xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xb6() {
  Assert_real((isspace(182) == 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_isspace.c",
              915, ("isspace should be 0 for 0xb6"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xb6>:
push   %rax
mov    $0xb6,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x393,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb6\00"
define void @t_isspace_0xb6() {
%1 = call i64 @isspace(i32 182)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 915, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb6\00"
define void @t_isspace_0xb6() {
%1 = tail call i64 @isspace(i32 182)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 915, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main() {
  int __BLAST_NONDET;
  int x;
  int y;
  x = __BLAST_NONDET;
  y = __BLAST_NONDET;
  if (x != y) {
  ERROR:
    goto ERROR;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1126 <main+0x26>
jmp    1121 <main+0x21>
jmp    1121 <main+0x21>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int partition(unsigned int *, int, int);
void quickSort(unsigned int a[], int l, int r) {
  int j;
  if (l < r) {
    j = partition(a, l, r);
    quickSort(a, l, j - 1);
    quickSort(a, j + 1, r);
  }
}


x86 assembly (clang, -O0):
<quickSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quickSort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quickSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quickSort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickSort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quickSort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quickSort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quickSort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @quickSort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %3
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @partition(i32* %12, i32 %13, i32 %14)
store i32 %15, i32* %7
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = sub nsw i32 %18, 1
%20 = load i32*, i32** %4
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
%23 = load i32, i32* %6
br label %24
24: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
define void @quickSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quickSort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int yas_kxsd9_read_reg_byte(int);
int /*<<< orphan*/ yas_kxsd9_write_reg_byte(int, int);
int yas_kxsd9_power_down(void) {
  yas_kxsd9_write_reg_byte(
      0x0d, ((yas_kxsd9_read_reg_byte(0x0d) & ~0x40) | ((0) << 6)));
  return (0);
}


x86 assembly (clang, -O0):
<yas_kxsd9_power_down>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd,%edi
call   1040 <yas_kxsd9_read_reg_byte@plt>
mov    %eax,%esi
and    $0xffffffbf,%esi
or     $0x0,%esi
mov    $0xd,%edi
call   1030 <yas_kxsd9_write_reg_byte@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_kxsd9_power_down>:
push   %rax
mov    $0xd,%edi
call   1040 <yas_kxsd9_read_reg_byte@plt>
and    $0xffffffbf,%eax
mov    $0xd,%edi
mov    %eax,%esi
call   1030 <yas_kxsd9_write_reg_byte@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_kxsd9_power_down() {
%1 = call i32 @yas_kxsd9_read_reg_byte(i32 13)
%2 = and i32 %1, -65
%3 = or i32 %2, 0
%4 = call i32 @yas_kxsd9_write_reg_byte(i32 13, i32 %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @yas_kxsd9_power_down() {
%1 = tail call i32 @yas_kxsd9_read_reg_byte(i32 13)
%2 = and i32 %1, -65
%3 = tail call i32 @yas_kxsd9_write_reg_byte(i32 13, i32 %2)
ret i32 0
}
int main() {
  int x = 2;
  float y = 12.11;
  show_int(x);
  show_float(y);
  show_pointer(&x);
  show_pointer(&y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
movss  0xeb9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <show_int@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <show_float@plt>
lea    -0x4(%rbp),%rdi
mov    $0x0,%al
call   1050 <show_pointer@plt>
lea    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <show_pointer@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x2,0x4(%rsp)
movl   $0x4141c28f,(%rsp)
mov    $0x2,%edi
xor    %eax,%eax
call   1040 <show_int@plt>
movsd  0xeac(%rip),%xmm0
mov    $0x1,%al
call   1030 <show_float@plt>
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1050 <show_pointer@plt>
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <show_pointer@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 2, i32* %1
store float 0x40283851E0000000, float* %2
%3 = load i32, i32* %1
%4 = call i32 (i32, ...) bitcast (i32 (...)* @show_int to i32 (i32, ...)*)(i32 %3)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = call i32 (double, ...) bitcast (i32 (...)* @show_float to i32 (double, ...)*)(double %6)
%8 = call i32 (i32*, ...) bitcast (i32 (...)* @show_pointer to i32 (i32*, ...)*)(i32* %1)
%9 = call i32 (float*, ...) bitcast (i32 (...)* @show_pointer to i32 (float*, ...)*)(float* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
store i32 2, i32* %1
%4 = bitcast float* %2 to i8*
store float 0x40283851E0000000, float* %2
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @show_int to i32 (i32, ...)*)(i32 2)
%6 = tail call i32 (double, ...) bitcast (i32 (...)* @show_float to i32 (double, ...)*)(double 0x40283851E0000000)
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @show_pointer to i32 (i32*, ...)*)(i32* %1)
%8 = call i32 (float*, ...) bitcast (i32 (...)* @show_pointer to i32 (float*, ...)*)(float* %2)
ret i32 0
}
float mapFloat(float input, float input_start, float input_end,
               float output_start, float output_end) {
  float output =
      output_start + ((output_end - output_start) / (input_end - input_start)) *
                         (input - input_start);
  return output;
}


x86 assembly (clang, -O0):
<mapFloat>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
subss  -0x8(%rbp),%xmm2
divss  %xmm2,%xmm0
movss  -0x4(%rbp),%xmm2
subss  -0x8(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapFloat>:
subss  %xmm3,%xmm4
subss  %xmm1,%xmm2
divss  %xmm2,%xmm4
subss  %xmm1,%xmm0
mulss  %xmm4,%xmm0
addss  %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @mapFloat(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%12 = load float, float* %9
%13 = load float, float* %10
%14 = load float, float* %9
%15 = fsub float %13, %14
%16 = load float, float* %8
%17 = load float, float* %7
%18 = fsub float %16, %17
%19 = fdiv float %15, %18
%20 = load float, float* %6
%21 = load float, float* %7
%22 = fsub float %20, %21
%23 = call float @llvm.fmuladd.f32(float %19, float %22, float %12)
store float %23, float* %11
%24 = load float, float* %11
ret float %24
}

LLVM IR (-O2):
define float @mapFloat(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float %4, %3
%7 = fsub float %2, %1
%8 = fdiv float %6, %7
%9 = fsub float %0, %1
%10 = tail call float @llvm.fmuladd.f32(float %8, float %9, float %3)
ret float %10
}
/* Variables and functions */
scalar_t__ space(char);
scalar_t__ tab(char);
int hs(char c) { return space(c) || tab(c); }


x86 assembly (clang, -O0):
<hs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <space@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <hs+0x3c>
movsbl -0x1(%rbp),%edi
call   1040 <tab@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hs>:
push   %rbx
mov    %edi,%ebx
call   1030 <space@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <hs+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1040 <tab@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hs(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @space(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @tab(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @hs(i8 signext %0) {
%2 = tail call i64 @space(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @tab(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_long_get(long *dest, const long *src, size_t len, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_long_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_long_get(i64* %0, i64* %1, i64 %2, i32 %3) {
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i64
%8 = alloca i32
store i64* %0, i64** %5
store i64* %1, i64** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_long_get(i64* nocapture readnone %0, i64* nocapture readnone %1, i64 %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_A7int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xA7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A7int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xa7,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A7int64_highword_mem>:
testb  $0xa7,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A7int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 167
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_A7int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 717259538432
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ emq_channel_sudirription_release(void *);
void emq_channel_sudirription_list_free_handler(void *value) {
  emq_channel_sudirription_release(value);
}


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

x86 assembly (clang, -O2):
<emq_channel_sudirription_list_free_handler>:
jmp    1030 <emq_channel_sudirription_release@plt>

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

LLVM IR (-O2):
define void @emq_channel_sudirription_list_free_handler(i8* %0) {
%2 = tail call i32 @emq_channel_sudirription_release(i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int __cancel_rx() {
  switch ((*(volatile uint32_t *)(0x550 + (0x40001000)))) {
  case 3:
    (*(volatile uint32_t *)(0x010 + (0x40001000))) = 1;
    break;
  default:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<__cancel_rx>:
push   %rbp
mov    %rsp,%rbp
mov    0x40001550,%eax
sub    $0x3,%eax
jne    1129 <__cancel_rx+0x29>
jmp    1119 <__cancel_rx+0x19>
mov    $0x40001010,%eax
movl   $0x1,(%rax)
jmp    112e <__cancel_rx+0x2e>
jmp    112e <__cancel_rx+0x2e>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cancel_rx>:
mov    0x40001550,%eax
cmp    $0x3,%eax
jne    1117 <__cancel_rx+0x17>
movl   $0x1,0x40001010
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @__cancel_rx() {
%1 = load volatile i32, i32* inttoptr (i64 1073747280 to i32*)
switch i32 %1, label %3 [
i32 3, label %2
]
2: ; preds = %0
store volatile i32 1, i32* inttoptr (i64 1073745936 to i32*)
br label %4
3: ; preds = %0
br label %4
4: ; preds = %3, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @__cancel_rx() {
%1 = load volatile i32, i32* inttoptr (i64 1073747280 to i32*)
%2 = icmp eq i32 %1, 3
br i1 %2, label %3, label %4
3: ; preds = %0
store volatile i32 1, i32* inttoptr (i64 1073745936 to i32*)
br label %4
4: ; preds = %0, %3
ret i32 0
}
/* Variables and functions */
void *tommy_list_remove_existing(void *, void *);
void *remove_elem_list(void *ll, void *ll_node) {
  return tommy_list_remove_existing(ll, ll_node);
}


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

x86 assembly (clang, -O2):
<remove_elem_list>:
jmp    1030 <tommy_list_remove_existing@plt>

LLVM IR (-O0):
define i8* @remove_elem_list(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @tommy_list_remove_existing(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @remove_elem_list(i8* %0, i8* %1) {
%3 = tail call i8* @tommy_list_remove_existing(i8* %0, i8* %1)
ret i8* %3
}
void loop_exit() { ("loop_exit"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"loop_exit\00"
define void @loop_exit() {
ret void
}

LLVM IR (-O2):
define void @loop_exit() {
ret void
}
void foo_2_1_2_1_1_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_1_1_1_1_1_2() {
ret void
}
int test() {
  int count = 0;
  for (int i = 0; i < 10; i++) {
    if (i == 2)
      continue;
    if (i == 5)
      break;
    count++;
  }
  return count != 4;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1151 <test+0x51>
cmpl   $0x2,-0x8(%rbp)
jne    112b <test+0x2b>
jmp    1143 <test+0x43>
cmpl   $0x5,-0x8(%rbp)
jne    113a <test+0x3a>
jmp    1151 <test+0x51>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <test+0x12>
cmpl   $0x4,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %17, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %20
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %6
br label %17
10: ; preds = %6
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 5
br i1 %12, label %13, label %14
13: ; preds = %10
br label %20
14: ; preds = %10
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
store i32 %16, i32* %1
br label %17
17: ; preds = %14, %9
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %3
20: ; preds = %13, %3
%21 = load i32, i32* %1
%22 = icmp ne i32 %21, 4
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @test() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glutSetColor(int, float, float, float);
void SetGreyRamp(void) {
  int i;
  float intensity;
  for (i = 0; i < 255; i++) {
    intensity = i / 255.0;
    glutSetColor(i, intensity, intensity, intensity);
  }
}


x86 assembly (clang, -O0):
<SetGreyRamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jge    116b <SetGreyRamp+0x5b>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
movss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
call   1030 <glutSetColor@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <SetGreyRamp+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetGreyRamp>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
xorpd  %xmm0,%xmm0
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0xecc(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    %ebx,%edi
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glutSetColor@plt>
movsd  0x8(%rsp),%xmm0
addsd  0xeb5(%rip),%xmm0
add    $0x1,%ebx
cmp    $0xff,%ebx
jne    1120 <SetGreyRamp+0x10>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @SetGreyRamp() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
br label %3
3: ; preds = %16, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 255
br i1 %5, label %6, label %19
6: ; preds = %3
%7 = load i32, i32* %1
%8 = sitofp i32 %7 to double
%9 = fdiv double %8, 2.550000e+02
%10 = fptrunc double %9 to float
store float %10, float* %2
%11 = load i32, i32* %1
%12 = load float, float* %2
%13 = load float, float* %2
%14 = load float, float* %2
%15 = call i32 @glutSetColor(i32 %11, float %12, float %13, float %14)
br label %16
16: ; preds = %6
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
br label %3
19: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @SetGreyRamp() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %7, %1 ]
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, 2.550000e+02
%5 = fptrunc double %4 to float
%6 = tail call i32 @glutSetColor(i32 %2, float %5, float %5, float %5)
%7 = add nuw nsw i32 %2, 1
%8 = icmp eq i32 %7, 255
br i1 %8, label %9, label %1
9: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void countdown(int x) {
  printf("entering countdown\n");
  if (x <= 0) {
    return;
  }
  printf("%d\n", x);
  countdown(x - 1);
  printf("exiting countdown\n");
}


x86 assembly (clang, -O0):
<countdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jg     1148 <countdown+0x28>
jmp    1172 <countdown+0x52>
mov    -0x4(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <countdown@plt>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countdown>:
push   %rbx
mov    %edi,%ebx
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
test   %ebx,%ebx
jle    116a <countdown+0x3a>
lea    0xeb6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1040 <countdown@plt>
lea    0xeb3(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"entering countdown\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [19 x i8] c"exiting countdown\0A\00"
define void @countdown(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %13
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = sub nsw i32 %10, 1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [19 x i8] c"entering countdown\00"
@str.3 = [18 x i8] c"exiting countdown\00"
define void @countdown(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%3 = icmp slt i32 %0, 1
br i1 %3, label %4, label %5
4: ; preds = %1, %5
ret void
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%7 = add nsw i32 %0, -1
tail call void @countdown(i32 %7)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.3, i64 0, i64 0))
br label %4
}
/* Variables and functions */
int inet_pton(int, char const *, void *);
int ILibInet_pton(int af, const char *src, void *dst) {
  return inet_pton(af, src, dst);
}


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

x86 assembly (clang, -O2):
<ILibInet_pton>:
jmp    1030 <inet_pton@plt>

LLVM IR (-O0):
define i32 @ILibInet_pton(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @inet_pton(i32 %7, i8* %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @ILibInet_pton(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @inet_pton(i32 %0, i8* %1, i8* %2)
ret i32 %4
}
int swapElements(int *array, int index1, int index2) {
  int tmp = array[index1];
  array[index1] = array[index2];
  array[index2] = tmp;
  return 0;
}


x86 assembly (clang, -O0):
<swapElements>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapElements>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @swapElements(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void exit(int code) { outb(code, 0xf4); }


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xf4,%esi
call   1030 <outb@plt>

x86 assembly (clang, -O2):
<exit>:
push   %rax
mov    $0xf4,%esi
call   1030 <outb@plt>

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @outb(i32 %3, i32 244)
unreachable
}

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = tail call i32 @outb(i32 %0, i32 244)
unreachable
}
/* Variables and functions */
scalar_t__ player_get_lives();
float f_lives() { return (float)player_get_lives(); }


x86 assembly (clang, -O0):
<f_lives>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <player_get_lives@plt>
cvtsi2ss %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_lives>:
push   %rax
xor    %eax,%eax
call   1030 <player_get_lives@plt>
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @f_lives() {
%1 = call i64 (...) @player_get_lives()
%2 = sitofp i64 %1 to float
ret float %2
}

LLVM IR (-O2):
define float @f_lives() {
%1 = tail call i64 (...) @player_get_lives()
%2 = sitofp i64 %1 to float
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closeDevice(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<closeDevice>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @closeDevice(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
int *__attribute__((no, const)) foo_const(int *p) { return p; }


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

x86 assembly (clang, -O2):
<foo_const>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i32* @foo_const(i32* readnone returned %0) {
ret i32* %0
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void add_m32_reg32(void *_m32, int reg32) {
  unsigned long *m32 = (unsigned long *)_m32;
  put8(0x01);
  put8((reg32 << 3) | 5);
  put32((unsigned int)(m32));
}


x86 assembly (clang, -O0):
<add_m32_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
shl    $0x3,%edi
or     $0x5,%edi
call   1030 <put8@plt>
mov    -0x18(%rbp),%rax
mov    %eax,%edi
call   1040 <put32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_m32_reg32>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0x1,%edi
call   1030 <put8@plt>
lea    0x5(,%rbx,8),%edi
call   1030 <put8@plt>
mov    %r14d,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @add_m32_reg32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %5
%8 = call i32 @put8(i32 1)
%9 = load i32, i32* %4
%10 = shl i32 %9, 3
%11 = or i32 %10, 5
%12 = call i32 @put8(i32 %11)
%13 = load i64*, i64** %5
%14 = ptrtoint i64* %13 to i32
%15 = call i32 @put32(i32 %14)
ret void
}

LLVM IR (-O2):
define void @add_m32_reg32(i8* %0, i32 %1) {
%3 = tail call i32 @put8(i32 1)
%4 = shl i32 %1, 3
%5 = or i32 %4, 5
%6 = tail call i32 @put8(i32 %5)
%7 = ptrtoint i8* %0 to i64
%8 = trunc i64 %7 to i32
%9 = tail call i32 @put32(i32 %8)
ret void
}
/* Type definitions */
struct fd_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct fd_state *);
void free_fd_state(struct fd_state *state) { free(state); }


x86 assembly (clang, -O0):
<free_fd_state>:
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_fd_state>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.fd_state = type { i32 }
define void @free_fd_state(%struct.fd_state* nocapture %0) {
%2 = tail call i32 @free(%struct.fd_state* %0)
ret void
}
double sqr2(double z) { return (z * z); }


x86 assembly (clang, -O0):
<sqr2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqr2>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @sqr2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @sqr2(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Variables and functions */
int init(void *p) { p = NULL; }


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @init(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ LRDP(char *);
void uc2_load_ucode() { LRDP("uc2:load_ucode\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"uc2:load_ucode\0A\00"
define void @uc2_load_ucode() {
%1 = call i32 @LRDP(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"uc2:load_ucode\0A\00"
define void @uc2_load_ucode() {
%1 = tail call i32 @LRDP(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
void endElement(char *uri, char *localName, char *qName) {
  if (uri == (void *)0)
    uri = "NULL";
  printf("endElement uri=[%s] localName=[%s] qName=[%s]\n", uri, localName,
         qName);
}


x86 assembly (clang, -O0):
<endElement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113a <endElement+0x2a>
lea    0xeca(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<endElement>:
mov    %rdx,%rcx
mov    %rsi,%rdx
test   %rdi,%rdi
lea    0xee0(%rip),%rsi
cmovne %rdi,%rsi
lea    0xeda(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"NULL\00"
@.str.1 = [47 x i8] c"endElement uri=[%s] localName=[%s] qName=[%s]\0A\00"
define void @endElement(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %4
br label %10
10: ; preds = %9, %3
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i8*, i8** %6
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"NULL\00"
@.str.1 = [47 x i8] c"endElement uri=[%s] localName=[%s] qName=[%s]\0A\00"
define void @endElement(i8* %0, i8* %1, i8* %2) {
%4 = icmp eq i8* %0, null
%5 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ minmax(int *, int, int *, int *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  int arr[500];
  int min = 0, max = 15;
  do {
    scanf("%d", &n);
  } while (n < 1);
  minmax(arr, n, &min, &max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7f0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x7e4(%rbp)
movl   $0xf,-0x7e8(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jl     1146 <main+0x26>
lea    -0x7e0(%rbp),%rdi
mov    -0x8(%rbp),%esi
lea    -0x7e4(%rbp),%rdx
lea    -0x7e8(%rbp),%rcx
call   1040 <minmax@plt>
xor    %eax,%eax
add    $0x7f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x7e8,%rsp
movl   $0x0,0x8(%rsp)
movl   $0xf,0x4(%rsp)
lea    0xebf(%rip),%r14
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
mov    0xc(%rsp),%esi
test   %esi,%esi
jle    1150 <main+0x30>
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1040 <minmax@plt>
xor    %eax,%eax
add    $0x7e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [500 x i32]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 15, i32* %5
br label %6
6: ; preds = %8, %0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 1
br i1 %10, label %6, label %11
11: ; preds = %8
%12 = getelementptr inbounds [500 x i32], [500 x i32]* %3, i64 0, i64 0
%13 = load i32, i32* %2
%14 = call i32 @minmax(i32* %12, i32 %13, i32* %4, i32* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [500 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast [500 x i32]* %2 to i8*
%7 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%8 = bitcast i32* %4 to i8*
store i32 15, i32* %4
br label %9
9: ; preds = %9, %0
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%11 = load i32, i32* %1
%12 = icmp slt i32 %11, 1
br i1 %12, label %9, label %13
13: ; preds = %9
%14 = getelementptr inbounds [500 x i32], [500 x i32]* %2, i64 0, i64 0
%15 = call i32 @minmax(i32* %14, i32 %11, i32* %3, i32* %4)
ret i32 0
}
/* Variables and functions */
int most_significant_bit_pos_ulong(unsigned long);
int lookup_max_height(size_t num_nodes) {
  if (num_nodes == 0)
    return -1;
  return most_significant_bit_pos_ulong((unsigned long)(num_nodes + 1)) << 1;
}


x86 assembly (clang, -O0):
<lookup_max_height>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <lookup_max_height+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    1146 <lookup_max_height+0x36>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <most_significant_bit_pos_ulong@plt>
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup_max_height>:
test   %rdi,%rdi
je     1126 <lookup_max_height+0x16>
push   %rax
add    $0x1,%rdi
call   1030 <most_significant_bit_pos_ulong@plt>
add    %eax,%eax
add    $0x8,%rsp
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @lookup_max_height(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add i64 %0, 1
%5 = tail call i32 @most_significant_bit_pos_ulong(i64 %4)
%6 = shl i32 %5, 1
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ cleanup_modules_used_by_loaders();
int /*<<< orphan*/ cleanup_modules_used_by_observers();
void cleanup_loaders_and_observers(void) {
  cleanup_modules_used_by_loaders();
  cleanup_modules_used_by_observers();
}


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

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

LLVM IR (-O0):
define void @cleanup_loaders_and_observers() {
%1 = call i32 (...) @cleanup_modules_used_by_loaders()
%2 = call i32 (...) @cleanup_modules_used_by_observers()
ret void
}

LLVM IR (-O2):
define void @cleanup_loaders_and_observers() {
%1 = tail call i32 (...) @cleanup_modules_used_by_loaders()
%2 = tail call i32 (...) @cleanup_modules_used_by_observers()
ret void
}
void enqueue(struct node **q, int *front, int *rear, struct node *key) {
  q[*rear] = key;
  *rear = *rear + 1;
}


x86 assembly (clang, -O0):
<enqueue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq (%rcx),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<enqueue>:
movslq (%rdx),%rax
mov    %rcx,(%rdi,%rax,8)
add    $0x1,%eax
mov    %eax,(%rdx)
ret

LLVM IR (-O0):
%struct.node = type opaque
define void @enqueue(%struct.node** %0, i32* %1, i32* %2, %struct.node* %3) {
%5 = alloca %struct.node**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca %struct.node*
store %struct.node** %0, %struct.node*** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store %struct.node* %3, %struct.node** %8
%9 = load %struct.node*, %struct.node** %8
%10 = load %struct.node**, %struct.node*** %5
%11 = load i32*, i32** %7
%12 = load i32, i32* %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds %struct.node*, %struct.node** %10, i64 %13
store %struct.node* %9, %struct.node** %14
%15 = load i32*, i32** %7
%16 = load i32, i32* %15
%17 = add nsw i32 %16, 1
%18 = load i32*, i32** %7
store i32 %17, i32* %18
ret void
}

LLVM IR (-O2):
%struct.node = type opaque
define void @enqueue(%struct.node** nocapture writeonly %0, i32* nocapture readnone %1, i32* nocapture %2, %struct.node* %3) {
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds %struct.node*, %struct.node** %0, i64 %6
store %struct.node* %3, %struct.node** %7
%8 = add nsw i32 %5, 1
store i32 %8, i32* %2
ret void
}
double Q_rho(double Q_rho_convection, double Q_rho_time) {
  return Q_rho_convection + Q_rho_time;
}


x86 assembly (clang, -O0):
<Q_rho>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_rho>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Q_rho(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 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @Q_rho(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ wait(int /*<<< orphan*/);
void execParent(void) { wait(0); }


x86 assembly (clang, -O0):
<execParent>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <wait@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<execParent>:
xor    %edi,%edi
jmp    1030 <wait@plt>

LLVM IR (-O0):
define void @execParent() {
%1 = call i32 @wait(i32 0)
ret void
}

LLVM IR (-O2):
define void @execParent() {
%1 = tail call i32 @wait(i32 0)
ret void
}
int is_backslash_escaped(const char *end, const char *start) {
  const char *ptr;
  for (ptr = end; ptr >= start; ptr--) {
    if (*ptr != '\\') {
      break;
    }
  }
  return (end - ptr) & 1;
}


x86 assembly (clang, -O0):
<is_backslash_escaped>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     114d <is_backslash_escaped+0x4d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     1137 <is_backslash_escaped+0x37>
jmp    114d <is_backslash_escaped+0x4d>
jmp    113c <is_backslash_escaped+0x3c>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <is_backslash_escaped+0x14>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
and    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_backslash_escaped>:
mov    %rdi,%rax
mov    %rdi,%rcx
cmp    %rsi,%rdi
jb     111e <is_backslash_escaped+0x1e>
mov    %rax,%rcx
xchg   %ax,%ax
cmpb   $0x5c,(%rcx)
jne    111e <is_backslash_escaped+0x1e>
add    $0xffffffffffffffff,%rcx
cmp    %rsi,%rcx
jae    1110 <is_backslash_escaped+0x10>
sub    %ecx,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_backslash_escaped(i8* %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %11, label %4
4: ; preds = %2, %8
%5 = phi i8* [ %9, %8 ], [ %0, %2 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 92
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %5, i64 -1
%10 = icmp ult i8* %9, %1
br i1 %10, label %11, label %4
11: ; preds = %8, %4, %2
%12 = phi i8* [ %0, %2 ], [ %5, %4 ], [ %9, %8 ]
%13 = ptrtoint i8* %0 to i64
%14 = ptrtoint i8* %12 to i64
%15 = sub i64 %13, %14
%16 = trunc i64 %15 to i32
%17 = and i32 %16, 1
ret i32 %17
}