xunge/DecIR huggingface dataset:
float get_Vdd(float Core_freq) {
  if (Core_freq < 100) {
    return 0.85;
  }
  if (Core_freq < 200) {
    return 1.0;
  }
  if (Core_freq < 300) {
    return 1.1;
  }
  if (Core_freq < 400) {
    return 1.3;
  } else {
    return 0.0;
  }
}


x86 assembly (clang, -O0):
<get_Vdd>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112d <get_Vdd+0x2d>
movss  0xef9(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a1 <get_Vdd+0xa1>
movss  0xecf(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1151 <get_Vdd+0x51>
movss  0xed1(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a1 <get_Vdd+0xa1>
movss  0xeaf(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1175 <get_Vdd+0x75>
movss  0xea9(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a1 <get_Vdd+0xa1>
movss  0xe8f(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1199 <get_Vdd+0x99>
movss  0xe81(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a1 <get_Vdd+0xa1>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_Vdd>:
movss  0xefc(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1116 <get_Vdd+0x16>
movss  0xeeb(%rip),%xmm0
ret
movss  0xeee(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    112c <get_Vdd+0x2c>
movss  0xedd(%rip),%xmm0
ret
movss  0xee0(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1142 <get_Vdd+0x42>
movss  0xecf(%rip),%xmm0
ret
cmpltss 0xecd(%rip),%xmm0
movss  0xec9(%rip),%xmm1
andps  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @get_Vdd(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 1.000000e+02
br i1 %5, label %6, label %7
6: ; preds = %1
store float 0x3FEB333340000000, float* %2
br label %20
7: ; preds = %1
%8 = load float, float* %3
%9 = fcmp olt float %8, 2.000000e+02
br i1 %9, label %10, label %11
10: ; preds = %7
store float 1.000000e+00, float* %2
br label %20
11: ; preds = %7
%12 = load float, float* %3
%13 = fcmp olt float %12, 3.000000e+02
br i1 %13, label %14, label %15
14: ; preds = %11
store float 0x3FF19999A0000000, float* %2
br label %20
15: ; preds = %11
%16 = load float, float* %3
%17 = fcmp olt float %16, 4.000000e+02
br i1 %17, label %18, label %19
18: ; preds = %15
store float 0x3FF4CCCCC0000000, float* %2
br label %20
19: ; preds = %15
store float 0.000000e+00, float* %2
br label %20
20: ; preds = %19, %18, %14, %10, %6
%21 = load float, float* %2
ret float %21
}

LLVM IR (-O2):
define float @get_Vdd(float %0) {
%2 = fcmp olt float %0, 1.000000e+02
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = fcmp olt float %0, 2.000000e+02
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = fcmp olt float %0, 3.000000e+02
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = fcmp olt float %0, 4.000000e+02
%9 = select i1 %8, float 0x3FF4CCCCC0000000, float 0.000000e+00
br label %10
10: ; preds = %7, %5, %3, %1
%11 = phi float [ 0x3FEB333340000000, %1 ], [ 1.000000e+00, %3 ], [ 0x3FF19999A0000000, %5 ], [ %9, %7 ]
ret float %11
}
main() {
  return ({ (union { __typeof(1) i, j; }){.i = 5}.j; });
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %union.anon
store i32 0, i32* %1
%4 = bitcast %union.anon* %3 to i32*
store i32 5, i32* %4
%5 = bitcast %union.anon* %3 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %2
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
ret i32 5
}
int __fastpow(int num, int base) {
  if (base < 0) {
    return 0;
  }
  if (base == 0) {
    return 1;
  }
  if (base == 1) {
    return num;
  }
  return num * __fastpow(num, base - 1);
}


x86 assembly (clang, -O0):
<__fastpow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1134 <__fastpow+0x24>
movl   $0x0,-0x4(%rbp)
jmp    117e <__fastpow+0x6e>
cmpl   $0x0,-0xc(%rbp)
jne    114a <__fastpow+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    117e <__fastpow+0x6e>
cmpl   $0x1,-0xc(%rbp)
jne    115f <__fastpow+0x4f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117e <__fastpow+0x6e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <__fastpow@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fastpow>:
test   %esi,%esi
js     1128 <__fastpow+0x28>
mov    $0x1,%eax
test   %esi,%esi
je     111f <__fastpow+0x1f>
nopl   (%rax)
cmp    $0x1,%esi
je     1124 <__fastpow+0x24>
add    $0xffffffff,%esi
imul   %edi,%eax
test   %esi,%esi
jne    1110 <__fastpow+0x10>
mov    $0x1,%edi
imul   %edi,%eax
ret
xor    %edi,%edi
mov    $0x1,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @__fastpow(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 slt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %25
9: ; preds = %2
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %3
br label %25
13: ; preds = %9
%14 = load i32, i32* %5
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = load i32, i32* %4
store i32 %17, i32* %3
br label %25
18: ; preds = %13
%19 = load i32, i32* %4
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = sub nsw i32 %21, 1
%23 = call i32 @__fastpow(i32 %20, i32 %22)
%24 = mul nsw i32 %19, %23
store i32 %24, i32* %3
br label %25
25: ; preds = %18, %16, %12, %8
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @__fastpow(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %7
%5 = phi i32 [ %8, %7 ], [ %1, %2 ]
%6 = phi i32 [ %9, %7 ], [ 1, %2 ]
switch i32 %5, label %7 [
i32 0, label %10
i32 1, label %11
]
7: ; preds = %4
%8 = add nsw i32 %5, -1
%9 = mul nsw i32 %6, %0
br label %4
10: ; preds = %4
br label %11
11: ; preds = %4, %10, %2
%12 = phi i32 [ 1, %2 ], [ %6, %10 ], [ %6, %4 ]
%13 = phi i32 [ 0, %2 ], [ 1, %10 ], [ %0, %4 ]
%14 = mul nsw i32 %13, %12
ret i32 %14
}
void b43_nphy_radio_turn_on(struct b43_wldev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.b43_wldev = type opaque
define void @b43_nphy_radio_turn_on(%struct.b43_wldev* nocapture %0) {
ret void
}
/* Variables and functions */
int isprint(int);
__attribute__((regparm(0))) int(_win_isprint)(int c) { return isprint(c); }


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

x86 assembly (clang, -O2):
<_win_isprint>:
jmp    1030 <isprint@plt>

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

LLVM IR (-O2):
define i32 @_win_isprint(i32 %0) {
%2 = tail call i32 @isprint(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ tone(int, int);
void low() { tone(2, 1); }


x86 assembly (clang, -O0):
<low>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x1,%esi
call   1030 <tone@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<low>:
mov    $0x2,%edi
mov    $0x1,%esi
jmp    1030 <tone@plt>

LLVM IR (-O0):
define void @low() {
%1 = call i32 @tone(i32 2, i32 1)
ret void
}

LLVM IR (-O2):
define void @low() {
%1 = tail call i32 @tone(i32 2, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_fixture_hello();
void all_tests(void) { test_fixture_hello(); }


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

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

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

LLVM IR (-O2):
define void @all_tests() {
%1 = tail call i32 (...) @test_fixture_hello()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_draw_area_flag(int);
void get_draw_area() { get_draw_area_flag(1); }


x86 assembly (clang, -O0):
<get_draw_area>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <get_draw_area_flag@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_draw_area>:
mov    $0x1,%edi
jmp    1030 <get_draw_area_flag@plt>

LLVM IR (-O0):
define void @get_draw_area() {
%1 = call i32 @get_draw_area_flag(i32 1)
ret void
}

LLVM IR (-O2):
define void @get_draw_area() {
%1 = tail call i32 @get_draw_area_flag(i32 1)
ret void
}
void foo430() {}


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

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

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

LLVM IR (-O2):
define void @foo430() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void printCharArray(char *array, int n) {
  int i;
  for (i = 0; i < n; ++i) {
    printf("%c,", array[i]);
  }
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c,\00"
define void @printCharArray(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test5();
int main(int argc, const char *argv[]) {
  test5();
  return 0;
}


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 <test5@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test5()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test5()
ret i32 0
}
/* Variables and functions */
double SHRT_MIN;
extern double cmin_short() { return SHRT_MIN; }


x86 assembly (clang, -O0):
<cmin_short>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
movsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmin_short>:
mov    0x2ed9(%rip),%rax
movsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@SHRT_MIN = global double 0.000000e+00
define double @cmin_short() {
%1 = load double, double* @SHRT_MIN
ret double %1
}

LLVM IR (-O2):
@SHRT_MIN = global double 0.000000e+00
define double @cmin_short() {
%1 = load double, double* @SHRT_MIN
ret double %1
}
void prepare_swap_prefetch(void) {}


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

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

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

LLVM IR (-O2):
define void @prepare_swap_prefetch() {
ret void
}
/* Variables and functions */
int _talloc_is_parent(void const *, void const *);
int /*<<< orphan*/ lock();
int /*<<< orphan*/ unlock();
int talloc_is_parent(const void *context, const void *ptr) {
  int ret;
  lock();
  ret = _talloc_is_parent(context, ptr);
  unlock();
  return ret;
}


x86 assembly (clang, -O0):
<talloc_is_parent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <lock@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <_talloc_is_parent@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <unlock@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<talloc_is_parent>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <lock@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <_talloc_is_parent@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <unlock@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @talloc_is_parent(i8* %0, i8* %1) {
%3 = tail call i32 (...) @lock()
%4 = tail call i32 @_talloc_is_parent(i8* %0, i8* %1)
%5 = tail call i32 (...) @unlock()
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fdputs(int, char *);
int /*<<< orphan*/ fdputsf(int, char *, char *);
int /*<<< orphan*/ send_http_response(int, char *);
void send_302_redirect(int clientsock, char *url) {
  send_http_response(clientsock, "302 Found");
  fdputsf(clientsock, "Location: %s\n", url);
  fdputs(clientsock, "\n");
}


x86 assembly (clang, -O0):
<send_302_redirect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    0xeb7(%rip),%rsi
call   1030 <send_http_response@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xeae(%rip),%rsi
call   1040 <fdputsf@plt>
mov    -0x4(%rbp),%edi
lea    0xeab(%rip),%rsi
call   1050 <fdputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_302_redirect>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rsi
call   1030 <send_http_response@plt>
lea    0xebf(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1040 <fdputsf@plt>
lea    0xeba(%rip),%rsi
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <fdputs@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"302 Found\00"
@.str.1 = [14 x i8] c"Location: %s\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @send_302_redirect(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @send_http_response(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = call i32 @fdputsf(i32 %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = load i32, i32* %3
%11 = call i32 @fdputs(i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"302 Found\00"
@.str.1 = [14 x i8] c"Location: %s\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @send_302_redirect(i32 %0, i8* %1) {
%3 = tail call i32 @send_http_response(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fdputsf(i32 %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = tail call i32 @fdputs(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct vt_stat {
  int v_active;
};

/* Variables and functions */
int /*<<< orphan*/ VT_GETSTATE;
int getfd();
scalar_t__ ioctl(int, int /*<<< orphan*/, struct vt_stat *);
int getvt(void) {
  int fd = getfd();
  struct vt_stat status;
  if (fd < 0) {
    return 0;
  }
  if (ioctl(fd, VT_GETSTATE, &status)) {
    return -1;
  }
  return status.v_active;
}


x86 assembly (clang, -O0):
<getvt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getfd@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1148 <getvt+0x28>
movl   $0x0,-0x4(%rbp)
jmp    1179 <getvt+0x59>
mov    -0x8(%rbp),%edi
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
je     1173 <getvt+0x53>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <getvt+0x59>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getvt>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getfd@plt>
test   %eax,%eax
js     1155 <getvt+0x35>
mov    0x2ea7(%rip),%rcx
mov    (%rcx),%esi
lea    0x8(%rsp),%rdx
mov    %eax,%edi
call   1030 <ioctl@plt>
mov    $0xffffffff,%ebx
test   %rax,%rax
jne    1155 <getvt+0x35>
mov    0x8(%rsp),%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.vt_stat = type { i32 }
@VT_GETSTATE = global i32 0
define i32 @getvt() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.vt_stat
%4 = call i32 (...) @getfd()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 0, i32* %1
br label %17
8: ; preds = %0
%9 = load i32, i32* %2
%10 = load i32, i32* @VT_GETSTATE
%11 = call i64 @ioctl(i32 %9, i32 %10, %struct.vt_stat* %3)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 -1, i32* %1
br label %17
14: ; preds = %8
%15 = getelementptr inbounds %struct.vt_stat, %struct.vt_stat* %3, i32 0, i32 0
%16 = load i32, i32* %15
store i32 %16, i32* %1
br label %17
17: ; preds = %14, %13, %7
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
%struct.vt_stat = type { i32 }
@VT_GETSTATE = global i32 0
define i32 @getvt() {
%1 = alloca %struct.vt_stat
%2 = tail call i32 (...) @getfd()
%3 = bitcast %struct.vt_stat* %1 to i8*
%4 = icmp slt i32 %2, 0
br i1 %4, label %12, label %5
5: ; preds = %0
%6 = load i32, i32* @VT_GETSTATE
%7 = call i64 @ioctl(i32 %2, i32 %6, %struct.vt_stat* %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = getelementptr inbounds %struct.vt_stat, %struct.vt_stat* %1, i64 0, i32 0
%11 = load i32, i32* %10
br label %12
12: ; preds = %5, %0, %9
%13 = phi i32 [ %11, %9 ], [ 0, %0 ], [ -1, %5 ]
ret i32 %13
}
IR0AR1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((*p0) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<IR0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
mov    -0x20(%rbp),%rcx
movswl 0x87a22(%rcx),%ecx
cmp    %ecx,%eax
jg     1145 <IR0AR1+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <IR0AR1+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0AR1>:
movzwl (%r8),%ecx
xor    %eax,%eax
cmp    0x87a22(%r9),%cx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @IR0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture %5) {
%7 = load i16, i16* %4
%8 = getelementptr inbounds i16, i16* %5, i64 277777
%9 = load i16, i16* %8
%10 = icmp sle i16 %7, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int fn(float);
int pow(float, int);
float errorSimpson(float h, float x1) { return (pow(h, 5) / (-90)) * fn(x1); }


x86 assembly (clang, -O0):
<errorSimpson>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x5,%edi
call   1040 <pow@plt>
mov    $0xffffffa6,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <fn@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errorSimpson>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0xc(%rsp)
mov    $0x5,%edi
call   1040 <pow@plt>
cltq
imul   $0x49f49f49,%rax,%rbx
shr    $0x20,%rbx
sub    %eax,%ebx
mov    %ebx,%eax
shr    $0x1f,%eax
sar    $0x6,%ebx
add    %eax,%ebx
movss  0xc(%rsp),%xmm0
call   1030 <fn@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @errorSimpson(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 = call i32 @pow(float %5, i32 5)
%7 = sdiv i32 %6, -90
%8 = load float, float* %4
%9 = call i32 @fn(float %8)
%10 = mul nsw i32 %7, %9
%11 = sitofp i32 %10 to float
ret float %11
}

LLVM IR (-O2):
define float @errorSimpson(float %0, float %1) {
%3 = tail call i32 @pow(float %0, i32 5)
%4 = sdiv i32 %3, -90
%5 = tail call i32 @fn(float %1)
%6 = mul nsw i32 %4, %5
%7 = sitofp i32 %6 to float
ret float %7
}
/* Type definitions */
struct fsm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ io_error();
struct fsm *read_att(char *filename) {
  io_error();
  return NULL;
}


x86 assembly (clang, -O0):
<read_att>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <io_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.fsm = type { i32 }
define %struct.fsm* @read_att(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @io_error()
ret %struct.fsm* null
}

LLVM IR (-O2):
%struct.fsm = type { i32 }
define noalias %struct.fsm* @read_att(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @io_error()
ret %struct.fsm* null
}
/* Variables and functions */
int /*<<< orphan*/ cellPadEnd();
void ps3_joypad_destroy(void) { cellPadEnd(); }


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

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

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

LLVM IR (-O2):
define void @ps3_joypad_destroy() {
%1 = tail call i32 (...) @cellPadEnd()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int chown(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int fs_chown(const char *path, int uid, int gid) {
  return chown(path, (uid_t)uid, (gid_t)gid);
}


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

x86 assembly (clang, -O2):
<fs_chown>:
jmp    1030 <chown@plt>

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

LLVM IR (-O2):
define i32 @fs_chown(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @chown(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
int test_imm_23int16_mem(short *val) {
  return ((*val) & (0x23 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_23int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 35
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint16_t;

/* Variables and functions */
uint16_t le16_to_cpupu(const uint16_t *p) {
  const uint8_t *p1 = (const uint8_t *)p;
  return p1[0] | (p1[1] << 8);
}


x86 assembly (clang, -O0):
<le16_to_cpupu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<le16_to_cpupu>:
mov    0x4(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @le16_to_cpupu(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = shl i32 %10, 8
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @le16_to_cpupu(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = shl i32 %4, 8
%6 = or i32 %5, %2
ret i32 %6
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t lshift(uint8_t op1, uint8_t op2) { return op1 << op2; }


x86 assembly (clang, -O0):
<lshift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lshift>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @lshift(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
ret i32 %3
}
/* Variables and functions */
scalar_t__ bar();
int /*<<< orphan*/ printf(char *);
int main() {
  if (bar() == 0)
    printf("PASS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
cmp    $0x0,%rax
jne    114c <main+0x2c>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <bar@plt>
test   %rax,%rax
jne    1139 <main+0x19>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"PASS\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @bar()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
define i32 @main() {
%1 = tail call i64 (...) @bar()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
char *strdup(char *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *get_time() {
  char s[80];
  memset(s, 0, 81);
  struct tm *tim;
  time_t now;
  time(&now);
  tim = localtime(&now);
  strftime(s, 80, "%a %d %b %Y %T %Z", tim);
  return strdup(s);
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x51,%edx
call   1040 <memset@plt>
lea    -0x5c(%rbp),%rdi
call   1050 <time@plt>
lea    -0x5c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x58(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rcx
mov    $0x50,%esi
lea    0xe6e(%rip),%rdx
call   1060 <strftime@plt>
lea    -0x50(%rbp),%rdi
call   1070 <strdup@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0x10(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x51,%edx
call   1040 <memset@plt>
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
lea    0xe79(%rip),%rdx
mov    %r14,%rdi
mov    $0x50,%esi
mov    %rax,%rcx
call   1060 <strftime@plt>
mov    %r14,%rdi
call   1070 <strdup@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%a %d %b %Y %T %Z\00"
define i8* @get_time() {
%1 = alloca [80 x i8]
%2 = alloca %struct.tm*
%3 = alloca i32
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i32 0, i32 81)
%6 = call i32 @time(i32* %3)
%7 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %7, %struct.tm** %2
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%9 = load %struct.tm*, %struct.tm** %2
%10 = call i32 @strftime(i8* %8, i32 80, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %9)
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%12 = call i8* @strdup(i8* %11)
ret i8* %12
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%a %d %b %Y %T %Z\00"
define noalias i8* @get_time() {
%1 = alloca [80 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i32 0, i32 81)
%5 = bitcast i32* %2 to i8*
%6 = call i32 @time(i32* %2)
%7 = call %struct.tm* @localtime(i32* %2)
%8 = call i32 @strftime(i8* %3, i32 80, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %7)
%9 = call i8* @strdup(i8* %3)
ret i8* %9
}
/* Variables and functions */
long long l_dim(long long *, long long *);
long long intr_wrap_174(long long p1, long long p2) { return l_dim(&p1, &p2); }


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

x86 assembly (clang, -O2):
<intr_wrap_174>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <l_dim@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @intr_wrap_174(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @l_dim(i64* %3, i64* %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @intr_wrap_174(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @l_dim(i64* %3, i64* %4)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ rename(char const *, char const *);
int /*<<< orphan*/ unlink(char const *);
void mv(const char *dst, const char *src) {
  rename(src, dst);
  unlink(src);
}


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

x86 assembly (clang, -O2):
<mv>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
call   1040 <rename@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <unlink@plt>

LLVM IR (-O0):
define void @mv(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @rename(i8* %5, i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @unlink(i8* %8)
ret void
}

LLVM IR (-O2):
define void @mv(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @rename(i8* %1, i8* %0)
%4 = tail call i32 @unlink(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PathPlannerSettingsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void PathPlannerSettingsUpdated() {
  UAVObjUpdated(PathPlannerSettingsHandle());
}


x86 assembly (clang, -O0):
<PathPlannerSettingsUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <PathPlannerSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PathPlannerSettingsUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <PathPlannerSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @PathPlannerSettingsUpdated() {
%1 = call i32 (...) @PathPlannerSettingsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @PathPlannerSettingsUpdated() {
%1 = tail call i32 (...) @PathPlannerSettingsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
int raw_open(name, o_flags, prot_mask)
char *name;
int o_flags;
int prot_mask;
{ return (open(name, o_flags, prot_mask)); }


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

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

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

LLVM IR (-O2):
define i32 @raw_open(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @open to i32 (i8*, i32, i32, ...)*)(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
void INT_Excep_S12AD_GBADI(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_S12AD_GBADI() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void put_unaligned_be24(uint32_t val, void *p) {
  ((uint8_t *)p)[0] = (val >> 16) & 0xff;
  ((uint8_t *)p)[1] = (val >> 8) & 0xff;
  ((uint8_t *)p)[2] = val & 0xff;
}


x86 assembly (clang, -O0):
<put_unaligned_be24>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_unaligned_be24>:
mov    %edi,%eax
movzbl %ah,%ecx
movzbl %al,%edx
shr    $0x10,%eax
movzbl %al,%eax
mov    %eax,(%rsi)
mov    %ecx,0x4(%rsi)
mov    %edx,0x8(%rsi)
ret

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

LLVM IR (-O2):
define void @put_unaligned_be24(i32 %0, i8* nocapture writeonly %1) {
%3 = lshr i32 %0, 16
%4 = and i32 %3, 255
%5 = bitcast i8* %1 to i32*
store i32 %4, i32* %5
%6 = lshr i32 %0, 8
%7 = and i32 %6, 255
%8 = getelementptr inbounds i8, i8* %1, i64 4
%9 = bitcast i8* %8 to i32*
store i32 %7, i32* %9
%10 = and i32 %0, 255
%11 = getelementptr inbounds i8, i8* %1, i64 8
%12 = bitcast i8* %11 to i32*
store i32 %10, i32* %12
ret void
}
/* Variables and functions */
int how_many_clicks(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char main_message[160];
  scanf("%[^\n]s", main_message);
  printf("%d\n", how_many_clicks(main_message));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xb0(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xb0(%rbp),%rdi
call   1040 <how_many_clicks@plt>
mov    %eax,%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xa0,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <how_many_clicks@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%[^\0A]s\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [160 x i8]
%2 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @how_many_clicks(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
void dirfree(char **namesp, int cnt) { return; }


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

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

LLVM IR (-O0):
define void @dirfree(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @dirfree(i8** nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug_warning(char *);
int /*<<< orphan*/ h_free(void *);
void component_global_free(void *handle) {
  if (!handle) {
    debug_warning("[component_global_free] handle cannot be NULL");
    return;
  }
  h_free(handle);
}


x86 assembly (clang, -O0):
<component_global_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <component_global_free+0x28>
lea    0xec2(%rip),%rdi
call   1040 <debug_warning@plt>
jmp    1151 <component_global_free+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <h_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<component_global_free>:
test   %rdi,%rdi
je     112a <component_global_free+0xa>
jmp    1030 <h_free@plt>
lea    0xecf(%rip),%rdi
jmp    1040 <debug_warning@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"[component_global_free] handle cannot be NULL\00"
define void @component_global_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @debug_warning(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @h_free(i8* %8)
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"[component_global_free] handle cannot be NULL\00"
define void @component_global_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @debug_warning(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @h_free(i8* %0)
br label %7
7: ; preds = %5, %3
ret void
}
double identity(double h) { return h; }


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

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

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

LLVM IR (-O2):
define double @identity(double returned %0) {
ret double %0
}
void foo405() {}


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

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

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

LLVM IR (-O2):
define void @foo405() {
ret void
}
/* Type definitions */
struct ast_tone_zone {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _ao2_ref(struct ast_tone_zone *, int);
struct ast_tone_zone *ast_tone_zone_ref(struct ast_tone_zone *tz) {
  _ao2_ref((tz), (+1));
  return tz;
}


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

x86 assembly (clang, -O2):
<ast_tone_zone_ref>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <_ao2_ref@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ast_tone_zone = type { i32 }
define %struct.ast_tone_zone* @ast_tone_zone_ref(%struct.ast_tone_zone* %0) {
%2 = alloca %struct.ast_tone_zone*
store %struct.ast_tone_zone* %0, %struct.ast_tone_zone** %2
%3 = load %struct.ast_tone_zone*, %struct.ast_tone_zone** %2
%4 = call i32 @_ao2_ref(%struct.ast_tone_zone* %3, i32 1)
%5 = load %struct.ast_tone_zone*, %struct.ast_tone_zone** %2
ret %struct.ast_tone_zone* %5
}

LLVM IR (-O2):
%struct.ast_tone_zone = type { i32 }
define %struct.ast_tone_zone* @ast_tone_zone_ref(%struct.ast_tone_zone* returned %0) {
%2 = tail call i32 @_ao2_ref(%struct.ast_tone_zone* %0, i32 1)
ret %struct.ast_tone_zone* %0
}
unsigned char *sample_done() { return (void *)0; }


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

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

LLVM IR (-O0):
define i8* @sample_done() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @sample_done() {
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int O_CREAT;
int O_TRUNC;
int O_WRONLY;
int open(char const *, int, int /*<<< orphan*/);
int creat(const char *file, mode_t mode) {
  return open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
}


x86 assembly (clang, -O0):
<creat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
mov    0x2ec5(%rip),%rax
or     (%rax),%esi
mov    0x2eb4(%rip),%rax
or     (%rax),%esi
mov    -0xc(%rbp),%edx
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creat>:
mov    0x2eb1(%rip),%rcx
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
mov    %esi,%edx
mov    0x2ec5(%rip),%rcx
or     (%rcx),%eax
mov    %eax,%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
define i32 @creat(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_WRONLY
%7 = load i32, i32* @O_CREAT
%8 = or i32 %6, %7
%9 = load i32, i32* @O_TRUNC
%10 = or i32 %8, %9
%11 = load i32, i32* %4
%12 = call i32 @open(i8* %5, i32 %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
define i32 @creat(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @O_WRONLY
%4 = load i32, i32* @O_CREAT
%5 = or i32 %4, %3
%6 = load i32, i32* @O_TRUNC
%7 = or i32 %5, %6
%8 = tail call i32 @open(i8* %0, i32 %7, i32 %1)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello "
         "World"
         "\n");
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\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
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}