xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
void relu_forward(float a, float b) { printf("relu: %f, %f\n", a, b); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"relu: %f, %f\0A\00"
define void @relu_forward(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %5, float %6)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"relu: %f, %f\0A\00"
define void @relu_forward(float %0, float %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %0, float %1)
ret void
}
unsigned xrop3_21_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T & S;
  stk1 = D | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_21_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_21_1_1>:
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %edi,%esi
not    %edi
shl    $0x8,%edi
not    %eax
and    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_21_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = and i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = and i32 %37, %38
%40 = or i32 %36, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %7
%43 = and i32 %41, %42
%44 = or i32 %40, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_21_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = mul nuw nsw i32 %4, 257
%6 = xor i32 %3, -1
%7 = shl nsw i32 %6, 8
%8 = xor i32 %5, -1
%9 = and i32 %7, %8
%10 = or i8 %1, %0
%11 = zext i8 %10 to i32
%12 = or i32 %9, %11
ret i32 %12
}
double jd2ep(dj)
double dj;
{
  double date, time;
  jd2dt(dj, &date, &time);
  return (dt2ep(date, time));
}


x86 assembly (clang, -O0):
<jd2ep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x1,%al
call   1040 <jd2dt@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    $0x2,%al
call   1030 <dt2ep@plt>
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jd2ep>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x1,%al
call   1040 <jd2dt@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1030 <dt2ep@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @jd2ep(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @jd2dt to i32 (double, double*, double*, ...)*)(double %5, double* %3, double* %4)
%7 = load double, double* %3
%8 = load double, double* %4
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2ep to i32 (double, double, ...)*)(double %7, double %8)
%10 = sitofp i32 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @jd2ep(double %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @jd2dt to i32 (double, double*, double*, ...)*)(double %0, double* %2, double* %3)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2ep to i32 (double, double, ...)*)(double %7, double %8)
%10 = sitofp i32 %9 to double
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ cargaFicheroBinario();
int /*<<< orphan*/ creaCrucigrama();
int /*<<< orphan*/ existeFichero();
int /*<<< orphan*/ imprimeCrucigrama();
int /*<<< orphan*/ liberaCrucigrama();
int /*<<< orphan*/ reservaCrucigrama();
int main() {
  existeFichero();
  cargaFicheroBinario();
  reservaCrucigrama();
  creaCrucigrama();
  imprimeCrucigrama();
  liberaCrucigrama();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <existeFichero@plt>
mov    $0x0,%al
call   1060 <cargaFicheroBinario@plt>
mov    $0x0,%al
call   1040 <reservaCrucigrama@plt>
mov    $0x0,%al
call   1080 <creaCrucigrama@plt>
mov    $0x0,%al
call   1030 <imprimeCrucigrama@plt>
mov    $0x0,%al
call   1070 <liberaCrucigrama@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <existeFichero@plt>
xor    %eax,%eax
call   1060 <cargaFicheroBinario@plt>
xor    %eax,%eax
call   1040 <reservaCrucigrama@plt>
xor    %eax,%eax
call   1080 <creaCrucigrama@plt>
xor    %eax,%eax
call   1030 <imprimeCrucigrama@plt>
xor    %eax,%eax
call   1070 <liberaCrucigrama@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @existeFichero()
%3 = call i32 (...) @cargaFicheroBinario()
%4 = call i32 (...) @reservaCrucigrama()
%5 = call i32 (...) @creaCrucigrama()
%6 = call i32 (...) @imprimeCrucigrama()
%7 = call i32 (...) @liberaCrucigrama()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @existeFichero()
%2 = tail call i32 (...) @cargaFicheroBinario()
%3 = tail call i32 (...) @reservaCrucigrama()
%4 = tail call i32 (...) @creaCrucigrama()
%5 = tail call i32 (...) @imprimeCrucigrama()
%6 = tail call i32 (...) @liberaCrucigrama()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void aam() {
  db(0xD4);
  db(0x0A);
}


x86 assembly (clang, -O0):
<aam>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd4,%edi
call   1030 <db@plt>
mov    $0xa,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<aam>:
push   %rax
mov    $0xd4,%edi
call   1030 <db@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @aam() {
%1 = call i32 @db(i32 212)
%2 = call i32 @db(i32 10)
ret void
}

LLVM IR (-O2):
define void @aam() {
%1 = tail call i32 @db(i32 212)
%2 = tail call i32 @db(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sbc_a_hl();
void opcode_9e() { sbc_a_hl(); }


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

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

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

LLVM IR (-O2):
define void @opcode_9e() {
%1 = tail call i32 (...) @sbc_a_hl()
ret void
}
unsigned int newer_style_hook(const struct nf_hook_ops *ops,
                              struct sk_buff *skb,
                              const struct nf_hook_state *state) {
  (void)ops;
  (void)skb;
  (void)state;
  return 0;
}


x86 assembly (clang, -O0):
<newer_style_hook>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.nf_hook_ops = type opaque
%struct.sk_buff = type opaque
%struct.nf_hook_state = type opaque
define i32 @newer_style_hook(%struct.nf_hook_ops* %0, %struct.sk_buff* %1, %struct.nf_hook_state* %2) {
%4 = alloca %struct.nf_hook_ops*
%5 = alloca %struct.sk_buff*
%6 = alloca %struct.nf_hook_state*
store %struct.nf_hook_ops* %0, %struct.nf_hook_ops** %4
store %struct.sk_buff* %1, %struct.sk_buff** %5
store %struct.nf_hook_state* %2, %struct.nf_hook_state** %6
%7 = load %struct.nf_hook_ops*, %struct.nf_hook_ops** %4
%8 = load %struct.sk_buff*, %struct.sk_buff** %5
%9 = load %struct.nf_hook_state*, %struct.nf_hook_state** %6
ret i32 0
}

LLVM IR (-O2):
%struct.nf_hook_ops = type opaque
%struct.sk_buff = type opaque
%struct.nf_hook_state = type opaque
define i32 @newer_style_hook(%struct.nf_hook_ops* nocapture readnone %0, %struct.sk_buff* nocapture readnone %1, %struct.nf_hook_state* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ evdp_final();
void network_final() { evdp_final(); }


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

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

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

LLVM IR (-O2):
define void @network_final() {
%1 = tail call i32 (...) @evdp_final()
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int string_cmp(const void *litem, const void *ritem) {
  char *lstring = (char *)litem;
  char *rstring = (char *)ritem;
  return strcmp(lstring, rstring);
}


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

x86 assembly (clang, -O2):
<string_cmp>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @string_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x63() {
  Assert_real((isbdigit(99) == 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_isbdigit.c",
              500, ("isbdigit should be 0 for c"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for c\00"
define void @t_isbdigit_0x63() {
%1 = tail call i64 @isbdigit(i32 99)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 500, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int q, y;
  q = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (q > 0) {
    if (y > 0) {
      q = q - y - 1;
    } else {
      q = q + y - 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1169 <main+0x59>
cmpl   $0x0,-0xc(%rbp)
jle    1158 <main+0x48>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1164 <main+0x54>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int strlen(char const *);
int singlecharopt(const char *str) {
  if (strlen(str) == 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<singlecharopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jne    113a <singlecharopt+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1141 <singlecharopt+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<singlecharopt>:
push   %rax
call   1030 <strlen@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @singlecharopt(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int foo() {
  printf("Hello world!\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<foo>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
define i32 @foo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello world!\00"
define i32 @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int changed(char *a, char *b) {
  if (a == 0 && b == 0)
    return 0;
  if (a != 0 && b != 0 && strcmp(a, b) == 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<changed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1142 <changed+0x32>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <changed+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1182 <changed+0x72>
cmpq   $0x0,-0x10(%rbp)
je     117b <changed+0x6b>
cmpq   $0x0,-0x18(%rbp)
je     117b <changed+0x6b>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    117b <changed+0x6b>
movl   $0x0,-0x4(%rbp)
jmp    1182 <changed+0x72>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<changed>:
push   %rbx
xor    %ebx,%ebx
mov    %rdi,%rax
or     %rsi,%rax
je     1134 <changed+0x24>
test   %rdi,%rdi
je     112f <changed+0x1f>
test   %rsi,%rsi
je     112f <changed+0x1f>
call   1030 <strcmp@plt>
test   %rax,%rax
je     1134 <changed+0x24>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @changed(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %14, label %6
6: ; preds = %2
%7 = icmp ne i8* %0, null
%8 = icmp ne i8* %1, null
%9 = and i1 %7, %8
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = tail call i64 @strcmp(i8* %0, i8* %1)
%12 = icmp eq i64 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %10, %6
br label %14
14: ; preds = %10, %2, %13
%15 = phi i32 [ 1, %13 ], [ 0, %2 ], [ 0, %10 ]
ret i32 %15
}
void cprop_result5(int *data) {
  if (data[0])
    data[1] = 10;
  else
    data[2] = 15;
  data[3] = 26;
}


x86 assembly (clang, -O0):
<cprop_result5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1125 <cprop_result5+0x25>
mov    -0x8(%rbp),%rax
movl   $0xa,0x4(%rax)
jmp    1130 <cprop_result5+0x30>
mov    -0x8(%rbp),%rax
movl   $0xf,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1a,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprop_result5>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
sete   %al
lea    (%rax,%rax,4),%ecx
add    $0xa,%ecx
mov    %ecx,0x4(%rdi,%rax,4)
movl   $0x1a,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @cprop_result5(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i64 2, i64 1
%5 = select i1 %3, i32 15, i32 10
%6 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %5, i32* %6
%7 = getelementptr inbounds i32, i32* %0, i64 3
store i32 26, i32* %7
ret void
}
int assemble4le(unsigned char *p) {
  return (p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24));
}


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

x86 assembly (clang, -O2):
<assemble4le>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @assemble4le(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int main(void) {
  int i;
  for (i = 0; i < 100000000; i++)
    foo();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5f5e100,-0x8(%rbp)
jge    1148 <main+0x38>
mov    $0x0,%al
call   1030 <foo@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5f5e100,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <foo@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (...) @foo()
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 100000000
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end) {}


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

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

LLVM IR (-O0):
%struct.paravirt_patch = type opaque
define void @apply_paravirt(%struct.paravirt_patch* %0, %struct.paravirt_patch* %1) {
%3 = alloca %struct.paravirt_patch*
%4 = alloca %struct.paravirt_patch*
store %struct.paravirt_patch* %0, %struct.paravirt_patch** %3
store %struct.paravirt_patch* %1, %struct.paravirt_patch** %4
ret void
}

LLVM IR (-O2):
%struct.paravirt_patch = type opaque
define void @apply_paravirt(%struct.paravirt_patch* nocapture %0, %struct.paravirt_patch* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void log_message(char *str) { printf("%s: %s\n", "i2c1_get_clkt_tout", str); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [19 x i8] c"i2c1_get_clkt_tout\00"
define void @log_message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [19 x i8] c"i2c1_get_clkt_tout\00"
define void @log_message(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int cbuf(int, int, int);
cbuf24(int f, int n) { return (cbuf(f, n, 24)); }


x86 assembly (clang, -O0):
<cbuf24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x18,%edx
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf24>:
mov    $0x18,%edx
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf24(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
%7 = call i32 @cbuf(i32 %5, i32 %6, i32 24)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf24(i32 %0, i32 %1) {
%3 = tail call i32 @cbuf(i32 %0, i32 %1, i32 24)
ret i32 %3
}
int SDL_imageFilterShiftRightAndMultByByteMMX(unsigned char *Src1,
                                              unsigned char *Dest,
                                              unsigned int SrcLength,
                                              unsigned char N,
                                              unsigned char C) {
  return (-1);
}


x86 assembly (clang, -O0):
<SDL_imageFilterShiftRightAndMultByByteMMX>:
push   %rbp
mov    %rsp,%rbp
mov    %r8b,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %cl,-0x15(%rbp)
mov    %al,-0x16(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SDL_imageFilterShiftRightAndMultByByteMMX(i8* %0, i8* %1, i32 %2, i8 zeroext %3, i8 zeroext %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8 %3, i8* %9
store i8 %4, i8* %10
ret i32 -1
}

LLVM IR (-O2):
define i32 @SDL_imageFilterShiftRightAndMultByByteMMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8 zeroext %3, i8 zeroext %4) {
ret i32 -1
}
int rl_upcase_word(count, key)
int count, key __attribute__((unused));
{ return (rl_change_case(count, 1)); }


x86 assembly (clang, -O0):
<rl_upcase_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <rl_change_case@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rl_upcase_word>:
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <rl_change_case@plt>

LLVM IR (-O0):
define i32 @rl_upcase_word(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 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_change_case to i32 (i32, i32, ...)*)(i32 %5, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @rl_upcase_word(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_change_case to i32 (i32, i32, ...)*)(i32 %0, i32 1)
ret i32 %3
}
void foo349(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo349(i32 %0) {
ret void
}
int main(void) {
  int a;
  int b;
  {
    a = 6;
    b = 6;
    a = 0;
    {
      while (1) {
      while_0_continue:;
        if (a < 6) {
        } else {
          goto while_0_break;
        }
        b = 0;
        {
          while (1) {
          while_1_continue:;
            if (b < 6) {
            } else {
              goto while_1_break;
            }
            b = b + 1;
          }
        while_1_break:;
        }
        a = a + 1;
      }
    while_0_break:;
    }
    if (a == 6) {
      if (b == 6) {
      } else {
        goto ERROR;
      }
    } else {
    ERROR:
      goto ERROR;
    }
    return (1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    1125 <main+0x25>
cmpl   $0x6,-0x8(%rbp)
jge    1134 <main+0x34>
jmp    1139 <main+0x39>
jmp    1175 <main+0x75>
movl   $0x0,-0xc(%rbp)
jmp    1145 <main+0x45>
cmpl   $0x6,-0xc(%rbp)
jge    1154 <main+0x54>
jmp    1159 <main+0x59>
jmp    1167 <main+0x67>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1140 <main+0x40>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1120 <main+0x20>
cmpl   $0x6,-0x8(%rbp)
jne    1198 <main+0x98>
cmpl   $0x6,-0xc(%rbp)
jne    118e <main+0x8e>
jmp    1193 <main+0x93>
jmp    119d <main+0x9d>
jmp    11a2 <main+0xa2>
jmp    119d <main+0x9d>
jmp    119d <main+0x9d>
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ clockid_t;

/* Variables and functions */
long clock_getres_vdso(int /*<<< orphan*/, struct timespec *);
long errno;
int clock_getres_vdso_wrapper(clockid_t id, struct timespec *ts) {
  return ({
    long int err;
    int v_ret;
    v_ret = err = clock_getres_vdso(id, ts);
    if ((v_ret < 0)) {
      errno = -err;
      v_ret = -1;
    }
    v_ret;
  });
}


x86 assembly (clang, -O0):
<clock_getres_vdso_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <clock_getres_vdso@plt>
mov    %rax,-0x18(%rbp)
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1155 <clock_getres_vdso_wrapper+0x45>
xor    %eax,%eax
mov    %eax,%ecx
sub    -0x18(%rbp),%rcx
mov    0x2e95(%rip),%rax
mov    %rcx,(%rax)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_getres_vdso_wrapper>:
push   %rax
call   1030 <clock_getres_vdso@plt>
test   %eax,%eax
js     111c <clock_getres_vdso_wrapper+0xc>
pop    %rcx
ret
neg    %rax
mov    0x2eba(%rip),%rcx
mov    %rax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@errno = global i64 0
define i32 @clock_getres_vdso_wrapper(i32 %0, %struct.timespec* %1) {
%3 = alloca i32
%4 = alloca %struct.timespec*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store %struct.timespec* %1, %struct.timespec** %4
%8 = load i32, i32* %3
%9 = load %struct.timespec*, %struct.timespec** %4
%10 = call i64 @clock_getres_vdso(i32 %8, %struct.timespec* %9)
store i64 %10, i64* %5
%11 = trunc i64 %10 to i32
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i64, i64* %5
%16 = sub nsw i64 0, %15
store i64 %16, i64* @errno
store i32 -1, i32* %6
br label %17
17: ; preds = %14, %2
%18 = load i32, i32* %6
store i32 %18, i32* %7
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@errno = global i64 0
define i32 @clock_getres_vdso_wrapper(i32 %0, %struct.timespec* %1) {
%3 = tail call i64 @clock_getres_vdso(i32 %0, %struct.timespec* %1)
%4 = trunc i64 %3 to i32
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = sub nsw i64 0, %3
store i64 %7, i64* @errno
br label %8
8: ; preds = %6, %2
%9 = phi i32 [ -1, %6 ], [ %4, %2 ]
ret i32 %9
}
/* Variables and functions */
unsigned char *fptr_capi20_get_version(unsigned int, unsigned char *);
scalar_t__ loadlib();
unsigned char *capi20_get_version(unsigned Ctrl, unsigned char *Buf) {
  if (loadlib() < 0)
    return "";
  return fptr_capi20_get_version(Ctrl, Buf);
}


x86 assembly (clang, -O0):
<capi20_get_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0x0,%al
call   1030 <loadlib@plt>
cmp    $0x0,%rax
jge    1150 <capi20_get_version+0x30>
lea    0xeb9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <capi20_get_version+0x40>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1040 <fptr_capi20_get_version@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<capi20_get_version>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <loadlib@plt>
test   %rax,%rax
js     1144 <capi20_get_version+0x24>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fptr_capi20_get_version@plt>
lea    0xeb5(%rip),%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @capi20_get_version(i32 %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = call i64 (...) @loadlib()
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %3
br label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = call i8* @fptr_capi20_get_version(i32 %10, i8* %11)
store i8* %12, i8** %3
br label %13
13: ; preds = %9, %8
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @capi20_get_version(i32 %0, i8* %1) {
%3 = tail call i64 (...) @loadlib()
%4 = icmp slt i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i8* @fptr_capi20_get_version(i32 %0, i8* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i8* [ %6, %5 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %2 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ modff(float, float *);
float ceilf(float x) {
  modff(x, &x);
  if (x > 0.0) {
    x += 1.0;
  }
  return x;
}


x86 assembly (clang, -O0):
<ceilf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x4(%rbp),%rdi
call   1030 <modff@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    115f <ceilf+0x4f>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeae(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceilf>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <modff@plt>
movss  0x4(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    113d <ceilf+0x2d>
addss  0xec9(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
pop    %rax
ret

LLVM IR (-O0):
define float @ceilf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @modff(float %3, float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fcmp ogt double %6, 0.000000e+00
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = fadd double %10, 1.000000e+00
%12 = fptrunc double %11 to float
store float %12, float* %2
br label %13
13: ; preds = %8, %1
%14 = load float, float* %2
ret float %14
}

LLVM IR (-O2):
define float @ceilf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i32 @modff(float %0, float* %2)
%4 = load float, float* %2
%5 = fcmp ogt float %4, 0.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = fadd float %4, 1.000000e+00
store float %7, float* %2
br label %8
8: ; preds = %6, %1
%9 = phi float [ %7, %6 ], [ %4, %1 ]
ret float %9
}
__attribute__((pure)) _Complex double foo_double(int x) {
  _Complex double r;
  __real r = x + 1;
  __imag r = x - 1;
  return r;
}


x86 assembly (clang, -O0):
<foo_double>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_double>:
movd   %edi,%xmm0
pshufd $0x50,%xmm0,%xmm0
paddd  0xeef(%rip),%xmm0
cvtdq2pd %xmm0,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
ret

LLVM IR (-O0):
define { double, double } @foo_double(i32 %0) {
%2 = alloca { double, double }
%3 = alloca i32
%4 = alloca { double, double }
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
%7 = sitofp i32 %6 to double
%8 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
store double %7, double* %8
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = sitofp i32 %10 to double
%12 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %11, double* %12
%13 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%14 = load double, double* %13
%15 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%16 = load double, double* %15
%17 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
%18 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
store double %14, double* %17
store double %16, double* %18
%19 = load { double, double }, { double, double }* %2
ret { double, double } %19
}

LLVM IR (-O2):
define { double, double } @foo_double(i32 %0) {
%2 = insertelement <2 x i32> poison, i32 %0, i64 0
%3 = shufflevector <2 x i32> %2, <2 x i32> poison, <2 x i32> zeroinitializer
%4 = add nsw <2 x i32> %3, <i32 1, i32 -1>
%5 = sitofp <2 x i32> %4 to <2 x double>
%6 = extractelement <2 x double> %5, i64 0
%7 = insertvalue { double, double } poison, double %6, 0
%8 = extractelement <2 x double> %5, i64 1
%9 = insertvalue { double, double } %7, double %8, 1
ret { double, double } %9
}
float celsius_to_fahrenheit(float fahrenheit) {
  return ((fahrenheit - 32) * 100.0) / 180.0;
}


x86 assembly (clang, -O0):
<celsius_to_fahrenheit>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xefa(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xece(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<celsius_to_fahrenheit>:
addss  0xef8(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @celsius_to_fahrenheit(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float %3, 3.200000e+01
%5 = fpext float %4 to double
%6 = fmul double %5, 1.000000e+02
%7 = fdiv double %6, 1.800000e+02
%8 = fptrunc double %7 to float
ret float %8
}

LLVM IR (-O2):
define float @celsius_to_fahrenheit(float %0) {
%2 = fadd float %0, -3.200000e+01
%3 = fpext float %2 to double
%4 = fmul double %3, 1.000000e+02
%5 = fdiv double %4, 1.800000e+02
%6 = fptrunc double %5 to float
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t read_FP_BE(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
size_t int64ReadFromFP(FILE *fp, int64_t *data) {
  return read_FP_BE(fp, data, sizeof(int64_t));
}


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

x86 assembly (clang, -O2):
<int64ReadFromFP>:
mov    $0x4,%edx
jmp    1030 <read_FP_BE@plt>

LLVM IR (-O0):
define i64 @int64ReadFromFP(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
%7 = call i64 @read_FP_BE(i32* %5, i32* %6, i32 4)
ret i64 %7
}

LLVM IR (-O2):
define i64 @int64ReadFromFP(i32* %0, i32* %1) {
%3 = tail call i64 @read_FP_BE(i32* %0, i32* %1, i32 4)
ret i64 %3
}
char main(void) { return 42; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x2a,%al
ret

LLVM IR (-O0):
define signext i8 @main() {
ret i8 42
}

LLVM IR (-O2):
define signext i8 @main() {
ret i8 42
}
int _src_iter_eof(const char *current, const char *end) {
  return current == end;
}


x86 assembly (clang, -O0):
<_src_iter_eof>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_src_iter_eof>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @_src_iter_eof(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 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @_src_iter_eof(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int Thread() { return (2); }


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

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

LLVM IR (-O0):
define i32 @Thread() {
ret i32 2
}

LLVM IR (-O2):
define i32 @Thread() {
ret i32 2
}
void resetBackgrounds() {}


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

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

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

LLVM IR (-O2):
define void @resetBackgrounds() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char const *);
void debug(const char *str) {
  if (!0)
    return;
  uart_puts(str);
}


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

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

LLVM IR (-O0):
define void @debug(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @debug(i8* nocapture %0) {
ret void
}
void gtk_file_chooser_get_filename() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_get_filename() {
ret void
}
char sumc(char a, char b) { return a; }


x86 assembly (clang, -O0):
<sumc>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumc>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @sumc(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @sumc(i8 returned signext %0, i8 signext %1) {
ret i8 %0
}