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, ... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 143