xunge/DecIR huggingface dataset:
void swap_le32(unsigned int *src, unsigned int *dest) {
  unsigned char *s = (unsigned char *)src;
  unsigned char *d = (unsigned char *)dest;
  d[0] = s[3];
  d[1] = s[2];
  d[2] = s[1];
  d[3] = s[0];
}


x86 assembly (clang, -O0):
<swap_le32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_le32>:
mov    0x3(%rdi),%al
mov    %al,(%rsi)
mov    0x2(%rdi),%al
mov    %al,0x1(%rsi)
mov    0x1(%rdi),%al
mov    %al,0x2(%rsi)
mov    (%rdi),%al
mov    %al,0x3(%rsi)
ret

LLVM IR (-O0):
define void @swap_le32(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = bitcast i32* %7 to i8*
store i8* %8, i8** %5
%9 = load i32*, i32** %4
%10 = bitcast i32* %9 to i8*
store i8* %10, i8** %6
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 3
%13 = load i8, i8* %12
%14 = load i8*, i8** %6
%15 = getelementptr inbounds i8, i8* %14, i64 0
store i8 %13, i8* %15
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = load i8*, i8** %6
%20 = getelementptr inbounds i8, i8* %19, i64 1
store i8 %18, i8* %20
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = load i8, i8* %22
%24 = load i8*, i8** %6
%25 = getelementptr inbounds i8, i8* %24, i64 2
store i8 %23, i8* %25
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i64 0
%28 = load i8, i8* %27
%29 = load i8*, i8** %6
%30 = getelementptr inbounds i8, i8* %29, i64 3
store i8 %28, i8* %30
ret void
}

LLVM IR (-O2):
define void @swap_le32(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = bitcast i32* %0 to i8*
%4 = bitcast i32* %1 to i8*
%5 = getelementptr inbounds i8, i8* %3, i64 3
%6 = load i8, i8* %5
store i8 %6, i8* %4
%7 = getelementptr inbounds i8, i8* %3, i64 2
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %8, i8* %9
%10 = getelementptr inbounds i8, i8* %3, i64 1
%11 = load i8, i8* %10
%12 = getelementptr inbounds i8, i8* %4, i64 2
store i8 %11, i8* %12
%13 = load i8, i8* %3
%14 = getelementptr inbounds i8, i8* %4, i64 3
store i8 %13, i8* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xae() {
  Assert_real((isodigit(174) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              875, ("isodigit should be 0 for 0xae"));
}


x86 assembly (clang, -O0):
<t_isodigit_0xae>:
push   %rbp
mov    %rsp,%rbp
mov    $0xae,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x36b,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0xae>:
push   %rax
mov    $0xae,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x36b,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xae\00"
define void @t_isodigit_0xae() {
%1 = call i64 @isodigit(i32 174)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 875, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xae\00"
define void @t_isodigit_0xae() {
%1 = tail call i64 @isodigit(i32 174)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 875, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ queue_test(int, int, int /*<<< orphan*/);
void queue_test_500K_0(void) { queue_test(0x00, 0x1c, 0); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x1c,%esi
mov    %edx,%edi
call   1030 <queue_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
xor    %edi,%edi
mov    $0x1c,%esi
xor    %edx,%edx
jmp    1030 <queue_test@plt>

LLVM IR (-O0):
define void @queue_test_500K_0() {
%1 = call i32 @queue_test(i32 0, i32 28, i32 0)
ret void
}

LLVM IR (-O2):
define void @queue_test_500K_0() {
%1 = tail call i32 @queue_test(i32 0, i32 28, i32 0)
ret void
}
int CanMacroTune(void) { return 0; }


x86 assembly (clang, -O0):
<CanMacroTune>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CanMacroTune>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @CanMacroTune() {
ret i32 0
}

LLVM IR (-O2):
define i32 @CanMacroTune() {
ret i32 0
}
__attribute__((always_)) void
trace_mm_page_alloc_extfrag(struct page *page, int alloc_order,
                            int fallback_order, int alloc_migratetype,
                            int fallback_migratetype) {}


x86 assembly (clang, -O0):
<trace_mm_page_alloc_extfrag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<trace_mm_page_alloc_extfrag>:
ret

LLVM IR (-O0):
%struct.page = type opaque
define void @trace_mm_page_alloc_extfrag(%struct.page* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.page*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.page* %0, %struct.page** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
%struct.page = type opaque
define void @trace_mm_page_alloc_extfrag(%struct.page* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void clear_end_of_line() { fputs("\033[0K", stdout); }


x86 assembly (clang, -O0):
<clear_end_of_line>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_end_of_line>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[0K\00"
@stdout = global i32 0
define void @clear_end_of_line() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[0K\00"
@stdout = global i32 0
define void @clear_end_of_line() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hrt(double, double, char *);
int /*<<< orphan*/ print_check(double, double);
int /*<<< orphan*/ printf(char *, double, double);
void print_seven(double x, double y) {
  print_check(x, y);
  printf("        <rect x=\"%.2fin\" y=\"%.2fin\" width=\"5.75in\" "
         "height=\"0.5in\" fill=\"#ef0000\" />\n",
         x, y + 0.5);
  hrt(x, y, "7");
}


x86 assembly (clang, -O0):
<print_seven>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <print_check@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xea2(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xedd(%rip),%rdi
call   1030 <hrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_seven>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1050 <print_check@plt>
movsd  0xeb3(%rip),%xmm1
addsd  0x10(%rsp),%xmm1
lea    0xeae(%rip),%rdi
movsd  0x8(%rsp),%xmm0
call   1040 <printf@plt>
lea    0xef1(%rip),%rdi
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
add    $0x18,%rsp
jmp    1030 <hrt@plt>

LLVM IR (-O0):
@.str = [85 x i8] c" <rect x=\22%.2fin\22 y=\22%.2fin\22 width=\225.75in\22 height=\220.5in\22 fill=\22#ef0000\22 />\0A\00"
@.str.1 = [2 x i8] c"7\00"
define void @print_seven(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @print_check(double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fadd double %9, 5.000000e-01
%11 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), double %8, double %10)
%12 = load double, double* %3
%13 = load double, double* %4
%14 = call i32 @hrt(double %12, double %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [85 x i8] c" <rect x=\22%.2fin\22 y=\22%.2fin\22 width=\225.75in\22 height=\220.5in\22 fill=\22#ef0000\22 />\0A\00"
@.str.1 = [2 x i8] c"7\00"
define void @print_seven(double %0, double %1) {
%3 = tail call i32 @print_check(double %0, double %1)
%4 = fadd double %1, 5.000000e-01
%5 = tail call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), double %0, double %4)
%6 = tail call i32 @hrt(double %0, double %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Interrupt_ADC1();
void INT_Excep_AD1_ADI1(void) { Interrupt_ADC1(); }


x86 assembly (clang, -O0):
<INT_Excep_AD1_ADI1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Interrupt_ADC1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<INT_Excep_AD1_ADI1>:
xor    %eax,%eax
jmp    1030 <Interrupt_ADC1@plt>

LLVM IR (-O0):
define void @INT_Excep_AD1_ADI1() {
%1 = call i32 (...) @Interrupt_ADC1()
ret void
}

LLVM IR (-O2):
define void @INT_Excep_AD1_ADI1() {
%1 = tail call i32 (...) @Interrupt_ADC1()
ret void
}
/* Variables and functions */
long UpdateOneRecordWithHMACAndECMAC(int);
long UpdateOneRecordWithHMACAndCircularECMAC(int id) {
  return UpdateOneRecordWithHMACAndECMAC(id);
}


x86 assembly (clang, -O0):
<UpdateOneRecordWithHMACAndCircularECMAC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <UpdateOneRecordWithHMACAndECMAC@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpdateOneRecordWithHMACAndCircularECMAC>:
jmp    1030 <UpdateOneRecordWithHMACAndECMAC@plt>

LLVM IR (-O0):
define i64 @UpdateOneRecordWithHMACAndCircularECMAC(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @UpdateOneRecordWithHMACAndECMAC(i32 %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @UpdateOneRecordWithHMACAndCircularECMAC(i32 %0) {
%2 = tail call i64 @UpdateOneRecordWithHMACAndECMAC(i32 %0)
ret i64 %2
}
int slen(const char *s) {
  const char *p;
  for (p = s; *p != '\0'; p++)
    ;
  return p - s;
}


x86 assembly (clang, -O0):
<slen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1136 <slen+0x36>
jmp    1125 <slen+0x25>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <slen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <slen+0x10>
ret

LLVM IR (-O0):
define i32 @slen(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %11, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %5
br label %11
11: ; preds = %10
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
br label %5
14: ; preds = %5
%15 = load i8*, i8** %3
%16 = load i8*, i8** %2
%17 = ptrtoint i8* %15 to i64
%18 = ptrtoint i8* %16 to i64
%19 = sub i64 %17, %18
%20 = trunc i64 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @slen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
void blk_put_request(struct request *req) { return; }


x86 assembly (clang, -O0):
<blk_put_request>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<blk_put_request>:
ret

LLVM IR (-O0):
%struct.request = type opaque
define void @blk_put_request(%struct.request* %0) {
%2 = alloca %struct.request*
store %struct.request* %0, %struct.request** %2
ret void
}

LLVM IR (-O2):
%struct.request = type opaque
define void @blk_put_request(%struct.request* nocapture %0) {
ret void
}
void compress_write_word(unsigned char *addr, unsigned int value) {
  addr[0] = (value >> 0) & 0xff;
  addr[1] = (value >> 8) & 0xff;
  addr[2] = (value >> 16) & 0xff;
}


x86 assembly (clang, -O0):
<compress_write_word>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x0,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<compress_write_word>:
mov    %esi,%eax
mov    %al,(%rdi)
mov    %ah,0x1(%rdi)
shr    $0x10,%eax
mov    %al,0x2(%rdi)
ret

LLVM IR (-O0):
define void @compress_write_word(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = lshr i32 %5, 0
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i32, i32* %4
%12 = lshr i32 %11, 8
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i32, i32* %4
%18 = lshr i32 %17, 16
%19 = and i32 %18, 255
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %20, i8* %22
ret void
}

LLVM IR (-O2):
define void @compress_write_word(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
ret void
}
/* Variables and functions */
int recv(int, char *, long, int);
int apr_recv(int sock, void *buf, long size, int mode) {
  return recv(sock, (char *)buf, size, mode);
}


x86 assembly (clang, -O0):
<apr_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apr_recv>:
jmp    1030 <recv@plt>

LLVM IR (-O0):
define i32 @apr_recv(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i32, i32* %8
%13 = call i32 @recv(i32 %9, i8* %10, i64 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @apr_recv(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @recv(i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool uDMAChannelPriorityGet(uint32_t ui32Base, uint32_t ui32ChannelNum) {
  ;
  ;
  return ((*((volatile unsigned long *)(ui32Base + 0x00000038))) &
                  (1 << ui32ChannelNum)
              ? 0x00000001
              : 0x00000000);
}


x86 assembly (clang, -O0):
<uDMAChannelPriorityGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x38,%eax
cltq
mov    (%rax),%rdx
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
and    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAChannelPriorityGet>:
mov    %esi,%ecx
movslq %edi,%rdx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
xor    %eax,%eax
and    0x38(%rdx),%rcx
setne  %al
ret

LLVM IR (-O0):
define i32 @uDMAChannelPriorityGet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 56
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = load i32, i32* %4
%11 = shl i32 1, %10
%12 = sext i32 %11 to i64
%13 = and i64 %9, %12
%14 = icmp ne i64 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 1, i32 0
ret i32 %16
}

LLVM IR (-O2):
define i32 @uDMAChannelPriorityGet(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 56
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = shl nuw i32 1, %1
%8 = sext i32 %7 to i64
%9 = and i64 %6, %8
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
void swift_allocateGenericValueMetadata(void) {}


x86 assembly (clang, -O0):
<swift_allocateGenericValueMetadata>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swift_allocateGenericValueMetadata>:
ret

LLVM IR (-O0):
define void @swift_allocateGenericValueMetadata() {
ret void
}

LLVM IR (-O2):
define void @swift_allocateGenericValueMetadata() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int yyerror(char *s) { printf("ERROR : %s", s); }


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyerror>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"ERROR : %s\00"
define i32 @yyerror(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR : %s\00"
define i32 @yyerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ write(int, void *, int);
void clear_screen() {
  char *buf = "\033[2J";
  write(1, (void *)buf, 7);
}


x86 assembly (clang, -O0):
<clear_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
mov    $0x7,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_screen>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x7,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
define void @clear_screen() {
%1 = alloca i8*
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @write(i32 1, i8* %2, i32 7)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @clear_screen() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 7)
ret void
}
void avcodec_init(void) {
  static int inited = 0;
  if (inited != 0)
    return;
  inited = 1;
}


x86 assembly (clang, -O0):
<avcodec_init>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f19(%rip)
je     1116 <avcodec_init+0x16>
jmp    1120 <avcodec_init+0x20>
movl   $0x1,0x2f04(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<avcodec_init>:
cmpb   $0x0,0x2f1d(%rip)
jne    1110 <avcodec_init+0x10>
movb   $0x1,0x2f14(%rip)
ret

LLVM IR (-O0):
@avcodec_init.inited = internal global i32 0
define void @avcodec_init() {
%1 = load i32, i32* @avcodec_init.inited
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %5
4: ; preds = %0
store i32 1, i32* @avcodec_init.inited
br label %5
5: ; preds = %4, %3
ret void
}

LLVM IR (-O2):
@avcodec_init.inited = internal unnamed_addr global i1 false
define void @avcodec_init() {
%1 = load i1, i1* @avcodec_init.inited
br i1 %1, label %3, label %2
2: ; preds = %0
store i1 true, i1* @avcodec_init.inited
br label %3
3: ; preds = %0, %2
ret void
}
int maxi(int a, int b) {
  int max;
  if (a > b) {
    max = a;
  } else {
    max = b;
  }
  return max;
}


x86 assembly (clang, -O0):
<maxi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <maxi+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <maxi+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxi>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @maxi(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %3
store i32 %10, i32* %5
br label %13
11: ; preds = %2
%12 = load i32, i32* %4
store i32 %12, i32* %5
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @maxi(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: topenfid aname test\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"Usage: topenfid aname test\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"Usage: topenfid aname test\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main(void) {
  double megabytes, kilobytes;
  printf("Please enter the amount of megabytes to convert.\n");
  scanf("%Lf", &megabytes);
  kilobytes = megabytes * 1024;
  printf("There are %Lf kilobytes in %Lf megabytes.\n", kilobytes, megabytes);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeab(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xece(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeff(%rip),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm1
movsd  0xea7(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xea8(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Please enter the amount of megabytes to convert.\0A\00"
@.str.1 = [4 x i8] c"%Lf\00"
@.str.2 = [43 x i8] c"There are %Lf kilobytes in %Lf megabytes.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = fmul double %6, 1.024000e+03
store double %7, double* %3
%8 = load double, double* %3
%9 = load double, double* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), double %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%Lf\00"
@.str.2 = [43 x i8] c"There are %Lf kilobytes in %Lf megabytes.\0A\00"
@str = [49 x i8] c"Please enter the amount of megabytes to convert.\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = fmul double %5, 1.024000e+03
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), double %6, double %5)
ret i32 0
}
void putu32(unsigned data, unsigned char *addr) {
  addr[0] = (unsigned char)data;
  addr[1] = (unsigned char)(data >> 8);
  addr[2] = (unsigned char)(data >> 16);
  addr[3] = (unsigned char)(data >> 24);
}


x86 assembly (clang, -O0):
<putu32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<putu32>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @putu32(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = trunc i32 %5 to i8
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = load i32, i32* %3
%10 = lshr i32 %9, 8
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
%14 = load i32, i32* %3
%15 = lshr i32 %14, 16
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 2
store i8 %16, i8* %18
%19 = load i32, i32* %3
%20 = lshr i32 %19, 24
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i64 3
store i8 %21, i8* %23
ret void
}

LLVM IR (-O2):
define void @putu32(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i8
store i8 %3, i8* %1
%4 = lshr i32 %0, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %0, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %0, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
void RTSha1DigestFromFile(void) {}


x86 assembly (clang, -O0):
<RTSha1DigestFromFile>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTSha1DigestFromFile>:
ret

LLVM IR (-O0):
define void @RTSha1DigestFromFile() {
ret void
}

LLVM IR (-O2):
define void @RTSha1DigestFromFile() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  while (1) {
    printf("Looping forever.\n");
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [18 x i8] c"Looping forever.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %2
}

LLVM IR (-O2):
@str = [17 x i8] c"Looping forever.\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
br label %1
}
void d_fetchul(const unsigned char **ptr, unsigned long *dest) {
  *dest = (((unsigned long)(*ptr)[0] << 24) | ((unsigned long)(*ptr)[1] << 16) |
           ((unsigned long)(*ptr)[2] << 8) | ((unsigned long)(*ptr)[3] << 0));
  *ptr += 4;
}


x86 assembly (clang, -O0):
<d_fetchul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl (%rax),%eax
mov    %eax,%ecx
shl    $0x18,%rcx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl 0x1(%rax),%eax
shl    $0x10,%rax
or     %rax,%rcx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl 0x2(%rax),%eax
shl    $0x8,%rax
or     %rax,%rcx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl 0x3(%rax),%eax
shl    $0x0,%rax
or     %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_fetchul>:
mov    (%rdi),%rax
mov    (%rax),%ecx
shl    $0x20,%rcx
bswap  %rcx
mov    %rcx,(%rsi)
add    $0x4,%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @d_fetchul(i8** %0, i64* %1) {
%3 = alloca i8**
%4 = alloca i64*
store i8** %0, i8*** %3
store i64* %1, i64** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i64
%10 = shl i64 %9, 24
%11 = load i8**, i8*** %3
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = zext i8 %14 to i64
%16 = shl i64 %15, 16
%17 = or i64 %10, %16
%18 = load i8**, i8*** %3
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i64 2
%21 = load i8, i8* %20
%22 = zext i8 %21 to i64
%23 = shl i64 %22, 8
%24 = or i64 %17, %23
%25 = load i8**, i8*** %3
%26 = load i8*, i8** %25
%27 = getelementptr inbounds i8, i8* %26, i64 3
%28 = load i8, i8* %27
%29 = zext i8 %28 to i64
%30 = shl i64 %29, 0
%31 = or i64 %24, %30
%32 = load i64*, i64** %4
store i64 %31, i64* %32
%33 = load i8**, i8*** %3
%34 = load i8*, i8** %33
%35 = getelementptr inbounds i8, i8* %34, i64 4
store i8* %35, i8** %33
ret void
}

LLVM IR (-O2):
define void @d_fetchul(i8** nocapture %0, i64* nocapture writeonly %1) {
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
%5 = zext i8 %4 to i64
%6 = shl nuw nsw i64 %5, 24
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i64
%10 = shl nuw nsw i64 %9, 16
%11 = or i64 %10, %6
%12 = getelementptr inbounds i8, i8* %3, i64 2
%13 = load i8, i8* %12
%14 = zext i8 %13 to i64
%15 = shl nuw nsw i64 %14, 8
%16 = or i64 %11, %15
%17 = getelementptr inbounds i8, i8* %3, i64 3
%18 = load i8, i8* %17
%19 = zext i8 %18 to i64
%20 = or i64 %16, %19
store i64 %20, i64* %1
%21 = getelementptr inbounds i8, i8* %3, i64 4
store i8* %21, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_emacs_lisp_comment_entities();
int /*<<< orphan*/ test_emacs_lisp_comments();
void all_emacs_lisp_tests() {
  test_emacs_lisp_comments();
  test_emacs_lisp_comment_entities();
}


x86 assembly (clang, -O0):
<all_emacs_lisp_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test_emacs_lisp_comments@plt>
mov    $0x0,%al
call   1030 <test_emacs_lisp_comment_entities@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_emacs_lisp_tests>:
push   %rax
xor    %eax,%eax
call   1040 <test_emacs_lisp_comments@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_emacs_lisp_comment_entities@plt>

LLVM IR (-O0):
define void @all_emacs_lisp_tests() {
%1 = call i32 (...) @test_emacs_lisp_comments()
%2 = call i32 (...) @test_emacs_lisp_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_emacs_lisp_tests() {
%1 = tail call i32 (...) @test_emacs_lisp_comments()
%2 = tail call i32 (...) @test_emacs_lisp_comment_entities()
ret void
}
int fun652() { return 652; }


x86 assembly (clang, -O0):
<fun652>:
push   %rbp
mov    %rsp,%rbp
mov    $0x28c,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun652>:
mov    $0x28c,%eax
ret

LLVM IR (-O0):
define i32 @fun652() {
ret i32 652
}

LLVM IR (-O2):
define i32 @fun652() {
ret i32 652
}
unsigned int string_hash(const void *a) {
  const char *s = a;
  unsigned int h;
  h = 0x811c9dc5;
  while (*s) {
    h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
    h ^= *s++;
  }
  return h;
}


x86 assembly (clang, -O0):
<string_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x811c9dc5,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116d <string_hash+0x6d>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    -0x14(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x7,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <string_hash+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <string_hash+0x27>
add    $0x1,%rdi
mov    $0x811c9dc5,%eax
nop
imul   $0x1000193,%eax,%edx
movsbl %cl,%eax
xor    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <string_hash+0x10>
ret
mov    $0x811c9dc5,%eax
ret

LLVM IR (-O0):
define i32 @string_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
store i32 -2128831035, i32* %4
br label %6
6: ; preds = %10, %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %33
10: ; preds = %6
%11 = load i32, i32* %4
%12 = shl i32 %11, 1
%13 = load i32, i32* %4
%14 = shl i32 %13, 4
%15 = add i32 %12, %14
%16 = load i32, i32* %4
%17 = shl i32 %16, 7
%18 = add i32 %15, %17
%19 = load i32, i32* %4
%20 = shl i32 %19, 8
%21 = add i32 %18, %20
%22 = load i32, i32* %4
%23 = shl i32 %22, 24
%24 = add i32 %21, %23
%25 = load i32, i32* %4
%26 = add i32 %25, %24
store i32 %26, i32* %4
%27 = load i8*, i8** %3
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %3
%29 = load i8, i8* %27
%30 = sext i8 %29 to i32
%31 = load i32, i32* %4
%32 = xor i32 %31, %30
store i32 %32, i32* %4
br label %6
33: ; preds = %6
%34 = load i32, i32* %4
ret i32 %34
}

LLVM IR (-O2):
define i32 @string_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ -2128831035, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 16777619
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = xor i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ -2128831035, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
size_t UINT_MAX;
void *_xmalloc(size_t, size_t);
void *_xmalloc_array(size_t size, size_t align, size_t num) {
  if (size && num > UINT_MAX / size)
    return NULL;
  return _xmalloc(size * num, align);
}


x86 assembly (clang, -O0):
<_xmalloc_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1166 <_xmalloc_array+0x56>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jbe    1166 <_xmalloc_array+0x56>
movq   $0x0,-0x8(%rbp)
jmp    117c <_xmalloc_array+0x6c>
mov    -0x10(%rbp),%rdi
imul   -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <_xmalloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_xmalloc_array>:
mov    %rdx,%rcx
test   %rdi,%rdi
je     1144 <_xmalloc_array+0x34>
mov    0x2ec9(%rip),%rax
mov    (%rax),%rax
mov    %rax,%rdx
or     %rdi,%rdx
shr    $0x20,%rdx
je     113b <_xmalloc_array+0x2b>
xor    %edx,%edx
div    %rdi
cmp    %rcx,%rax
jae    1144 <_xmalloc_array+0x34>
xor    %eax,%eax
ret
xor    %edx,%edx
div    %edi
cmp    %rcx,%rax
jb     1138 <_xmalloc_array+0x28>
imul   %rdi,%rcx
mov    %rcx,%rdi
jmp    1030 <_xmalloc@plt>

LLVM IR (-O0):
@UINT_MAX = global i64 0
define i8* @_xmalloc_array(i64 %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %5
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %3
%11 = load i64, i64* %7
%12 = load i64, i64* @UINT_MAX
%13 = load i64, i64* %5
%14 = udiv i64 %12, %13
%15 = icmp ugt i64 %11, %14
br i1 %15, label %16, label %17
16: ; preds = %10
store i8* null, i8** %4
br label %23
17: ; preds = %10, %3
%18 = load i64, i64* %5
%19 = load i64, i64* %7
%20 = mul i64 %18, %19
%21 = load i64, i64* %6
%22 = call i8* @_xmalloc(i64 %20, i64 %21)
store i8* %22, i8** %4
br label %23
23: ; preds = %17, %16
%24 = load i8*, i8** %4
ret i8* %24
}

LLVM IR (-O2):
@UINT_MAX = global i64 0
define i8* @_xmalloc_array(i64 %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = load i64, i64* @UINT_MAX
%7 = udiv i64 %6, %0
%8 = icmp ult i64 %7, %2
br i1 %8, label %12, label %9
9: ; preds = %5, %3
%10 = mul i64 %2, %0
%11 = tail call i8* @_xmalloc(i64 %10, i64 %1)
br label %12
12: ; preds = %5, %9
%13 = phi i8* [ %11, %9 ], [ null, %5 ]
ret i8* %13
}
/* Variables and functions */
int f264(int *);
int f265(int *p) { return f264(p); }


x86 assembly (clang, -O0):
<f265>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <f264@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f265>:
jmp    1030 <f264@plt>

LLVM IR (-O0):
define i32 @f265(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @f264(i32* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @f265(i32* %0) {
%2 = tail call i32 @f264(i32* %0)
ret i32 %2
}
/* Variables and functions */
short printNumber(unsigned long, int);
short printNumber_UC(unsigned char b, int base) {
  return printNumber((unsigned long)b, base);
}


x86 assembly (clang, -O0):
<printNumber_UC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1030 <printNumber@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printNumber_UC>:
mov    %edi,%edi
jmp    1030 <printNumber@plt>

LLVM IR (-O0):
define signext i16 @printNumber_UC(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i64
%7 = load i32, i32* %4
%8 = call signext i16 @printNumber(i64 %6, i32 %7)
ret i16 %8
}

LLVM IR (-O2):
define signext i16 @printNumber_UC(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i64
%4 = tail call signext i16 @printNumber(i64 %3, i32 %1)
ret i16 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ waitpid(int, int *, int /*<<< orphan*/);
void SIGCHLD_handler(int signo) {
  pid_t pid;
  int stat;
  while ((pid = waitpid(-1, &stat, WNOHANG)) > 0)
    ;
  return;
}


x86 assembly (clang, -O0):
<SIGCHLD_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1030 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1143 <SIGCHLD_handler+0x33>
jmp    111b <SIGCHLD_handler+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIGCHLD_handler>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
lea    0x4(%rsp),%rbx
mov    (%r14),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1030 <waitpid@plt>
test   %eax,%eax
jg     1120 <SIGCHLD_handler+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @SIGCHLD_handler(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* %4, i32 %6)
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @SIGCHLD_handler(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = load i32, i32* @WNOHANG
%6 = call i32 @waitpid(i32 -1, i32* %2, i32 %5)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4
ret void
}
/* Type definitions */
struct bo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct bo *);
void destroy_bo(struct bo *l) { free(l); }


x86 assembly (clang, -O0):
<destroy_bo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_bo>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.bo = type { i32 }
define void @destroy_bo(%struct.bo* %0) {
%2 = alloca %struct.bo*
store %struct.bo* %0, %struct.bo** %2
%3 = load %struct.bo*, %struct.bo** %2
%4 = call i32 @free(%struct.bo* %3)
ret void
}

LLVM IR (-O2):
%struct.bo = type { i32 }
define void @destroy_bo(%struct.bo* nocapture %0) {
%2 = tail call i32 @free(%struct.bo* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(char *prog) { printf("%s <bin_file> [<code_file>]\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"%s <bin_file> [<code_file>]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"%s <bin_file> [<code_file>]\0A\00"
define void @usage(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct leash_pid_attrs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct leash_pid_attrs *);
void free_leash_pid_attrs(struct leash_pid_attrs *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<free_leash_pid_attrs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_leash_pid_attrs>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.leash_pid_attrs = type { i32 }
define void @free_leash_pid_attrs(%struct.leash_pid_attrs* %0) {
%2 = alloca %struct.leash_pid_attrs*
store %struct.leash_pid_attrs* %0, %struct.leash_pid_attrs** %2
%3 = load %struct.leash_pid_attrs*, %struct.leash_pid_attrs** %2
%4 = call i32 @free(%struct.leash_pid_attrs* %3)
ret void
}

LLVM IR (-O2):
%struct.leash_pid_attrs = type { i32 }
define void @free_leash_pid_attrs(%struct.leash_pid_attrs* nocapture %0) {
%2 = tail call i32 @free(%struct.leash_pid_attrs* %0)
ret void
}
int get_col(void *col) { return (int)(*((char *)col + 0)) - 64; }


x86 assembly (clang, -O0):
<get_col>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x40,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_col>:
movsbl (%rdi),%eax
add    $0xffffffc0,%eax
ret

LLVM IR (-O0):
define i32 @get_col(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 64
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_col(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = add nsw i32 %3, -64
ret i32 %4
}
/* Type definitions */
struct vio_mpc_val {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct vio_mpc_val *);
void vio_mpc_val_free(struct vio_mpc_val *x) { free(x); }


x86 assembly (clang, -O0):
<vio_mpc_val_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vio_mpc_val_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.vio_mpc_val = type { i32 }
define void @vio_mpc_val_free(%struct.vio_mpc_val* %0) {
%2 = alloca %struct.vio_mpc_val*
store %struct.vio_mpc_val* %0, %struct.vio_mpc_val** %2
%3 = load %struct.vio_mpc_val*, %struct.vio_mpc_val** %2
%4 = call i32 @free(%struct.vio_mpc_val* %3)
ret void
}

LLVM IR (-O2):
%struct.vio_mpc_val = type { i32 }
define void @vio_mpc_val_free(%struct.vio_mpc_val* nocapture %0) {
%2 = tail call i32 @free(%struct.vio_mpc_val* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void usage(void) {
  puts("--Tee--\n"
       "        Basic implementation of tee\n"
       "Options:\n"
       " -h|--help		Display help\n"
       " -a|--append	        Append\n"
       " -f|--file	        Write to file\n"
       "Usage: cat stuff.txt | ./tee -a -f newstuff.txt");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [187 x i8] c"--Tee--\0A Basic implementation of tee\0AOptions:\0A -h|--help\09\09Display help\0A -a|--append\09 Append\0A -f|--file\09 Write to file\0AUsage: cat stuff.txt | ./tee -a -f newstuff.txt\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [187 x i8] c"--Tee--\0A Basic implementation of tee\0AOptions:\0A -h|--help\09\09Display help\0A -a|--append\09 Append\0A -f|--file\09 Write to file\0AUsage: cat stuff.txt | ./tee -a -f newstuff.txt\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([187 x i8], [187 x i8]* @.str, i64 0, i64 0))
ret void
}