xunge/DecIR huggingface dataset:
/* Variables and functions */
void iwc_count_bytes(int buflen, unsigned long long *bytes) {
  if (bytes != NULL) {
    *bytes += buflen;
  }
}


x86 assembly (clang, -O0):
<iwc_count_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1124 <iwc_count_bytes+0x24>
movslq -0x4(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<iwc_count_bytes>:
test   %rsi,%rsi
je     110b <iwc_count_bytes+0xb>
movslq %edi,%rax
add    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @iwc_count_bytes(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = icmp ne i64* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = load i64*, i64** %4
%11 = load i64, i64* %10
%12 = add i64 %11, %9
store i64 %12, i64* %10
br label %13
13: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @iwc_count_bytes(i32 %0, i64* %1) {
%3 = icmp eq i64* %1, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = load i64, i64* %1
%7 = add i64 %6, %5
store i64 %7, i64* %1
br label %8
8: ; preds = %4, %2
ret void
}
int access(s, m)
char *s;
{ return (0); }


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

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

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

LLVM IR (-O2):
define i32 @access(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
int foo1() { return 10; }


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

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

LLVM IR (-O0):
define i32 @foo1() {
ret i32 10
}

LLVM IR (-O2):
define i32 @foo1() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int toascii(int);
void test_toascii_symbolic(int x) {
  int ret = toascii(x);
  (void)ret;
  clang_analyzer_eval(-1 <= x && x <= 255);
}


x86 assembly (clang, -O0):
<test_toascii_symbolic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <toascii@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x9(%rbp)
jg     1156 <test_toascii_symbolic+0x36>
cmpl   $0xff,-0x4(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_toascii_symbolic>:
add    $0x1,%edi
xor    %eax,%eax
cmp    $0x101,%edi
setb   %al
mov    %eax,%edi
jmp    1030 <clang_analyzer_eval@plt>

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

LLVM IR (-O2):
define void @test_toascii_symbolic(i32 %0) {
%2 = add i32 %0, 1
%3 = icmp ult i32 %2, 257
%4 = zext i1 %3 to i32
%5 = tail call i32 @clang_analyzer_eval(i32 %4)
ret void
}
int sungetch(int dummy, char **cpp) { return (*(*cpp)--); }


x86 assembly (clang, -O0):
<sungetch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,(%rcx)
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sungetch>:
mov    (%rsi),%rax
lea    -0x1(%rax),%rcx
mov    %rcx,(%rsi)
movsbl (%rax),%eax
ret

LLVM IR (-O0):
define i32 @sungetch(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i32 -1
store i8* %7, i8** %5
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @sungetch(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = getelementptr inbounds i8, i8* %3, i64 -1
store i8* %4, i8** %1
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
ret i32 %6
}
float meter_deflect_nordic(float db) {
  if (db < -60) {
    return 0.0;
  } else {
    const float rv = (db + 60.0f) / 54.0f;
    if (rv < 1.0) {
      return rv;
    } else {
      return 1.0;
    }
  }
}


x86 assembly (clang, -O0):
<meter_deflect_nordic>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1128 <meter_deflect_nordic+0x28>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    117d <meter_deflect_nordic+0x7d>
movss  0xed8(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  0xec7(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb9(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1170 <meter_deflect_nordic+0x70>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    117d <meter_deflect_nordic+0x7d>
movss  0xe94(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<meter_deflect_nordic>:
xorps  %xmm1,%xmm1
movss  0xef5(%rip),%xmm2
ucomiss %xmm0,%xmm2
ja     112b <meter_deflect_nordic+0x2b>
addss  0xeec(%rip),%xmm0
divss  0xee8(%rip),%xmm0
minss  0xee4(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @meter_deflect_nordic(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %3
%5 = load float, float* %3
%6 = fcmp olt float %5, -6.000000e+01
br i1 %6, label %7, label %8
7: ; preds = %1
store float 0.000000e+00, float* %2
br label %18
8: ; preds = %1
%9 = load float, float* %3
%10 = fadd float %9, 6.000000e+01
%11 = fdiv float %10, 5.400000e+01
store float %11, float* %4
%12 = load float, float* %4
%13 = fpext float %12 to double
%14 = fcmp olt double %13, 1.000000e+00
br i1 %14, label %15, label %17
15: ; preds = %8
%16 = load float, float* %4
store float %16, float* %2
br label %18
17: ; preds = %8
store float 1.000000e+00, float* %2
br label %18
18: ; preds = %17, %15, %7
%19 = load float, float* %2
ret float %19
}

LLVM IR (-O2):
define float @meter_deflect_nordic(float %0) {
%2 = fcmp olt float %0, -6.000000e+01
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = fadd float %0, 6.000000e+01
%5 = fdiv float %4, 5.400000e+01
%6 = fcmp olt float %5, 1.000000e+00
%7 = select i1 %6, float %5, float 1.000000e+00
br label %8
8: ; preds = %1, %3
%9 = phi float [ %7, %3 ], [ 0.000000e+00, %1 ]
ret float %9
}
void sort(char **names, int total) {}


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

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

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

LLVM IR (-O2):
define void @sort(i8** nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ about();
int /*<<< orphan*/ printf(char *, char *);
void show_version(void) {
  about();
  printf("drop version %s\n", "0.2.4.0 \"Saint Paul the Hermit\"");
}


x86 assembly (clang, -O0):
<show_version>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <about@plt>
lea    0xece(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_version>:
push   %rax
xor    %eax,%eax
call   1040 <about@plt>
lea    0xed1(%rip),%rdi
lea    0xedb(%rip),%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"drop version %s\0A\00"
@.str.1 = [32 x i8] c"0.2.4.0 \22Saint Paul the Hermit\22\00"
define void @show_version() {
%1 = call i32 (...) @about()
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"drop version %s\0A\00"
@.str.1 = [32 x i8] c"0.2.4.0 \22Saint Paul the Hermit\22\00"
define void @show_version() {
%1 = tail call i32 (...) @about()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void glUniformBlockBinding(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glUniformBlockBinding() {
ret void
}
/* Variables and functions */
int round_nearest(double);
double incr_rnd(double d, double m) {
  int q;
  double y = 0;
  double z = 0;
  y = d / m;
  q = round_nearest(y);
  z = q * m;
  return z;
}


x86 assembly (clang, -O0):
<incr_rnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <round_nearest@plt>
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<incr_rnd>:
push   %rax
movsd  %xmm1,(%rsp)
divsd  %xmm1,%xmm0
call   1030 <round_nearest@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @incr_rnd(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fdiv double %8, %9
store double %10, double* %6
%11 = load double, double* %6
%12 = call i32 @round_nearest(double %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = sitofp i32 %13 to double
%15 = load double, double* %4
%16 = fmul double %14, %15
store double %16, double* %7
%17 = load double, double* %7
ret double %17
}

LLVM IR (-O2):
define double @incr_rnd(double %0, double %1) {
%3 = fdiv double %0, %1
%4 = tail call i32 @round_nearest(double %3)
%5 = sitofp i32 %4 to double
%6 = fmul double %5, %1
ret double %6
}
int main(void) {
  int i;
  i = 0;
  {
    {
      int i;
      i = 1;
    }
    int i;
    i = 2;
    {
      int i;
      i = 3;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int qualityPoints(int points) {
  if (points < 60) {
    return 0;
  } else if (points < 70) {
    return 1;
  } else if (points < 80) {
    return 2;
  } else if (points < 90) {
    return 3;
  } else if (points < 101) {
    return 4;
  }
}


x86 assembly (clang, -O0):
<qualityPoints>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x3c,-0x8(%rbp)
jge    111d <qualityPoints+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1189 <qualityPoints+0x89>
cmpl   $0x46,-0x8(%rbp)
jge    1133 <qualityPoints+0x33>
movl   $0x1,-0x4(%rbp)
jmp    1189 <qualityPoints+0x89>
cmpl   $0x50,-0x8(%rbp)
jge    1149 <qualityPoints+0x49>
movl   $0x2,-0x4(%rbp)
jmp    1189 <qualityPoints+0x89>
cmpl   $0x5a,-0x8(%rbp)
jge    115f <qualityPoints+0x5f>
movl   $0x3,-0x4(%rbp)
jmp    1189 <qualityPoints+0x89>
cmpl   $0x65,-0x8(%rbp)
jge    1175 <qualityPoints+0x75>
movl   $0x4,-0x4(%rbp)
jmp    1189 <qualityPoints+0x89>
jmp    117a <qualityPoints+0x7a>
jmp    117f <qualityPoints+0x7f>
jmp    1184 <qualityPoints+0x84>
jmp    1189 <qualityPoints+0x89>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qualityPoints>:
xor    %eax,%eax
cmp    $0x3c,%edi
jl     1126 <qualityPoints+0x26>
mov    $0x1,%eax
cmp    $0x46,%edi
jb     1126 <qualityPoints+0x26>
mov    $0x2,%eax
cmp    $0x50,%edi
jb     1126 <qualityPoints+0x26>
cmp    $0x5a,%edi
mov    $0x4,%eax
sbb    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @qualityPoints(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 60
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %27
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 70
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 1, i32* %2
br label %27
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 80
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 2, i32* %2
br label %27
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 90
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 3, i32* %2
br label %27
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp slt i32 %20, 101
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 4, i32* %2
br label %27
23: ; preds = %19
br label %24
24: ; preds = %23
br label %25
25: ; preds = %24
br label %26
26: ; preds = %25
br label %27
27: ; preds = %6, %10, %14, %18, %22, %26
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @qualityPoints(i32 %0) {
%2 = icmp slt i32 %0, 60
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 70
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 80
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 90
%9 = select i1 %8, i32 3, i32 4
br label %10
10: ; preds = %7, %5, %3, %1
%11 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 2, %5 ], [ %9, %7 ]
ret i32 %11
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ internal_fiat_p384_nonzero(uintptr_t);
void fiat_p384_nonzero(uint64_t *out1, const uint64_t arg1[6]) {
  *out1 = (uint64_t)internal_fiat_p384_nonzero((uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p384_nonzero>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <internal_fiat_p384_nonzero@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @fiat_p384_nonzero(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = ptrtoint i64* %5 to i64
%7 = call i64 @internal_fiat_p384_nonzero(i64 %6)
%8 = load i64*, i64** %3
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @fiat_p384_nonzero(i64* nocapture writeonly %0, i64* %1) {
%3 = ptrtoint i64* %1 to i64
%4 = tail call i64 @internal_fiat_p384_nonzero(i64 %3)
store i64 %4, i64* %0
ret void
}
/* Variables and functions */
int atoi(char *);
char *strstr(char *, char *);
int ph_parseCallProgressCid(char *data) {
  char *tag = strstr(data, "CID=");
  if (!tag)
    return 0;
  return atoi(tag + 4);
}


x86 assembly (clang, -O0):
<ph_parseCallProgressCid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <ph_parseCallProgressCid+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1167 <ph_parseCallProgressCid+0x47>
mov    -0x18(%rbp),%rdi
add    $0x4,%rdi
call   1030 <atoi@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ph_parseCallProgressCid>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <strstr@plt>
test   %rax,%rax
je     113f <ph_parseCallProgressCid+0x1f>
add    $0x4,%rax
mov    %rax,%rdi
pop    %rax
jmp    1030 <atoi@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"CID=\00"
define i32 @ph_parseCallProgressCid(i8* %0) {
%2 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 4
%6 = tail call i32 @atoi(i8* %5)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ eiki_strlen(char const *);
int /*<<< orphan*/ eiki_write(int /*<<< orphan*/, char const *,
                              int /*<<< orphan*/);
void eiki_print_s(const char *s) {
  eiki_write(STDERR_FILENO, s, eiki_strlen(s));
}


x86 assembly (clang, -O0):
<eiki_print_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <eiki_strlen@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
call   1040 <eiki_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eiki_print_s>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
call   1030 <eiki_strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <eiki_write@plt>

LLVM IR (-O0):
@STDERR_FILENO = global i32 0
define void @eiki_print_s(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @STDERR_FILENO
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @eiki_strlen(i8* %5)
%7 = call i32 @eiki_write(i32 %3, i8* %4, i32 %6)
ret void
}

LLVM IR (-O2):
@STDERR_FILENO = global i32 0
define void @eiki_print_s(i8* %0) {
%2 = load i32, i32* @STDERR_FILENO
%3 = tail call i32 @eiki_strlen(i8* %0)
%4 = tail call i32 @eiki_write(i32 %2, i8* %0, i32 %3)
ret void
}
int GLeapYear(int year) {
  int T = 0;
  if (year % 4 == 0)
    T = 1;
  if (year % 100 == 0) {
    T = 0;
    if (year % 400 == 0)
      T = 1;
  }
  return (T);
}


x86 assembly (clang, -O0):
<GLeapYear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1129 <GLeapYear+0x29>
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1164 <GLeapYear+0x64>
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115f <GLeapYear+0x5f>
movl   $0x1,-0x8(%rbp)
jmp    1164 <GLeapYear+0x64>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLeapYear>:
imul   $0xc28f5c29,%edi,%eax
add    $0x51eb850,%eax
ror    $0x2,%eax
cmp    $0x28f5c28,%eax
jbe    111a <GLeapYear+0x1a>
and    $0x3,%edi
jmp    1139 <GLeapYear+0x39>
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x27,%rax
add    %ecx,%eax
imul   $0x190,%eax,%eax
sub    %eax,%edi
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @GLeapYear(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = srem i32 %4, 4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %3
br label %8
8: ; preds = %7, %1
%9 = load i32, i32* %2
%10 = srem i32 %9, 100
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %8
store i32 0, i32* %3
%13 = load i32, i32* %2
%14 = srem i32 %13, 400
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %3
br label %17
17: ; preds = %16, %12
br label %18
18: ; preds = %17, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @GLeapYear(i32 %0) {
%2 = and i32 %0, 3
%3 = srem i32 %0, 100
%4 = icmp eq i32 %3, 0
%5 = srem i32 %0, 400
%6 = select i1 %4, i32 %5, i32 %2
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ standend();
int /*<<< orphan*/ standout();
int curs_hilite(int mode) {
  if (mode)
    standout();
  else
    standend();
}


x86 assembly (clang, -O0):
<curs_hilite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1141 <curs_hilite+0x21>
mov    $0x0,%al
call   1040 <standout@plt>
jmp    1148 <curs_hilite+0x28>
mov    $0x0,%al
call   1030 <standend@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curs_hilite>:
push   %rax
xor    %eax,%eax
test   %edi,%edi
je     112e <curs_hilite+0xe>
call   1040 <standout@plt>
pop    %rcx
ret
call   1030 <standend@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @curs_hilite(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @standout()
br label %7
5: ; preds = %1
%6 = tail call i32 (...) @standend()
br label %7
7: ; preds = %5, %3
ret i32 undef
}
wait_for_char() {}


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

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

LLVM IR (-O0):
define i32 @wait_for_char() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @wait_for_char() {
ret i32 undef
}
int do_929() { return 929; }


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

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

LLVM IR (-O0):
define i32 @do_929() {
ret i32 929
}

LLVM IR (-O2):
define i32 @do_929() {
ret i32 929
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ window;
};
struct TYPE_4__ {
  TYPE_1__ xany;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xany_window(void *_p) {
  return (unsigned long)((XEvent *)_p)->xany.window;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xany_window>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xany_window(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xany_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int algebra1(int x) {
  int result;
  result = 3 * x + 6 * x * x;
  return result;
}


x86 assembly (clang, -O0):
<algebra1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x3,-0x4(%rbp),%eax
imul   $0x6,-0x4(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<algebra1>:
lea    (%rdi,%rdi,2),%eax
add    %eax,%eax
add    $0x3,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @algebra1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 3, %4
%6 = load i32, i32* %2
%7 = mul nsw i32 6, %6
%8 = load i32, i32* %2
%9 = mul nsw i32 %7, %8
%10 = add nsw i32 %5, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @algebra1(i32 %0) {
%2 = mul nsw i32 %0, 6
%3 = add i32 %2, 3
%4 = mul i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void butler(void) { printf("You rang, sir?\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"You rang, sir?\0A\00"
define void @butler() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"You rang, sir?\00"
define void @butler() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned int TimerHalGetTimerBaseAddress(unsigned int timer) {
  switch (timer) {
  case 0:
    return (0x44E05000);
  case 1:
    return (0x44E31000);
  case 2:
    return (0x48040000);
  case 3:
    return (0x48042000);
  case 4:
    return (0x48044000);
  case 5:
    return (0x48046000);
  case 6:
    return (0x48048000);
  case 7:
    return (0x4804A000);
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<TimerHalGetTimerBaseAddress>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x7,%rax
ja     118c <TimerHalGetTimerBaseAddress+0x8c>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x44e05000,-0x4(%rbp)
jmp    1193 <TimerHalGetTimerBaseAddress+0x93>
movl   $0x44e31000,-0x4(%rbp)
jmp    1193 <TimerHalGetTimerBaseAddress+0x93>
movl   $0x48040000,-0x4(%rbp)
jmp    1193 <TimerHalGetTimerBaseAddress+0x93>
movl   $0x48042000,-0x4(%rbp)
jmp    1193 <TimerHalGetTimerBaseAddress+0x93>
movl   $0x48044000,-0x4(%rbp)
jmp    1193 <TimerHalGetTimerBaseAddress+0x93>
movl   $0x48046000,-0x4(%rbp)
jmp    1193 <TimerHalGetTimerBaseAddress+0x93>
movl   $0x48048000,-0x4(%rbp)
jmp    1193 <TimerHalGetTimerBaseAddress+0x93>
movl   $0x4804a000,-0x4(%rbp)
jmp    1193 <TimerHalGetTimerBaseAddress+0x93>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerHalGetTimerBaseAddress>:
xor    %eax,%eax
cmp    $0x7,%edi
ja     1114 <TimerHalGetTimerBaseAddress+0x14>
movslq %edi,%rax
lea    0xeef(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @TimerHalGetTimerBaseAddress(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
i32 7, label %12
]
5: ; preds = %1
store i32 1155551232, i32* %2
br label %14
6: ; preds = %1
store i32 1155731456, i32* %2
br label %14
7: ; preds = %1
store i32 1208221696, i32* %2
br label %14
8: ; preds = %1
store i32 1208229888, i32* %2
br label %14
9: ; preds = %1
store i32 1208238080, i32* %2
br label %14
10: ; preds = %1
store i32 1208246272, i32* %2
br label %14
11: ; preds = %1
store i32 1208254464, i32* %2
br label %14
12: ; preds = %1
store i32 1208262656, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %11, %10, %9, %8, %7, %6, %5
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@switch.table.TimerHalGetTimerBaseAddress = [8 x i32] [i32 1155551232, i32 1155731456, i32 1208221696, i32 1208229888, i32 1208238080, i32 1208246272, i32 1208254464, i32 1208262656]
define i32 @TimerHalGetTimerBaseAddress(i32 %0) {
%2 = icmp ult i32 %0, 8
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [8 x i32], [8 x i32]* @switch.table.TimerHalGetTimerBaseAddress, i64 0, i64 %4
%6 = load i32, i32* %5
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
int analog(int);
int detect_side(int sensor) {
  int result = -1;
  if (analog(sensor) > 75) {
    result = 1;
  } else {
    result = 0;
  }
  return result;
}


x86 assembly (clang, -O0):
<detect_side>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <analog@plt>
cmp    $0x4b,%eax
jle    113f <detect_side+0x2f>
movl   $0x1,-0x8(%rbp)
jmp    1146 <detect_side+0x36>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<detect_side>:
push   %rax
call   1030 <analog@plt>
xor    %ecx,%ecx
cmp    $0x4c,%eax
setge  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @detect_side(i32 %0) {
%2 = tail call i32 @analog(i32 %0)
%3 = icmp sgt i32 %2, 75
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  printf("argc : %d, argv : %s\n", argc, argv[0]);
  printf("hi!!!\n");
  printf("by!!!\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %edi,%eax
mov    (%rsi),%rdx
lea    0xed3(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"argc : %d, argv : %s\0A\00"
@str = [6 x i8] c"hi!!!\00"
@str.3 = [6 x i8] c"by!!!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}
void pci_msi_init_pci_dev(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_msi_init_pci_dev(%struct.pci_dev* nocapture %0) {
ret void
}
void bus_fault_exception(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @bus_fault_exception() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int sys_bind(struct tcb *);
int sys_connect(struct tcb *tcp) { return sys_bind(tcp); }


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

x86 assembly (clang, -O2):
<sys_connect>:
jmp    1030 <sys_bind@plt>

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

LLVM IR (-O2):
%struct.tcb = type { i32 }
define i32 @sys_connect(%struct.tcb* %0) {
%2 = tail call i32 @sys_bind(%struct.tcb* %0)
ret i32 %2
}
double log10(double x) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(x);
  return 0;
}


x86 assembly (clang, -O0):
<log10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.log10 = [6 x i8] c"log10\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @log10(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.log10, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%7 = load double, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.log10 = [6 x i8] c"log10\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @log10(double %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.log10, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret double 0.000000e+00
}
int val_or_m1(const int *val) {
  if (!val)
    return -1;
  return *val;
}


x86 assembly (clang, -O0):
<val_or_m1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <val_or_m1+0x1f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1128 <val_or_m1+0x28>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<val_or_m1>:
test   %rdi,%rdi
je     1108 <val_or_m1+0x8>
mov    (%rdi),%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @val_or_m1(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* %0
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ -1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fnoret();
int call_fnoret(void) { fnoret(); }


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

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

LLVM IR (-O0):
define i32 @call_fnoret() {
%1 = alloca i32
%2 = call i32 (...) @fnoret()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @call_fnoret() {
%1 = tail call i32 (...) @fnoret()
ret i32 undef
}
void mat2_adjoint(float *dst) {
  float a0 = dst[0];
  dst[0] = dst[3];
  dst[1] = -dst[1];
  dst[2] = -dst[2];
  dst[3] = a0;
}


x86 assembly (clang, -O0):
<mat2_adjoint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat2_adjoint>:
movss  (%rdi),%xmm0
movss  0xc(%rdi),%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rdi),%xmm1
movaps 0xee7(%rip),%xmm2
xorps  %xmm2,%xmm1
movss  %xmm1,0x4(%rdi)
movss  0x8(%rdi),%xmm1
xorps  %xmm2,%xmm1
movss  %xmm1,0x8(%rdi)
movss  %xmm0,0xc(%rdi)
ret

LLVM IR (-O0):
define void @mat2_adjoint(float* %0) {
%2 = alloca float*
%3 = alloca float
store float* %0, float** %2
%4 = load float*, float** %2
%5 = getelementptr inbounds float, float* %4, i64 0
%6 = load float, float* %5
store float %6, float* %3
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 3
%9 = load float, float* %8
%10 = load float*, float** %2
%11 = getelementptr inbounds float, float* %10, i64 0
store float %9, float* %11
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fneg float %14
%16 = load float*, float** %2
%17 = getelementptr inbounds float, float* %16, i64 1
store float %15, float* %17
%18 = load float*, float** %2
%19 = getelementptr inbounds float, float* %18, i64 2
%20 = load float, float* %19
%21 = fneg float %20
%22 = load float*, float** %2
%23 = getelementptr inbounds float, float* %22, i64 2
store float %21, float* %23
%24 = load float, float* %3
%25 = load float*, float** %2
%26 = getelementptr inbounds float, float* %25, i64 3
store float %24, float* %26
ret void
}

LLVM IR (-O2):
define void @mat2_adjoint(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 3
%4 = load float, float* %3
store float %4, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = fneg float %6
store float %7, float* %5
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = fneg float %9
store float %10, float* %8
store float %2, float* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ decode(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ ret_key(int);
int scanf(char *, int *);
int main() {
  int x, pass;
  pass = scanf("%i", &x);
  while (pass == 1) {
    decode(ret_key(x));
    pass = scanf("%i", &x);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1193 <main+0x53>
mov    -0x8(%rbp),%edi
call   1030 <ret_key@plt>
mov    %eax,%edi
call   1050 <decode@plt>
lea    0xe7e(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    %eax,-0xc(%rbp)
jmp    1162 <main+0x22>
lea    0xe69(%rip),%rdi
call   1040 <printf@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
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
cmp    $0x1,%eax
jne    1190 <main+0x50>
lea    0xe9f(%rip),%r14
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    0x4(%rsp),%edi
call   1040 <ret_key@plt>
mov    %eax,%edi
call   1050 <decode@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
cmp    $0x1,%eax
je     1170 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 %4, i32* %3
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i32, i32* %2
%10 = call i32 @ret_key(i32 %9)
%11 = call i32 @decode(i32 %10)
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 %12, i32* %3
br label %5
13: ; preds = %5
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = load i32, i32* %1
%7 = call i32 @ret_key(i32 %6)
%8 = call i32 @decode(i32 %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = icmp eq i32 %9, 1
br i1 %10, label %5, label %11
11: ; preds = %5, %0
%12 = call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sendreg(int, char *, int);
void initrunla() {
  sendreg(18, "1", 1);
  sendreg(8, "1,1,1", 3);
  sendreg(17, "1", 1);
}


x86 assembly (clang, -O0):
<initrunla>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12,%edi
lea    0xee4(%rip),%rsi
mov    $0x1,%edx
call   1030 <sendreg@plt>
mov    $0x8,%edi
lea    0xeca(%rip),%rsi
mov    $0x3,%edx
call   1030 <sendreg@plt>
mov    $0x11,%edi
lea    0xeb8(%rip),%rsi
mov    $0x1,%edx
call   1030 <sendreg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initrunla>:
push   %rbx
lea    0xeec(%rip),%rbx
mov    $0x12,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <sendreg@plt>
lea    0xecf(%rip),%rsi
mov    $0x8,%edi
mov    $0x3,%edx
call   1030 <sendreg@plt>
mov    $0x11,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
pop    %rbx
jmp    1030 <sendreg@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [6 x i8] c"1,1,1\00"
define void @initrunla() {
%1 = call i32 @sendreg(i32 18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = call i32 @sendreg(i32 8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 3)
%3 = call i32 @sendreg(i32 17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
@.str.1 = [6 x i8] c"1,1,1\00"
define void @initrunla() {
%1 = tail call i32 @sendreg(i32 18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @sendreg(i32 8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 3)
%3 = tail call i32 @sendreg(i32 17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
const char *zlibVersion() { return "1.2.5.1"; }


x86 assembly (clang, -O0):
<zlibVersion>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zlibVersion>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"1.2.5.1\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"1.2.5.1\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
int cmd_set_env(char *arg_list[], int n) {
  sw_printf("\nstart run %s...\n\n\r", __func__);
  return 0;
}


x86 assembly (clang, -O0):
<cmd_set_env>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0x0,%al
call   1030 <sw_printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"\0Astart run %s...\0A\0A\0D\00"
@__func__.cmd_set_env = [12 x i8] c"cmd_set_env\00"
define i32 @cmd_set_env(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @sw_printf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.cmd_set_env, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0Astart run %s...\0A\0A\0D\00"
@__func__.cmd_set_env = [12 x i8] c"cmd_set_env\00"
define i32 @cmd_set_env(i8** nocapture readnone %0, i32 %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @sw_printf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.cmd_set_env, i64 0, i64 0))
ret i32 0
}