xunge/DecIR huggingface dataset:
int cntOddDigits(int data) {
  int cnt = 0, k;
  while (data != 0) {
    k = data % 10;
    if ((k != 0) && (k % 2 == 1))
      cnt++;
    data /= 10;
  }
  return cnt;
}


x86 assembly (clang, -O0):
<cntOddDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1160 <cntOddDigits+0x60>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114d <cntOddDigits+0x4d>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    114d <cntOddDigits+0x4d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <cntOddDigits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cntOddDigits>:
xor    %eax,%eax
test   %edi,%edi
je     115a <cntOddDigits+0x5a>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
setne  %r8b
mov    %esi,%edx
shr    $0x7,%dl
add    %sil,%dl
and    $0xfe,%dl
sub    %dl,%sil
cmp    $0x1,%sil
sete   %dl
and    %r8b,%dl
movzbl %dl,%edx
add    %edx,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <cntOddDigits+0x10>
ret

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

LLVM IR (-O2):
define i32 @cntOddDigits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %17, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %14, %3 ], [ %0, %1 ]
%5 = phi i32 [ %13, %3 ], [ 0, %1 ]
%6 = srem i32 %4, 10
%7 = icmp ne i32 %6, 0
%8 = trunc i32 %6 to i8
%9 = srem i8 %8, 2
%10 = icmp eq i8 %9, 1
%11 = and i1 %7, %10
%12 = zext i1 %11 to i32
%13 = add nuw nsw i32 %5, %12
%14 = sdiv i32 %4, 10
%15 = add i32 %4, 9
%16 = icmp ult i32 %15, 19
br i1 %16, label %17, label %3
17: ; preds = %3, %1
%18 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %18
}
int trace_seq_putc(struct trace_seq *s, unsigned char c) { return 0; }


x86 assembly (clang, -O0):
<trace_seq_putc>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.trace_seq = type opaque
define i32 @trace_seq_putc(%struct.trace_seq* %0, i8 zeroext %1) {
%3 = alloca %struct.trace_seq*
%4 = alloca i8
store %struct.trace_seq* %0, %struct.trace_seq** %3
store i8 %1, i8* %4
ret i32 0
}

LLVM IR (-O2):
%struct.trace_seq = type opaque
define i32 @trace_seq_putc(%struct.trace_seq* nocapture readnone %0, i8 zeroext %1) {
ret i32 0
}
unsigned int address_to_frame(void *address) {
  return (unsigned int)(address - 0x1800000) / 0x1000;
}


x86 assembly (clang, -O0):
<address_to_frame>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffe800000,%rax
shr    $0xc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<address_to_frame>:
lea    -0x1800000(%rdi),%eax
shr    $0xc,%eax
ret

LLVM IR (-O0):
define i32 @address_to_frame(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 -25165824
%5 = ptrtoint i8* %4 to i32
%6 = udiv i32 %5, 4096
ret i32 %6
}

LLVM IR (-O2):
define i32 @address_to_frame(i8* %0) {
%2 = getelementptr i8, i8* %0, i64 -25165824
%3 = ptrtoint i8* %2 to i64
%4 = trunc i64 %3 to i32
%5 = lshr i32 %4, 12
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getpid();
int getppid();
int /*<<< orphan*/ printf(char *, int, int);
void run_grandchild() {
  printf("grandchild = %d, parent = %d\n", getpid(), getppid());
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<run_grandchild>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getppid@plt>
mov    -0x4(%rbp),%esi
mov    %eax,%edx
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<run_grandchild>:
push   %rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getppid@plt>
lea    0xea8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"grandchild = %d, parent = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define void @run_grandchild() {
%1 = call i32 (...) @getpid()
%2 = call i32 (...) @getppid()
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@.str = [30 x i8] c"grandchild = %d, parent = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define void @run_grandchild() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 (...) @getppid()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
__complex__ float func(__complex__ float x) {
  if (__real__ x == 0.0)
    return 1.0;
  else
    return 0.0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movlpd %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    113f <func+0x3f>
jp     113f <func+0x3f>
movss  0xed3(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    114f <func+0x4f>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
xorps  %xmm0,%xmm0
jne    1115 <func+0x15>
jp     1115 <func+0x15>
movss  0xeeb(%rip),%xmm0
ret

LLVM IR (-O0):
define <2 x float> @func(<2 x float> %0) {
%2 = alloca { float, float }
%3 = alloca { float, float }
%4 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %4
%5 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%6 = load float, float* %5
%7 = fpext float %6 to double
%8 = fcmp oeq double %7, 0.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%11 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float 1.000000e+00, float* %10
store float 0.000000e+00, float* %11
br label %15
12: ; preds = %1
%13 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%14 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float 0.000000e+00, float* %13
store float 0.000000e+00, float* %14
br label %15
15: ; preds = %12, %9
%16 = bitcast { float, float }* %2 to <2 x float>*
%17 = load <2 x float>, <2 x float>* %16
ret <2 x float> %17
}

LLVM IR (-O2):
define <2 x float> @func(<2 x float> %0) {
%2 = extractelement <2 x float> %0, i64 0
%3 = fcmp oeq float %2, 0.000000e+00
%4 = select i1 %3, <2 x float> <float 1.000000e+00, float 0.000000e+00>, <2 x float> zeroinitializer
ret <2 x float> %4
}
/* Variables and functions */
int atoi(char *);
int gtw_prepare(int argc, char **argv) {
  if (argc == 1) {
    return 1;
  } else {
    return atoi(argv[1]);
  }
}


x86 assembly (clang, -O0):
<gtw_prepare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1135 <gtw_prepare+0x25>
movl   $0x1,-0x4(%rbp)
jmp    1145 <gtw_prepare+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtw_prepare>:
cmp    $0x1,%edi
jne    111b <gtw_prepare+0xb>
mov    $0x1,%eax
ret
mov    0x8(%rsi),%rdi
jmp    1030 <atoi@plt>

LLVM IR (-O0):
define i32 @gtw_prepare(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
store i32 %13, i32* %3
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @gtw_prepare(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ done(int /*<<< orphan*/);
int /*<<< orphan*/ getargs(int, char **);
int /*<<< orphan*/ lalr();
int /*<<< orphan*/ lr0();
int /*<<< orphan*/ make_parser();
int /*<<< orphan*/ open_files();
int /*<<< orphan*/ output();
int /*<<< orphan*/ reader();
int /*<<< orphan*/ set_signals();
int /*<<< orphan*/ verbose();
int main(int argc, char **argv) {
  set_signals();
  getargs(argc, argv);
  open_files();
  reader();
  lr0();
  lalr();
  make_parser();
  verbose();
  output();
  done(0);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   10c0 <set_signals@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   10b0 <getargs@plt>
mov    $0x0,%al
call   1070 <open_files@plt>
mov    $0x0,%al
call   1060 <reader@plt>
mov    $0x0,%al
call   1030 <lr0@plt>
mov    $0x0,%al
call   1090 <lalr@plt>
mov    $0x0,%al
call   1080 <make_parser@plt>
mov    $0x0,%al
call   10a0 <verbose@plt>
mov    $0x0,%al
call   1040 <output@plt>
xor    %edi,%edi
call   1050 <done@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   10c0 <set_signals@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   10b0 <getargs@plt>
xor    %eax,%eax
call   1070 <open_files@plt>
xor    %eax,%eax
call   1060 <reader@plt>
xor    %eax,%eax
call   1030 <lr0@plt>
xor    %eax,%eax
call   1090 <lalr@plt>
xor    %eax,%eax
call   1080 <make_parser@plt>
xor    %eax,%eax
call   10a0 <verbose@plt>
xor    %eax,%eax
call   1040 <output@plt>
xor    %edi,%edi
call   1050 <done@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @set_signals()
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @getargs(i32 %7, i8** %8)
%10 = call i32 (...) @open_files()
%11 = call i32 (...) @reader()
%12 = call i32 (...) @lr0()
%13 = call i32 (...) @lalr()
%14 = call i32 (...) @make_parser()
%15 = call i32 (...) @verbose()
%16 = call i32 (...) @output()
%17 = call i32 @done(i32 0)
ret i32 1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @set_signals()
%4 = tail call i32 @getargs(i32 %0, i8** %1)
%5 = tail call i32 (...) @open_files()
%6 = tail call i32 (...) @reader()
%7 = tail call i32 (...) @lr0()
%8 = tail call i32 (...) @lalr()
%9 = tail call i32 (...) @make_parser()
%10 = tail call i32 (...) @verbose()
%11 = tail call i32 (...) @output()
%12 = tail call i32 @done(i32 0)
ret i32 1
}
void invfft_(x, n, isign) register struct complex *x;
int *n, *isign;
{ invfft(x, (*n), (*isign)); }


x86 assembly (clang, -O0):
<invfft_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    $0x0,%al
call   1030 <invfft@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invfft_>:
mov    (%rsi),%esi
mov    (%rdx),%edx
xor    %eax,%eax
jmp    1030 <invfft@plt>

LLVM IR (-O0):
%struct.complex = type opaque
define void @invfft_(%struct.complex* %0, i32* %1, i32* %2) {
%4 = alloca %struct.complex*
%5 = alloca i32*
%6 = alloca i32*
store %struct.complex* %0, %struct.complex** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load %struct.complex*, %struct.complex** %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = call i32 (%struct.complex*, i32, i32, ...) bitcast (i32 (...)* @invfft to i32 (%struct.complex*, i32, i32, ...)*)(%struct.complex* %7, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.complex = type opaque
define void @invfft_(%struct.complex* %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = tail call i32 (%struct.complex*, i32, i32, ...) bitcast (i32 (...)* @invfft to i32 (%struct.complex*, i32, i32, ...)*)(%struct.complex* %0, i32 %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xf1() {
  Assert_real((isdigit(241) == 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_isdigit.c",
              1210, ("isdigit should be 0 for 0xf1"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xf1>:
push   %rax
mov    $0xf1,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ba,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xf1\00"
define void @t_isdigit_0xf1() {
%1 = call i64 @isdigit(i32 241)
%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 1210, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xf1\00"
define void @t_isdigit_0xf1() {
%1 = tail call i64 @isdigit(i32 241)
%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 1210, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double sin(int);
int bigFor() {
  int i;
  double acc;
  for (i = 0; i < 1000000000; i++) {
    acc = acc + sin(i);
  }
}


x86 assembly (clang, -O0):
<bigFor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x3b9aca00,-0x8(%rbp)
jge    115d <bigFor+0x4d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <bigFor+0xf>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigFor>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <sin@plt>
lea    0x1(%rbx),%edi
call   1030 <sin@plt>
lea    0x2(%rbx),%edi
call   1030 <sin@plt>
lea    0x3(%rbx),%edi
call   1030 <sin@plt>
lea    0x4(%rbx),%edi
call   1030 <sin@plt>
lea    0x5(%rbx),%edi
call   1030 <sin@plt>
lea    0x6(%rbx),%edi
call   1030 <sin@plt>
lea    0x7(%rbx),%edi
call   1030 <sin@plt>
lea    0x8(%rbx),%edi
call   1030 <sin@plt>
lea    0x9(%rbx),%edi
call   1030 <sin@plt>
add    $0xa,%ebx
cmp    $0x3b9aca00,%ebx
jne    1120 <bigFor+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bigFor() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %2
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1000000000
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load double, double* %3
%9 = load i32, i32* %2
%10 = call double @sin(i32 %9)
%11 = fadd double %8, %10
store double %11, double* %3
br label %12
12: ; preds = %7
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %4
15: ; preds = %4
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @bigFor() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %22, %1 ]
%3 = tail call double @sin(i32 %2)
%4 = or i32 %2, 1
%5 = tail call double @sin(i32 %4)
%6 = add nuw nsw i32 %2, 2
%7 = tail call double @sin(i32 %6)
%8 = add nuw nsw i32 %2, 3
%9 = tail call double @sin(i32 %8)
%10 = add nuw nsw i32 %2, 4
%11 = tail call double @sin(i32 %10)
%12 = add nuw nsw i32 %2, 5
%13 = tail call double @sin(i32 %12)
%14 = add nuw nsw i32 %2, 6
%15 = tail call double @sin(i32 %14)
%16 = add nuw nsw i32 %2, 7
%17 = tail call double @sin(i32 %16)
%18 = add nuw nsw i32 %2, 8
%19 = tail call double @sin(i32 %18)
%20 = add nuw nsw i32 %2, 9
%21 = tail call double @sin(i32 %20)
%22 = add nuw nsw i32 %2, 10
%23 = icmp eq i32 %22, 1000000000
br i1 %23, label %24, label %1
24: ; preds = %1
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ number;

/* Variables and functions */
int /*<<< orphan*/ printWordsUtil(int *, int /*<<< orphan*/, char *, int);
void printWords(void) {
  int number[] = {2, 0, 2, 2};
  int n = sizeof(number) / sizeof(number[0]);
  char result[n + 1];
  result[n] = '\0';
  printWordsUtil(number, 0, result, n);
}


x86 assembly (clang, -O0):
<printWords>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movaps 0xee1(%rip),%xmm0
movaps %xmm0,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,%rsp
mov    %rax,-0x28(%rbp)
movslq -0x14(%rbp),%rax
movb   $0x0,(%rdx,%rax,1)
lea    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%ecx
xor    %esi,%esi
call   1030 <printWordsUtil@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printWords>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movb   $0x0,0x4(%rsp)
lea    0x10(%rsp),%rdi
mov    %rsp,%rdx
xor    %esi,%esi
mov    $0x4,%ecx
call   1030 <printWordsUtil@plt>
mov    %rbx,%rsp
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.printWords.number = [4 x i32] [i32 2, i32 0, i32 2, i32 2]
define void @printWords() {
%1 = alloca [4 x i32]
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = bitcast [4 x i32]* %1 to i8*
store i32 4, i32* %2
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %3
%10 = alloca i8, i64 %8
store i64 %8, i64* %4
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
store i8 0, i8* %13
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%15 = load i32, i32* %2
%16 = call i32 @printWordsUtil(i32* %14, i32 0, i8* %10, i32 %15)
%17 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
@__const.printWords.number = [4 x i32] [i32 2, i32 0, i32 2, i32 2]
define void @printWords() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = tail call i8* @llvm.stacksave()
%4 = alloca [5 x i8]
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 4
store i8 0, i8* %6
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%8 = call i32 @printWordsUtil(i32* %7, i32 0, i8* %5, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *programName) {
  printf("usage: %s killer_sudoku_file [solution_file]\n", programName);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"usage: %s killer_sudoku_file [solution_file]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [46 x i8] c"usage: %s killer_sudoku_file [solution_file]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
char asm_inputc(char *scancode) {
  unsigned short ax;
  asm volatile("movb $0x10,%%ah ; "
               "int $0x16"
               : "=a"(ax));
  if (scancode)
    *scancode = (ax >> 8);
  return (char)ax;
}


x86 assembly (clang, -O0):
<asm_inputc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x10,%ah
int    $0x16
mov    %ax,-0xa(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     112a <asm_inputc+0x2a>
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xa(%rbp),%ax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<asm_inputc>:
mov    $0x10,%ah
int    $0x16
test   %rdi,%rdi
je     110b <asm_inputc+0xb>
mov    %ah,(%rdi)
ret

LLVM IR (-O0):
define signext i8 @asm_inputc(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = call i16 asm sideeffect "movb $$0x10,%ah ; int $$0x16", "={ax},~{dirflag},~{fpsr},~{flags}"()
store i16 %4, i16* %3
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i16, i16* %3
%9 = zext i16 %8 to i32
%10 = ashr i32 %9, 8
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %2
store i8 %11, i8* %12
br label %13
13: ; preds = %7, %1
%14 = load i16, i16* %3
%15 = trunc i16 %14 to i8
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @asm_inputc(i8* writeonly %0) {
%2 = tail call i16 asm sideeffect "movb $$0x10,%ah ; int $$0x16", "={ax},~{dirflag},~{fpsr},~{flags}"()
%3 = icmp eq i8* %0, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = lshr i16 %2, 8
%6 = trunc i16 %5 to i8
store i8 %6, i8* %0
br label %7
7: ; preds = %4, %1
%8 = trunc i16 %2 to i8
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ end();
int main(void) {
  end();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <end@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <end@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @end()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @end()
ret i32 0
}
int q_test(unsigned char *table, int pos) {
  return !!(table[pos >> 3] & (1 << (pos & 7)));
}


x86 assembly (clang, -O0):
<q_test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0xc(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<q_test>:
mov    %esi,%ecx
mov    %esi,%eax
sar    $0x3,%eax
cltq
movzbl (%rdi,%rax,1),%eax
and    $0x7,%cl
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @q_test(i8* %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 = load i32, i32* %4
%7 = ashr i32 %6, 3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i32, i32* %4
%13 = and i32 %12, 7
%14 = shl i32 1, %13
%15 = and i32 %11, %14
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @q_test(i8* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 3
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = and i32 %1, 7
%9 = lshr i32 %7, %8
%10 = and i32 %9, 1
ret i32 %10
}
/* Variables and functions */
int __setpgid(int /*<<< orphan*/, int /*<<< orphan*/);
int setpgrp() { return __setpgid(0, 0); }


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

x86 assembly (clang, -O2):
<setpgrp>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <__setpgid@plt>

LLVM IR (-O0):
define i32 @setpgrp() {
%1 = call i32 @__setpgid(i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @setpgrp() {
%1 = tail call i32 @__setpgid(i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void qcc_close(int fd) { close(fd); }


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

LLVM IR (-O0):
define void @qcc_close(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 @qcc_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ kread(int, void *, size_t);
ssize_t __libc_read(int fd, void *buf, size_t len) {
  return kread(fd, buf, len);
}


x86 assembly (clang, -O0):
<__libc_read>:
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 <kread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_read>:
jmp    1030 <kread@plt>

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

LLVM IR (-O2):
define i32 @__libc_read(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @kread(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
void _uart_init() {}


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

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

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

LLVM IR (-O2):
define void @_uart_init() {
ret void
}
int main(void) {
  int a;
  int s;
  {
    a = 0;
    s = 1;
    if (a == 1) {
      goto ERROR1;
    ERROR1:;
    } else {
      a = 1;
    }
    if (a == 1) {
      if (s == 1) {
      } else {
        goto ERROR2;
      ERROR2:;
      }
    } else {
    }
    if (s == 1) {
    } else {
      goto ERROR3;
    ERROR3:;
    }
    return (0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    112d <main+0x2d>
jmp    1128 <main+0x28>
jmp    1134 <main+0x34>
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    115c <main+0x5c>
cmpl   $0x1,-0xc(%rbp)
jne    114d <main+0x4d>
jmp    1157 <main+0x57>
jmp    1152 <main+0x52>
jmp    1157 <main+0x57>
jmp    1161 <main+0x61>
jmp    1161 <main+0x61>
cmpl   $0x1,-0xc(%rbp)
jne    1170 <main+0x70>
jmp    117a <main+0x7a>
jmp    1175 <main+0x75>
jmp    117a <main+0x7a>
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
store i32 0, i32* %1
store i32 0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %0
br label %7
7: ; preds = %6
br label %9
8: ; preds = %0
store i32 1, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %16
15: ; preds = %12
br label %18
16: ; preds = %12
br label %17
17: ; preds = %16
br label %18
18: ; preds = %17, %15
br label %20
19: ; preds = %9
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %3
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %24
23: ; preds = %20
br label %26
24: ; preds = %20
br label %25
25: ; preds = %24
br label %26
26: ; preds = %25, %23
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int fn1(int p) { return 0 ? 0 : p - 1; }


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
lea    -0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @fn1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @fn1(i32 %0) {
%2 = add nsw i32 %0, -1
ret i32 %2
}
int test_imm_E3int16_mem(short *val) {
  return ((*val) & (0xE3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E3int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xe3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_E3int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 227
%7 = icmp ne i32 %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_E3int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 227
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ le16toh(int /*<<< orphan*/);
uint16_t _le16toh(uint16_t value) { return le16toh(value); }


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

x86 assembly (clang, -O2):
<_le16toh>:
jmp    1030 <le16toh@plt>

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

LLVM IR (-O2):
define i32 @_le16toh(i32 %0) {
%2 = tail call i32 @le16toh(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printArray(int arr[], int size) {
  int i;
  for (i = 0; i < size; i++)
    printf("%d ", arr[i]);
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <printArray+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printArray+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printArray+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int /*<<< orphan*/ GET_HIGH_WORD(scalar_t__, double);
int __signbit(double x) {
  int32_t hx;
  GET_HIGH_WORD(hx, x);
  return hx < 0;
}


x86 assembly (clang, -O0):
<__signbit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
call   1030 <GET_HIGH_WORD@plt>
cmpq   $0x0,-0x10(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__signbit>:
push   %rax
call   1030 <GET_HIGH_WORD@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__signbit(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = load i64, i64* %3
%5 = load double, double* %2
%6 = call i32 @GET_HIGH_WORD(i64 %4, double %5)
%7 = load i64, i64* %3
%8 = icmp slt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @__signbit(double %0) {
%2 = tail call i32 @GET_HIGH_WORD(i64 undef, double %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR8D_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR8D_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMR8D_swap(i8* %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 = load i32, i32* %4
%7 = call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMR8D_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Type definitions */
struct array_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ array_item_remove_with_shift(struct array_s *,
                                                unsigned long);
int /*<<< orphan*/ array_shrink_with_ratio(struct array_s *, float);
void array_item_remove_with_shift_with_shrink(struct array_s *a,
                                              unsigned long n, float ratio) {
  array_item_remove_with_shift(a, n);
  array_shrink_with_ratio(a, ratio);
}


x86 assembly (clang, -O0):
<array_item_remove_with_shift_with_shrink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <array_item_remove_with_shift@plt>
mov    -0x8(%rbp),%rdi
movss  -0x14(%rbp),%xmm0
call   1040 <array_shrink_with_ratio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_item_remove_with_shift_with_shrink>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
mov    %rdi,%rbx
call   1030 <array_item_remove_with_shift@plt>
mov    %rbx,%rdi
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1040 <array_shrink_with_ratio@plt>

LLVM IR (-O0):
%struct.array_s = type { i32 }
define void @array_item_remove_with_shift_with_shrink(%struct.array_s* %0, i64 %1, float %2) {
%4 = alloca %struct.array_s*
%5 = alloca i64
%6 = alloca float
store %struct.array_s* %0, %struct.array_s** %4
store i64 %1, i64* %5
store float %2, float* %6
%7 = load %struct.array_s*, %struct.array_s** %4
%8 = load i64, i64* %5
%9 = call i32 @array_item_remove_with_shift(%struct.array_s* %7, i64 %8)
%10 = load %struct.array_s*, %struct.array_s** %4
%11 = load float, float* %6
%12 = call i32 @array_shrink_with_ratio(%struct.array_s* %10, float %11)
ret void
}

LLVM IR (-O2):
%struct.array_s = type { i32 }
define void @array_item_remove_with_shift_with_shrink(%struct.array_s* %0, i64 %1, float %2) {
%4 = tail call i32 @array_item_remove_with_shift(%struct.array_s* %0, i64 %1)
%5 = tail call i32 @array_shrink_with_ratio(%struct.array_s* %0, float %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
swap() { ol("mov.l\t%d0,%d2\n\tmov.l\t%d1,%d0\n\tmov.l\t%d2,%d1"); }


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"mov.l\09%d0,%d2\0A\09mov.l\09%d1,%d0\0A\09mov.l\09%d2,%d1\00"
define i32 @swap() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [44 x i8] c"mov.l\09%d0,%d2\0A\09mov.l\09%d1,%d0\0A\09mov.l\09%d2,%d1\00"
define i32 @swap() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int onNotify(int nProgress) {
  printf("Current progress: %d\n", nProgress);
  return 1;
}


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

x86 assembly (clang, -O2):
<onNotify>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Current progress: %d\0A\00"
define i32 @onNotify(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 1
}

LLVM IR (-O2):
@.str = [22 x i8] c"Current progress: %d\0A\00"
define i32 @onNotify(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 1
}
/* Variables and functions */
char *format_str(char *, char const *, char const *);
char *format_root_spec(const char spec[], const char mount_point[]) {
  return format_str("%s/%s", mount_point, spec + (sizeof("%r/") - 1));
}


x86 assembly (clang, -O0):
<format_root_spec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
add    $0x3,%rdx
lea    0xecd(%rip),%rdi
call   1030 <format_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_root_spec>:
lea    0x3(%rdi),%rdx
lea    0xee5(%rip),%rdi
jmp    1030 <format_str@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
define i8* @format_root_spec(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 3
%8 = call i8* @format_str(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %7)
ret i8* %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define i8* @format_root_spec(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 3
%4 = tail call i8* @format_str(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %3)
ret i8* %4
}
/* Variables and functions */
int write(int, char *, int);
int ap_log_hputc(char c, int file_handle) { return write(file_handle, &c, 1); }


x86 assembly (clang, -O0):
<ap_log_hputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_log_hputc>:
push   %rax
mov    %esi,%eax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ap_log_hputc(i8 signext %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 = call i32 @write(i32 %5, i8* %3, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @ap_log_hputc(i8 signext %0, i32 %1) {
%3 = alloca i8
store i8 %0, i8* %3
%4 = call i32 @write(i32 %1, i8* %3, i32 1)
ret i32 %4
}
void nams_process_command(int command, int param) {
  (void)command;
  (void)param;
}


x86 assembly (clang, -O0):
<nams_process_command>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @nams_process_command(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 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @nams_process_command(i32 %0, i32 %1) {
ret void
}
signed long long f2(signed long long v_a, signed long long v_b) {
  signed long long v_anda = v_a & -15;
  signed long long v_andb = v_b & 14;
  signed long long v_or = v_anda | v_andb;
  return v_or;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0xfffffffffffffff1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0xe,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
or     -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
and    $0xfffffffffffffff1,%rdi
and    $0xe,%esi
lea    (%rsi,%rdi,1),%rax
ret

LLVM IR (-O0):
define i64 @f2(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%8 = load i64, i64* %3
%9 = and i64 %8, -15
store i64 %9, i64* %5
%10 = load i64, i64* %4
%11 = and i64 %10, 14
store i64 %11, i64* %6
%12 = load i64, i64* %5
%13 = load i64, i64* %6
%14 = or i64 %12, %13
store i64 %14, i64* %7
%15 = load i64, i64* %7
ret i64 %15
}

LLVM IR (-O2):
define i64 @f2(i64 %0, i64 %1) {
%3 = and i64 %0, -15
%4 = and i64 %1, 14
%5 = or i64 %4, %3
ret i64 %5
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int fstat(int, struct stat *);
int fileSize(int fd) {
  int status;
  struct stat im_stat;
  status = fstat(fd, &im_stat);
  if (status < 0) {
    return status;
  } else
    return im_stat.st_size;
}


x86 assembly (clang, -O0):
<fileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <fstat@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    113f <fileSize+0x2f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <fileSize+0x35>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileSize>:
push   %rax
mov    %rsp,%rsi
call   1030 <fstat@plt>
test   %eax,%eax
js     1120 <fileSize+0x10>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @fileSize(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.stat
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @fstat(i32 %6, %struct.stat* %5)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %15
12: ; preds = %1
%13 = getelementptr inbounds %struct.stat, %struct.stat* %5, i32 0, i32 0
%14 = load i32, i32* %13
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fileSize(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = icmp slt i32 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 %4, i32 %7
ret i32 %8
}