xunge/DecIR huggingface dataset:
/* Variables and functions */
long f(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int i;
  long result;
  printf("input:");
  scanf("%d", &i);
  result = f(i);
  printf("%ld", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <f@plt>
lea    0xeaa(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"input:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i64 @f(i32 %6)
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"input:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i64 @f(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 %6)
ret i32 0
}
float FloatSwap(float f) {
  union {
    float f;
    unsigned char b[4];
  } dat1, dat2;
  dat1.f = f;
  dat2.b[0] = dat1.b[3];
  dat2.b[1] = dat1.b[2];
  dat2.b[2] = dat1.b[1];
  dat2.b[3] = dat1.b[0];
  return dat2.f;
}


x86 assembly (clang, -O0):
<FloatSwap>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x5(%rbp),%al
mov    %al,-0x10(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0xf(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%al
mov    %al,-0xd(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FloatSwap>:
movd   %xmm0,%eax
bswap  %eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { float }
define float @FloatSwap(float %0) {
%2 = alloca float
%3 = alloca %union.anon
%4 = alloca %union.anon
store float %0, float* %2
%5 = load float, float* %2
%6 = bitcast %union.anon* %3 to float*
store float %5, float* %6
%7 = bitcast %union.anon* %3 to [4 x i8]*
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 3
%9 = load i8, i8* %8
%10 = bitcast %union.anon* %4 to [4 x i8]*
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
store i8 %9, i8* %11
%12 = bitcast %union.anon* %3 to [4 x i8]*
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %12, i64 0, i64 2
%14 = load i8, i8* %13
%15 = bitcast %union.anon* %4 to [4 x i8]*
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %15, i64 0, i64 1
store i8 %14, i8* %16
%17 = bitcast %union.anon* %3 to [4 x i8]*
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %17, i64 0, i64 1
%19 = load i8, i8* %18
%20 = bitcast %union.anon* %4 to [4 x i8]*
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %20, i64 0, i64 2
store i8 %19, i8* %21
%22 = bitcast %union.anon* %3 to [4 x i8]*
%23 = getelementptr inbounds [4 x i8], [4 x i8]* %22, i64 0, i64 0
%24 = load i8, i8* %23
%25 = bitcast %union.anon* %4 to [4 x i8]*
%26 = getelementptr inbounds [4 x i8], [4 x i8]* %25, i64 0, i64 3
store i8 %24, i8* %26
%27 = bitcast %union.anon* %4 to float*
%28 = load float, float* %27
ret float %28
}

LLVM IR (-O2):
define float @FloatSwap(float %0) {
%2 = bitcast float %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = bitcast i32 %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void *smalloc(int);
void *tnode_const_hookcopy(void *hook) {
  void *copy = smalloc(32);
  memcpy(copy, hook, 32);
  return copy;
}


x86 assembly (clang, -O0):
<tnode_const_hookcopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x20,%edi
call   1040 <smalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x20,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tnode_const_hookcopy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x20,%edi
call   1040 <smalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    $0x20,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @tnode_const_hookcopy(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @smalloc(i32 32)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 32)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @tnode_const_hookcopy(i8* %0) {
%2 = tail call i8* @smalloc(i32 32)
%3 = tail call i32 @memcpy(i8* %2, i8* %0, i32 32)
ret i8* %2
}
int b2d(int num) {
  int rem, decimal_val = 0, base = 1;
  while (num > 0) {
    rem = num % 10;
    decimal_val = decimal_val + rem * base;
    num = num / 10;
    base = base * 2;
  }
  return decimal_val;
}


x86 assembly (clang, -O0):
<b2d>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1158 <b2d+0x58>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <b2d+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b2d>:
xor    %eax,%eax
test   %edi,%edi
jle    1144 <b2d+0x44>
mov    $0x1,%ecx
mov    $0xcccccccd,%r8d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %edi,%esi
imul   %r8,%rsi
shr    $0x23,%rsi
lea    (%rsi,%rsi,1),%edx
lea    (%rdx,%rdx,4),%r9d
mov    %edi,%edx
sub    %r9d,%edx
imul   %ecx,%edx
add    %edx,%eax
add    %ecx,%ecx
cmp    $0x9,%edi
mov    %esi,%edi
ja     1120 <b2d+0x20>
ret

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

LLVM IR (-O2):
define i32 @b2d(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %13
3: ; preds = %1, %3
%4 = phi i32 [ %11, %3 ], [ 1, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = phi i32 [ %10, %3 ], [ %0, %1 ]
%7 = urem i32 %6, 10
%8 = mul nsw i32 %4, %7
%9 = add nsw i32 %8, %5
%10 = udiv i32 %6, 10
%11 = shl nsw i32 %4, 1
%12 = icmp ult i32 %6, 10
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x17() {
  Assert_real((isxdigit(23) == 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_isxdigit.c",
              120, ("isxdigit should be 0 for 0x17"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x17>:
push   %rax
mov    $0x17,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x78,%edx
pop    %rax
jmp    1040 <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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x17\00"
define void @t_isxdigit_0x17() {
%1 = call i64 @isxdigit(i32 23)
%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 120, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x17\00"
define void @t_isxdigit_0x17() {
%1 = tail call i64 @isxdigit(i32 23)
%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 120, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ example();
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("%s:Hello World\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/OrangeTide/build/refs/heads/master/example/"
         "c/c.c");
  example();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <example@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <example@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"%s:Hello World\0A\00"
@.str.1 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/OrangeTide/build/refs/heads/master/example/c/c.c\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @example()
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"%s:Hello World\0A\00"
@.str.1 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/OrangeTide/build/refs/heads/master/example/c/c.c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @example()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
time_t time_abs(time_t value) { return value < 0 ? -value : value; }


x86 assembly (clang, -O0):
<time_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <time_abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <time_abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @time_abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
void sock_update_memcg(struct sock *sk) {}


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

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

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

LLVM IR (-O2):
%struct.sock = type opaque
define void @sock_update_memcg(%struct.sock* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int cTools_mutexUnlock(uint32_t mutexId) {
  mutexId = mutexId;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @cTools_mutexUnlock(i32 %0) {
ret i32 0
}
/* Variables and functions */
int execlp(char *, char *, char *, int /*<<< orphan*/);
int main() { return execlp("ksysguard", "ksysguard", "--showprocesses", 0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rsi
lea    0xedd(%rip),%rdx
xor    %ecx,%ecx
mov    %rsi,%rdi
call   1030 <execlp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rdx
mov    %rdi,%rsi
xor    %ecx,%ecx
jmp    1030 <execlp@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"ksysguard\00"
@.str.1 = [16 x i8] c"--showprocesses\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @execlp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 %2
}

LLVM IR (-O2):
@.str = [10 x i8] c"ksysguard\00"
@.str.1 = [16 x i8] c"--showprocesses\00"
define i32 @main() {
%1 = tail call i32 @execlp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 %1
}
int q_compare(const void *a, const void *b) { return *(int *)a - *(int *)b; }


x86 assembly (clang, -O0):
<q_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @q_compare(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @q_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ htmlIncludeFile(char *);
int /*<<< orphan*/ safef(char *, int, char *, char *, char *);
void htmlIncludeWebFile(char *file) {
  char path[256];
  char *docRoot = "/usr/local/apache/htdocs";
  safef(path, sizeof path, "%s/%s", docRoot, file);
  htmlIncludeFile(path);
}


x86 assembly (clang, -O0):
<htmlIncludeWebFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x118(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x118(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    $0x100,%esi
lea    0xebe(%rip),%rdx
call   1030 <safef@plt>
lea    -0x110(%rbp),%rdi
call   1040 <htmlIncludeFile@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htmlIncludeWebFile>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%r8
lea    0xee7(%rip),%rdx
lea    0xec7(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1030 <safef@plt>
mov    %rbx,%rdi
call   1040 <htmlIncludeFile@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"/usr/local/apache/htdocs\00"
@.str.1 = [6 x i8] c"%s/%s\00"
define void @htmlIncludeWebFile(i8* %0) {
%2 = alloca i8*
%3 = alloca [256 x i8]
%4 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %4
%7 = load i8*, i8** %2
%8 = call i32 @safef(i8* %5, i32 256, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* %7)
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%10 = call i32 @htmlIncludeFile(i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"/usr/local/apache/htdocs\00"
@.str.1 = [6 x i8] c"%s/%s\00"
define void @htmlIncludeWebFile(i8* %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @safef(i8* %3, i32 256, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @htmlIncludeFile(i8* %3)
ret void
}
/* Variables and functions */
double app_timer_user(int);
double tm_Time_F(int op) { return app_timer_user(op); }


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

x86 assembly (clang, -O2):
<tm_Time_F>:
jmp    1030 <app_timer_user@plt>

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

LLVM IR (-O2):
define double @tm_Time_F(i32 %0) {
%2 = tail call double @app_timer_user(i32 %0)
ret double %2
}
void network_init(void) {}


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

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

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

LLVM IR (-O2):
define void @network_init() {
ret void
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void warn(const char *msg) {
  if (errno)
    perror(msg);
  else
    fprintf(stderr, "WARN: %s\n", msg);
}


x86 assembly (clang, -O0):
<warn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
cmpq   $0x0,(%rax)
je     114b <warn+0x2b>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
jmp    1164 <warn+0x44>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warn>:
mov    %rdi,%rdx
mov    0x2eae(%rip),%rax
cmpq   $0x0,(%rax)
jne    1145 <warn+0x25>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
jmp    1030 <fprintf@plt>
mov    %rdx,%rdi
jmp    1040 <perror@plt>

LLVM IR (-O0):
@errno = global i64 0
@stderr = global i32 0
@.str = [10 x i8] c"WARN: %s\0A\00"
define void @warn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @errno
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @perror(i8* %6)
br label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@stderr = global i32 0
@.str = [10 x i8] c"WARN: %s\0A\00"
define void @warn(i8* %0) {
%2 = load i64, i64* @errno
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
br label %9
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %6, %4
ret void
}
int main(void) {
  char a;
  char(b);
  char c[1];
  char d();
  char e[1];
  char(f)[1];
  char g[1][1];
  char i();
  char(j)();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
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 i8
%3 = alloca i8
%4 = alloca [1 x i8]
%5 = alloca [1 x i8]
%6 = alloca [1 x i8]
%7 = alloca [1 x [1 x i8]]
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int crc_update(unsigned char, int);
int crc16(unsigned char *data, int length) {
  int i;
  int crc = 0xffff;
  for (i = 0; i < length; i++)
    crc = crc_update(data[i], crc);
  return crc & 0xffff;
}


x86 assembly (clang, -O0):
<crc16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffff,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <crc16+0x50>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x14(%rbp),%esi
movzbl %al,%edi
call   1030 <crc_update@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <crc16+0x1d>
mov    -0x14(%rbp),%eax
and    $0xffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc16>:
test   %esi,%esi
jle    114e <crc16+0x3e>
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    %esi,%r15d
mov    $0xffff,%eax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movzbl (%r14,%rbx,1),%edi
mov    %eax,%esi
call   1030 <crc_update@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <crc16+0x20>
movzwl %ax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret
mov    $0xffff,%eax
ret

LLVM IR (-O0):
define i32 @crc16(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 65535, i32* %6
store i32 0, i32* %5
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = load i32, i32* %6
%18 = call i32 @crc_update(i8 zeroext %16, i32 %17)
store i32 %18, i32* %6
br label %19
19: ; preds = %11
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %7
22: ; preds = %7
%23 = load i32, i32* %6
%24 = and i32 %23, 65535
ret i32 %24
}

LLVM IR (-O2):
define i32 @crc16(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = phi i32 [ 65535, %4 ], [ %11, %6 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = tail call i32 @crc_update(i8 zeroext %10, i32 %8)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6
%15 = and i32 %11, 65535
br label %16
16: ; preds = %14, %2
%17 = phi i32 [ 65535, %2 ], [ %15, %14 ]
ret i32 %17
}
double Function4Double(double a, double b, double c, double d) {
  return a + b + c + d;
}


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

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

LLVM IR (-O0):
define double @Function4Double(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = fadd double %9, %10
%12 = load double, double* %7
%13 = fadd double %11, %12
%14 = load double, double* %8
%15 = fadd double %13, %14
ret double %15
}

LLVM IR (-O2):
define double @Function4Double(double %0, double %1, double %2, double %3) {
%5 = fadd double %0, %1
%6 = fadd double %5, %2
%7 = fadd double %6, %3
ret double %7
}
long _constantFolding() {
  long EV_a;
  EV_a = ((((((((((8 * 9) / 4) + 2) - (5 * 8)) + 9) - 12) + 6) - 9) - 18) +
          (((23 * 3) / 23) * 90));
  return EV_a;
}


x86 assembly (clang, -O0):
<_constantFolding>:
push   %rbp
mov    %rsp,%rbp
movq   $0xe2,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @_constantFolding() {
%1 = alloca i64
store i64 226, i64* %1
%2 = load i64, i64* %1
ret i64 %2
}

LLVM IR (-O2):
define i64 @_constantFolding() {
ret i64 226
}
int cairo_code_draw_infamousLogoTiny_get_height() { return 31; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_infamousLogoTiny_get_height() {
ret i32 31
}

LLVM IR (-O2):
define i32 @cairo_code_draw_infamousLogoTiny_get_height() {
ret i32 31
}
unsigned max(unsigned a, unsigned b) { return (a < b) ? b : a; }


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

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

LLVM IR (-O0):
define i32 @max(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 = icmp ult i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
void TELL_CHILD(pid_t pid) { kill(pid, SIGUSR1); }


x86 assembly (clang, -O0):
<TELL_CHILD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TELL_CHILD>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <kill@plt>

LLVM IR (-O0):
@SIGUSR1 = global i32 0
define void @TELL_CHILD(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGUSR1
%5 = call i32 @kill(i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
define void @TELL_CHILD(i32 %0) {
%2 = load i32, i32* @SIGUSR1
%3 = tail call i32 @kill(i32 %0, i32 %2)
ret void
}
int hash_int_key_equal(const void *k1, const void *k2) { return k1 == k2; }


x86 assembly (clang, -O0):
<hash_int_key_equal>:
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):
<hash_int_key_equal>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @hash_int_key_equal(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 @hash_int_key_equal(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ mdelay(int);
int /*<<< orphan*/ wifi_pm_gpio_ctrl(char *, int);
void sif_platform_reset_target(void) {
  wifi_pm_gpio_ctrl("esp_wl_chip_en", 0);
  mdelay(100);
  wifi_pm_gpio_ctrl("esp_wl_chip_en", 1);
  mdelay(100);
}


x86 assembly (clang, -O0):
<sif_platform_reset_target>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
xor    %esi,%esi
call   1040 <wifi_pm_gpio_ctrl@plt>
mov    $0x64,%edi
call   1030 <mdelay@plt>
lea    0xebd(%rip),%rdi
mov    $0x1,%esi
call   1040 <wifi_pm_gpio_ctrl@plt>
mov    $0x64,%edi
call   1030 <mdelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sif_platform_reset_target>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <wifi_pm_gpio_ctrl@plt>
mov    $0x64,%edi
call   1030 <mdelay@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <wifi_pm_gpio_ctrl@plt>
mov    $0x64,%edi
pop    %rbx
jmp    1030 <mdelay@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"esp_wl_chip_en\00"
define void @sif_platform_reset_target() {
%1 = call i32 @wifi_pm_gpio_ctrl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = call i32 @mdelay(i32 100)
%3 = call i32 @wifi_pm_gpio_ctrl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @mdelay(i32 100)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"esp_wl_chip_en\00"
define void @sif_platform_reset_target() {
%1 = tail call i32 @wifi_pm_gpio_ctrl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @mdelay(i32 100)
%3 = tail call i32 @wifi_pm_gpio_ctrl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 @mdelay(i32 100)
ret void
}
void sqr__spx(float x, float y, float *r_x, float *r_y) {
  float squash = (x + y) * -0.2113248654051871;
  *r_x = x + squash;
  *r_y = y + squash;
}


x86 assembly (clang, -O0):
<sqr__spx>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed4(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x8(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqr__spx>:
movaps %xmm0,%xmm2
addss  %xmm1,%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  0xeed(%rip),%xmm2
cvtsd2ss %xmm2,%xmm2
addss  %xmm2,%xmm0
movss  %xmm0,(%rdi)
addss  %xmm1,%xmm2
movss  %xmm2,(%rsi)
ret

LLVM IR (-O0):
define void @sqr__spx(float %0, float %1, float* %2, float* %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float*
%8 = alloca float*
%9 = alloca float
store float %0, float* %5
store float %1, float* %6
store float* %2, float** %7
store float* %3, float** %8
%10 = load float, float* %5
%11 = load float, float* %6
%12 = fadd float %10, %11
%13 = fpext float %12 to double
%14 = fmul double %13, 0xBFCB0CB174DF99C7
%15 = fptrunc double %14 to float
store float %15, float* %9
%16 = load float, float* %5
%17 = load float, float* %9
%18 = fadd float %16, %17
%19 = load float*, float** %7
store float %18, float* %19
%20 = load float, float* %6
%21 = load float, float* %9
%22 = fadd float %20, %21
%23 = load float*, float** %8
store float %22, float* %23
ret void
}

LLVM IR (-O2):
define void @sqr__spx(float %0, float %1, float* nocapture writeonly %2, float* nocapture writeonly %3) {
%5 = fadd float %0, %1
%6 = fpext float %5 to double
%7 = fmul double %6, 0xBFCB0CB174DF99C7
%8 = fptrunc double %7 to float
%9 = fadd float %8, %0
store float %9, float* %2
%10 = fadd float %8, %1
store float %10, float* %3
ret void
}
int a_entry() {
  int *p = (int *)(&a_entry) - 1;
  return *p;
}


x86 assembly (clang, -O0):
<a_entry>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eed(%rip),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_entry>:
mov    0x2ef1(%rip),%rax
mov    -0x4(%rax),%eax
ret

LLVM IR (-O0):
define i32 @a_entry() {
%1 = alloca i32*
store i32* getelementptr inbounds (i32, i32* bitcast (i32 ()* @a_entry to i32*), i64 -1), i32** %1
%2 = load i32*, i32** %1
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @a_entry() {
%1 = load i32, i32* getelementptr inbounds (i32, i32* bitcast (i32 ()* @a_entry to i32*), i64 -1)
ret i32 %1
}
/* Variables and functions */
scalar_t__ load_stick();
int min_cost();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  while (load_stick())
    printf("The minimum cutting is %d.\n", min_cost());
}


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   1030 <load_stick@plt>
cmp    $0x0,%rax
je     1171 <main+0x41>
mov    $0x0,%al
call   1050 <min_cost@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
jmp    1146 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <load_stick@plt>
test   %rax,%rax
je     116d <main+0x3d>
lea    0xebc(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1050 <min_cost@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <load_stick@plt>
test   %rax,%rax
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"The minimum cutting is %d.\0A\00"
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
br label %6
6: ; preds = %9, %2
%7 = call i64 (...) @load_stick()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = call i32 (...) @min_cost()
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %6
12: ; preds = %6
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [28 x i8] c"The minimum cutting is %d.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @load_stick()
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = tail call i32 (...) @min_cost()
%7 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i64 (...) @load_stick()
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret i32 0
}
/* Variables and functions */
int readin(char *);
int rlreply(char *, char *, int);
int fileread(int f, int n) {
  int s;
  char fname[80];
  if ((s = rlreply("Read file: ", fname, 80)) != 1)
    return (s);
  return (readin(fname));
}


x86 assembly (clang, -O0):
<fileread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x60(%rbp),%rsi
lea    0xec7(%rip),%rdi
mov    $0x50,%edx
call   1030 <rlreply@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x1,%eax
je     115a <fileread+0x3a>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <fileread+0x46>
lea    -0x60(%rbp),%rdi
call   1040 <readin@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileread>:
sub    $0x58,%rsp
lea    0xed5(%rip),%rdi
mov    %rsp,%rsi
mov    $0x50,%edx
call   1030 <rlreply@plt>
cmp    $0x1,%eax
jne    1145 <fileread+0x25>
mov    %rsp,%rdi
call   1040 <readin@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Read file: \00"
define i32 @fileread(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [80 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%9 = call i32 @rlreply(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %8, i32 80)
store i32 %9, i32* %6
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* %6
store i32 %12, i32* %3
br label %16
13: ; preds = %2
%14 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%15 = call i32 @readin(i8* %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %13, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [12 x i8] c"Read file: \00"
define i32 @fileread(i32 %0, i32 %1) {
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = call i32 @rlreply(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4, i32 80)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @readin(i8* %4)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ %8, %7 ], [ %5, %2 ]
ret i32 %10
}
void nop_reg(void) {}


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

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

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

LLVM IR (-O2):
define void @nop_reg() {
ret void
}
int max(int left, int right) {
  if (left > right) {
    return left;
  }
  return right;
}


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

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

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int dumpbinary(int x, int t) {
  if (t <= 0) {
    return 0;
  }
  dumpbinary(x >> 1, t - 1);
  printf("%d", x & 0x01);
  return 0;
}


x86 assembly (clang, -O0):
<dumpbinary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     1144 <dumpbinary+0x24>
movl   $0x0,-0x4(%rbp)
jmp    116e <dumpbinary+0x4e>
mov    -0x8(%rbp),%edi
sar    $0x1,%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1040 <dumpbinary@plt>
mov    -0x8(%rbp),%esi
and    $0x1,%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpbinary>:
test   %esi,%esi
jle    1143 <dumpbinary+0x23>
push   %rbx
mov    %edi,%ebx
sar    %edi
add    $0xffffffff,%esi
call   1040 <dumpbinary@plt>
and    $0x1,%ebx
lea    0xec5(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
pop    %rbx
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @dumpbinary(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %4, label %5
4: ; preds = %2, %5
ret i32 0
5: ; preds = %2
%6 = ashr i32 %0, 1
%7 = add nsw i32 %1, -1
%8 = tail call i32 @dumpbinary(i32 %6, i32 %7)
%9 = and i32 %0, 1
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %4
}
/* Variables and functions */
int hexdig(char);
char tohex(char c1, char c2) {
  char out = (hexdig(c1) << 4) | hexdig(c2);
  return out;
}


x86 assembly (clang, -O0):
<tohex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <hexdig@plt>
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <hexdig@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tohex>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <hexdig@plt>
mov    %eax,%ebp
shl    $0x4,%ebp
mov    %ebx,%edi
call   1030 <hexdig@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define signext i8 @tohex(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = call i32 @hexdig(i8 signext %6)
%8 = shl i32 %7, 4
%9 = load i8, i8* %4
%10 = call i32 @hexdig(i8 signext %9)
%11 = or i32 %8, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %5
%13 = load i8, i8* %5
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @tohex(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @hexdig(i8 signext %0)
%4 = shl i32 %3, 4
%5 = tail call i32 @hexdig(i8 signext %1)
%6 = or i32 %4, %5
%7 = trunc i32 %6 to i8
ret i8 %7
}
/* Variables and functions */
scalar_t__ board_is_gp_evm();
int /*<<< orphan*/ board_ti_get_rev();
scalar_t__ strncmp(char *, int /*<<< orphan*/, int);
int board_is_evm_15_or_later(void) {
  return (board_is_gp_evm() && strncmp("1.5", board_ti_get_rev(), 3) <= 0);
}


x86 assembly (clang, -O0):
<board_is_evm_15_or_later>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <board_is_gp_evm@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     1175 <board_is_evm_15_or_later+0x45>
mov    $0x0,%al
call   1040 <board_ti_get_rev@plt>
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
setle  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_is_evm_15_or_later>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <board_is_gp_evm@plt>
test   %rax,%rax
je     1161 <board_is_evm_15_or_later+0x31>
xor    %eax,%eax
call   1040 <board_ti_get_rev@plt>
lea    0xeb3(%rip),%rdi
mov    %eax,%esi
mov    $0x3,%edx
call   1030 <strncmp@plt>
xor    %ebx,%ebx
test   %rax,%rax
setle  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"1.5\00"
define i32 @board_is_evm_15_or_later() {
%1 = call i64 (...) @board_is_gp_evm()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 (...) @board_ti_get_rev()
%5 = call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4, i32 3)
%6 = icmp sle i64 %5, 0
br label %7
7: ; preds = %3, %0
%8 = phi i1 [ false, %0 ], [ %6, %3 ]
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [4 x i8] c"1.5\00"
define i32 @board_is_evm_15_or_later() {
%1 = tail call i64 (...) @board_is_gp_evm()
%2 = icmp eq i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 (...) @board_ti_get_rev()
%5 = tail call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4, i32 3)
%6 = icmp slt i64 %5, 1
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %3, %0
%9 = phi i32 [ 0, %0 ], [ %7, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ format_words();
int main(void) {
  format_words();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @format_words()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
DispenserManager_change_configuration(uint16_t time_between_emission) {}


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

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

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

LLVM IR (-O2):
define i32 @DispenserManager_change_configuration(i32 %0) {
ret i32 undef
}
void gtk_requisition_get_type() {}


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

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

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

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