xunge/DecIR huggingface dataset:
void gtk_icon_source_set_state() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_source_set_state() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_get_quaddobl_pole_radius(double *frp) {
  int fail;
  int precision = 2;
  int *b;
  fail = _ada_use_c2phc4c(865, &precision, b, frp, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_quaddobl_pole_radius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x361,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_quaddobl_pole_radius>:
push   %rax
mov    %rdi,%rcx
movl   $0x2,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x361,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @padcon_get_quaddobl_pole_radius(double* %0) {
%2 = alloca double*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store double* %0, double** %2
store i32 2, i32* %4
%6 = load i32*, i32** %5
%7 = load double*, double** %2
%8 = call i32 @_ada_use_c2phc4c(i32 865, i32* %4, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @padcon_get_quaddobl_pole_radius(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 2, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 865, i32* %2, i32* undef, double* %0, i32 0)
ret i32 %4
}
int non_extern_func(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @non_extern_func(i32 returned %0) {
ret i32 %0
}
int min(int i1, int i2) {
  if (i1 < i2)
    return i1;
  return i2;
}


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

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

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int g() { return "bye" == "hello"; }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
lea    0xef9(%rip),%rcx
lea    0xeee(%rip),%rax
sub    %rcx,%rax
sete   %al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
lea    0xefd(%rip),%rcx
lea    0xef2(%rip),%rdx
xor    %eax,%eax
cmp    %rcx,%rdx
sete   %al
ret

LLVM IR (-O0):
@.str = [4 x i8] c"bye\00"
@.str.1 = [6 x i8] c"hello\00"
define i32 @g() {
ret i32 zext (i1 icmp eq (i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)) to i32)
}

LLVM IR (-O2):
@.str = [4 x i8] c"bye\00"
@.str.1 = [6 x i8] c"hello\00"
define i32 @g() {
ret i32 zext (i1 icmp eq (i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)) to i32)
}
int main() {
  int ***three;
  int **two;
  ***three = **two;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32***
%2 = alloca i32**
%3 = load i32**, i32*** %2
%4 = load i32*, i32** %3
%5 = load i32, i32* %4
%6 = load i32***, i32**** %1
%7 = load i32**, i32*** %6
%8 = load i32*, i32** %7
store i32 %5, i32* %8
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ foo(int);
void baz(int i) { foo(i + 2); }


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

x86 assembly (clang, -O2):
<baz>:
add    $0x2,%edi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @baz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 2
%5 = call i32 @foo(i32 %4)
ret void
}

LLVM IR (-O2):
define void @baz(i32 %0) {
%2 = add nsw i32 %0, 2
%3 = tail call i32 @foo(i32 %2)
ret void
}
char TestO() {
  char r;
  unsigned char res = 128;
  __asm__("addb $128, %1" : "=@cco"(r), "+r"(res));
  if (r) {
    __asm__("addb $1, %1" : "=@ccno"(r), "+r"(res));
    if (r)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<TestO>:
push   %rbp
mov    %rsp,%rbp
movb   $0x80,-0x3(%rbp)
mov    -0x3(%rbp),%al
add    $0x80,%al
seto   %cl
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
cmpb   $0x0,-0x2(%rbp)
je     1146 <TestO+0x46>
mov    -0x3(%rbp),%al
add    $0x1,%al
setno  %cl
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
cmpb   $0x0,-0x2(%rbp)
je     1141 <TestO+0x41>
movb   $0x1,-0x1(%rbp)
jmp    114a <TestO+0x4a>
jmp    1146 <TestO+0x46>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestO>:
mov    $0x80,%al
add    $0x80,%al
jno    110d <TestO+0xd>
add    $0x1,%al
mov    $0x1,%al
jo     110d <TestO+0xd>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @TestO() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
store i8 -128, i8* %3
%4 = load i8, i8* %3
%5 = call { i8, i8 } asm "addb $$128, $1", "={@cco},=r,1,~{dirflag},~{fpsr},~{flags}"(i8 %4)
%6 = extractvalue { i8, i8 } %5, 0
%7 = extractvalue { i8, i8 } %5, 1
store i8 %6, i8* %2
store i8 %7, i8* %3
%8 = load i8, i8* %2
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %19
10: ; preds = %0
%11 = load i8, i8* %3
%12 = call { i8, i8 } asm "addb $$1, $1", "={@ccno},=r,1,~{dirflag},~{fpsr},~{flags}"(i8 %11)
%13 = extractvalue { i8, i8 } %12, 0
%14 = extractvalue { i8, i8 } %12, 1
store i8 %13, i8* %2
store i8 %14, i8* %3
%15 = load i8, i8* %2
%16 = icmp ne i8 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %10
store i8 1, i8* %1
br label %20
18: ; preds = %10
br label %19
19: ; preds = %18, %0
store i8 0, i8* %1
br label %20
20: ; preds = %19, %17
%21 = load i8, i8* %1
ret i8 %21
}

LLVM IR (-O2):
define signext i8 @TestO() {
%1 = tail call { i8, i8 } asm "addb $$128, $1", "={@cco},=r,1,~{dirflag},~{fpsr},~{flags}"(i8 -128)
%2 = extractvalue { i8, i8 } %1, 0
%3 = icmp eq i8 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %0
%5 = extractvalue { i8, i8 } %1, 1
%6 = tail call { i8, i8 } asm "addb $$1, $1", "={@ccno},=r,1,~{dirflag},~{fpsr},~{flags}"(i8 %5)
%7 = extractvalue { i8, i8 } %6, 0
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %4, %0
br label %10
10: ; preds = %4, %9
%11 = phi i8 [ 0, %9 ], [ 1, %4 ]
ret i8 %11
}
void olpc_prequirks(struct snd_card *card, struct snd_ac97_template *ac97) {}


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

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

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

LLVM IR (-O2):
%struct.snd_card = type opaque
%struct.snd_ac97_template = type opaque
define void @olpc_prequirks(%struct.snd_card* nocapture %0, %struct.snd_ac97_template* nocapture %1) {
ret void
}
int d_blg_mr1(double *a1, double a2) {
  return (__builtin_islessgreater(*a1, a2));
}


x86 assembly (clang, -O0):
<d_blg_mr1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x10(%rbp),%xmm0
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_blg_mr1>:
xor    %eax,%eax
ucomisd (%rdi),%xmm0
setne  %al
ret

LLVM IR (-O0):
define i32 @d_blg_mr1(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double, double* %4
%8 = fcmp one double %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @d_blg_mr1(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = fcmp one double %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int sleep(int);
int Logging_Full_Sleep(int seconds) {
  while (seconds > 0)
    seconds = sleep(seconds);
  return seconds;
}


x86 assembly (clang, -O0):
<Logging_Full_Sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1135 <Logging_Full_Sleep+0x25>
mov    -0x4(%rbp),%edi
call   1030 <sleep@plt>
mov    %eax,-0x4(%rbp)
jmp    111b <Logging_Full_Sleep+0xb>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Logging_Full_Sleep>:
push   %rax
mov    %edi,%eax
test   %edi,%edi
jle    112b <Logging_Full_Sleep+0x1b>
nopw   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <sleep@plt>
test   %eax,%eax
jg     1120 <Logging_Full_Sleep+0x10>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Logging_Full_Sleep(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %7
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = tail call i32 @sleep(i32 %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3, %1
%8 = phi i32 [ %0, %1 ], [ %5, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void cow_fortune(void) { system("/usr/games/fortune -s | /usr/games/cowsay"); }


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"/usr/games/fortune -s | /usr/games/cowsay\00"
define void @cow_fortune() {
%1 = call i32 @system(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"/usr/games/fortune -s | /usr/games/cowsay\00"
define void @cow_fortune() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}
long modPow(long b, long e, long m) {
  long result = 1;
  while (e > 0) {
    if ((e & 1) == 1) {
      result = (result * b) % m;
    }
    b = (b * b) % m;
    e >>= 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<modPow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    116c <modPow+0x6c>
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x1,%rax
jne    1148 <modPow+0x48>
mov    -0x20(%rbp),%rax
imul   -0x8(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x8(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rdx,-0x8(%rbp)
mov    -0x10(%rbp),%rax
sar    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <modPow+0x18>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<modPow>:
mov    $0x1,%r8d
test   %rsi,%rsi
jle    117a <modPow+0x7a>
mov    %rdx,%rcx
jmp    1145 <modPow+0x45>
mov    %r8,%rax
cqto
idiv   %rcx
mov    %rdx,%r8
imul   %rdi,%rdi
mov    %rdi,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1170 <modPow+0x70>
mov    %rdi,%rax
cqto
idiv   %rcx
mov    %rdx,%rdi
mov    %rsi,%rax
shr    %rax
cmp    $0x1,%rsi
mov    %rax,%rsi
jbe    117a <modPow+0x7a>
test   $0x1,%sil
je     111b <modPow+0x1b>
imul   %rdi,%r8
mov    %r8,%rax
or     %rcx,%rax
shr    $0x20,%rax
jne    1110 <modPow+0x10>
mov    %r8d,%eax
xor    %edx,%edx
div    %ecx
mov    %edx,%r8d
jmp    111b <modPow+0x1b>
nopw   0x0(%rax,%rax,1)
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
mov    %edx,%edi
jmp    1136 <modPow+0x36>
mov    %r8,%rax
ret

LLVM IR (-O0):
define i64 @modPow(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
store i64 1, i64* %7
br label %8
8: ; preds = %21, %3
%9 = load i64, i64* %5
%10 = icmp sgt i64 %9, 0
br i1 %10, label %11, label %29
11: ; preds = %8
%12 = load i64, i64* %5
%13 = and i64 %12, 1
%14 = icmp eq i64 %13, 1
br i1 %14, label %15, label %21
15: ; preds = %11
%16 = load i64, i64* %7
%17 = load i64, i64* %4
%18 = mul nsw i64 %16, %17
%19 = load i64, i64* %6
%20 = srem i64 %18, %19
store i64 %20, i64* %7
br label %21
21: ; preds = %15, %11
%22 = load i64, i64* %4
%23 = load i64, i64* %4
%24 = mul nsw i64 %22, %23
%25 = load i64, i64* %6
%26 = srem i64 %24, %25
store i64 %26, i64* %4
%27 = load i64, i64* %5
%28 = ashr i64 %27, 1
store i64 %28, i64* %5
br label %8
29: ; preds = %8
%30 = load i64, i64* %7
ret i64 %30
}

LLVM IR (-O2):
define i64 @modPow(i64 %0, i64 %1, i64 %2) {
%4 = icmp sgt i64 %1, 0
br i1 %4, label %5, label %20
5: ; preds = %3, %14
%6 = phi i64 [ %15, %14 ], [ 1, %3 ]
%7 = phi i64 [ %17, %14 ], [ %0, %3 ]
%8 = phi i64 [ %18, %14 ], [ %1, %3 ]
%9 = and i64 %8, 1
%10 = icmp eq i64 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %5
%12 = mul nsw i64 %6, %7
%13 = srem i64 %12, %2
br label %14
14: ; preds = %11, %5
%15 = phi i64 [ %13, %11 ], [ %6, %5 ]
%16 = mul nsw i64 %7, %7
%17 = srem i64 %16, %2
%18 = lshr i64 %8, 1
%19 = icmp ult i64 %8, 2
br i1 %19, label %20, label %5
20: ; preds = %14, %3
%21 = phi i64 [ 1, %3 ], [ %15, %14 ]
ret i64 %21
}
void _Jv_NewString() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @resh_cleanup() {
ret void
}
void DMA_INT3_IRQHandler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<DMA_INT3_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <DMA_INT3_IRQHandler+0x9>
jmp    1109 <DMA_INT3_IRQHandler+0x9>

x86 assembly (clang, -O2):
<DMA_INT3_IRQHandler>:
jmp    1100 <DMA_INT3_IRQHandler>

LLVM IR (-O0):
define void @DMA_INT3_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @DMA_INT3_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void eol2EOL() {}


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

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

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

LLVM IR (-O2):
define void @eol2EOL() {
ret void
}
/* Variables and functions */
bool is_data_type(unsigned int chunk_type) {
  return (chunk_type == 0x01 || chunk_type == 0x02 || chunk_type == 0x03);
}


x86 assembly (clang, -O0):
<is_data_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <is_data_type+0x2f>
mov    $0x1,%al
cmpl   $0x2,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <is_data_type+0x2f>
cmpl   $0x3,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_data_type>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x3,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_data_type(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 3
%4 = zext i1 %3 to i32
ret i32 %4
}
void OPM_CloseOldSym(void) {}


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

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

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

LLVM IR (-O2):
define void @OPM_CloseOldSym() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Protocol_Loop();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Entering protocol loop...\n");
  printf("type 'CONNECT', 'CLOSE', 'SEND', or 'QUIT'\n");
  Protocol_Loop();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"Entering protocol loop...\0A\00"
@.str.1 = [44 x i8] c"type 'CONNECT', 'CLOSE', 'SEND', or 'QUIT'\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (...) @Protocol_Loop()
ret i32 0
}

LLVM IR (-O2):
@str = [26 x i8] c"Entering protocol loop...\00"
@str.2 = [43 x i8] c"type 'CONNECT', 'CLOSE', 'SEND', or 'QUIT'\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.2, i64 0, i64 0))
%5 = tail call i32 (...) @Protocol_Loop()
ret i32 0
}
int vpx_codec_version(void) { return ((1 << 16) | (8 << 8) | (2)); }


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

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

LLVM IR (-O0):
define i32 @vpx_codec_version() {
ret i32 67586
}

LLVM IR (-O2):
define i32 @vpx_codec_version() {
ret i32 67586
}
void gtk_widget_get_accessible() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_get_accessible() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ by_ref_actual_already_in_footprint(int /*<<< orphan*/ *);
void call_by_ref_actual_already_in_footprint_ok() {
  by_ref_actual_already_in_footprint(NULL);
}


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

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

LLVM IR (-O0):
define void @call_by_ref_actual_already_in_footprint_ok() {
%1 = call i32 @by_ref_actual_already_in_footprint(i32* null)
ret void
}

LLVM IR (-O2):
define void @call_by_ref_actual_already_in_footprint_ok() {
%1 = tail call i32 @by_ref_actual_already_in_footprint(i32* null)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_IFCHR;
int stat(const char *filename, struct stat *st) {
  st->st_mode = S_IFCHR;
  return 0;
}


x86 assembly (clang, -O0):
<stat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_IFCHR = global i32 0
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* @S_IFCHR
%6 = load %struct.stat*, %struct.stat** %4
%7 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
store i32 %5, i32* %7
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IFCHR = global i32 0
define i32 @stat(i8* nocapture readnone %0, %struct.stat* nocapture writeonly %1) {
%3 = load i32, i32* @S_IFCHR
%4 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
store i32 %3, i32* %4
ret i32 0
}
/* Type definitions */
struct xc6_routing_bitpos {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct xc6_routing_bitpos *);
void free_xc6_routing_bitpos(struct xc6_routing_bitpos *bitpos) {
  free(bitpos);
}


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

x86 assembly (clang, -O2):
<free_xc6_routing_bitpos>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.xc6_routing_bitpos = type { i32 }
define void @free_xc6_routing_bitpos(%struct.xc6_routing_bitpos* %0) {
%2 = alloca %struct.xc6_routing_bitpos*
store %struct.xc6_routing_bitpos* %0, %struct.xc6_routing_bitpos** %2
%3 = load %struct.xc6_routing_bitpos*, %struct.xc6_routing_bitpos** %2
%4 = call i32 @free(%struct.xc6_routing_bitpos* %3)
ret void
}

LLVM IR (-O2):
%struct.xc6_routing_bitpos = type { i32 }
define void @free_xc6_routing_bitpos(%struct.xc6_routing_bitpos* nocapture %0) {
%2 = tail call i32 @free(%struct.xc6_routing_bitpos* %0)
ret void
}
void adis16240_unconfigure_ring(struct iio_dev *indio_dev) {}


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define void @adis16240_unconfigure_ring(%struct.iio_dev* nocapture %0) {
ret void
}
/* Type definitions */
struct FluffSetEnum {
  int dummy;
};

/* Variables and functions */
unsigned int CHAR_BIT;
int set_enum_contains_base(struct FluffSetEnum *, unsigned int, unsigned int);
int fluff_set_enum_contains(struct FluffSetEnum *self, unsigned int n) {
  unsigned int block;
  block = (n / CHAR_BIT);
  n %= CHAR_BIT;
  return set_enum_contains_base(self, block, n);
}


x86 assembly (clang, -O0):
<fluff_set_enum_contains>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2eb7(%rip),%rcx
xor    %edx,%edx
divl   (%rcx)
mov    %eax,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%ecx
mov    -0xc(%rbp),%eax
xor    %edx,%edx
div    %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <set_enum_contains_base@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fluff_set_enum_contains>:
mov    %esi,%eax
mov    0x2ec7(%rip),%rcx
xor    %edx,%edx
divl   (%rcx)
mov    %eax,%esi
jmp    1030 <set_enum_contains_base@plt>

LLVM IR (-O0):
%struct.FluffSetEnum = type { i32 }
@CHAR_BIT = global i32 0
define i32 @fluff_set_enum_contains(%struct.FluffSetEnum* %0, i32 %1) {
%3 = alloca %struct.FluffSetEnum*
%4 = alloca i32
%5 = alloca i32
store %struct.FluffSetEnum* %0, %struct.FluffSetEnum** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* @CHAR_BIT
%8 = udiv i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* @CHAR_BIT
%10 = load i32, i32* %4
%11 = urem i32 %10, %9
store i32 %11, i32* %4
%12 = load %struct.FluffSetEnum*, %struct.FluffSetEnum** %3
%13 = load i32, i32* %5
%14 = load i32, i32* %4
%15 = call i32 @set_enum_contains_base(%struct.FluffSetEnum* %12, i32 %13, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.FluffSetEnum = type { i32 }
@CHAR_BIT = global i32 0
define i32 @fluff_set_enum_contains(%struct.FluffSetEnum* %0, i32 %1) {
%3 = load i32, i32* @CHAR_BIT
%4 = udiv i32 %1, %3
%5 = urem i32 %1, %3
%6 = tail call i32 @set_enum_contains_base(%struct.FluffSetEnum* %0, i32 %4, i32 %5)
ret i32 %6
}
/* Variables and functions */
char EOF;
char getchar();
void limparBuffer(void) {
  char c;
  while ((c = getchar()) != '\n' && c != EOF)
    ;
}


x86 assembly (clang, -O0):
<limparBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1149 <limparBuffer+0x39>
movsbl -0x1(%rbp),%eax
mov    0x2eaa(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    1159 <limparBuffer+0x49>
jmp    115e <limparBuffer+0x4e>
jmp    1118 <limparBuffer+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<limparBuffer>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
je     112f <limparBuffer+0x1f>
cmp    (%rbx),%al
jne    1120 <limparBuffer+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i8 0
define void @limparBuffer() {
%1 = alloca i8
br label %2
2: ; preds = %14, %0
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
%9 = load i8, i8* @EOF
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %8, %10
br label %12
12: ; preds = %6, %2
%13 = phi i1 [ false, %2 ], [ %11, %6 ]
br i1 %13, label %14, label %15
14: ; preds = %12
br label %2
15: ; preds = %12
ret void
}

LLVM IR (-O2):
@EOF = global i8 0
define void @limparBuffer() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp ne i8 %2, 10
%4 = load i8, i8* @EOF
%5 = icmp ne i8 %2, %4
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void bar(int b) {
  b += 2;
  printf("single line! %d\n", b);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    0x2(%rdi),%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"single line! %d\0A\00"
define void @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 2
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"single line! %d\0A\00"
define void @bar(i32 %0) {
%2 = add nsw i32 %0, 2
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ cale(int *, int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int /*<<< orphan*/ seiza(int, int);
int main() {
  int tuki, niti;
  printf("Enter your birthday[mm/dd] : ");
  scanf("%d/%d", &tuki, &niti);
  if (cale(&tuki, &niti) == 0) {
    seiza(tuki, niti);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <cale@plt>
cmp    $0x0,%rax
jne    1191 <main+0x51>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1060 <seiza@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0x4(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <cale@plt>
test   %rax,%rax
jne    1186 <main+0x46>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1060 <seiza@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Enter your birthday[mm/dd] : \00"
@.str.1 = [6 x i8] c"%d/%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = call i64 @cale(i32* %2, i32* %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @seiza(i32 %9, i32 %10)
br label %12
12: ; preds = %8, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Enter your birthday[mm/dd] : \00"
@.str.1 = [6 x i8] c"%d/%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = call i64 @cale(i32* %1, i32* %2)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = call i32 @seiza(i32 %10, i32 %11)
br label %13
13: ; preds = %9, %0
ret i32 0
}
/* Variables and functions */
double cos(double);
double cos_to_earth(double to_earth) { return cos(to_earth); }


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

x86 assembly (clang, -O2):
<cos_to_earth>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define double @cos_to_earth(double %0) {
%2 = tail call double @cos(double %0)
ret double %2
}
char *ch_str(ch)
int ch;
{
  char tmp[1];
  tmp[0] = ch;
  return asc_str(tmp, 1);
}


x86 assembly (clang, -O0):
<ch_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
lea    -0x5(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <asc_str@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch_str>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <asc_str@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @ch_str(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
store i8 %5, i8* %6
%7 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%8 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @asc_str to i32 (i8*, i32, ...)*)(i8* %7, i32 1)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @ch_str(i32 %0) {
%2 = alloca [1 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @asc_str to i32 (i8*, i32, ...)*)(i8* %3, i32 1)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
OP(fd, a9) {
  illegal_1();
  op_a9();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_a9@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_a9()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_a9()
ret i32 undef
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int xstrcasecmp(const char *s1, const char *s2) {
  if (s1 == s2)
    return 0;
  if (s1 == 0 || s2 == 0)
    return 1;
  return strcasecmp(s1, s2);
}


x86 assembly (clang, -O0):
<xstrcasecmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    113a <xstrcasecmp+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    116c <xstrcasecmp+0x5c>
cmpq   $0x0,-0x10(%rbp)
je     1150 <xstrcasecmp+0x40>
cmpq   $0x0,-0x18(%rbp)
jne    115c <xstrcasecmp+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    116c <xstrcasecmp+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrcasecmp>:
cmp    %rsi,%rdi
je     1129 <xstrcasecmp+0x19>
mov    $0x1,%eax
test   %rdi,%rdi
je     112b <xstrcasecmp+0x1b>
test   %rsi,%rsi
je     112b <xstrcasecmp+0x1b>
jmp    1030 <strcasecmp@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @xstrcasecmp(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
%6 = icmp eq i8* %1, null
%7 = or i1 %5, %6
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = tail call i32 @strcasecmp(i8* %0, i8* %1)
br label %10
10: ; preds = %4, %2, %8
%11 = phi i32 [ %9, %8 ], [ 0, %2 ], [ 1, %4 ]
ret i32 %11
}
/* Variables and functions */
char *malloc(int);
char *my_realloc(char *old, int oldlen, int newlen) {
  char *new = malloc(newlen);
  int i = 0;
  while (i <= oldlen - 1) {
    new[i] = old[i];
    i = i + 1;
  }
  return new;
}


x86 assembly (clang, -O0):
<my_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     116a <my_realloc+0x5a>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1135 <my_realloc+0x25>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_realloc>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %edx,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %ebp,%ebp
jle    1144 <my_realloc+0x24>
mov    %ebp,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define noalias i8* @my_realloc(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i8* @malloc(i32 %2)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %3
ret i8* %4
}
void gtk_parse_args() {}


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

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

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

LLVM IR (-O2):
define void @gtk_parse_args() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
off_t fxt_block_falign(FILE *fstream) {
  off_t start;
  if ((start = ftell(fstream)) < 0) {
    perror("ftell getting current position");
    exit(EXIT_FAILURE);
  }
  return start;
}


x86 assembly (clang, -O0):
<fxt_block_falign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    116b <fxt_block_falign+0x3b>
lea    0xea8(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fxt_block_falign>:
push   %rax
call   1030 <ftell@plt>
test   %eax,%eax
js     113c <fxt_block_falign+0xc>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"ftell getting current position\00"
@EXIT_FAILURE = global i32 0
define i32 @fxt_block_falign(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @ftell(i32* %4)
store i32 %5, i32* %3
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str = [31 x i8] c"ftell getting current position\00"
@EXIT_FAILURE = global i32 0
define i32 @fxt_block_falign(i32* nocapture %0) {
%2 = tail call i32 @ftell(i32* %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i32 %2
}
/* Variables and functions */
size_t next_power_of_2(size_t x) {
  size_t r = 8192;
  while (r < x)
    r <<= 1;
  return r;
}


x86 assembly (clang, -O0):
<next_power_of_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x2000,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    112f <next_power_of_2+0x2f>
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <next_power_of_2+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_power_of_2>:
mov    $0x2000,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rcx,%rax
add    %rcx,%rcx
cmp    %rdi,%rax
jb     1110 <next_power_of_2+0x10>
ret

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

LLVM IR (-O2):
define i64 @next_power_of_2(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 8192, %1 ], [ %5, %2 ]
%4 = icmp ult i64 %3, %0
%5 = shl i64 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void print_int_array(int *b, int b_size) {
  for (int i = 0; i < b_size; i++) {
    printf("[%d]: %d\n", i, b[i]);
  }
}


x86 assembly (clang, -O0):
<print_int_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <print_int_array+0x4a>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_int_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"[%d]: %d\0A\00"
define void @print_int_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ fail(char *);
scalar_t__ load_fs(char *);
void fs_load() {
  if (load_fs("fat.part") < 0)
    fail("'load' failed!\n");
}


x86 assembly (clang, -O0):
<fs_load>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <load_fs@plt>
cmp    $0x0,%rax
jge    1146 <fs_load+0x26>
lea    0xec8(%rip),%rdi
call   1030 <fail@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_load>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <load_fs@plt>
test   %rax,%rax
js     1134 <fs_load+0x14>
pop    %rax
ret
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <fail@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"fat.part\00"
@.str.1 = [16 x i8] c"'load' failed!\0A\00"
define void @fs_load() {
%1 = call i64 @load_fs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @fail(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"fat.part\00"
@.str.1 = [16 x i8] c"'load' failed!\0A\00"
define void @fs_load() {
%1 = tail call i64 @load_fs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @fail(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long time;
};
typedef TYPE_1__ XSelectionEvent;

/* Variables and functions */
void set_XSelectionEvent_time(void *_p, unsigned long _v) {
  ((XSelectionEvent *)_p)->time = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XSelectionEvent_time(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XSelectionEvent_time(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}