task_name stringlengths 8 10 | source_code stringlengths 58 1.86k | x86_64 stringlengths 668 14.9k | aarch64_linux stringlengths 578 13.4k | riscv64 stringlengths 980 12.6k | aarch64_apple stringlengths 464 13.2k |
|---|---|---|---|---|---|
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] ... |
problem81 | #include <string.h>
#include <stdbool.h>
bool func0(const char* s) {
if (strlen(s) < 3) return false;
for (int i = 2; i < strlen(s); i++)
if (s[i] == s[i-1] || s[i] == s[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, #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... |
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... |
problem41 | #include <stdio.h>
#include <stdbool.h>
bool func0(int *l, int size) {
for (int i = 0; i < size; i++)
for (int j = i + 1; j < size; j++)
for (int k = j + 1; k < size; k++)
if (l[i] + l[j] + l[k] == 0) 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]
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, -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, ... |
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... |
problem9 | #include <stdio.h>
void func0(int *numbers, int size, int *result) {
int sum = 0, product = 1;
for (int i = 0; i < size; i++) {
sum += numbers[i];
product *= numbers[i];
}
result[0] = sum;
result[1] = product;
} | .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, [... |
problem65 | #include <stdio.h>
#include <string.h>
#include <ctype.h>
int func0(const char *s) {
const char *vowels = "aeiouAEIOU";
int count = 0;
int length = strlen(s);
for (int i = 0; i < length; i++) {
if (strchr(vowels, s[i])) {
count++;
}
}
if (length > 0 && (s[l... | .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... |
problem57 | #include <stdio.h>
#include <stdbool.h>
#include <string.h>
bool func0(const char *brackets) {
int level = 0;
int i = 0;
while (brackets[i]) {
if (brackets[i] == '<') level++;
if (brackets[i] == '>') level--;
if (level < 0) return false;
i++;
}
if (level != 0) return... | .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 wzr, [sp, #12]
str wzr, [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, -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 wzr, [sp, #12]
str wzr,... |
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
... |
problem48 | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
float func0(float *l, int size) {
for (int i = 0; i < size; i++) {
for (int j = i + 1; j < size; j++) {
if (l[i] > l[j]) {
float temp = l[i];
l[i] = l[j];
l[j] = temp;
}
... | .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, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str w1, [sp, #12]
str wzr, [sp, #8]
b .LBB0_1
.LBB0_1: ... | .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
.text
.globl func0
.p2align 1
.type func0... | .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, ... |
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... |
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, ... |
problem71 | #include <stdio.h>
#include <stdlib.h>
void func0(int *lst, int size, int *out) {
for (int i = 0; i < size - 1; i++) {
for (int j = i + 1; j < size; j++) {
if (lst[i] > lst[j]) {
int temp = lst[i];
lst[i] = lst[j];
lst[j] = temp;
}
... | .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, [... |
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... |
problem54 | #include <stdio.h>
int func0(int x, int y) {
return x + 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, #12]
str w1, [sp, #8]
ldr w8, [sp, #12]
ldr w9, [sp, #8]
add... | .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]
ldr w8, [s... |
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... |
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... |
problem82 | #include <stdio.h>
#include <stdlib.h>
char** func0(float* grades, int size) {
char** out = malloc(size * sizeof(char*));
for (int i = 0; i < size; ++i) {
if (grades[i] >= 3.9999) out[i] = "A+";
else if (grades[i] > 3.7001) out[i] = "A";
else if (grades[i] > 3.3001) out[i] = "A-";
... | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function func0
.LCPI0_0:
.quad 0x400fffcb923a29c7 # double 3.9998999999999998
.LCPI0_1:
.quad 0x400d99ce075f6fd2 # double 3.7000999999999999
.LCPI0_2:
... | .text
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 // -- Begin function func0
.LCPI0_0:
.xword 0x3f1a36e2eb1c432d // double 1.0E-4
.LCPI0_1:
.xword 0x3fe667381d7dbf48 // double 0.70009999999999994
.LCPI0_2:
.xword 0x3ff00068db8bac71 ... | .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 0x400fffcb923a29c7 # double 3.9998999999999998
.LCPI0_1:
.quad 0x400d99ce075... | .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
lCPI0_1:
.quad 0x3fe667381d7dbf48 ; double 0.7000999... |
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, ... |
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 ... |
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... |
problem88 | #include <stdio.h>
#include <stdlib.h>
int **func0(int **lst, int lst_size, int *row_sizes, int x, int *return_size) {
int **out = (int **)malloc(100 * sizeof(int *));
int count = 0;
for (int i = 0; i < lst_size; i++) {
for (int j = row_sizes[i] - 1; j >= 0; j--) {
if (lst[i][j] == x) {... | .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... |
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... |
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... |
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... |
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, [... |
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... |
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
... |
problem68 | #include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
int func0(const char *s, int n) {
char num1[10] = "";
char num2[10] = "";
int is12 = 0, j = 0;
for (int i = 0; s[i] != '\0'; i++) {
if (isdigit(s[i])) {
if (is12 == 0) {
num1[j++] = s[i];
} 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, #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, #96
stp x29, x30, [sp, #80] ; 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... |
problem69 | #include <stdio.h>
#include <limits.h>
int *func0(int arr[], int length, int output[2]) {
int smallestEven = INT_MAX;
int index = -1;
for (int i = 0; i < length; ++i) {
if (arr[i] % 2 == 0 && (arr[i] < smallestEven || index == -1)) {
smallestEven = arr[i];
index = 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
str x0, [sp, #32]
str w1, [sp, #28]
str x2, [sp, #16]
mov w8, #2147483647 ... | .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, [... |
problem45 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
void func0(int x, int base, char *out) {
int index = 0;
char temp[33];
while (x > 0) {
temp[index++] = (x % base) + '0';
x = x / base;
}
int j = 0;
while(index > 0) {
out[j++] = temp[--index];
}
out[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
str w0, [sp, #60]
str w1, [sp, #56]
str x2, [sp, #48]
str wzr, [sp, #44]
... | .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, #96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp... |
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 ... |
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, [... |
problem87 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
char* func0(const char* s) {
int len = strlen(s);
char* out = malloc(len + 2);
char current[51];
int out_index = 0, current_index = 0;
for (int i = 0; i <= len; i++) {
if (s[i] == ' ' || s[i] == '\0') {
for (int j = 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, #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, #144
stp x29, x30, [sp, #128] ; 16-byte Folded Spill
add x29, s... |
problem73 | #include <stdio.h>
#include <stdbool.h>
bool func0(int q[], int size, int w) {
int sum = 0;
for (int i = 0; i < size / 2; i++) {
if (q[i] != q[size - 1 - i]) return false;
sum += q[i] + q[size - 1 - i];
}
if (size % 2 == 1) sum += q[size / 2];
return sum <= w;
} | .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 w2, [sp, #8]
str wzr, [sp, #4]
st... | .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 w2, [... |
problem78 | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
int func0(int a) {
for (int i = 0; i * i * i <= abs(a); i++)
if (i * i * i == abs(a)) 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, #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... |
problem89 | #include <stdio.h>
#include <stdlib.h>
void func0(int *array, int size, int **out_array, int *out_size) {
*out_size = size;
if (size == 0) {
*out_array = NULL;
return;
}
*out_array = (int *)malloc(sizeof(int) * size);
if (*out_array == NULL) {
exit(1);
}
for (int 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... |
problem99 | #include <stdio.h>
#include <string.h>
int func0(const char *s) {
const char *uvowel = "AEIOU";
int count = 0;
for (int i = 0; s[i] != '\0' && i * 2 < strlen(s); i++) {
if (strchr(uvowel, s[i * 2]) != NULL) {
count += 1;
}
}
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, #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... |
problem74 | #include <stdio.h>
int func0(int arr[], int size) {
int out = 0;
for (int i = 0; i < size / 2; i++) {
if (arr[i] != arr[size - 1 - i]) {
out++;
}
}
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, #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, ... |
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, ... |
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... |
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... |
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, [... |
problem7 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int* func0(const char* paren_string, int* returnSize) {
int* all_levels = NULL;
int level = 0, max_level = 0, i = 0, count = 0;
char chr;
for (i = 0; paren_string[i] != '\0'; i++) {
chr = paren_string[i];
if (chr == '(') {
... | .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... |
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... |
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, ... |
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... |
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... |
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... |
problem51 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
void func0(char *s, int encode) {
int shift = encode ? 5 : 21;
size_t len = strlen(s);
for (size_t i = 0; i < len; i++) {
int w = ((s[i] - 'a' + shift) % 26) + 'a';
s[i] = (char)w;
}
} | .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... |
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... |
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... |
problem8 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char **func0(char **strings, int size, const char *substring, int *out_size) {
char **out = NULL;
int count = 0;
for (int i = 0; i < size; i++) {
if (strstr(strings[i], substring) != NULL) {
out = (char **)realloc(out, sizeof(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:
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... |
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, [... |
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, [... |
problem94 | #include <stdio.h>
#include <ctype.h>
#include <string.h>
void func0(const char* message, char* out) {
const char* vowels = "aeiouAEIOU";
int i, j;
for (i = 0; message[i] != '\0'; ++i) {
char w = message[i];
if (islower(w)) {
w = toupper(w);
} else if (isupper(w)) {... | .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... |
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... |
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... |
problem63 | #include <stdio.h>
void func0(const float *xs, int xs_size, float *out) {
for (int i = 1; i < xs_size; i++) {
out[i - 1] = i * xs[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]
str x2, [sp, #8]
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]
str x2, [... |
problem53 | #include <stdio.h>
#include <stdbool.h>
bool func0(int *l, int size, int t) {
for (int i = 0; i < size; i++)
if (l[i] >= t) 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]
str w2, [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 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, ... |
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, ... |
problem62 | #include <stdio.h>
#include <stdbool.h>
#include <string.h>
bool func0(const char *brackets) {
int level = 0;
for (int i = 0; i < strlen(brackets); i++) {
if (brackets[i] == '(') level += 1;
if (brackets[i] == ')') level -= 1;
if (level < 0) return false;
}
return level == 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, #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... |
problem90 | #include <stdio.h>
#include <string.h>
void func0(const char *s, char *out) {
int i;
for (i = 0; s[i] != '\0'; i++) {
int w = ((int)s[i] - 'a' + 4) % 26 + 'a';
out[i] = (char)w;
}
out[i] = '\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, #24]
str x1, [sp, #16]
str wzr, [sp, #12]
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, -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 x1, [sp, #16]
str wzr, ... |
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 ... |
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... |
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, #... |
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, [... |
problem44 | #include <stdio.h>
#include <stdbool.h>
bool func0(int *l, int size) {
for (int i = 0; i < size; i++)
for (int j = i + 1; j < size; j++)
if (l[i] + l[j] == 0) 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]
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, -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, ... |
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... |
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... |
problem72 | #include <stdio.h>
#include <math.h>
float func0(float a, float b, float c) {
if (a + b <= c || a + c <= b || b + c <= a) return -1;
float s = (a + b + c) / 2;
float area = sqrtf(s * (s - a) * (s - b) * (s - c));
return roundf(area * 100) / 100;
} | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function func0
.LCPI0_0:
.long 0x42c80000 # float 100
.LCPI0_1:
.long 0x40000000 # float 2
.LCPI0_2:
.long 0xbf800000 ... | .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, #32
.cfi_def_cfa_offset 32
str s0, [sp, #24]
str s1, [sp, #20]
str s2, [... |
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... |
problem77 | #include <stdio.h>
int func0(int x, int n) {
int p = 1, count = 0;
while (p <= x && count < 100) {
if (p == x) return 1;
p = p * n; count += 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 w0, [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 w0, [sp, #24]
str w1, [sp, #20]
mov w8, #... |
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, [... |
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... |
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... |
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, [... |
problem55 | #include <stdio.h>
#include <string.h>
#include <stdbool.h>
bool func0(const char *s0, const char *s1) {
int len0 = strlen(s0), len1 = strlen(s1);
for (int i = 0; i < len0; i++) {
bool found = false;
for (int j = 0; j < len1; j++) {
if (s0[i] == s1[j]) {
found = 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... |
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, #... |
problem79 | #include <stdio.h>
#include <string.h>
int func0(const char* num) {
const char* key = "2357BD";
int out = 0;
for (int i = 0; i < strlen(num); i++) {
if (strchr(key, num[i])) out += 1;
}
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... |
problem43 | #include <stdio.h>
void func0(int *l, int size) {
for (int i = 0; i < size; i++)
l[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, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
str w1, [sp, #4]
str wzr, [sp]
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 w1, [sp, #4]
str wzr, [s... |
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... |
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... |
problem49 | #include <stdio.h>
#include <string.h>
#include <stdbool.h>
bool func0(const char *text) {
int len = strlen(text);
for (int i = 0; i < len / 2; i++) {
if (text[i] != text[len - 1 - i]) {
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, #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... |
problem66 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char* func0(int x, int shift) {
static char xs[50];
sprintf(xs, "%d", x);
int len = strlen(xs);
if (len < shift) {
for (int i = 0; i < len / 2; i++) {
char temp = xs[i];
xs[i] = xs[len - 1 - i];
xs[l... | .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, #144
stp x29, x30, [sp, #128] ; 16-byte Folded Spill
add x29, s... |
problem76 | #include <stdio.h>
#include <stdlib.h>
int func0(int a) {
if (a < 2) return 0;
int num = 0;
for (int i = 2; i * i <= a; i++) {
while (a % i == 0) {
a = a / i;
num++;
}
}
if (a > 1) num++;
return num == 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, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
ldr w8, [sp, #8]
subs w8, w8, #2
cset w8, ge
tbnz w8, #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]
subs w8, w8... |
problem84 | #include <stdio.h>
int func0(int n) {
if (n < 1) return 0;
if (n == 1) return 1;
int out = 18;
for (int i = 2; i < n; i++)
out = out * 10;
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, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
ldr w8, [sp, #8]
subs w8, w8, #1
cset w8, ge
tbnz w8, #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]
subs w8, w8... |
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, ... |
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... |
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... |
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... |
problem97 | #include <stdio.h>
#include <stdlib.h>
int *func0(int n, int *count) {
int *out = malloc(n * sizeof(int));
*count = 0;
int i, j, isp, k;
for (i = 2; i < n; i++) {
isp = 1;
for (j = 0; j < *count; j++) {
k = out[j];
if (k * k > i) break;
if (i % k == ... | .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... |
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... |
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, ... |
problem91 | #include <stdio.h>
#include <limits.h>
int func0(int *lst, int size) {
if (size < 2) return -1;
int first = INT_MAX, second = INT_MAX;
for (int i = 0; i < size; ++i) {
if (lst[i] < first) {
second = first;
first = lst[i];
} else if (lst[i] < second && lst[i] != firs... | .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, #2
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, [... |
problem67 | #include <stdio.h>
#include <string.h>
int func0(const char *s) {
int sum = 0;
for (int i = 0; s[i] != '\0'; i++)
if (s[i] >= 'A' && s[i] <= 'Z')
sum += s[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, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
str wzr, [sp, #4]
str wzr, [sp]
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]
str wzr, [... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.