xunge/DecIR huggingface dataset:
/* Variables and functions */
int fibo1(int);
int fibo2(int n) {
  if (n < 1) {
    return 0;
  } else if (n == 1) {
    return 1;
  } else {
    return fibo1(n - 1) + fibo1(n - 2);
  }
}


x86 assembly (clang, -O0):
<fibo2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1131 <fibo2+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <fibo2+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fibo2+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <fibo2+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibo1@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibo1@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibo2>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    113b <fibo2+0x2b>
mov    %edi,%ebx
mov    $0x1,%eax
cmp    $0x1,%edi
je     113d <fibo2+0x2d>
lea    -0x1(%rbx),%edi
call   1030 <fibo1@plt>
mov    %eax,%ebp
add    $0xfffffffe,%ebx
mov    %ebx,%edi
call   1030 <fibo1@plt>
add    %ebp,%eax
jmp    113d <fibo2+0x2d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibo2(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = icmp eq i32 %0, 1
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = add nsw i32 %0, -1
%7 = tail call i32 @fibo1(i32 %6)
%8 = add nsw i32 %0, -2
%9 = tail call i32 @fibo1(i32 %8)
%10 = add nsw i32 %9, %7
br label %11
11: ; preds = %3, %1, %5
%12 = phi i32 [ %10, %5 ], [ 0, %1 ], [ 1, %3 ]
ret i32 %12
}
double funcion(double x, double r) { return (r * x * (1 - x)); }


x86 assembly (clang, -O0):
<funcion>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcion>:
mulsd  %xmm0,%xmm1
movsd  0xef4(%rip),%xmm2
subsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @funcion(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fmul double %5, %6
%8 = load double, double* %3
%9 = fsub double 1.000000e+00, %8
%10 = fmul double %7, %9
ret double %10
}

LLVM IR (-O2):
define double @funcion(double %0, double %1) {
%3 = fmul double %0, %1
%4 = fsub double 1.000000e+00, %0
%5 = fmul double %4, %3
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int write_to(char *, char *);
int release_gpio(int n) {
  char num[16];
  sprintf(num, "%d", n);
  return write_to("/sys/class/gpio/unexport", num);
}


x86 assembly (clang, -O0):
<release_gpio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x20(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <write_to@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<release_gpio>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
call   1030 <write_to@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [25 x i8] c"/sys/class/gpio/unexport\00"
define i32 @release_gpio(i32 %0) {
%2 = alloca i32
%3 = alloca [16 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%8 = call i32 @write_to(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [25 x i8] c"/sys/class/gpio/unexport\00"
define i32 @release_gpio(i32 %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @write_to(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char, unsigned char);
int main() {
  unsigned char a[] = "啦";
  printf("0x%x 0x%x\n", a[0], a[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%al
lea    0xed9(%rip),%rdi
movzbl %al,%esi
movzbl -0x3(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xe5,%esi
mov    $0x95,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.a = [4 x i8] c"\E5\95\A6\00"
@.str = [11 x i8] c"0x%x 0x%x\0A\00"
define i32 @main() {
%1 = alloca [4 x i8]
%2 = bitcast [4 x i8]* %1 to i8*
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%4 = load i8, i8* %3
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
%6 = load i8, i8* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 zeroext %4, i8 zeroext %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"0x%x 0x%x\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 zeroext -27, i8 zeroext -107)
ret i32 0
}
unsigned long omap_vram_reserve_sram(unsigned long sram_pstart,
                                     unsigned long sram_vstart,
                                     unsigned long sram_size,
                                     unsigned long pstart_avail,
                                     unsigned long size_avail) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i64 @omap_vram_reserve_sram(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
ret i64 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct iscsi_context {
  int dummy;
};

/* Variables and functions */
int _iscsi_ids_get(struct iscsi_context *, int /*<<< orphan*/ **,
                   int /*<<< orphan*/ *, char *, char *);
int _iscsi_sids_get(struct iscsi_context *ctx, uint32_t **sids,
                    uint32_t *sid_count) {
  return _iscsi_ids_get(ctx, sids, sid_count, "/sys/class/iscsi_session",
                        "session");
}


x86 assembly (clang, -O0):
<_iscsi_sids_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec9(%rip),%rcx
lea    0xed3(%rip),%r8
call   1030 <_iscsi_ids_get@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_iscsi_sids_get>:
lea    0xee9(%rip),%rcx
lea    0xef3(%rip),%r8
jmp    1030 <_iscsi_ids_get@plt>

LLVM IR (-O0):
%struct.iscsi_context = type { i32 }
@.str = [25 x i8] c"/sys/class/iscsi_session\00"
@.str.1 = [8 x i8] c"session\00"
define i32 @_iscsi_sids_get(%struct.iscsi_context* %0, i32** %1, i32* %2) {
%4 = alloca %struct.iscsi_context*
%5 = alloca i32**
%6 = alloca i32*
store %struct.iscsi_context* %0, %struct.iscsi_context** %4
store i32** %1, i32*** %5
store i32* %2, i32** %6
%7 = load %struct.iscsi_context*, %struct.iscsi_context** %4
%8 = load i32**, i32*** %5
%9 = load i32*, i32** %6
%10 = call i32 @_iscsi_ids_get(%struct.iscsi_context* %7, i32** %8, i32* %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 %10
}

LLVM IR (-O2):
%struct.iscsi_context = type { i32 }
@.str = [25 x i8] c"/sys/class/iscsi_session\00"
@.str.1 = [8 x i8] c"session\00"
define i32 @_iscsi_sids_get(%struct.iscsi_context* %0, i32** %1, i32* %2) {
%4 = tail call i32 @_iscsi_ids_get(%struct.iscsi_context* %0, i32** %1, i32* %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 %4
}
int cmp_float_asc(const void *x, const void *y) {
  if (*(float *)x < *(float *)y) {
    return -1;
  } else if (*(float *)x > *(float *)y) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cmp_float_asc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1131 <cmp_float_asc+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <cmp_float_asc+0x5e>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    1152 <cmp_float_asc+0x52>
movl   $0x1,-0x4(%rbp)
jmp    115e <cmp_float_asc+0x5e>
jmp    1157 <cmp_float_asc+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_float_asc>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
seta   %cl
ucomiss %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp_float_asc(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to float*
%8 = load float, float* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to float*
%11 = load float, float* %10
%12 = fcmp olt float %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %25
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to float*
%17 = load float, float* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to float*
%20 = load float, float* %19
%21 = fcmp ogt float %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 1, i32* %3
br label %25
23: ; preds = %14
br label %24
24: ; preds = %23
store i32 0, i32* %3
br label %25
25: ; preds = %24, %22, %13
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @cmp_float_asc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp olt float %4, %6
%8 = fcmp ogt float %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TCSAFLUSH;
int tcsetattr(int /*<<< orphan*/, int /*<<< orphan*/, struct termios *);
int termset(struct termios *tp) { return (tcsetattr(0, TCSAFLUSH, tp)); }


x86 assembly (clang, -O0):
<termset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
call   1030 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<termset>:
mov    %rdi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
jmp    1030 <tcsetattr@plt>

LLVM IR (-O0):
%struct.termios = type { i32 }
@TCSAFLUSH = global i32 0
define i32 @termset(%struct.termios* %0) {
%2 = alloca %struct.termios*
store %struct.termios* %0, %struct.termios** %2
%3 = load i32, i32* @TCSAFLUSH
%4 = load %struct.termios*, %struct.termios** %2
%5 = call i32 @tcsetattr(i32 0, i32 %3, %struct.termios* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@TCSAFLUSH = global i32 0
define i32 @termset(%struct.termios* %0) {
%2 = load i32, i32* @TCSAFLUSH
%3 = tail call i32 @tcsetattr(i32 0, i32 %2, %struct.termios* %0)
ret i32 %3
}
void RTSpinlockRelease(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSpinlockRelease() {
ret void
}
unsigned byteSwap32(unsigned a) {
  union {
    unsigned whole;
    unsigned char bytes[4];
  } u, v;
  u.whole = a;
  v.bytes[0] = u.bytes[3];
  v.bytes[1] = u.bytes[2];
  v.bytes[2] = u.bytes[1];
  v.bytes[3] = u.bytes[0];
  return v.whole;
}


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

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

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

LLVM IR (-O2):
define i32 @byteSwap32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
void g_slist_index() {}


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

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

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

LLVM IR (-O2):
define void @g_slist_index() {
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double gettime() {
  struct timeval t;
  gettimeofday(&t, NULL);
  return t.tv_sec + t.tv_usec * 1e-6;
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
define double @gettime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %4)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
define double @gettime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long, unsigned long, unsigned long);
int main(void) {
  unsigned long d = 0x23178;
  unsigned long c = ~3;
  unsigned long r = d & c;
  printf("d=%X, c=%X, r=%X\n", d, c, r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x23178,-0x10(%rbp)
movq   $0xfffffffffffffffc,-0x18(%rbp)
ff
mov    -0x10(%rbp),%rax
and    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x23178,%esi
mov    $0x23178,%ecx
mov    $0xfffffffffffffffc,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"d=%X, c=%X, r=%X\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
store i64 143736, i64* %2
store i64 -4, i64* %3
%5 = load i64, i64* %2
%6 = load i64, i64* %3
%7 = and i64 %5, %6
store i64 %7, i64* %4
%8 = load i64, i64* %2
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %8, i64 %9, i64 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"d=%X, c=%X, r=%X\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 143736, i64 -4, i64 143736)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef int uint16_t;

/* Variables and functions */
uint64_t nth_position(uint64_t num, uint16_t position) {
  return ((num >> position) & (uint64_t)1);
}


x86 assembly (clang, -O0):
<nth_position>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nth_position>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @nth_position(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 = ashr i32 %5, %6
%8 = and i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @nth_position(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRCB_get(void) { return U_WMRCORENONE_get("U_WMRCB"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRCB\00"
define i32 @U_WMRCB_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRCB\00"
define i32 @U_WMRCB_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned char);
void fprint_mov_to_Rn(FILE *stream, unsigned char n) {
  fprintf(stream, "MOV   R%X, A                     ", n);
}


x86 assembly (clang, -O0):
<fprint_mov_to_Rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_mov_to_Rn>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"MOV R%X, A \00"
define void @fprint_mov_to_Rn(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i32*, i32** %3
%6 = load i8, i8* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"MOV R%X, A \00"
define void @fprint_mov_to_Rn(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_defindex(int /*<<< orphan*/);
void cm_defindex(void) { gen_defindex(0); }


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

x86 assembly (clang, -O2):
<cm_defindex>:
xor    %edi,%edi
jmp    1030 <gen_defindex@plt>

LLVM IR (-O0):
define void @cm_defindex() {
%1 = call i32 @gen_defindex(i32 0)
ret void
}

LLVM IR (-O2):
define void @cm_defindex() {
%1 = tail call i32 @gen_defindex(i32 0)
ret void
}
/* Variables and functions */
long incr(long *, int);
long call_incr2(long x) {
  long v1 = 15213;
  long v2 = incr(&v1, 3000);
  return x + v2;
}


x86 assembly (clang, -O0):
<call_incr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x3b6d,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0xbb8,%esi
call   1030 <incr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_incr2>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movq   $0x3b6d,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    $0xbb8,%esi
call   1030 <incr@plt>
add    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i64 @call_incr2(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 15213, i64* %3
%5 = call i64 @incr(i64* %3, i32 3000)
store i64 %5, i64* %4
%6 = load i64, i64* %2
%7 = load i64, i64* %4
%8 = add nsw i64 %6, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @call_incr2(i64 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 15213, i64* %2
%4 = call i64 @incr(i64* %2, i32 3000)
%5 = add nsw i64 %4, %0
ret i64 %5
}
int plugin_dummy_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @plugin_dummy_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @plugin_dummy_init() {
ret i32 0
}
void foo6f() {}


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

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

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

LLVM IR (-O2):
define void @foo6f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_packet_noack(unsigned char *, int);
int /*<<< orphan*/ wait_for_ack();
void send_packet(unsigned char *pkt, int len) {
  send_packet_noack(pkt, len);
  wait_for_ack();
}


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

x86 assembly (clang, -O2):
<send_packet>:
push   %rax
call   1040 <send_packet_noack@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <wait_for_ack@plt>

LLVM IR (-O0):
define void @send_packet(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @send_packet_noack(i8* %5, i32 %6)
%8 = call i32 (...) @wait_for_ack()
ret void
}

LLVM IR (-O2):
define void @send_packet(i8* %0, i32 %1) {
%3 = tail call i32 @send_packet_noack(i8* %0, i32 %1)
%4 = tail call i32 (...) @wait_for_ack()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lcd_cmd(int);
void lcd_gotoxy2(unsigned char pos) { lcd_cmd(0xC0 + pos); }


x86 assembly (clang, -O0):
<lcd_gotoxy2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
add    $0xc0,%edi
call   1030 <lcd_cmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_gotoxy2>:
add    $0xc0,%edi
jmp    1030 <lcd_cmd@plt>

LLVM IR (-O0):
define void @lcd_gotoxy2(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = add nsw i32 192, %4
%6 = call i32 @lcd_cmd(i32 %5)
ret void
}

LLVM IR (-O2):
define void @lcd_gotoxy2(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = add nuw nsw i32 %2, 192
%4 = tail call i32 @lcd_cmd(i32 %3)
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR8B_set(void) { return U_WMRCORENONE_set("U_WMR8B"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR8B\00"
define i8* @U_WMR8B_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR8B\00"
define i8* @U_WMR8B_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t min_1(int32_t x_1, int32_t y_0) {
  if (x_1 <= y_0) {
    return x_1;
  } else {
    return y_0;
  }
}


x86 assembly (clang, -O0):
<min_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     1127 <min_1+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <min_1+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_1>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovg  %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @min_1(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ send(int, char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int do_helo(int fd, char *param) {
  send(fd, "250 JChen\r\n", strlen("250 JChen\r\n"), 0);
  return 0;
}


x86 assembly (clang, -O0):
<do_helo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xec4(%rip),%rdi
call   1030 <strlen@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%edx
lea    0xeb3(%rip),%rsi
xor    %ecx,%ecx
call   1040 <send@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_helo>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xed3(%rip),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1040 <send@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"250 JChen\0D\0A\00"
define i32 @do_helo(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 @strlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @send(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"250 JChen\0D\0A\00"
define i32 @do_helo(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @strlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @send(i32 %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3, i32 0)
ret i32 0
}
int lexer_special_escape(char c) {
  switch (c) {
  case 'a':
  case 'b':
  case 'f':
  case 'n':
  case 'r':
  case 't':
  case 'v':
    return 1;
    break;
  default:
    return 0;
    break;
  }
}


x86 assembly (clang, -O0):
<lexer_special_escape>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffff9f,%eax
sub    $0x2,%eax
jb     1177 <lexer_special_escape+0x77>
jmp    1122 <lexer_special_escape+0x22>
mov    -0xc(%rbp),%eax
sub    $0x66,%eax
je     1177 <lexer_special_escape+0x77>
jmp    1133 <lexer_special_escape+0x33>
mov    -0xc(%rbp),%eax
sub    $0x6e,%eax
je     1177 <lexer_special_escape+0x77>
jmp    1144 <lexer_special_escape+0x44>
mov    -0xc(%rbp),%eax
sub    $0x72,%eax
je     1177 <lexer_special_escape+0x77>
jmp    1155 <lexer_special_escape+0x55>
mov    -0xc(%rbp),%eax
sub    $0x74,%eax
je     1177 <lexer_special_escape+0x77>
jmp    1166 <lexer_special_escape+0x66>
mov    -0xc(%rbp),%eax
sub    $0x76,%eax
jne    1183 <lexer_special_escape+0x83>
jmp    1177 <lexer_special_escape+0x77>
movl   $0x1,-0x4(%rbp)
jmp    118a <lexer_special_escape+0x8a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lexer_special_escape>:
add    $0xffffff9f,%edi
cmp    $0x15,%edi
ja     1118 <lexer_special_escape+0x18>
mov    $0x1,%eax
mov    $0x2a2023,%ecx
bt     %edi,%ecx
jae    1118 <lexer_special_escape+0x18>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @lexer_special_escape(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 97, label %6
i32 98, label %6
i32 102, label %6
i32 110, label %6
i32 114, label %6
i32 116, label %6
i32 118, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @lexer_special_escape(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 97, label %4
i32 98, label %4
i32 102, label %4
i32 110, label %4
i32 114, label %4
i32 116, label %4
i32 118, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out,
                             size_t length, const void *key,
                             unsigned char *ivec, int *num, const int enc) {
  printf("Camellia_cfb128_encrypt stubbed\n");
  (void)&(in);
  (void)&(out);
  (void)&(length);
  (void)&(key);
  (void)&(ivec);
  (void)&(num);
  (void)&(enc);
}


x86 assembly (clang, -O0):
<Camellia_cfb128_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [33 x i8] c"Camellia_cfb128_encrypt stubbed\0A\00"
define void @Camellia_cfb128_encrypt(i8* %0, i8* %1, i64 %2, i8* %3, i8* %4, i32* %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i64 %2, i64* %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i32* %5, i32** %13
store i32 %6, i32* %14
%15 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"Camellia_cfb128_encrypt stubbed\00"
define void @Camellia_cfb128_encrypt(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i32* nocapture readnone %5, i32 %6) {
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct flashrom_flashctx {
  int dummy;
};

/* Variables and functions */
int spi_enter_exit_4ba(struct flashrom_flashctx *const, int);
int spi_enter_4ba(struct flashrom_flashctx *const flash) {
  return spi_enter_exit_4ba(flash, true);
}


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

x86 assembly (clang, -O2):
<spi_enter_4ba>:
mov    $0x1,%esi
jmp    1030 <spi_enter_exit_4ba@plt>

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

LLVM IR (-O2):
%struct.flashrom_flashctx = type { i32 }
define i32 @spi_enter_4ba(%struct.flashrom_flashctx* %0) {
%2 = tail call i32 @spi_enter_exit_4ba(%struct.flashrom_flashctx* %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ BLS_LOAD_BINARY_LEVEL1_C();
int /*<<< orphan*/ BLS_LOAD_BINARY_LEVEL2_C();
int /*<<< orphan*/ level1_init();
int /*<<< orphan*/ level2_init();
void load_level(int l) {
  switch (l) {
  case 1:
    BLS_LOAD_BINARY_LEVEL1_C();
    level1_init();
    break;
  case 2:
    BLS_LOAD_BINARY_LEVEL2_C();
    level2_init();
    break;
  }
}


x86 assembly (clang, -O0):
<load_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     1170 <load_level+0x30>
jmp    115f <load_level+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1183 <load_level+0x43>
jmp    1191 <load_level+0x51>
mov    $0x0,%al
call   1040 <BLS_LOAD_BINARY_LEVEL1_C@plt>
mov    $0x0,%al
call   1030 <level1_init@plt>
jmp    1191 <load_level+0x51>
mov    $0x0,%al
call   1050 <BLS_LOAD_BINARY_LEVEL2_C@plt>
mov    $0x0,%al
call   1060 <level2_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_level>:
push   %rax
cmp    $0x2,%edi
je     115a <load_level+0x1a>
cmp    $0x1,%edi
jne    1169 <load_level+0x29>
xor    %eax,%eax
call   1040 <BLS_LOAD_BINARY_LEVEL1_C@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <level1_init@plt>
xor    %eax,%eax
call   1050 <BLS_LOAD_BINARY_LEVEL2_C@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <level2_init@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @load_level(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %10 [
i32 1, label %4
i32 2, label %7
]
4: ; preds = %1
%5 = call i32 (...) @BLS_LOAD_BINARY_LEVEL1_C()
%6 = call i32 (...) @level1_init()
br label %10
7: ; preds = %1
%8 = call i32 (...) @BLS_LOAD_BINARY_LEVEL2_C()
%9 = call i32 (...) @level2_init()
br label %10
10: ; preds = %1, %7, %4
ret void
}

LLVM IR (-O2):
define void @load_level(i32 %0) {
switch i32 %0, label %8 [
i32 1, label %2
i32 2, label %5
]
2: ; preds = %1
%3 = tail call i32 (...) @BLS_LOAD_BINARY_LEVEL1_C()
%4 = tail call i32 (...) @level1_init()
br label %8
5: ; preds = %1
%6 = tail call i32 (...) @BLS_LOAD_BINARY_LEVEL2_C()
%7 = tail call i32 (...) @level2_init()
br label %8
8: ; preds = %1, %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
int /*<<< orphan*/ WaypointHandle();
void WaypointLogging() { UAVObjLogging(WaypointHandle()); }


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

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

LLVM IR (-O0):
define void @WaypointLogging() {
%1 = call i32 (...) @WaypointHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @WaypointLogging() {
%1 = tail call i32 (...) @WaypointHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int addnumbers(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int total;
  total = addnumbers(2, 4);
  printf("total = %d\n", total);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <addnumbers@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <addnumbers@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"total = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @addnumbers(i32 2, i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void fork_test_sigchld_ignored() {
  signal(SIGCHLD, SIG_IGN);
  int n = fork();
  if (n == 0)
    exit(0);
}


x86 assembly (clang, -O0):
<fork_test_sigchld_ignored>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    116a <fork_test_sigchld_ignored+0x3a>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork_test_sigchld_ignored>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
je     1155 <fork_test_sigchld_ignored+0x25>
pop    %rax
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
define void @fork_test_sigchld_ignored() {
%1 = alloca i32
%2 = load i32, i32* @SIGCHLD
%3 = load i32, i32* @SIG_IGN
%4 = call i32 @signal(i32 %2, i32 %3)
%5 = call i32 (...) @fork()
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %0
ret void
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
define void @fork_test_sigchld_ignored() {
%1 = load i32, i32* @SIGCHLD
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
%4 = tail call i32 (...) @fork()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %0
ret void
}
void gtk_paint_flat_box() {}


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

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

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

LLVM IR (-O2):
define void @gtk_paint_flat_box() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int semget(int, int, int);
int get_semid() {
  int semid;
  semid = semget(77, 2, 0777);
  if (semid < 0) {
    perror("Could not get semaphores depositor");
    exit(EXIT_FAILURE);
  }
  return semid;
}


x86 assembly (clang, -O0):
<get_semid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4d,%edi
mov    $0x2,%esi
mov    $0x1ff,%edx
call   1030 <semget@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1173 <get_semid+0x43>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_semid>:
push   %rax
mov    $0x4d,%edi
mov    $0x2,%esi
mov    $0x1ff,%edx
call   1030 <semget@plt>
test   %eax,%eax
js     114b <get_semid+0x1b>
pop    %rcx
ret
lea    0xeae(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Could not get semaphores depositor\00"
@EXIT_FAILURE = global i32 0
define i32 @get_semid() {
%1 = alloca i32
%2 = call i32 @semget(i32 77, i32 2, i32 511)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [35 x i8] c"Could not get semaphores depositor\00"
@EXIT_FAILURE = global i32 0
define i32 @get_semid() {
%1 = tail call i32 @semget(i32 77, i32 2, i32 511)
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %0
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ check_add_double();
int /*<<< orphan*/ check_add_float();
int /*<<< orphan*/ check_add_long_double();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(void) {
  check_add_float();
  check_add_double();
  check_add_long_double();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <check_add_float@plt>
mov    $0x0,%al
call   1030 <check_add_double@plt>
mov    $0x0,%al
call   1050 <check_add_long_double@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <check_add_float@plt>
xor    %eax,%eax
call   1030 <check_add_double@plt>
xor    %eax,%eax
call   1050 <check_add_long_double@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @check_add_float()
%3 = call i32 (...) @check_add_double()
%4 = call i32 (...) @check_add_long_double()
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @check_add_float()
%2 = tail call i32 (...) @check_add_double()
%3 = tail call i32 (...) @check_add_long_double()
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ run();
int main(void) {
  run();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @run()
ret i32 0
}
/* Type definitions */
struct feature_pair {
  int dummy;
};
struct CovariateAnalysis {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void _emitJSONUniExtraL(const struct feature_pair *pair,
                        const struct CovariateAnalysis *covan, FILE *fp) {}


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

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

LLVM IR (-O0):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniExtraL(%struct.feature_pair* %0, %struct.CovariateAnalysis* %1, i32* %2) {
%4 = alloca %struct.feature_pair*
%5 = alloca %struct.CovariateAnalysis*
%6 = alloca i32*
store %struct.feature_pair* %0, %struct.feature_pair** %4
store %struct.CovariateAnalysis* %1, %struct.CovariateAnalysis** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniExtraL(%struct.feature_pair* nocapture %0, %struct.CovariateAnalysis* nocapture %1, i32* nocapture %2) {
ret void
}
int mod(x) { return x > 0 ? x : -x; }


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

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

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

LLVM IR (-O2):
define i32 @mod(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}