xunge/DecIR huggingface dataset:
/* Type definitions */
struct Camera {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ camera_update_position(struct Camera *, double);
int /*<<< orphan*/ camera_update_rotation(struct Camera *);
void camera_frame_update(struct Camera *C, double period) {
  camera_update_rotation(C);
  camera_update_position(C, period);
}


x86 assembly (clang, -O0):
<camera_frame_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <camera_update_rotation@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1040 <camera_update_position@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<camera_frame_update>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rbx
call   1030 <camera_update_rotation@plt>
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1040 <camera_update_position@plt>

LLVM IR (-O0):
%struct.Camera = type { i32 }
define void @camera_frame_update(%struct.Camera* %0, double %1) {
%3 = alloca %struct.Camera*
%4 = alloca double
store %struct.Camera* %0, %struct.Camera** %3
store double %1, double* %4
%5 = load %struct.Camera*, %struct.Camera** %3
%6 = call i32 @camera_update_rotation(%struct.Camera* %5)
%7 = load %struct.Camera*, %struct.Camera** %3
%8 = load double, double* %4
%9 = call i32 @camera_update_position(%struct.Camera* %7, double %8)
ret void
}

LLVM IR (-O2):
%struct.Camera = type { i32 }
define void @camera_frame_update(%struct.Camera* %0, double %1) {
%3 = tail call i32 @camera_update_rotation(%struct.Camera* %0)
%4 = tail call i32 @camera_update_position(%struct.Camera* %0, double %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ship(char *);
void eps_pageterm_ps(void) {
  ship("grestore\n");
  ship("showpage\n");
}


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

x86 assembly (clang, -O2):
<eps_pageterm_ps>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <ship@plt>
lea    0xee6(%rip),%rdi
pop    %rax
jmp    1030 <ship@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"grestore\0A\00"
@.str.1 = [10 x i8] c"showpage\0A\00"
define void @eps_pageterm_ps() {
%1 = call i32 @ship(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @ship(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"grestore\0A\00"
@.str.1 = [10 x i8] c"showpage\0A\00"
define void @eps_pageterm_ps() {
%1 = tail call i32 @ship(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @ship(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f454(int *);
int f455(int *p) { return f454(p); }


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

x86 assembly (clang, -O2):
<f455>:
jmp    1030 <f454@plt>

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

LLVM IR (-O2):
define i32 @f455(i32* %0) {
%2 = tail call i32 @f454(i32* %0)
ret i32 %2
}
/* Variables and functions */
double frsqrte(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ strtod(char *, int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  printf("%8.8f\n", frsqrte(strtod(argv[1], NULL)));
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtod@plt>
mov    %eax,%edi
call   1050 <frsqrte@plt>
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
xor    %esi,%esi
call   1030 <strtod@plt>
mov    %eax,%edi
call   1050 <frsqrte@plt>
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%8.8f\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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @strtod(i8* %8, i32* null)
%10 = call double @frsqrte(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%8.8f\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @strtod(i8* nocapture %4, i32* null)
%6 = tail call double @frsqrte(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gameQuit();
int /*<<< orphan*/ printf(char *);
void gameLose() {
  printf("You lose!\n");
  gameQuit();
}


x86 assembly (clang, -O0):
<gameLose>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <gameQuit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gameLose>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <gameQuit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"You lose!\0A\00"
define void @gameLose() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @gameQuit()
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"You lose!\00"
define void @gameLose() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @gameQuit()
ret void
}
/* Variables and functions */
scalar_t__ isspace(int);
char *trim(char **str) {
  if (*str)
    while (isspace((int)**str))
      (*str)++;
  return *str;
}


x86 assembly (clang, -O0):
<trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1160 <trim+0x50>
jmp    112f <trim+0x1f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     115b <trim+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    112f <trim+0x1f>
jmp    1160 <trim+0x50>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
test   %rax,%rax
je     113a <trim+0x2a>
movsbl (%rax),%edi
nop
call   1030 <isspace@plt>
test   %rax,%rax
je     113a <trim+0x2a>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%rax),%edi
jmp    1120 <trim+0x10>
mov    (%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @trim(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %19
6: ; preds = %1
br label %7
7: ; preds = %14, %6
%8 = load i8**, i8*** %2
%9 = load i8*, i8** %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = call i64 @isspace(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %7
%15 = load i8**, i8*** %2
%16 = load i8*, i8** %15
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %15
br label %7
18: ; preds = %7
br label %19
19: ; preds = %18, %1
%20 = load i8**, i8*** %2
%21 = load i8*, i8** %20
ret i8* %21
}

LLVM IR (-O2):
define i8* @trim(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %16, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = tail call i64 @isspace(i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %4, %9
%10 = load i8*, i8** %0
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %11, i8** %0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = tail call i64 @isspace(i32 %13)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %9
16: ; preds = %9, %4, %1
%17 = load i8*, i8** %0
ret i8* %17
}
int f(int a) { return ((a >= 0 && a <= 10) && !(a >= 0)); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1131 <f+0x31>
xor    %eax,%eax
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jg     1131 <f+0x31>
cmpl   $0x0,-0x4(%rbp)
setge  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 10
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 0
%11 = xor i1 %10, true
br label %12
12: ; preds = %8, %5, %1
%13 = phi i1 [ false, %5 ], [ false, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ hdump(char const *);
void hdump_command(const char *dir) { hdump(dir); }


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

x86 assembly (clang, -O2):
<hdump_command>:
jmp    1030 <hdump@plt>

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

LLVM IR (-O2):
define void @hdump_command(i8* %0) {
%2 = tail call i32 @hdump(i8* %0)
ret void
}
void USBEndpointDMAChannel(unsigned long ulBase, unsigned long ulEndpoint,
                           unsigned long ulChannel) {
  unsigned long ulMask;
  ;

  ;
  ;
  ulMask = 0xf << (ulChannel * 4);
  ulMask = (*((volatile unsigned long *)(ulBase + 0x00000450))) & (~ulMask);
  ulMask |= (((ulEndpoint) >> 4)) << (ulChannel * 4);
  (*((volatile unsigned long *)(ulBase + 0x00000450))) = ulMask;
}


x86 assembly (clang, -O0):
<USBEndpointDMAChannel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%ecx
mov    $0xf,%eax
shl    %cl,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    0x450(%rax),%rax
mov    -0x20(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x4,%rax
mov    -0x18(%rbp),%rcx
shl    $0x2,%rcx
shl    %cl,%rax
or     -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x450(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBEndpointDMAChannel>:
lea    0x0(,%rdx,4),%ecx
mov    $0xf,%eax
shl    %cl,%eax
not    %eax
cltq
shr    $0x4,%rsi
shl    %cl,%rsi
and    0x450(%rdi),%rax
or     %rax,%rsi
mov    %rsi,0x450(%rdi)
ret

LLVM IR (-O0):
define void @USBEndpointDMAChannel(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = mul i64 %8, 4
%10 = trunc i64 %9 to i32
%11 = shl i32 15, %10
%12 = sext i32 %11 to i64
store i64 %12, i64* %7
%13 = load i64, i64* %4
%14 = add i64 %13, 1104
%15 = inttoptr i64 %14 to i64*
%16 = load volatile i64, i64* %15
%17 = load i64, i64* %7
%18 = xor i64 %17, -1
%19 = and i64 %16, %18
store i64 %19, i64* %7
%20 = load i64, i64* %5
%21 = lshr i64 %20, 4
%22 = load i64, i64* %6
%23 = mul i64 %22, 4
%24 = shl i64 %21, %23
%25 = load i64, i64* %7
%26 = or i64 %25, %24
store i64 %26, i64* %7
%27 = load i64, i64* %7
%28 = load i64, i64* %4
%29 = add i64 %28, 1104
%30 = inttoptr i64 %29 to i64*
store volatile i64 %27, i64* %30
ret void
}

LLVM IR (-O2):
define void @USBEndpointDMAChannel(i64 %0, i64 %1, i64 %2) {
%4 = shl i64 %2, 2
%5 = trunc i64 %4 to i32
%6 = shl i32 15, %5
%7 = add i64 %0, 1104
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = xor i32 %6, -1
%11 = sext i32 %10 to i64
%12 = and i64 %9, %11
%13 = lshr i64 %1, 4
%14 = shl i64 %13, %4
%15 = or i64 %12, %14
store volatile i64 %15, i64* %8
ret void
}
void colamd_set_defaults(double knobs[20]) {
  int i;
  if (!knobs) {
    return;
  }
  for (i = 0; i < 20; i++) {
    knobs[i] = 0;
  }
  knobs[0] = 10;
  knobs[1] = 10;
  knobs[2] = (1);
}


x86 assembly (clang, -O0):
<colamd_set_defaults>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1118 <colamd_set_defaults+0x18>
jmp    1179 <colamd_set_defaults+0x79>
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jge    1147 <colamd_set_defaults+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <colamd_set_defaults+0x1f>
mov    -0x8(%rbp),%rax
movsd  0xeb5(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xea5(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0xe8c(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<colamd_set_defaults>:
test   %rdi,%rdi
je     114e <colamd_set_defaults+0x4e>
xorps  %xmm0,%xmm0
movups %xmm0,0x88(%rdi)
movups %xmm0,0x78(%rdi)
movups %xmm0,0x68(%rdi)
movups %xmm0,0x58(%rdi)
movups %xmm0,0x48(%rdi)
movups %xmm0,0x38(%rdi)
movups %xmm0,0x28(%rdi)
movups %xmm0,0x18(%rdi)
movq   $0x0,0x98(%rdi)
movaps 0xec3(%rip),%xmm0
movups %xmm0,(%rdi)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x10(%rdi)
ret

LLVM IR (-O0):
define void @colamd_set_defaults(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
%4 = load double*, double** %2
%5 = icmp ne double* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
br label %26
7: ; preds = %1
store i32 0, i32* %3
br label %8
8: ; preds = %16, %7
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 20
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load double*, double** %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
store double 0.000000e+00, double* %15
br label %16
16: ; preds = %11
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %8
19: ; preds = %8
%20 = load double*, double** %2
%21 = getelementptr inbounds double, double* %20, i64 0
store double 1.000000e+01, double* %21
%22 = load double*, double** %2
%23 = getelementptr inbounds double, double* %22, i64 1
store double 1.000000e+01, double* %23
%24 = load double*, double** %2
%25 = getelementptr inbounds double, double* %24, i64 2
store double 1.000000e+00, double* %25
br label %26
26: ; preds = %19, %6
ret void
}

LLVM IR (-O2):
define void @colamd_set_defaults(double* writeonly %0) {
%2 = icmp eq double* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = getelementptr inbounds double, double* %0, i64 3
%5 = bitcast double* %4 to i8*
%6 = bitcast double* %0 to <2 x double>*
store <2 x double> <double 1.000000e+01, double 1.000000e+01>, <2 x double>* %6
%7 = getelementptr inbounds double, double* %0, i64 2
store double 1.000000e+00, double* %7
br label %8
8: ; preds = %1, %3
ret void
}
void g_timer_elapsed() {}


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

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

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

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

/* Variables and functions */
int cb_print_ftw(char const *, struct stat const *, int, struct FTW *);
int cb_print_pftw(const char *fpath, const struct stat *sb, int typeflag,
                  struct FTW *ftwbuf, void *arg) {
  return cb_print_ftw(fpath, sb, typeflag, ftwbuf);
}


x86 assembly (clang, -O0):
<cb_print_pftw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <cb_print_ftw@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cb_print_pftw>:
jmp    1030 <cb_print_ftw@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
%struct.FTW = type { i32 }
define i32 @cb_print_pftw(i8* %0, %struct.stat* %1, i32 %2, %struct.FTW* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca %struct.stat*
%8 = alloca i32
%9 = alloca %struct.FTW*
%10 = alloca i8*
store i8* %0, i8** %6
store %struct.stat* %1, %struct.stat** %7
store i32 %2, i32* %8
store %struct.FTW* %3, %struct.FTW** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load %struct.stat*, %struct.stat** %7
%13 = load i32, i32* %8
%14 = load %struct.FTW*, %struct.FTW** %9
%15 = call i32 @cb_print_ftw(i8* %11, %struct.stat* %12, i32 %13, %struct.FTW* %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.stat = type { i32 }
%struct.FTW = type { i32 }
define i32 @cb_print_pftw(i8* %0, %struct.stat* %1, i32 %2, %struct.FTW* %3, i8* nocapture readnone %4) {
%6 = tail call i32 @cb_print_ftw(i8* %0, %struct.stat* %1, i32 %2, %struct.FTW* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ OAL_OBTAIN_SEMAPHORE();
int /*<<< orphan*/ OAL_RELEASE_SEMAPHORE();
int spi_bulkread(void *, unsigned short, unsigned char, unsigned char *, int);
signed int fc8180_spib_longread(void *handle, unsigned short addr,
                                unsigned int *data) {
  signed int res;
  unsigned char command = 0x40 | 0x80;
  OAL_OBTAIN_SEMAPHORE();
  res = spi_bulkread(handle, addr, command, (unsigned char *)data, 4);
  OAL_RELEASE_SEMAPHORE();
  return res;
}


x86 assembly (clang, -O0):
<fc8180_spib_longread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
movb   $0xc0,-0x1d(%rbp)
mov    $0x0,%al
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%dx
mov    -0x1d(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    $0x4,%r8d
movzwl %dx,%esi
movzbl %al,%edx
call   1040 <spi_bulkread@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <OAL_RELEASE_SEMAPHORE@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8180_spib_longread>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0xc0,%edx
mov    %r14,%rcx
mov    $0x4,%r8d
call   1040 <spi_bulkread@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <OAL_RELEASE_SEMAPHORE@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fc8180_spib_longread(i8* %0, i16 zeroext %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i8
store i8* %0, i8** %4
store i16 %1, i16* %5
store i32* %2, i32** %6
store i8 -64, i8* %8
%9 = call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%10 = load i8*, i8** %4
%11 = load i16, i16* %5
%12 = load i8, i8* %8
%13 = load i32*, i32** %6
%14 = bitcast i32* %13 to i8*
%15 = call i32 @spi_bulkread(i8* %10, i16 zeroext %11, i8 zeroext %12, i8* %14, i32 4)
store i32 %15, i32* %7
%16 = call i32 (...) @OAL_RELEASE_SEMAPHORE()
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @fc8180_spib_longread(i8* %0, i16 zeroext %1, i32* %2) {
%4 = tail call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%5 = bitcast i32* %2 to i8*
%6 = tail call i32 @spi_bulkread(i8* %0, i16 zeroext %1, i8 zeroext -64, i8* %5, i32 4)
%7 = tail call i32 (...) @OAL_RELEASE_SEMAPHORE()
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ cgbrtrue(int);
int /*<<< orphan*/ gentext();
void genbrtrue(int dest) {
  gentext();
  cgbrtrue(dest);
}


x86 assembly (clang, -O0):
<genbrtrue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <gentext@plt>
mov    -0x4(%rbp),%edi
call   1030 <cgbrtrue@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genbrtrue>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <gentext@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <cgbrtrue@plt>

LLVM IR (-O0):
define void @genbrtrue(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @gentext()
%4 = load i32, i32* %2
%5 = call i32 @cgbrtrue(i32 %4)
ret void
}

LLVM IR (-O2):
define void @genbrtrue(i32 %0) {
%2 = tail call i32 (...) @gentext()
%3 = tail call i32 @cgbrtrue(i32 %0)
ret void
}
unsigned int getLowerPowerOfTwo(const unsigned int x) {
  unsigned int i = 1;
  while (i <= x)
    i += i;
  return i >> 1;
}


x86 assembly (clang, -O0):
<getLowerPowerOfTwo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
ja     1128 <getLowerPowerOfTwo+0x28>
mov    -0x8(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110e <getLowerPowerOfTwo+0xe>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLowerPowerOfTwo>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jbe    1110 <getLowerPowerOfTwo+0x10>
shr    %eax
ret

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

LLVM IR (-O2):
define i32 @getLowerPowerOfTwo(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp ugt i32 %3, %0
%5 = shl i32 %3, 1
br i1 %4, label %6, label %2
6: ; preds = %2
%7 = lshr i32 %3, 1
ret i32 %7
}
int main() {
  volatile int cancel = 0;
  while (!cancel)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112a <main+0x2a>
jmp    112f <main+0x2f>
jmp    1112 <main+0x12>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movl   $0x0,-0x4(%rsp)
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,-0x4(%rsp)
je     1110 <main+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
br label %3
3: ; preds = %3, %0
%4 = load volatile i32, i32* %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %3, label %6
6: ; preds = %3
ret i32 0
}
/* Variables and functions */
int inb(int);
void uart_wait_until_sent(void) {
  while (!(inb(0x3f8 + 0x05) & 0x40))
    ;
}


x86 assembly (clang, -O0):
<uart_wait_until_sent>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <uart_wait_until_sent+0x9>
mov    $0x3fd,%edi
call   1030 <inb@plt>
and    $0x40,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    113b <uart_wait_until_sent+0x2b>
jmp    1140 <uart_wait_until_sent+0x30>
jmp    1119 <uart_wait_until_sent+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_wait_until_sent>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x3fd,%edi
call   1030 <inb@plt>
test   $0x40,%al
je     1120 <uart_wait_until_sent+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @uart_wait_until_sent() {
br label %1
1: ; preds = %6, %0
%2 = call i32 @inb(i32 1021)
%3 = and i32 %2, 64
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @uart_wait_until_sent() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @inb(i32 1021)
%3 = and i32 %2, 64
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  long long accu;
  unsigned char x1 = 24, x2 = 1;
  accu >>= x1;
  accu >>= x2;
  assert(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x18,-0x9(%rbp)
movb   $0x1,-0xa(%rbp)
movzbl -0x9(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
sar    %cl,%rax
mov    %rax,-0x8(%rbp)
movzbl -0xa(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
sar    %cl,%rax
mov    %rax,-0x8(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i64
%2 = alloca i8
%3 = alloca i8
store i8 24, i8* %2
store i8 1, i8* %3
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = load i64, i64* %1
%7 = zext i32 %5 to i64
%8 = ashr i64 %6, %7
store i64 %8, i64* %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = load i64, i64* %1
%12 = zext i32 %10 to i64
%13 = ashr i64 %11, %12
store i64 %13, i64* %1
%14 = call i32 @assert(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Type definitions */
struct option {
  int dummy;
};

/* Variables and functions */
int __getopt_long(int, char *const *, char const *, struct option const *,
                  int *, int);
int getopt_long_only(int argc, char *const *argv, const char *optstring,
                     const struct option *longopts, int *idx) {
  return __getopt_long(argc, argv, optstring, longopts, idx, 1);
}


x86 assembly (clang, -O0):
<getopt_long_only>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x1,%r9d
call   1030 <__getopt_long@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long_only>:
mov    $0x1,%r9d
jmp    1030 <__getopt_long@plt>

LLVM IR (-O0):
%struct.option = type { i32 }
define i32 @getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option* %3, %struct.option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.option*, %struct.option** %9
%15 = load i32*, i32** %10
%16 = call i32 @__getopt_long(i32 %11, i8** %12, i8* %13, %struct.option* %14, i32* %15, i32 1)
ret i32 %16
}

LLVM IR (-O2):
%struct.option = type { i32 }
define i32 @getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = tail call i32 @__getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 1)
ret i32 %6
}
void mod_httpd_is_dlclose_safe() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @av_rc4_crypt() {
ret void
}
/* Variables and functions */
int detectPresence(char *);
scalar_t__ graphicMode();
int gmessagePresent(void) {
  static int lGmessagePresent = -1;
  if (lGmessagePresent < 0) {
    lGmessagePresent = detectPresence("gmessage");
  }
  return lGmessagePresent && graphicMode();
}


x86 assembly (clang, -O0):
<gmessagePresent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f01(%rip)
jge    1147 <gmessagePresent+0x27>
lea    0xec4(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2ee9(%rip)
xor    %eax,%eax
cmpl   $0x0,0x2ee0(%rip)
mov    %al,-0x1(%rbp)
je     116a <gmessagePresent+0x4a>
mov    $0x0,%al
call   1030 <graphicMode@plt>
cmp    $0x0,%rax
setne  %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):
<gmessagePresent>:
push   %rax
mov    0x2f09(%rip),%eax
test   %eax,%eax
js     1143 <gmessagePresent+0x23>
test   %eax,%eax
je     1159 <gmessagePresent+0x39>
xor    %eax,%eax
call   1030 <graphicMode@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2edb(%rip)
test   %eax,%eax
jne    112f <gmessagePresent+0xf>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@gmessagePresent.lGmessagePresent = internal global i32 -1
@.str = [9 x i8] c"gmessage\00"
define i32 @gmessagePresent() {
%1 = load i32, i32* @gmessagePresent.lGmessagePresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @gmessagePresent.lGmessagePresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @gmessagePresent.lGmessagePresent
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@gmessagePresent.lGmessagePresent = internal unnamed_addr global i32 -1
@.str = [9 x i8] c"gmessage\00"
define i32 @gmessagePresent() {
%1 = load i32, i32* @gmessagePresent.lGmessagePresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @gmessagePresent.lGmessagePresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = tail call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p224_from_bytes(uintptr_t, uintptr_t);
void fiat_p224_from_bytes(uint64_t out1[4], const uint8_t arg1[28]) {
  internal_fiat_p224_from_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p224_from_bytes>:
jmp    1030 <internal_fiat_p224_from_bytes@plt>

LLVM IR (-O0):
define void @fiat_p224_from_bytes(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p224_from_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p224_from_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p224_from_bytes(i64 %3, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double const);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  const double PI = 3.14159;
  double radius;
  scanf("%lf", &radius);
  printf("A=%.4lf\n", PI * radius * radius);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xec5(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeac(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm1
movsd  0xec3(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [9 x i8] c"A=%.4lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = fmul double %4, 3.141590e+00
%6 = fmul double %4, %5
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MultiMapGadgets(int);
void UnmapAllGadgets() {
  MultiMapGadgets(((1 << 3) | (1 << 4) | (1 << 5)) | (1 << 0));
}


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

x86 assembly (clang, -O2):
<UnmapAllGadgets>:
mov    $0x39,%edi
jmp    1030 <MultiMapGadgets@plt>

LLVM IR (-O0):
define void @UnmapAllGadgets() {
%1 = call i32 @MultiMapGadgets(i32 57)
ret void
}

LLVM IR (-O2):
define void @UnmapAllGadgets() {
%1 = tail call i32 @MultiMapGadgets(i32 57)
ret void
}
/* Variables and functions */
int strlen(char *);
int std_len(char *str) { return strlen(str); }


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

x86 assembly (clang, -O2):
<std_len>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @std_len(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
double JHKeyframeAnimationFunctionEaseOutQuad(double t, double b, double c,
                                              double d) {
  return -c * (t /= d) * (t - 2) + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionEaseOutQuad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,-0x8(%rbp)
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xea8(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionEaseOutQuad>:
divsd  %xmm3,%xmm0
mulsd  %xmm0,%xmm2
addsd  0xef0(%rip),%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @JHKeyframeAnimationFunctionEaseOutQuad(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* %7
%10 = fneg double %9
%11 = load double, double* %8
%12 = load double, double* %5
%13 = fdiv double %12, %11
store double %13, double* %5
%14 = fmul double %10, %13
%15 = load double, double* %5
%16 = fsub double %15, 2.000000e+00
%17 = load double, double* %6
%18 = call double @llvm.fmuladd.f64(double %14, double %16, double %17)
ret double %18
}

LLVM IR (-O2):
define double @JHKeyframeAnimationFunctionEaseOutQuad(double %0, double %1, double %2, double %3) {
%5 = fneg double %2
%6 = fdiv double %0, %3
%7 = fmul double %6, %5
%8 = fadd double %6, -2.000000e+00
%9 = tail call double @llvm.fmuladd.f64(double %7, double %8, double %1)
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void handle_irq(void) {
  uart_puts("\nIRQ");
  while (1)
    ;
  return;
}


x86 assembly (clang, -O0):
<handle_irq>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <uart_puts@plt>
jmp    1120 <handle_irq+0x10>

x86 assembly (clang, -O2):
<handle_irq>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <uart_puts@plt>
nopl   (%rax)
jmp    1120 <handle_irq+0x10>

LLVM IR (-O0):
@.str = [5 x i8] c"\0AIRQ\00"
define void @handle_irq() {
%1 = call i32 @uart_puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [5 x i8] c"\0AIRQ\00"
define void @handle_irq() {
%1 = tail call i32 @uart_puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ gluOrtho2D(double, double, double, double);
void myinit() {
  glClearColor(0.0, 0.0, 0.0, 1.0);
  gluOrtho2D(-1.0, 1.0, -1.0, 1.0);
}


x86 assembly (clang, -O0):
<myinit>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm2,%xmm2
movsd  0xed9(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glClearColor@plt>
movsd  0xebe(%rip),%xmm2
movsd  0xebe(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
call   1040 <gluOrtho2D@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<myinit>:
push   %rax
movsd  0xed7(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1030 <glClearColor@plt>
movsd  0xec9(%rip),%xmm0
movsd  0xeb9(%rip),%xmm1
movaps %xmm0,%xmm2
movaps %xmm1,%xmm3
pop    %rax
jmp    1040 <gluOrtho2D@plt>

LLVM IR (-O0):
define void @myinit() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%2 = call i32 @gluOrtho2D(double -1.000000e+00, double 1.000000e+00, double -1.000000e+00, double 1.000000e+00)
ret void
}

LLVM IR (-O2):
define void @myinit() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%2 = tail call i32 @gluOrtho2D(double -1.000000e+00, double 1.000000e+00, double -1.000000e+00, double 1.000000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ count_to_20(int);
int main(void) {
  count_to_20(-10000000);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xff676980,%edi
call   1030 <count_to_20@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @count_to_20(i32 -10000000)
ret i32 0
}
void ikev2_decode_cert(struct msg_digest *md) {}


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

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

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

LLVM IR (-O2):
%struct.msg_digest = type opaque
define void @ikev2_decode_cert(%struct.msg_digest* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_extension(char **, char *);
char *TeX_search_ttf_file(char **name) {
  handle_extension(name, ".ttf");
  return *name;
}


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

x86 assembly (clang, -O2):
<TeX_search_ttf_file>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <handle_extension@plt>
mov    (%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c".ttf\00"
define i8* @TeX_search_ttf_file(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 @handle_extension(i8** %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = load i8**, i8*** %2
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
@.str = [5 x i8] c".ttf\00"
define i8* @TeX_search_ttf_file(i8** %0) {
%2 = tail call i32 @handle_extension(i8** %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i8*, i8** %0
ret i8* %3
}
void func8(int *ptr1, int *ptr2) {
  if (ptr1 && ptr2) {
    *ptr1 = 100;
    *ptr2 = 200;
    return;
  } else {
    *ptr1 = 300;
    *ptr2 = 400;
    return;
  }
  *ptr1 = 500;
  *ptr2 = 600;
}


x86 assembly (clang, -O0):
<func8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113b <func8+0x3b>
cmpq   $0x0,-0x10(%rbp)
je     113b <func8+0x3b>
mov    -0x8(%rbp),%rax
movl   $0x64,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xc8,(%rax)
jmp    114f <func8+0x4f>
mov    -0x8(%rbp),%rax
movl   $0x12c,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x190,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func8>:
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
test   %cl,%al
mov    $0x64,%eax
mov    $0x12c,%ecx
cmovne %eax,%ecx
mov    $0xc8,%eax
mov    $0x190,%edx
cmovne %eax,%edx
mov    %ecx,(%rdi)
mov    %edx,(%rsi)
ret

LLVM IR (-O0):
define void @func8(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 = icmp ne i32* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32*, i32** %4
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32*, i32** %3
store i32 100, i32* %11
%12 = load i32*, i32** %4
store i32 200, i32* %12
br label %16
13: ; preds = %7, %2
%14 = load i32*, i32** %3
store i32 300, i32* %14
%15 = load i32*, i32** %4
store i32 400, i32* %15
br label %16
16: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
define void @func8(i32* writeonly %0, i32* writeonly %1) {
%3 = icmp ne i32* %0, null
%4 = icmp ne i32* %1, null
%5 = and i1 %3, %4
%6 = select i1 %5, i32 100, i32 300
%7 = select i1 %5, i32 200, i32 400
store i32 %6, i32* %0
store i32 %7, i32* %1
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t __IO_sound_count_low() { return -38; }


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

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

LLVM IR (-O0):
define i32 @__IO_sound_count_low() {
ret i32 -38
}

LLVM IR (-O2):
define i32 @__IO_sound_count_low() {
ret i32 -38
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, char const *);
void setoid(char oid[], size_t oidlen, const char *wlan) {
  if (wlan)
    snprintf(oid, oidlen, "net.%s.debug", wlan);
}


x86 assembly (clang, -O0):
<setoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1147 <setoid+0x37>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    0xebe(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setoid>:
test   %rdx,%rdx
je     1124 <setoid+0x14>
mov    %rdx,%rcx
lea    0xee1(%rip),%rdx
jmp    1030 <snprintf@plt>
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"net.%s.debug\00"
define void @setoid(i8* %0, i64 %1, i8* %2) {
%4 = icmp eq i8* %2, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ReverseGPIOP__0__Out__makeOutput();
void LedsP__Led0__makeOutput(void) { ReverseGPIOP__0__Out__makeOutput(); }


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

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

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

LLVM IR (-O2):
define void @LedsP__Led0__makeOutput() {
%1 = tail call i32 (...) @ReverseGPIOP__0__Out__makeOutput()
ret void
}
double mymax(double a, double b) {
  if (a >= b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<mymax>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     112d <mymax+0x2d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1137 <mymax+0x37>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymax>:
movapd %xmm1,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define double @mymax(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}