task_name stringlengths 8 10 | source_code stringlengths 58 1.86k | x86 stringlengths 668 14.9k | arm_linux stringlengths 578 13.4k | riscv stringlengths 980 12.6k | arm_apple stringlengths 464 13.2k |
|---|---|---|---|---|---|
problem1 | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int func0(float numbers[], int size, float threshold) {
int i, j;
for (i = 0; i < size; i++)
for (j = i + 1; j < size; j++)
if (fabs(numbers[i] - numbers[j]) < threshold)
return 1;
return 0;
} | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst16,"aM",@progbits,16
.p2align 4, 0x0 # -- Begin function func0
.LCPI0_0:
.quad 0x7fffffffffffffff # double NaN
.quad 0x7fffffffffffffff # double NaN
.text
.globl func0
.p2align 4, 0x90
.type fun... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str w1, [sp, #12]
str s0, [sp, #8]
str wzr, [sp, #4]
b ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str w1, [sp, #12]
str s0, [... |
problem10 | #include <stdio.h>
#include <stdlib.h>
int *func0(int *numbers, int size) {
if (size <= 0) {
return NULL;
}
int *out = malloc(size * sizeof(int));
if (!out) {
return NULL;
}
int max = numbers[0];
for (int i = 0; i < size; i++) {
if (numbers[i] > max) max = ... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem100 | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int func0(const char *value) {
double w;
w = atof(value);
return (int)(w < 0 ? ceil(w - 0.5) : floor(w + 0.5));
} | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function func0
.LCPI0_0:
.quad 0x3fe0000000000000 # double 0.5
.text
.globl func0
.p2align 4, 0x90
.type func0,@function
func0: #... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function func0
.LCPI0_0:
.quad 0x3fe0000000000000 # double 0.5
.LCPI0_1:
.quad 0x4330000000000000 ... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem101 | #include <stdio.h>
#include <stdlib.h>
int* func0(int n) {
int* out = (int*)malloc(n * sizeof(int));
*out = n;
for (int i = 1; i < n; i++)
*(out + i) = *(out + i - 1) + 2;
return out;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem102 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char** func0(const char* s, int* count) {
int capacity = 10;
char** out = malloc(capacity * sizeof(char*));
char* current = malloc(strlen(s) + 1);
int word_count = 0;
int current_length = 0;
for (int i = 0; s[i]; i++) {
if (s[i... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem103 | #include <stdio.h>
int func0(int x, int y) {
if (y < x) return -1;
if (y == x && y % 2 == 1) return -1;
if (y % 2 == 1) return y - 1;
return y;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
str w1, [sp, #4]
ldr w8, [sp, #4]
ldr w9, [sp, #8]
subs ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -32
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
str w1, [sp, #4]
ldr w8, [sp... |
problem104 | #include <stdio.h>
#include <stdlib.h>
char* func0(int n, int m) {
if (n > m) return "-1";
int num = (m + n) / 2;
char* out = (char*)malloc(33);
out[0] = '\0';
int index = 32;
out[index--] = '\0';
do {
out[index--] = '0' + num % 2;
num /= 2;
} while (num > 0);
ret... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem105 | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
void func0(int *x, int size, int **out, int *out_size) {
*out = malloc(size * sizeof(int));
*out_size = 0;
for (int i = 0; i < size; i++) {
int num = x[i];
bool has_even_digit = false;
if (num == 0) has_even_digit = true;
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem106 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
void func0(int *arr, int size, char ***out, int *out_size) {
char *names[] = {"", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};
int i, j;
for (i = 0; i < size - 1; i++) {
for (j = 0; j < size - i - 1; j++) {
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #144
.cfi_def_cfa_offset 144
stp x29, x30, [sp, #128] // 16-byte Folded Spill
add x29, sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -160
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #160
stp x29, x30, [sp, #144] ; 16-byte Folded Spill
add x29, s... |
problem107 | #include <stdio.h>
#include <stdlib.h>
int* func0(int n) {
int* out = (int*)malloc(n * sizeof(int));
int sum = 0, prod = 1;
for (int i = 1; i <= n; i++) {
sum += i;
prod *= i;
if (i % 2 == 0) out[i - 1] = prod;
else out[i - 1] = sum;
}
return out;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem108 | #include <stdio.h>
#include <stdlib.h>
int* func0(int n) {
int* counts = (int*)malloc(2 * sizeof(int));
counts[0] = 0;
counts[1] = 0;
for (int i = 1; i <= n; i++) {
int reversed = 0, original = i;
int number = i;
while (number != 0) {
reversed = reversed * 10 + num... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem109 | #include <stdio.h>
#include <stdlib.h>
int func0(int *n, int size) {
int num = 0;
for (int i = 0; i < size; i++) {
if (n[i] > 0) {
num += 1;
} else {
int sum = 0;
int w = abs(n[i]);
while (w >= 10) {
sum += w % 10;
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem11 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *func0(const char *str) {
int len = strlen(str), i, j;
char *result = (char *)malloc(2 * len + 1);
if (!result) {
return NULL;
}
for (i = 0; i < len; i++) {
int is_palindrome = 1;
for (j = 0; j < (len - i) / 2... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem110 | #include <stdio.h>
#include <stdbool.h>
bool func0(int *arr, int size) {
int num = 0;
if (size == 0) return true;
for (int i = 1; i < size; i++)
if (arr[i] < arr[i - 1]) num += 1;
if (arr[size - 1] > arr[0]) num += 1;
if (num < 2) return true;
return false;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str w1, [sp, #12]
str wzr, [sp, #8]
ldr w8, [sp, #12]
s... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str w1, [sp, #12]
str wzr, ... |
problem111 | #include <stdio.h>
const char* func0(int *lst1, int size1, int *lst2, int size2) {
int num = 0;
for (int i = 0; i < size1; i++)
if (lst1[i] % 2 == 0) num += 1;
for (int i = 0; i < size2; i++)
if (lst2[i] % 2 == 0) num += 1;
if (num >= size1) return "YES";
return "NO";
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #32]
str w1, [sp, #28]
str x2, [sp, #16]
str w3, [sp, #12]
s... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #32]
str w1, [sp, #28]
str x2, [... |
problem112 | #include <stdio.h>
#include <string.h>
void func0(const char* test, int* freq, int* max_count, char* letters) {
int local_freq[26] = {0}; // for 'a' to 'z'
int local_max = 0;
const char* ptr = test;
int idx = 0;
while (*ptr) {
if (*ptr != ' ') {
int letter_index = *ptr - 'a';
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #192
.cfi_def_cfa_offset 192
stp x29, x30, [sp, #176] // 16-byte Folded Spill
add x29, sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -192
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #192
stp x29, x30, [sp, #176] ; 16-byte Folded Spill
add x29, s... |
problem113 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
void func0(const char *s, const char *c, char *result, char *palindrome) {
int len = strlen(s);
char *n = malloc((len + 1) * sizeof(char));
int ni = 0;
for (int i = 0; s[i] != '\0'; i++) {
const char *temp = c;
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] // 16-byte Folded Spill
add x29, sp, #80... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -128
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #112
stp x29, x30, [sp, #96] ; 16-byte Folded Spill
add x29, s... |
problem114 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char **func0(char *lst[], int size) {
char **out = malloc(size * sizeof(char *));
for (int i = 0; i < size; i++) {
int sum = 0;
for (int j = 0; lst[i][j] != '\0'; j++) {
if (lst[i][j] >= '0' && lst[i][j] <= '9' && (lst[i][j]... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem115 | #include <stdio.h>
long long func0(long long *nums, int size) {
long long current = nums[0];
long long min = nums[0];
for (int i = 1; i < size; i++) {
current = current < 0 ? current + nums[i] : nums[i];
if (current < min) min = current;
}
return min;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
ldr x8, [sp, #40]
ldr x8, [x8]
str x8... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
ldr x8, [... |
problem116 | #include <stdio.h>
int func0(int **grid, int rows, int cols, int capacity) {
int out = 0;
for (int i = 0; i < rows; i++) {
int sum = 0;
for (int j = 0; j < cols; j++)
sum += grid[i][j];
if (sum > 0) out += (sum + capacity - 1) / capacity;
}
return out;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
str w2, [sp, #32]
str w3, [sp, #28]
s... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
str w2, [... |
problem117 | #include <stdio.h>
#include <stdlib.h>
void func0(int *arr, int size) {
int count_ones, x, y, temp;
for (int i = 0; i < size; i++) {
for (int j = i + 1; j < size; j++) {
count_ones = 0;
x = arr[i];
y = arr[j];
while (x > 0) {
count_ones +=... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
str wzr, [sp, #16]
b .LBB0_1
.LBB0_1: ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
str wzr, ... |
problem118 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
char **func0(const char *s, int n, int *returnSize) {
const char *vowels = "aeiouAEIOU";
char **out = NULL;
int numc = 0, word_count = 0, begin = 0;
size_t length = strlen(s);
char *current = (char *)malloc(length + 1);
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] // 16-byte Folded Spill
add x29, sp, #80... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -112
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp... |
problem119 | #include <stdio.h>
#include <string.h>
char *func0(const char *word) {
static char out[2] = {0};
const char *vowels = "AEIOUaeiou";
size_t len = strlen(word);
for (int i = len - 2; i >= 1; i--) {
if (strchr(vowels, word[i]) && !strchr(vowels, word[i + 1]) && !strchr(vowels, word[i - 1])) {... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem12 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *func0(const char *a, const char *b) {
int len_a = strlen(a);
int len_b = strlen(b);
int min_len = len_a < len_b ? len_a : len_b;
char *output = malloc((min_len + 1) * sizeof(char));
if (!output) return NULL;
for (int i = 0; i < m... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem120 | #include <stdio.h>
#include <string.h>
const char *func0(const char *s1, const char *s2) {
int count = 0;
int len1 = strlen(s1);
int len2 = strlen(s2);
int i;
int can = 1;
for (i = 0; i < len1; i++) {
if (s1[i] == '(') count++;
if (s1[i] == ')') count--;
if (count < 0) ... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem121 | #include <stdio.h>
#include <stdlib.h>
void func0(int* arr, int arr_size, int k, int* out) {
for (int i = 0; i < arr_size - 1; i++) {
for (int j = 0; j < arr_size - i - 1; j++) {
if (arr[j] > arr[j + 1]) {
int temp = arr[j];
arr[j] = arr[j + 1];
a... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
str w2, [sp, #32]
str x3, [sp, #24]
s... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
str w2, [... |
problem122 | #include <stdio.h>
int func0(int* lst, int size) {
int sum = 0;
for (int i = 0; i * 2 < size; i++)
if (lst[i * 2] % 2 == 1) sum += lst[i * 2];
return sum;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, [sp, #16]
str wzr, [sp, #12]
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, ... |
problem123 | #include <stdio.h>
int func0(int arr[], int k) {
int sum = 0;
for (int i = 0; i < k; i++)
if (arr[i] >= -99 && arr[i] <= 99)
sum += arr[i];
return sum;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, [sp, #16]
str wzr, [sp, #12]
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, ... |
problem124 | #include <stdio.h>
#include <stdlib.h>
void func0(int n, int *out, int *size) {
int capacity = 10;
*size = 1;
out[0] = 1;
while (n != 1) {
if (n % 2 == 1) {
if (*size >= capacity) {
capacity *= 2;
out = (int*)realloc(out, capacity * sizeof(int));... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem125 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int func0(const char *date) {
int mm, dd, yy;
if (strlen(date) != 10) return 0;
for (int i = 0; i < 10; i++) {
if (i == 2 || i == 5) {
if (date[i] != '-') return 0;
} else {
if (date[i] < '0' || date[i] > '9... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem126 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
char **func0(const char *txt, int *returnSize) {
int i, j = 0, num = 0, count = 0;
int len = strlen(txt);
char **out = NULL;
char current[101] = {0};
if (strchr(txt, ' ') || strchr(txt, ',')) {
out = malloc(sizeo... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #192
.cfi_def_cfa_offset 192
stp x29, x30, [sp, #176] // 16-byte Folded Spill
add x29, sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -192
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #208
stp x29, x30, [sp, #192] ; 16-byte Folded Spill
add x29, s... |
problem127 | #include <stdio.h>
#include <stdbool.h>
bool func0(const int *lst, int lst_size) {
if (lst_size == 0) return true;
for (int i = 1; i < lst_size; i++) {
if (lst[i] < lst[i - 1]) return false;
if (i >= 2 && lst[i] == lst[i - 1] && lst[i] == lst[i - 2]) return false;
}
return true;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str w1, [sp, #12]
ldr w8, [sp, #12]
subs w8, w8, #0
cse... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str w1, [sp, #12]
ldr w8, [... |
problem128 | #include <stdio.h>
const char* func0(int interval1_start, int interval1_end, int interval2_start, int interval2_end) {
int inter1, inter2, l, i;
inter1 = interval1_start > interval2_start ? interval1_start : interval2_start;
inter2 = interval1_end < interval2_end ? interval1_end : interval2_end;
l = in... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str w0, [sp, #36]
str w1, [sp, #32]
str w2, [sp, #28]
str w3, [sp, #24]
l... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str w0, [sp, #36]
str w1, [sp, #32]
str w2, [... |
problem129 | #include <stdio.h>
#include <stdlib.h>
int func0(int *arr, int arr_size) {
if (arr_size == 0) return -32768;
int sum = 0, prods = 1, i;
for (i = 0; i < arr_size; i++) {
sum += abs(arr[i]);
if (arr[i] == 0) prods = 0;
if (arr[i] < 0) prods = -prods;
}
return sum * prods;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem13 | #include <stdio.h>
#include <string.h>
char *func0(char **strings, int count) {
char *out = "";
int longest_length = 0;
for (int i = 0; i < count; i++) {
int current_length = strlen(strings[i]);
if (current_length > longest_length) {
out = strings[i];
longest_length ... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem130 | #include <stdio.h>
#include <stdlib.h>
int *func0(int **grid, int N, int k, int *returnSize) {
int i, j, x, y, min;
for (i = 0; i < N; i++)
for (j = 0; j < N; j++)
if (grid[i][j] == 1) {
x = i;
y = j;
}
min = N * N;
if (x > 0 && grid[x - 1... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem131 | #include <stdio.h>
#include <stdlib.h>
int* func0(int n) {
int* out = (int*)malloc((n + 1) * sizeof(int));
out[0] = 1;
if (n == 0) return out;
out[1] = 3;
for (int i = 2; i <= n; i++) {
if (i % 2 == 0) out[i] = 1 + i / 2;
else out[i] = out[i - 1] + out[i - 2] + 1 + (i + 1) / 2;
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem132 | #include <stdio.h>
int func0(int n) {
int prod = 1, has_odd = 0, digit;
while (n > 0) {
digit = n % 10;
if (digit % 2 == 1) {
has_odd = 1;
prod *= digit;
}
n /= 10;
}
return has_odd ? prod : 0;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
mov w8, #1 // =0x1
str w8, [sp, ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
mov w8, #1 ... |
problem133 | #include <stdio.h>
#include <string.h>
int func0(const char *str) {
int count = 0, maxcount = 0;
for (int i = 0; i < strlen(str); i++) {
if (str[i] == '[') count += 1;
if (str[i] == ']') count -= 1;
if (count < 0) count = 0;
if (count > maxcount) maxcount = count;
if (co... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem134 | #include <stdio.h>
#include <math.h>
int func0(float *lst, int size) {
int sum = 0;
for (int i = 0; i < size; i++) {
sum += (int)ceil(lst[i]) * (int)ceil(lst[i]);
}
return sum;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, [sp, #16]
str wzr, [sp, #12]
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, ... |
problem135 | #include <stdio.h>
#include <string.h>
#include <ctype.h>
int func0(const char *txt) {
int len = strlen(txt);
if (len == 0) return 0;
char last_char = txt[len - 1];
if (!isalpha((unsigned char)last_char)) return 0;
if (len == 1) return 1;
char second_last_char = txt[len - 2];
if (isalpha((u... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem136 | #include <stdio.h>
int func0(int *arr, int size) {
int max = -1;
for (int i = 1; i < size; ++i) {
if (arr[i] < arr[i - 1]) max = i;
}
return max;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
mov w8, #-1 // ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
mov w8, #... |
problem137 | #include <stdio.h>
void func0(const int *lst, int size, int result[2]) {
int maxneg = 0;
int minpos = 0;
for (int i = 0; i < size; i++) {
if (lst[i] < 0 && (maxneg == 0 || lst[i] > maxneg)) maxneg = lst[i];
if (lst[i] > 0 && (minpos == 0 || lst[i] < minpos)) minpos = lst[i];
}
resul... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
str x2, [sp, #24]
str wzr, [sp, #20]
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
str x2, [... |
problem138 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char* func0(const char* a, const char* b) {
char *end;
char *a_modified = strdup(a);
char *b_modified = strdup(b);
// Replace ',' with '.' if present for atof conversion
for (int i = 0; a_modified[i]; ++i) if (a_modified[i] == ',') a_modif... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] // 16-byte Folded Spill
add x29, sp, #80... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -96
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp... |
problem139 | #include <stdio.h>
int func0(int n) {
if (n % 2 == 0 && n >= 8) return 1;
return 0;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
ldr w8, [sp, #8]
mov w10, #2 // =0... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -32
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
ldr w8, [sp, #8]
mov w10, #2... |
problem14 | #include <stdio.h>
int func0(int a, int b) {
while (b != 0) {
int m = a % b;
a = b;
b = m;
}
return a;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str w1, [sp, #8]
b .LBB0_1
.LBB0_1: ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -32
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str w1, [sp, #8]
b LBB0_1
L... |
problem140 | #include <stdio.h>
long long func0(int n) {
long long fact = 1, bfact = 1;
for (int i = 1; i <= n; i++) {
fact = fact * i;
bfact = bfact * fact;
}
return bfact;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
mov x8, #1 // =0x1
str x8, [sp, ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
mov x8, #1 ... |
problem141 | #include <stdio.h>
#include <string.h>
void func0(const char *text, char *out) {
int space_len = 0;
int j = 0;
for (int i = 0; i < strlen(text); i++) {
if (text[i] == ' ') {
space_len++;
} else {
if (space_len == 1) out[j++] = '_';
if (space_len == 2) out... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem142 | #include <stdio.h>
#include <string.h>
const char* func0(const char* file_name) {
int num_digit = 0, num_dot = 0;
int length = strlen(file_name);
if (length < 5) return "No";
char w = file_name[0];
if (w < 'A' || (w > 'Z' && w < 'a') || w > 'z') return "No";
const char* last = file_name + lengt... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem143 | #include <stdio.h>
int func0(int* lst, int size) {
int sum = 0;
for (int i = 0; i < size; i++) {
if (i % 3 == 0) sum += lst[i] * lst[i];
else if (i % 4 == 0) sum += lst[i] * lst[i] * lst[i];
else sum += lst[i];
}
return sum;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, [sp, #16]
str wzr, [sp, #12]
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, ... |
problem144 | #include <stdio.h>
#include <string.h>
#include <stdbool.h>
void func0(const char* sentence, char* out) {
int index = 0, word_len = 0;
int out_index = 0;
bool is_prime;
int i, j;
for (i = 0; sentence[i] != '\0'; ++i) {
if (sentence[i] != ' ') {
word_len++;
} else {
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem145 | #include <stdio.h>
#include <stdlib.h>
int func0(const char* x, const char* n){
int a, b, c, d, i, j;
char num[101], den[101];
for (i = 0; x[i] != '/'; i++) {
num[i] = x[i];
}
num[i] = '\0';
a = atoi(num);
for (j = 0, i = i + 1; x[i] != '\0'; i++, j++) {
den[j] = x[i];
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #304
.cfi_def_cfa_offset 304
stp x29, x30, [sp, #272] // 16-byte Folded Spill
str x28, [sp, ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -304
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #304
stp x28, x27, [sp, #272] ; 16-byte Folded Spill
stp x29, x... |
problem146 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int* func0(int nums[], int size) {
int* sumdigit = (int*)malloc(size * sizeof(int));
for (int i = 0; i < size; i++) {
char w[12]; // Assuming the integer won't exceed the length of an int in string form.
sprintf(w, "%d", abs(nums[i]));
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] // 16-byte Folded Spill
add x29, sp, #80... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -96
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #128
stp x29, x30, [sp, #112] ; 16-byte Folded Spill
add x29, s... |
problem147 | #include <stdio.h>
#include <stdlib.h>
int func0(int nums[], int size) {
int num = 0;
for (int i = 0; i < size; i++) {
if (nums[i] > 10) {
int first, last;
last = nums[i] % 10;
int n = nums[i];
while (n >= 10) {
n /= 10;
}
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, [sp, #16]
str wzr, [sp, #12]
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, ... |
problem148 | #include <stdio.h>
#include <stdlib.h>
int func0(int n) {
int *a = (int *)malloc(n * sizeof(int));
int **sum = (int **)malloc((n + 1) * sizeof(int *));
int **sum2 = (int **)malloc((n + 1) * sizeof(int *));
for (int i = 0; i <= n; i++) {
sum[i] = (int *)calloc(3, sizeof(int));
sum2[i] = ... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #112
.cfi_def_cfa_offset 112
stp x29, x30, [sp, #96] // 16-byte Folded Spill
add x29, sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -112
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #112
stp x29, x30, [sp, #96] ; 16-byte Folded Spill
add x29, s... |
problem149 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
char** func0(const char* planet1, const char* planet2, int* returnSize) {
const char* planets[] = {"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"};
int pos1 = -1, pos2 = -1, m;
for (m = 0; m < 8; m++) {
if (st... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #144
.cfi_def_cfa_offset 144
stp x29, x30, [sp, #128] // 16-byte Folded Spill
add x29, sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -144
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #160
stp x29, x30, [sp, #144] ; 16-byte Folded Spill
add x29, s... |
problem15 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char **func0(const char *str, int *count) {
int len = strlen(str);
char **out = malloc(len * sizeof(char *));
char *current = malloc(len + 1);
current[0] = '\0';
for (int i = 0; i < len; ++i) {
size_t current_len = strlen(curr... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem150 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char** func0(char **lst, int lst_size, int *return_size) {
int i, j;
char *temp;
*return_size = 0;
for (i = 0; i < lst_size; ++i) {
if (strlen(lst[i]) % 2 == 0) {
lst[*return_size] = lst[i];
(*return_size)++;
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem151 | #include <stdio.h>
int func0(int n, int x, int y) {
int isp = 1;
if (n < 2) isp = 0;
for (int i = 2; i * i <= n; i++) {
if (n % i == 0) isp = 0;
}
if (isp) return x;
return y;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #24]
str w1, [sp, #20]
str w2, [sp, #16]
mov w8, #1 ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #24]
str w1, [sp, #20]
str w2, [... |
problem152 | #include <stdio.h>
#include <math.h>
long long func0(float lst[], int lst_size) {
long long sum = 0;
for (int i = 0; i < lst_size; i++) {
if (fabs(lst[i] - round(lst[i])) < 1e-4) {
if (lst[i] > 0 && (int)(round(lst[i])) % 2 == 1) {
sum += (int)(round(lst[i])) * (int)(round(l... | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function func0
.LCPI0_0:
.quad 0x3f1a36e2eb1c432d # double 1.0E-4
.section .rodata.cst16,"aM",@progbits,16
.p2align 4, 0x0
.LCPI0_1:
.quad 0x7fffffffffffffff ... | .text
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 // -- Begin function func0
.LCPI0_0:
.xword 0x3f1a36e2eb1c432d // double 1.0E-4
.text
.globl func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function func0
.LCPI0_0:
.quad 0x4330000000000000 # double 4503599627370496
.LCPI0_1:
.quad 0x3f1a36e2eb1c4... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.section __TEXT,__literal8,8byte_literals
.p2align 3, 0x0 ; -- Begin function func0
lCPI0_0:
.quad 0x3f1a36e2eb1c432d ; double 1.0E-4
.section __TEXT,__text,regular,pure_instructions
.globl _func0
... |
problem153 | #include <stdio.h>
#include <stdlib.h>
void func0(int* game, int* guess, int* out, int length) {
for (int i = 0; i < length; i++) {
out[i] = abs(game[i] - guess[i]);
}
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem154 | #include <stdio.h>
#include <string.h>
void func0(const char* class_name, const char** extensions, int ext_count, char* output) {
int max_strength = -1000;
const char* strongest = NULL;
for (int i = 0; i < ext_count; i++) {
const char* extension = extensions[i];
int strength = 0;
fo... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] // 16-byte Folded Spill
add x29, sp, #80... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -96
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #112
stp x29, x30, [sp, #96] ; 16-byte Folded Spill
add x29, s... |
problem155 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
bool func0(const char *a, const char *b) {
int len_a = strlen(a);
int len_b = strlen(b);
char *temp = (char *)malloc(2 * len_b + 1);
for (int i = 0; i < len_b; i++) {
strncpy(temp, b + i, len_b - i);
strncp... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem156 | #include <stdio.h>
#include <stdlib.h>
void func0(int num, int *result) {
int even_count = 0, odd_count = 0;
num = abs(num);
do {
int digit = num % 10;
if (digit % 2 == 0) {
even_count++;
} else {
odd_count++;
}
num /= 10;
} while (nu... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem157 | #include <stdio.h>
#include <string.h>
void func0(int number, char *result) {
const char *rep[] = {"m", "cm", "d", "cd", "c", "xc", "l", "xl", "x", "ix", "v", "iv", "i"};
const int num[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1};
int pos = 0;
result[0] = '\0';
while(number > 0) {
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #192
.cfi_def_cfa_offset 192
stp x29, x30, [sp, #176] // 16-byte Folded Spill
add x29, sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -208
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #208
stp x29, x30, [sp, #192] ; 16-byte Folded Spill
add x29, s... |
problem158 | #include <stdio.h>
#include <math.h>
int func0(float a, float b, float c) {
if (fabs(a*a + b*b - c*c) < 1e-4 || fabs(a*a + c*c - b*b) < 1e-4 || fabs(b*b + c*c - a*a) < 1e-4) return 1;
return 0;
} | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function func0
.LCPI0_0:
.quad 0x3f1a36e2eb1c432d # double 1.0E-4
.section .rodata.cst16,"aM",@progbits,16
.p2align 4, 0x0
.LCPI0_1:
.quad 0x7fffffffffffffff ... | .text
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 // -- Begin function func0
.LCPI0_0:
.xword 0x3f1a36e2eb1c432d // double 1.0E-4
.text
.globl func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function func0
.LCPI0_0:
.quad 0x3f1a36e2eb1c432d # double 1.0E-4
.text
.globl func0
.p2align 1
.type fu... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.section __TEXT,__literal8,8byte_literals
.p2align 3, 0x0 ; -- Begin function func0
lCPI0_0:
.quad 0x3f1a36e2eb1c432d ; double 1.0E-4
.section __TEXT,__text,regular,pure_instructions
.globl _func0
... |
problem159 | #include <stdio.h>
#include <string.h>
char *func0(char *words[], int count) {
char *max = "";
int maxu = 0;
for (int i = 0; i < count; i++) {
char unique[256] = {0};
int unique_count = 0;
for (int j = 0; words[i][j] != '\0'; j++) {
if (!strchr(unique, words[i][j])) {
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #352
.cfi_def_cfa_offset 352
stp x29, x30, [sp, #320] // 16-byte Folded Spill
str x28, [sp, ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -336
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #368
stp x28, x27, [sp, #336] ; 16-byte Folded Spill
stp x29, x... |
problem16 | #include <stdio.h>
#include <stdlib.h>
char *func0(int n) {
int len = 2;
for (int i = 1; i <= n; ++i) {
len += snprintf(NULL, 0, " %d", i);
}
char *out = malloc(len);
if (!out) {
return NULL;
}
char *ptr = out;
ptr += sprintf(ptr, "0");
for (int i = 1; i <= n;... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem160 | #include <stdio.h>
void func0(int number, int need, int remaining, int result[2]) {
if (need > remaining) {
result[0] = number + remaining;
result[1] = 0;
} else {
result[0] = number + need;
result[1] = remaining - need;
}
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str w1, [sp, #24]
str w2, [sp, #20]
str x3, [sp, #8]
ld... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str w1, [sp, #24]
str w2, [... |
problem161 | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
int func0(const char **operato, const int *operand, int operato_size, int operand_size) {
int *num = (int*)malloc(operand_size * sizeof(int));
int *posto = (int*)malloc(operand_size * sizeof(int));
for (int i = 0; i < operand_size... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem162 | #include <stdio.h>
#include <string.h>
#include <ctype.h>
char* func0(char *s){
int nletter = 0;
int length = strlen(s);
for (int i = 0; i < length; i++) {
if (isalpha((unsigned char)s[i])) {
if (isupper((unsigned char)s[i])) s[i] = tolower((unsigned char)s[i]);
else if (isl... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem163 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
// CRC32 function
char* func0(const char* text) {
if(strlen(text) == 0) {
return strdup("None");
}
unsigned int crc = 0xFFFFFFFF;
unsigned int i, j;
unsigned char byte;
for(i = 0; text[i] != '\0'; i++) {
byte = text[i... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem164 | #include <stdio.h>
void func0(int a, int b, int *out, int *size) {
int m;
*size = 0;
if (b < a) {
m = a;
a = b;
b = m;
}
for (int i = a; i <= b; i++) {
if (i < 10 && i % 2 == 0) {
out[(*size)++] = i;
}
}
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str w1, [sp, #24]
str x2, [sp, #16]
str x3, [sp, #8]
ld... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str w1, [sp, #24]
str x2, [... |
problem17 | #include <stdio.h>
#include <string.h>
#include <ctype.h>
int func0(const char *str) {
int count = 0;
int char_map[256] = {0};
int index;
for (index = 0; str[index]; index++) {
char ch = tolower((unsigned char)str[index]);
if (char_map[ch] == 0 && isalpha((unsigned char)ch)) {
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
stp x29, x30, [sp, #-32]! // 16-byte Folded Spill
.cfi_def_cfa_offset 32
str x28, [sp, #16] ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -1088
.cfi_def_cf... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
stp x29, x30, [sp, #16] ... |
problem18 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int *func0(const char *music_string, int *count) {
int *out = NULL;
int size = 0;
int capacity = 0;
char current[3] = "";
int music_string_length = strlen(music_string) + 1;
char *temp_music_string = malloc(music_string_length + 1);
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] // 16-byte Folded Spill
add x29, sp, #80... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -112
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #112
stp x29, x30, [sp, #96] ; 16-byte Folded Spill
add x29, s... |
problem19 | #include <stdio.h>
#include <string.h>
int func0(const char *str, const char *substring) {
int out = 0;
int str_len = strlen(str);
int sub_len = strlen(substring);
if (str_len == 0) return 0;
for (int i = 0; i <= str_len - sub_len; i++) {
if (strncmp(&str[i], substring, sub_len) == 0)
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem2 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char** func0(const char* paren_string, int* group_count) {
int length = strlen(paren_string);
int level = 0;
int capacity = 10;
char** groups = malloc(capacity * sizeof(char*));
char* buffer = malloc(length + 1);
int buffer_index = 0;
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -96
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem20 | #include <stdio.h>
#include <string.h>
const char* func0(const char* numbers) {
int count[10] = {0};
const char* numto[10] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
int index, i, j, k;
static char out[1000];
char current[6];
index = 0;
if (*numbe... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #192
.cfi_def_cfa_offset 192
stp x29, x30, [sp, #176] // 16-byte Folded Spill
add x29, sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -192
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #192
stp x29, x30, [sp, #176] ; 16-byte Folded Spill
add x29, s... |
problem21 | #include <stdio.h>
#include <math.h>
#include <float.h>
void func0(float numbers[], int size, float out[2]) {
float min_diff = FLT_MAX;
int i, j;
out[0] = numbers[0];
out[1] = numbers[1];
for (i = 0; i < size; i++) {
for (j = i + 1; j < size; j++) {
float diff = fabs(numbers[i... | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function func0
.LCPI0_0:
.long 0x7f7fffff # float 3.40282347E+38
.section .rodata.cst16,"aM",@progbits,16
.p2align 4, 0x0
.LCPI0_1:
.quad 0x7ffffffffffffff... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
str x2, [sp, #24]
mov w8, #2139095039 ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, #40]
str w1, [sp, #36]
str x2, [... |
problem22 | #include <stdio.h>
#include <math.h>
void func0(float *numbers, int size) {
float min = numbers[0], max = numbers[0];
for (int i = 1; i < size; i++) {
if (numbers[i] < min) min = numbers[i];
if (numbers[i] > max) max = numbers[i];
}
for (int i = 0; i < size; i++) {
numbers[i] = ... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
ldr x8, [sp, #24]
ldr s0, [x8]
str s0... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
ldr x8, [... |
problem23 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int *func0(const char *values, int *size) {
static int out[256];
int count = 0;
const char *start = values;
char *end;
while (*start) {
while (*start && !isdigit(*start) && *start != '-') {
start++;
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem24 | #include <stdio.h>
int func0(const char *str) {
int length = 0;
while (str[length] != '\0') {
length++;
}
return length;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
str wzr, [sp, #4]
b .LBB0_1
.LBB0_1: ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -32
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
str wzr, [sp, #4]
b LBB0_1
L... |
problem25 | #include <stdio.h>
int func0(int n) {
for (int i = 2; i * i <= n; i++)
if (n % i == 0) return n / i;
return 1;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
mov w8, #2 // =0x2
str w8, [sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -32
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
mov w8, #2 ... |
problem26 | #include <stdio.h>
#include <stdlib.h>
int* func0(int n, int* size) {
int* out = malloc(sizeof(int) * 64);
*size = 0;
for (int i = 2; i * i <= n; i++) {
while (n % i == 0) {
n = n / i;
out[(*size)++] = i;
}
}
if (n > 1) {
out[(*size)++] = n;
}
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem27 | #include <stdio.h>
#include <stdlib.h>
int* func0(int* numbers, int size, int* new_size) {
int* out = (int*)malloc(size * sizeof(int));
int* has1 = (int*)calloc(size, sizeof(int));
int* has2 = (int*)calloc(size, sizeof(int));
int has1_count = 0;
int has2_count = 0;
int out_count = 0;
for (... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #128
.cfi_def_cfa_offset 128
stp x29, x30, [sp, #112] // 16-byte Folded Spill
add x29, sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -128
.cfi_def_cfa... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #128
stp x29, x30, [sp, #112] ; 16-byte Folded Spill
add x29, s... |
problem28 | #include <stdio.h>
#include <string.h>
void func0(const char* str, char* out) {
int length = strlen(str);
for (int i = 0; i < length; i++) {
char w = str[i];
if (w >= 'a' && w <= 'z') {
w -= 32;
} else if (w >= 'A' && w <= 'Z') {
w += 32;
}
out[i]... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp... |
problem29 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
char* func0(char** strings, int count) {
int length = 0;
for (int i = 0; i < count; i++) {
length += strlen(strings[i]);
}
char* out = (char*)malloc(length + 1);
if (!out) {
return NULL;
}
out[0] = '\0';
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem3 | #include <stdio.h>
#include <math.h>
float func0(float number) {
return number - (int)number;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str s0, [sp, #12]
ldr s0, [sp, #12]
ldr s1, [sp, #12]
fcvtzs s1, s1
scvtf... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -32
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str s0, [sp, #12]
ldr s0, [sp, #12]
ldr s1, [... |
problem30 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int func0(char** strings, int count, const char* prefix, char*** out) {
int prefix_length = strlen(prefix);
*out = (char**)malloc(count * sizeof(char*));
int out_count = 0;
for (int i = 0; i < count; i++) {
if (strncmp(strings[i], pref... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem31 | #include <stdio.h>
#include <stdlib.h>
float* func0(const float* l, int count, int* out_count) {
float* out = (float*)malloc(count * sizeof(float));
*out_count = 0;
for (int i = 0; i < count; i++) {
if (l[i] > 0) {
out[(*out_count)++] = l[i];
}
}
return out;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem32 | #include <stdbool.h>
bool func0(long long n) {
if (n < 2) return false;
for (long long i = 2; i * i <= n; i++)
if (n % i == 0) return false;
return true;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
ldr x8, [sp, #16]
subs x8, x8, #2
cset w8, ge
tbnz w8, ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
ldr x8, [sp, #16]
subs x8, ... |
problem33 | #include <stdio.h>
#include <math.h>
double func0(const double *xs, int size) {
double ans = 0.0;
double value, driv, x_pow;
int i;
value = xs[0];
for (i = 1; i < size; i++) {
x_pow = 1.0;
for (int j = 0; j < i; j++) {
x_pow *= ans;
}
value += xs[i] * x_... | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function func0
.LCPI0_0:
.quad 0x3eb0c6f7a0b5ed8d # double 9.9999999999999995E-7
.LCPI0_2:
.quad 0x3ff0000000000000 # double 1
.section .rodata.cst16,"... | .text
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 // -- Begin function func0
.LCPI0_0:
.xword 0x3eb0c6f7a0b5ed8d // double 9.9999999999999995E-7
.text
.globl func0
.p2align 2
.type func0,@function
func0: // @func0
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function func0
.LCPI0_0:
.quad 0x3eb0c6f7a0b5ed8d # double 9.9999999999999995E-7
.text
.globl func0
.p2al... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.section __TEXT,__literal8,8byte_literals
.p2align 3, 0x0 ; -- Begin function func0
lCPI0_0:
.quad 0x3eb0c6f7a0b5ed8d ; double 9.9999999999999995E-7
.section __TEXT,__text,regular,pure_instructions
... |
problem34 | #include <stdio.h>
#include <stdlib.h>
void func0(int *l, int size, int *out) {
int *third = malloc((size / 3 + 1) * sizeof(int));
int i, k = 0, third_size = 0;
for (i = 0; i * 3 < size; i++) {
third[i] = l[i * 3];
third_size++;
}
for (i = 0; i < third_size - 1; i++) {
int... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem35 | #include <stdio.h>
#include <stdlib.h>
int *func0(int *l, int size, int *out_size) {
int *out = malloc(size * sizeof(int));
int found, out_count = 0, i, j;
for (i = 0; i < size; i++) {
found = 0;
for (j = 0; j < out_count; j++) {
if (l[i] == out[j]) {
found = 1;
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add x29, sp, #64... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp... |
problem36 | #include <stdio.h>
float func0(float *l, int size) {
float max = -10000;
for (int i = 0; i < size; i++)
if (max < l[i]) max = l[i];
return max;
} | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function func0
.LCPI0_0:
.long 0xc61c4000 # float -1.0E+4
.text
.globl func0
.p2align 4, 0x90
.type func0,@function
func0: ... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
mov w8, #16384 // ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
mov w8, #... |
problem37 | #include <stdio.h>
int func0(int n) {
int count = 0;
for (int i = 0; i < n; i++)
if (i % 11 == 0 || i % 13 == 0) {
int q = i;
while (q > 0) {
if (q % 10 == 7) count += 1;
q = q / 10;
}
}
return count;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str wzr, [sp, #8]
str wzr, [sp, #4]
b .LBB0_1
.LBB0_1: ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -32
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str wzr, [sp, #8]
str wzr, ... |
problem38 | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
void func0(float *l, int size, float *out) {
float *even = malloc((size / 2 + 1) * sizeof(float));
int i, j, even_count = 0;
for (i = 0; i < size; i += 2) {
even[even_count++] = l[i];
}
for (i = 0; i < even_count - 1; i++) {
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -64
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem39 | #include <stdio.h>
#include <string.h>
void func0(char *s, int encode) {
int l = strlen(s);
int num = (l + 2) / 3;
char x[4];
for (int i = 0; i < num; ++i) {
int len = (i * 3 + 3 <= l) ? 3 : l - i * 3;
strncpy(x, s + i * 3, len);
x[len] = '\0';
if (len == 3) {
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Spill
add x29, sp, #48... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp... |
problem4 | #include <stdio.h>
int func0(int operations[], int size) {
int num = 0;
for (int i = 0; i < size; i++) {
num += operations[i];
if (num < 0) return 1;
}
return 0;
} | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str w1, [sp, #12]
str wzr, [sp, #8]
str wzr, [sp, #4]
b... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str w1, [sp, #12]
str wzr, ... |
problem40 | #include <stdio.h>
int func0(int n) {
int f1 = 1, f2 = 2, m;
int count = 0;
while (count < n) {
f1 = f1 + f2;
m = f1; f1 = f2; f2 = m;
int isprime = 1;
for (int w = 2; w * w <= f1; w++) {
if (f1 % w == 0) {
isprime = 0; break;
}
... | .text
.intel_syntax noprefix
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 4, 0x90
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register... | .text
.file "code.c"
.globl func0 // -- Begin function func0
.p2align 2
.type func0,@function
func0: // @func0
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #24]
mov w8, #1 // =0x1
str w8, [sp, ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl func0 # -- Begin function func0
.p2align 1
.type func0,@function
func0: # @func0
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.cfi_def_cfa_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _func0 ; -- Begin function func0
.p2align 2
_func0: ; @func0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #24]
mov w8, #1 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.