Skip to content

Instantly share code, notes, and snippets.

@takoeight0821

takoeight0821/bf2c.sh

Last active May 17, 2020
Embed
What would you like to do?
Brainf**kコンパイラ。BFからCへのコンパイラと、gccに食わせると定数に最適化されることを示すデモ。#hiro_it 用
echo '#include <stdio.h>'
echo 'int main(void) {'
echo 'int tape[256] = {0};'
echo 'int i = 0;'
cat $@ |\
sed -e 's/\]/}/g' |\
sed -e 's/\[/while(tape\[i\]){/g' |\
sed -e 's/+/tape\[i\]++;/g' |\
sed -e 's/-/tape\[i\]--;/g' |\
sed -e 's/>/i++;/g' |\
sed -e 's/</i--;/g' |\
sed -e 's/\./putchar(tape\[i\]);/g' |\
sed -e 's/,/tape\[i\]=getchar();/g' | cat
echo '}'
>++++++++ [<+++++++++++++>-]<.
---.
+++++++..
+++.
>++++++ [<----------->-]<-.
------------.
>++++++++[<+++++++++++>-]<-.
--------.
+++.
------.
--------.
>+++++++++[<------>-]<.
[-]++++++++++.
#include <stdio.h>
int main(void)
{
int tape[256] = {0};
int i = 0;
i++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
while (tape[i])
{
i--;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
i++;
tape[i]--;
}
i--;
putchar(tape[i]);
i++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
while (tape[i])
{
i--;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
i++;
tape[i]--;
}
i--;
tape[i]++;
putchar(tape[i]);
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
putchar(tape[i]);
putchar(tape[i]);
tape[i]++;
tape[i]++;
tape[i]++;
putchar(tape[i]);
while (tape[i])
{
tape[i]--;
}
i++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
while (tape[i])
{
i--;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
i++;
tape[i]--;
}
i--;
putchar(tape[i]);
i++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
while (tape[i])
{
i--;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
i++;
tape[i]--;
}
i--;
putchar(tape[i]);
i++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
while (tape[i])
{
i--;
tape[i]++;
tape[i]++;
tape[i]++;
i++;
tape[i]--;
}
i--;
putchar(tape[i]);
tape[i]++;
tape[i]++;
tape[i]++;
putchar(tape[i]);
tape[i]--;
tape[i]--;
tape[i]--;
tape[i]--;
tape[i]--;
tape[i]--;
putchar(tape[i]);
tape[i]--;
tape[i]--;
tape[i]--;
tape[i]--;
tape[i]--;
tape[i]--;
tape[i]--;
tape[i]--;
putchar(tape[i]);
while (tape[i])
{
tape[i]--;
}
i++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
while (tape[i])
{
i--;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
i++;
tape[i]--;
}
i--;
tape[i]++;
putchar(tape[i]);
while (tape[i])
{
tape[i]--;
}
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
tape[i]++;
putchar(tape[i]);
}
.text
.section __TEXT,__text_startup,regular,pure_instructions
.p2align 4
.globl _main
_main:
LFB1:
subq $8, %rsp
LCFI0:
movl $72, %edi
call _putchar
movl $101, %edi
call _putchar
movl $108, %edi
call _putchar
movl $108, %edi
call _putchar
movl $111, %edi
call _putchar
movl $32, %edi
call _putchar
movl $87, %edi
call _putchar
movl $111, %edi
call _putchar
movl $114, %edi
call _putchar
movl $108, %edi
call _putchar
movl $100, %edi
call _putchar
movl $33, %edi
call _putchar
movl $10, %edi
call _putchar
xorl %eax, %eax
addq $8, %rsp
LCFI1:
ret
LFE1:
.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame1:
.set L$set$0,LECIE1-LSCIE1
.long L$set$0
LSCIE1:
.long 0
.byte 0x1
.ascii "zR\0"
.byte 0x1
.byte 0x78
.byte 0x10
.byte 0x1
.byte 0x10
.byte 0xc
.byte 0x7
.byte 0x8
.byte 0x90
.byte 0x1
.align 3
LECIE1:
LSFDE1:
.set L$set$1,LEFDE1-LASFDE1
.long L$set$1
LASFDE1:
.long LASFDE1-EH_frame1
.quad LFB1-.
.set L$set$2,LFE1-LFB1
.quad L$set$2
.byte 0
.byte 0x4
.set L$set$3,LCFI0-LFB1
.long L$set$3
.byte 0xe
.byte 0x10
.byte 0x4
.set L$set$4,LCFI1-LCFI0
.long L$set$4
.byte 0xe
.byte 0x8
.align 3
LEFDE1:
.ident "GCC: (Homebrew GCC 9.3.0_1) 9.3.0"
.subsections_via_symbols
.text
.globl _main
_main:
LFB1:
pushq %rbp
LCFI0:
movq %rsp, %rbp
LCFI1:
subq $1040, %rsp
leaq -1040(%rbp), %rax
movl $1024, %edx
movl $0, %esi
movq %rax, %rdi
call _memset
movl $0, -4(%rbp)
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
jmp L2
L3:
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
L2:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
testl %eax, %eax
jne L3
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
jmp L4
L5:
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
L4:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
testl %eax, %eax
jne L5
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
jmp L6
L7:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
L6:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
testl %eax, %eax
jne L7
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
jmp L8
L9:
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
L8:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
testl %eax, %eax
jne L9
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
jmp L10
L11:
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
L10:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
testl %eax, %eax
jne L11
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
jmp L12
L13:
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
L12:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
testl %eax, %eax
jne L13
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
jmp L14
L15:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
L14:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
testl %eax, %eax
jne L15
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
jmp L16
L17:
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
addl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
L16:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
testl %eax, %eax
jne L17
subl $1, -4(%rbp)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
jmp L18
L19:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal -1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
L18:
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
testl %eax, %eax
jne L19
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
leal 1(%rax), %edx
movl -4(%rbp), %eax
cltq
movl %edx, -1040(%rbp,%rax,4)
movl -4(%rbp), %eax
cltq
movl -1040(%rbp,%rax,4), %eax
movl %eax, %edi
call _putchar
movl $0, %eax
leave
LCFI2:
ret
LFE1:
.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame1:
.set L$set$0,LECIE1-LSCIE1
.long L$set$0
LSCIE1:
.long 0
.byte 0x1
.ascii "zR\0"
.byte 0x1
.byte 0x78
.byte 0x10
.byte 0x1
.byte 0x10
.byte 0xc
.byte 0x7
.byte 0x8
.byte 0x90
.byte 0x1
.align 3
LECIE1:
LSFDE1:
.set L$set$1,LEFDE1-LASFDE1
.long L$set$1
LASFDE1:
.long LASFDE1-EH_frame1
.quad LFB1-.
.set L$set$2,LFE1-LFB1
.quad L$set$2
.byte 0
.byte 0x4
.set L$set$3,LCFI0-LFB1
.long L$set$3
.byte 0xe
.byte 0x10
.byte 0x86
.byte 0x2
.byte 0x4
.set L$set$4,LCFI1-LCFI0
.long L$set$4
.byte 0xd
.byte 0x6
.byte 0x4
.set L$set$5,LCFI2-LCFI1
.long L$set$5
.byte 0xc
.byte 0x7
.byte 0x8
.align 3
LEFDE1:
.ident "GCC: (Homebrew GCC 9.3.0_1) 9.3.0"
.subsections_via_symbols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.