c_file
stringlengths
11
39
arm_file
stringlengths
12
26
x86_file
stringlengths
13
27
arm_assembly
stringlengths
1k
268k
x86_assembly
stringlengths
1.06k
264k
ackermann/ackermann.c
arm64/ackermann.s
x86_64/ackermann.s
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _ack ; -- Begin function ack .p2align 2 _ack: ; @ack .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 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-8] stur w1, [x29, #-12] adrp x8, _depth@PAGE ldr w9, [x8, _depth@PAGEOFF] add w9, w9, #1 str w9, [x8, _depth@PAGEOFF] ldr w8, [x8, _depth@PAGEOFF] mov w9, #16777215 subs w8, w8, w9 cset w8, ls tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: mov x9, sp mov x8, #16777215 str x8, [x9] adrp x0, l_.str@PAGE add x0, x0, l_.str@PAGEOFF bl _libmin_printf mov w0, #1 bl _libmin_fail b LBB0_2 LBB0_2: ldur w8, [x29, #-8] mov w9, #65535 subs w8, w8, w9 cset w8, lo tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: mov x9, sp mov x8, #65535 str x8, [x9] adrp x0, l_.str.1@PAGE add x0, x0, l_.str.1@PAGEOFF bl _libmin_printf mov w0, #1 bl _libmin_fail b LBB0_4 LBB0_4: ldur w8, [x29, #-12] subs w8, w8, #16 cset w8, lo tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: mov x9, sp mov x8, #16 str x8, [x9] adrp x0, l_.str.2@PAGE add x0, x0, l_.str.2@PAGEOFF bl _libmin_printf mov w0, #1 bl _libmin_fail b LBB0_6 LBB0_6: ldur w8, [x29, #-8] mov x9, x8 adrp x8, _a@PAGE add x8, x8, _a@PAGEOFF add x8, x8, x9, lsl #6 ldur w9, [x29, #-12] ; kill: def $x9 killed $w9 ldr w8, [x8, x9, lsl #2] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ldur w8, [x29, #-8] mov x9, x8 adrp x8, _a@PAGE add x8, x8, _a@PAGEOFF add x8, x8, x9, lsl #6 ldur w9, [x29, #-12] ; kill: def $x9 killed $w9 ldr w8, [x8, x9, lsl #2] stur w8, [x29, #-4] b LBB0_13 LBB0_8: ldur w8, [x29, #-12] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ldur w8, [x29, #-8] add w8, w8, #1 ldur w9, [x29, #-8] ; kill: def $x9 killed $w9 lsl x10, x9, #6 adrp x9, _a@PAGE add x9, x9, _a@PAGEOFF str w8, [x9, x10] stur w8, [x29, #-4] b LBB0_13 LBB0_10: ldur w8, [x29, #-8] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_12 b LBB0_11 LBB0_11: ldur w8, [x29, #-12] mov w0, #1 subs w1, w8, #1 bl _ack ldur w8, [x29, #-12] mov x9, x8 adrp x8, _a@PAGE add x8, x8, _a@PAGEOFF str w0, [x8, x9, lsl #2] stur w0, [x29, #-4] b LBB0_13 LBB0_12: ldur w8, [x29, #-8] subs w0, w8, #1 ldur w1, [x29, #-12] bl _ack ldur w8, [x29, #-12] subs w1, w8, #1 bl _ack ldur w8, [x29, #-8] mov x9, x8 adrp x8, _a@PAGE add x8, x8, _a@PAGEOFF add x8, x8, x9, lsl #6 ldur w9, [x29, #-12] ; kill: def $x9 killed $w9 str w0, [x8, x9, lsl #2] stur w0, [x29, #-4] b LBB0_13 LBB0_13: ldur w0, [x29, #-4] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .globl _main ; -- Begin function main .p2align 2 _main: ; @main .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 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur wzr, [x29, #-4] adrp x8, _max_depth@PAGE str wzr, [x8, _max_depth@PAGEOFF] stur wzr, [x29, #-12] b LBB1_1 LBB1_1: ; =>This Loop Header: Depth=1 ; Child Loop BB1_3 Depth 2 ldur w8, [x29, #-12] subs w8, w8, #5 cset w8, hi tbnz w8, #0, LBB1_10 b LBB1_2 LBB1_2: ; in Loop: Header=BB1_1 Depth=1 ldur w9, [x29, #-12] ; implicit-def: $x8 mov x8, x9 mov x9, sp str x8, [x9] adrp x0, l_.str.3@PAGE add x0, x0, l_.str.3@PAGEOFF bl _libmin_printf stur wzr, [x29, #-8] b LBB1_3 LBB1_3: ; Parent Loop BB1_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldur w8, [x29, #-8] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, hi tbnz w8, #0, LBB1_8 b LBB1_4 LBB1_4: ; in Loop: Header=BB1_3 Depth=2 adrp x8, _depth@PAGE stur x8, [x29, #-24] ; 8-byte Folded Spill str wzr, [x8, _depth@PAGEOFF] ldur w8, [x29, #-12] ldur w9, [x29, #-8] subs w8, w8, w9 str w8, [sp, #28] ; 4-byte Folded Spill ldur w9, [x29, #-8] ; implicit-def: $x8 mov x8, x9 str x8, [sp, #32] ; 8-byte Folded Spill ldur w8, [x29, #-12] ldur w9, [x29, #-8] subs w0, w8, w9 ldur w1, [x29, #-8] bl _ack ldr w11, [sp, #28] ; 4-byte Folded Reload ldr x8, [sp, #32] ; 8-byte Folded Reload mov x9, sp ; implicit-def: $x10 mov x10, x11 str x10, [x9] str x8, [x9, #8] ; implicit-def: $x8 mov x8, x0 str x8, [x9, #16] adrp x0, l_.str.4@PAGE add x0, x0, l_.str.4@PAGEOFF bl _libmin_printf ldur x8, [x29, #-24] ; 8-byte Folded Reload ldr w8, [x8, _depth@PAGEOFF] adrp x9, _max_depth@PAGE ldr w9, [x9, _max_depth@PAGEOFF] subs w8, w8, w9 cset w8, ls tbnz w8, #0, LBB1_6 b LBB1_5 LBB1_5: ; in Loop: Header=BB1_3 Depth=2 adrp x8, _depth@PAGE ldr w8, [x8, _depth@PAGEOFF] adrp x9, _max_depth@PAGE str w8, [x9, _max_depth@PAGEOFF] b LBB1_6 LBB1_6: ; in Loop: Header=BB1_3 Depth=2 b LBB1_7 LBB1_7: ; in Loop: Header=BB1_3 Depth=2 ldur w8, [x29, #-8] add w8, w8, #1 stur w8, [x29, #-8] b LBB1_3 LBB1_8: ; in Loop: Header=BB1_1 Depth=1 b LBB1_9 LBB1_9: ; in Loop: Header=BB1_1 Depth=1 ldur w8, [x29, #-12] add w8, w8, #1 stur w8, [x29, #-12] b LBB1_1 LBB1_10: adrp x8, _max_depth@PAGE ldr w9, [x8, _max_depth@PAGEOFF] ; implicit-def: $x8 mov x8, x9 mov x9, sp str x8, [x9] adrp x0, l_.str.5@PAGE add x0, x0, l_.str.5@PAGEOFF bl _libmin_printf bl _libmin_success mov w0, #0 ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .zerofill __DATA,__bss,_depth,4,2 ; @depth .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "Maximum stack depth %d exceeded. Abort.\n" l_.str.1: ; @.str.1 .asciz "Maximum x value %d exceeded. Abort. \n" l_.str.2: ; @.str.2 .asciz "Maximum y value %d exceeded. Abort. \n" .zerofill __DATA,__bss,_a,4194240,2 ; @a .zerofill __DATA,__bss,_max_depth,4,2 ; @max_depth l_.str.3: ; @.str.3 .asciz "\nx+y=%d:\n\n" l_.str.4: ; @.str.4 .asciz "A(%d,%d) = %d\n" l_.str.5: ; @.str.5 .asciz "Max recursive depth = %u\n" .subsections_via_symbols
.text .file "ackermann.c" .globl ack # -- Begin function ack .p2align 4, 0x90 .type ack,@function ack: # @ack .cfi_startproc # %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $16, %rsp movl %edi, -8(%rbp) movl %esi, -12(%rbp) movl depth(%rip), %eax addl $1, %eax movl %eax, depth(%rip) cmpl $16777215, depth(%rip) # imm = 0xFFFFFF jbe .LBB0_2 # %bb.1: leaq .L.str(%rip), %rdi movl $16777215, %esi # imm = 0xFFFFFF movb $0, %al callq libmin_printf@PLT movl $1, %edi callq libmin_fail@PLT .LBB0_2: cmpl $65535, -8(%rbp) # imm = 0xFFFF jb .LBB0_4 # %bb.3: leaq .L.str.1(%rip), %rdi movl $65535, %esi # imm = 0xFFFF movb $0, %al callq libmin_printf@PLT movl $1, %edi callq libmin_fail@PLT .LBB0_4: cmpl $16, -12(%rbp) jb .LBB0_6 # %bb.5: leaq .L.str.2(%rip), %rdi movl $16, %esi movb $0, %al callq libmin_printf@PLT movl $1, %edi callq libmin_fail@PLT .LBB0_6: movl -8(%rbp), %eax movl %eax, %ecx leaq a(%rip), %rax shlq $6, %rcx addq %rcx, %rax movl -12(%rbp), %ecx # kill: def $rcx killed $ecx cmpl $0, (%rax,%rcx,4) je .LBB0_8 # %bb.7: movl -8(%rbp), %eax movl %eax, %ecx leaq a(%rip), %rax shlq $6, %rcx addq %rcx, %rax movl -12(%rbp), %ecx # kill: def $rcx killed $ecx movl (%rax,%rcx,4), %eax movl %eax, -4(%rbp) jmp .LBB0_13 .LBB0_8: cmpl $0, -12(%rbp) jne .LBB0_10 # %bb.9: movl -8(%rbp), %eax addl $1, %eax movl -8(%rbp), %ecx movl %ecx, %edx leaq a(%rip), %rcx shlq $6, %rdx addq %rdx, %rcx movl %eax, (%rcx) movl %eax, -4(%rbp) jmp .LBB0_13 .LBB0_10: cmpl $0, -8(%rbp) jne .LBB0_12 # %bb.11: movl -12(%rbp), %esi subl $1, %esi movl $1, %edi callq ack movl -12(%rbp), %ecx movl %ecx, %edx leaq a(%rip), %rcx movl %eax, (%rcx,%rdx,4) movl %eax, -4(%rbp) jmp .LBB0_13 .LBB0_12: movl -8(%rbp), %edi subl $1, %edi movl -12(%rbp), %esi callq ack movl %eax, %edi movl -12(%rbp), %esi subl $1, %esi callq ack movl -8(%rbp), %ecx movl %ecx, %edx leaq a(%rip), %rcx shlq $6, %rdx addq %rdx, %rcx movl -12(%rbp), %edx # kill: def $rdx killed $edx movl %eax, (%rcx,%rdx,4) movl %eax, -4(%rbp) .LBB0_13: movl -4(%rbp), %eax addq $16, %rsp popq %rbp .cfi_def_cfa %rsp, 8 retq .Lfunc_end0: .size ack, .Lfunc_end0-ack .cfi_endproc # -- End function .globl main # -- Begin function main .p2align 4, 0x90 .type main,@function main: # @main .cfi_startproc # %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movl $0, -4(%rbp) movl $0, max_depth(%rip) movl $0, -12(%rbp) .LBB1_1: # =>This Loop Header: Depth=1 # Child Loop BB1_3 Depth 2 cmpl $5, -12(%rbp) ja .LBB1_10 # %bb.2: # in Loop: Header=BB1_1 Depth=1 movl -12(%rbp), %esi leaq .L.str.3(%rip), %rdi movb $0, %al callq libmin_printf@PLT movl $0, -8(%rbp) .LBB1_3: # Parent Loop BB1_1 Depth=1 # => This Inner Loop Header: Depth=2 movl -8(%rbp), %eax cmpl -12(%rbp), %eax ja .LBB1_8 # %bb.4: # in Loop: Header=BB1_3 Depth=2 movl $0, depth(%rip) movl -12(%rbp), %eax subl -8(%rbp), %eax movl %eax, -20(%rbp) # 4-byte Spill movl -8(%rbp), %eax movl %eax, -16(%rbp) # 4-byte Spill movl -12(%rbp), %edi subl -8(%rbp), %edi movl -8(%rbp), %esi callq ack movl -20(%rbp), %esi # 4-byte Reload movl -16(%rbp), %edx # 4-byte Reload movl %eax, %ecx leaq .L.str.4(%rip), %rdi movb $0, %al callq libmin_printf@PLT movl depth(%rip), %eax cmpl max_depth(%rip), %eax jbe .LBB1_6 # %bb.5: # in Loop: Header=BB1_3 Depth=2 movl depth(%rip), %eax movl %eax, max_depth(%rip) .LBB1_6: # in Loop: Header=BB1_3 Depth=2 jmp .LBB1_7 .LBB1_7: # in Loop: Header=BB1_3 Depth=2 movl -8(%rbp), %eax addl $1, %eax movl %eax, -8(%rbp) jmp .LBB1_3 .LBB1_8: # in Loop: Header=BB1_1 Depth=1 jmp .LBB1_9 .LBB1_9: # in Loop: Header=BB1_1 Depth=1 movl -12(%rbp), %eax addl $1, %eax movl %eax, -12(%rbp) jmp .LBB1_1 .LBB1_10: movl max_depth(%rip), %esi leaq .L.str.5(%rip), %rdi movb $0, %al callq libmin_printf@PLT callq libmin_success@PLT xorl %eax, %eax addq $32, %rsp popq %rbp .cfi_def_cfa %rsp, 8 retq .Lfunc_end1: .size main, .Lfunc_end1-main .cfi_endproc # -- End function .type depth,@object # @depth .local depth .comm depth,4,4 .type .L.str,@object # @.str .section .rodata.str1.1,"aMS",@progbits,1 .L.str: .asciz "Maximum stack depth %d exceeded. Abort.\n" .size .L.str, 41 .type .L.str.1,@object # @.str.1 .L.str.1: .asciz "Maximum x value %d exceeded. Abort. \n" .size .L.str.1, 38 .type .L.str.2,@object # @.str.2 .L.str.2: .asciz "Maximum y value %d exceeded. Abort. \n" .size .L.str.2, 38 .type a,@object # @a .local a .comm a,4194240,16 .type max_depth,@object # @max_depth .local max_depth .comm max_depth,4,4 .type .L.str.3,@object # @.str.3 .L.str.3: .asciz "\nx+y=%d:\n\n" .size .L.str.3, 11 .type .L.str.4,@object # @.str.4 .L.str.4: .asciz "A(%d,%d) = %d\n" .size .L.str.4, 15 .type .L.str.5,@object # @.str.5 .L.str.5: .asciz "Max recursive depth = %u\n" .size .L.str.5, 26 .ident "Ubuntu clang version 14.0.0-1ubuntu1.1" .section ".note.GNU-stack","",@progbits .addrsig .addrsig_sym ack .addrsig_sym libmin_printf .addrsig_sym libmin_fail .addrsig_sym libmin_success .addrsig_sym depth .addrsig_sym a .addrsig_sym max_depth
anagram/anagram.c
arm64/anagram.s
x86_64/anagram.s
"\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 13, 0\tsdk_version 13,(...TRUNCATED)
"\t.text\n\t.file\t\"anagram.c\"\n\t.globl\tFatal # -- Begin function Fata(...TRUNCATED)
audio-codec/audio-codec.c
arm64/audio-codec.s
x86_64/audio-codec.s
"\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 13, 0\tsdk_version 13,(...TRUNCATED)
"\t.text\n\t.file\t\"audio-codec.c\"\n\t.globl\tencode # -- Begin function (...TRUNCATED)
avl-tree/avl-tree.c
arm64/avl-tree.s
x86_64/avl-tree.s
"\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 13, 0\tsdk_version 13,(...TRUNCATED)
"\t.text\n\t.file\t\"avl-tree.c\"\n\t.globl\tprintTree # -- Begin function pri(...TRUNCATED)
banner/banner.c
arm64/banner.s
x86_64/banner.s
"\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 13, 0\tsdk_version 13,(...TRUNCATED)
"\t.text\n\t.file\t\"banner.c\"\n\t.globl\tmain # -- Begin function main\(...TRUNCATED)
blake2b/blake2b.c
arm64/blake2b.s
x86_64/blake2b.s
"\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 13, 0\tsdk_version 13,(...TRUNCATED)
"\t.text\n\t.file\t\"blake2b.c\"\n\t.globl\tblake2b # -- Begin function blak(...TRUNCATED)
bloom-filter/bloom-filter.c
arm64/bloom-filter.s
x86_64/bloom-filter.s
"\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 13, 0\tsdk_version 13,(...TRUNCATED)
"\t.text\n\t.file\t\"bloom-filter.c\"\n\t.globl\tbad_search # -- Begin function(...TRUNCATED)
boyer-moore-search/boyer-moore-search.c
arm64/boyer-moore-search.s
x86_64/boyer-moore-search.s
"\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 13, 0\tsdk_version 13,(...TRUNCATED)
"\t.text\n\t.file\t\"boyer-moore-search.c\"\n\t.globl\tbadCharHeuristic # -- Begin fu(...TRUNCATED)
bubble-sort/bubble-sort.c
arm64/bubble-sort.s
x86_64/bubble-sort.s
"\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 13, 0\tsdk_version 13,(...TRUNCATED)
"\t.text\n\t.file\t\"bubble-sort.c\"\n\t.globl\tprint_data # -- Begin function (...TRUNCATED)
c-interp/c-interp.c
arm64/c-interp.s
x86_64/c-interp.s
"\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 13, 0\tsdk_version 13,(...TRUNCATED)
"\t.text\n\t.file\t\"c-interp.c\"\n\t.globl\tnext # -- Begin function nex(...TRUNCATED)
README.md exists but content is empty.
Downloads last month
39