xunge/DecIR huggingface dataset:
int MIN_VAL(int X, int Y) { return ((X) < (Y)) ? (X) : (Y); }


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

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

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

LLVM IR (-O2):
define i32 @MIN_VAL(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int frontValue(int Q[], int *front, int *rear) {
  if (*front != -1)
    return Q[*front];
  else
    return -9999999;
}


x86 assembly (clang, -O0):
<frontValue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmpl   $0xffffffff,(%rax)
je     1133 <frontValue+0x33>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
jmp    113a <frontValue+0x3a>
movl   $0xff676981,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<frontValue>:
movslq (%rsi),%rax
cmp    $0xffffffffffffffff,%rax
je     110d <frontValue+0xd>
mov    (%rdi,%rax,4),%eax
ret
mov    $0xff676981,%eax
ret

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

LLVM IR (-O2):
define i32 @frontValue(i32* nocapture %0, i32* nocapture %1, i32* nocapture readnone %2) {
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, -1
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %3, %6
%11 = phi i32 [ %9, %6 ], [ -9999999, %3 ]
ret i32 %11
}
void inclass_unit2inclass_element() {}


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

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

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

LLVM IR (-O2):
define void @inclass_unit2inclass_element() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
unsigned int __VERIFIER_nondet_uint();
int main(void) {
  unsigned int a = __VERIFIER_nondet_uint();
  __VERIFIER_assert(a > 0);
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,%ebx
xor    %edi,%edi
test   %eax,%eax
setne  %dil
call   1030 <__VERIFIER_assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_uint()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ugt i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @__VERIFIER_assert(i32 %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_uint()
%2 = icmp ne i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @__VERIFIER_assert(i32 %3)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ oom();
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *d = strdup(s);
  if (!d)
    oom();
  return d;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <xstrdup+0x2b>
mov    $0x0,%al
call   1030 <oom@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <xstrdup+0x15>
xor    %eax,%eax
call   1030 <oom@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @oom()
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
double fabs(double);
double pow(double, double);
double inverse_nonlinear_adaptation(double c, double fl) {
  return (100.0 / fl) *
         pow((27.13 * fabs(c - 0.1)) / (400.0 - fabs(c - 0.1)), 1.0 / 0.42);
}


x86 assembly (clang, -O0):
<inverse_nonlinear_adaptation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xef6(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xecf(%rip),%xmm0
subsd  %xmm0,%xmm1
movaps 0xee4(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xec0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xea7(%rip),%xmm1
subsd  %xmm1,%xmm2
movaps 0xebc(%rip),%xmm1
pand   %xmm1,%xmm2
movsd  0xe88(%rip),%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  0xe70(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverse_nonlinear_adaptation>:
push   %rax
movsd  0xee7(%rip),%xmm2
addsd  0xee7(%rip),%xmm0
divsd  %xmm1,%xmm2
movsd  %xmm2,(%rsp)
andpd  0xefe(%rip),%xmm0
movsd  0xed6(%rip),%xmm2
mulsd  %xmm0,%xmm2
movsd  0xed2(%rip),%xmm1
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm2
movsd  0xeca(%rip),%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @inverse_nonlinear_adaptation(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fdiv double 1.000000e+02, %5
%7 = load double, double* %3
%8 = fsub double %7, 1.000000e-01
%9 = call double @llvm.fabs.f64(double %8)
%10 = fmul double 2.713000e+01, %9
%11 = load double, double* %3
%12 = fsub double %11, 1.000000e-01
%13 = call double @llvm.fabs.f64(double %12)
%14 = fsub double 4.000000e+02, %13
%15 = fdiv double %10, %14
%16 = call double @pow(double %15, double 0x40030C30C30C30C3)
%17 = fmul double %6, %16
ret double %17
}

LLVM IR (-O2):
define double @inverse_nonlinear_adaptation(double %0, double %1) {
%3 = fdiv double 1.000000e+02, %1
%4 = fadd double %0, -1.000000e-01
%5 = tail call double @llvm.fabs.f64(double %4)
%6 = fmul double %5, 2.713000e+01
%7 = fsub double 4.000000e+02, %5
%8 = fdiv double %6, %7
%9 = tail call double @pow(double %8, double 0x40030C30C30C30C3)
%10 = fmul double %3, %9
ret double %10
}
int ld_ge_rc2(long double a1) { return !(((a1) >= (100))); }


x86 assembly (clang, -O0):
<ld_ge_rc2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_ge_rc2>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setb   %al
ret

LLVM IR (-O0):
define i32 @ld_ge_rc2(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp oge x86_fp80 %3, 0xK4005C800000000000000
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ld_ge_rc2(x86_fp80 %0) {
%2 = fcmp ult x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ isalnum(char);
int iswordpart(char c) { return isalnum(c) || c == '_' || c == '$'; }


x86 assembly (clang, -O0):
<iswordpart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1158 <iswordpart+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     1158 <iswordpart+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x24,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswordpart>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
cmp    $0x24,%bl
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @iswordpart(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalnum(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 36
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @iswordpart(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = icmp eq i8 %0, 36
%7 = or i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
int _lshashtable_is_expired_noop(void *rec __attribute__((unused))) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @_lshashtable_is_expired_noop(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
void x12_pthread_exit(void *_retval) { pthread_exit(_retval); }


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

x86 assembly (clang, -O2):
<x12_pthread_exit>:
jmp    1030 <pthread_exit@plt>

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

LLVM IR (-O2):
define void @x12_pthread_exit(i8* %0) {
%2 = tail call i32 @pthread_exit(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test1(int, char **);
int /*<<< orphan*/ test2(int, char **);
int /*<<< orphan*/ test3(int, char **);
int /*<<< orphan*/ test4(int, char **);
int /*<<< orphan*/ test5(int, char **);
int /*<<< orphan*/ test6(int, char **);
int main(int argc, char **argv) {
  ;
  test1(argc, argv);
  test2(argc, argv);
  test3(argc, argv);
  test4(argc, argv);
  test5(argc, argv);
  test6(argc, argv);
  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),%edi
mov    -0x10(%rbp),%rsi
call   1050 <test1@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1080 <test2@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <test3@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1070 <test4@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <test5@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <test6@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1050 <test1@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1080 <test2@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <test3@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1070 <test4@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <test5@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1060 <test6@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @test1(i32 %6, i8** %7)
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @test2(i32 %9, i8** %10)
%12 = load i32, i32* %4
%13 = load i8**, i8*** %5
%14 = call i32 @test3(i32 %12, i8** %13)
%15 = load i32, i32* %4
%16 = load i8**, i8*** %5
%17 = call i32 @test4(i32 %15, i8** %16)
%18 = load i32, i32* %4
%19 = load i8**, i8*** %5
%20 = call i32 @test5(i32 %18, i8** %19)
%21 = load i32, i32* %4
%22 = load i8**, i8*** %5
%23 = call i32 @test6(i32 %21, i8** %22)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @test1(i32 %0, i8** %1)
%4 = tail call i32 @test2(i32 %0, i8** %1)
%5 = tail call i32 @test3(i32 %0, i8** %1)
%6 = tail call i32 @test4(i32 %0, i8** %1)
%7 = tail call i32 @test5(i32 %0, i8** %1)
%8 = tail call i32 @test6(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ vp8_variance(unsigned char const *, int,
                                unsigned char const *, int, int, int,
                                unsigned int *, int *);
unsigned int vp8_get8x8var_c(const unsigned char *src_ptr, int source_stride,
                             const unsigned char *ref_ptr, int recon_stride,
                             unsigned int *SSE, int *Sum) {
  vp8_variance(src_ptr, source_stride, ref_ptr, recon_stride, 8, 8, SSE, Sum);
  return (*SSE - (((*Sum) * (*Sum)) >> 6));
}


x86 assembly (clang, -O0):
<vp8_get8x8var_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r10
mov    -0x30(%rbp),%rax
mov    $0x8,%r9d
mov    %r9d,%r8d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <vp8_variance@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%ecx
mov    -0x30(%rbp),%rdx
imul   (%rdx),%ecx
sar    $0x6,%ecx
sub    %ecx,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vp8_get8x8var_c>:
push   %r14
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%rbx
mov    $0x8,%r8d
mov    $0x8,%r9d
push   %r14
push   %rbx
call   1030 <vp8_variance@plt>
add    $0x10,%rsp
mov    (%rbx),%eax
mov    (%r14),%ecx
imul   %ecx,%ecx
shr    $0x6,%ecx
sub    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @vp8_get8x8var_c(i8* %0, i32 %1, i8* %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = load i8*, i8** %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32*, i32** %12
%19 = call i32 @vp8_variance(i8* %13, i32 %14, i8* %15, i32 %16, i32 8, i32 8, i32* %17, i32* %18)
%20 = load i32*, i32** %11
%21 = load i32, i32* %20
%22 = load i32*, i32** %12
%23 = load i32, i32* %22
%24 = load i32*, i32** %12
%25 = load i32, i32* %24
%26 = mul nsw i32 %23, %25
%27 = ashr i32 %26, 6
%28 = sub i32 %21, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @vp8_get8x8var_c(i8* %0, i32 %1, i8* %2, i32 %3, i32* %4, i32* %5) {
%7 = tail call i32 @vp8_variance(i8* %0, i32 %1, i8* %2, i32 %3, i32 8, i32 8, i32* %4, i32* %5)
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = mul nsw i32 %9, %9
%11 = lshr i32 %10, 6
%12 = sub i32 %8, %11
ret i32 %12
}
char *langDbgDevKorean80() { return "Korean 80"; }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"Korean 80\00"
define i8* @langDbgDevKorean80() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
void ff_hevc_put_hevc_bi_w_qpel_h16_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_h16_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lookNarray(char *, unsigned int);
void lookcomplex8array(char *x, int n) {
  lookNarray((char *)x, (unsigned int)(n * 8));
}


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

x86 assembly (clang, -O2):
<lookcomplex8array>:
shl    $0x3,%esi
jmp    1030 <lookNarray@plt>

LLVM IR (-O0):
define void @lookcomplex8array(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 8
%8 = call i32 @lookNarray(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @lookcomplex8array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 3
%4 = tail call i32 @lookNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void g_error(char *message) { printf("%s: %s\n", "sleep", message); }


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

x86 assembly (clang, -O2):
<g_error>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee7(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [6 x i8] c"sleep\00"
define void @g_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [6 x i8] c"sleep\00"
define void @g_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int num = 0;
  printf("enter a two-digit number: ");
  scanf("%d", &num);
  printf("the reversal is: %d%d\n", num % 10, num / 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0xea9(%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
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x66666667,%rsi,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x22,%rdx
add    %eax,%edx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"enter a two-digit number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"the reversal is: %d%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = srem i32 %5, 10
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 10
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"enter a two-digit number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"the reversal is: %d%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = srem i32 %5, 10
%7 = sdiv i32 %5, 10
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
int bic(int x, int m) {
  int mask = ~m;
  return x & mask;
}


x86 assembly (clang, -O0):
<bic>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bic>:
mov    %esi,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @bic(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = xor i32 %6, -1
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i32, i32* %5
%10 = and i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @bic(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = and i32 %3, %0
ret i32 %4
}
char *get_idstring(void) {
  return "dSFMT-19937:36-29-1-7-16:57fbfffdffff575f-ffff6febffffffee";
}


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

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

LLVM IR (-O0):
@.str = [59 x i8] c"dSFMT-19937:36-29-1-7-16:57fbfffdffff575f-ffff6febffffffee\00"
define i8* @get_idstring() {
ret i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [59 x i8] c"dSFMT-19937:36-29-1-7-16:57fbfffdffff575f-ffff6febffffffee\00"
define i8* @get_idstring() {
ret i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0)
}
int parse_uint16(const unsigned char *bytes) {
  return bytes[0] + 256 * bytes[1];
}


x86 assembly (clang, -O0):
<parse_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_uint16>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @parse_uint16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = mul nsw i32 256, %10
%12 = add nsw i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @parse_uint16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
char *left_justify_string(char *string) {
  int p = 0;
  while (*(string + p) == ' ' || *(string + p) == '\n' || *(string + p) == '\r')
    p++;
  return string + p;
}


x86 assembly (clang, -O0):
<left_justify_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0xd(%rbp)
je     1158 <left_justify_string+0x58>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0xd(%rbp)
je     1158 <left_justify_string+0x58>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1168 <left_justify_string+0x68>
jmp    1176 <left_justify_string+0x76>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <left_justify_string+0xf>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<left_justify_string>:
mov    %rdi,%rax
xor    %ecx,%ecx
movabs $0x100002400,%rdx
nop
movzbl (%rax,%rcx,1),%esi
cmp    $0x20,%rsi
ja     1126 <left_justify_string+0x26>
bt     %rsi,%rdx
jae    1126 <left_justify_string+0x26>
add    $0x1,%rcx
jmp    1110 <left_justify_string+0x10>
mov    %ecx,%ecx
add    %rcx,%rax
ret

LLVM IR (-O0):
define i8* @left_justify_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %30, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 32
br i1 %11, label %28, label %12
12: ; preds = %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 10
br i1 %19, label %28, label %20
20: ; preds = %12
%21 = load i8*, i8** %2
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 13
br label %28
28: ; preds = %20, %12, %4
%29 = phi i1 [ true, %12 ], [ true, %4 ], [ %27, %20 ]
br i1 %29, label %30, label %33
30: ; preds = %28
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
br label %4
33: ; preds = %28
%34 = load i8*, i8** %2
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8, i8* %34, i64 %36
ret i8* %37
}

LLVM IR (-O2):
define i8* @left_justify_string(i8* %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 32, label %6
i8 10, label %6
i8 13, label %6
]
6: ; preds = %2, %2, %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
%9 = and i64 %3, 4294967295
%10 = getelementptr inbounds i8, i8* %0, i64 %9
ret i8* %10
}
/* Variables and functions */
bool isseperator(unsigned char i) {
  if ((i == ':') || (i == '-')) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<isseperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x3a,%eax
je     1124 <isseperator+0x24>
movzbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
jne    1130 <isseperator+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <isseperator+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isseperator>:
cmp    $0x3a,%dil
sete   %al
cmp    $0x2d,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isseperator(i8 zeroext %0) {
%2 = icmp eq i8 %0, 58
%3 = icmp eq i8 %0, 45
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int test_return_f();
void test_return() { assert(test_return_f() == 1); }


x86 assembly (clang, -O0):
<test_return>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_return_f@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_return>:
push   %rax
xor    %eax,%eax
call   1030 <test_return_f@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @test_return() {
%1 = call i32 (...) @test_return_f()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
ret void
}

LLVM IR (-O2):
define void @test_return() {
%1 = tail call i32 (...) @test_return_f()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
void PWMSyncUpdate(unsigned long ulBase, unsigned long ulGenBits) {
  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x00000000))) = ulGenBits;
}


x86 assembly (clang, -O0):
<PWMSyncUpdate>:
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):
<PWMSyncUpdate>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @PWMSyncUpdate(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 = load i64, i64* %3
%7 = add i64 %6, 0
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @PWMSyncUpdate(i64 %0, i64 %1) {
%3 = inttoptr i64 %0 to i64*
store volatile i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void help() { printf("Usage: %s [-V|start|stop|reload|status]\n", "gladd"); }


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

x86 assembly (clang, -O2):
<help>:
lea    0xee9(%rip),%rdi
lea    0xf0b(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Usage: %s [-V|start|stop|reload|status]\0A\00"
@.str.1 = [6 x i8] c"gladd\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"Usage: %s [-V|start|stop|reload|status]\0A\00"
@.str.1 = [6 x i8] c"gladd\00"
define void @help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void g_strjoin() {}


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

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

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

LLVM IR (-O2):
define void @g_strjoin() {
ret void
}
int natural_generator() {
  int a = 1;
  static int b = -1;
  b += 1;
  return a + b;
}


x86 assembly (clang, -O0):
<natural_generator>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
mov    0x2f0f(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f06(%rip)
mov    -0x4(%rbp),%eax
add    0x2efd(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<natural_generator>:
mov    0x2f1a(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f11(%rip)
add    $0x2,%eax
ret

LLVM IR (-O0):
@natural_generator.b = internal global i32 -1
define i32 @natural_generator() {
%1 = alloca i32
store i32 1, i32* %1
%2 = load i32, i32* @natural_generator.b
%3 = add nsw i32 %2, 1
store i32 %3, i32* @natural_generator.b
%4 = load i32, i32* %1
%5 = load i32, i32* @natural_generator.b
%6 = add nsw i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
@natural_generator.b = internal unnamed_addr global i32 -1
define i32 @natural_generator() {
%1 = load i32, i32* @natural_generator.b
%2 = add nsw i32 %1, 1
store i32 %2, i32* @natural_generator.b
%3 = add nsw i32 %1, 2
ret i32 %3
}
int is_consonant(unsigned int i) {
  return (i >= 0x915 && i <= 0x939) || (i >= 0x958 && i <= 0x95f);
}


x86 assembly (clang, -O0):
<is_consonant>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x915,-0x4(%rbp)
jb     1126 <is_consonant+0x26>
mov    $0x1,%al
cmpl   $0x939,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jbe    114b <is_consonant+0x4b>
xor    %eax,%eax
cmpl   $0x958,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jb     1145 <is_consonant+0x45>
cmpl   $0x95f,-0x4(%rbp)
setbe  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_consonant>:
lea    -0x915(%rdi),%eax
cmp    $0x25,%eax
setb   %al
and    $0xfffffff8,%edi
cmp    $0x958,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_consonant(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp uge i32 %3, 2325
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ule i32 %6, 2361
br i1 %7, label %16, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp uge i32 %9, 2392
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp ule i32 %12, 2399
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %5
%17 = phi i1 [ true, %5 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_consonant(i32 %0) {
%2 = add i32 %0, -2325
%3 = icmp ult i32 %2, 37
%4 = and i32 %0, -8
%5 = icmp eq i32 %4, 2392
%6 = or i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int arc, char *argv[]) {
  puts("Hello world.");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int factorial(int n, int res) {
  if (n == 0)
    return res;
  factorial(--n, n * res);
}


x86 assembly (clang, -O0):
<factorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1133 <factorial+0x23>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <factorial+0x38>
mov    -0x8(%rbp),%edi
add    $0xffffffff,%edi
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
call   1030 <factorial@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<factorial>:
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @factorial(i32 %0, i32 returned %1) {
ret i32 %1
}
int addDigits(int num) {
  if (num == 0)
    return 0;
  int x = num % 9;
  return x == 0 ? 9 : x;
}


x86 assembly (clang, -O0):
<addDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <addDigits+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    114e <addDigits+0x4e>
mov    -0x8(%rbp),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1142 <addDigits+0x42>
mov    $0x9,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <addDigits+0x48>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addDigits>:
test   %edi,%edi
je     1129 <addDigits+0x29>
movslq %edi,%rax
imul   $0x38e38e39,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,8),%eax
sub    %eax,%edi
mov    $0x9,%eax
cmovne %edi,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @addDigits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = srem i32 %0, 9
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 9, i32 %4
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void __attribute__((noreturn)) pr_nomem(const char *msg) {
  (void)fprintf(stderr, "Fatal error: out of memory: %s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<pr_nomem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<pr_nomem>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Fatal error: out of memory: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @pr_nomem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Fatal error: out of memory: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @pr_nomem(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
int ether_hostton(const char *hostname, struct ether_addr *e) { return -1; }


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

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

LLVM IR (-O0):
%struct.ether_addr = type opaque
define i32 @ether_hostton(i8* %0, %struct.ether_addr* %1) {
%3 = alloca i8*
%4 = alloca %struct.ether_addr*
store i8* %0, i8** %3
store %struct.ether_addr* %1, %struct.ether_addr** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.ether_addr = type opaque
define i32 @ether_hostton(i8* nocapture readnone %0, %struct.ether_addr* nocapture readnone %1) {
ret i32 -1
}
void X509_REQ_delete_attr(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_REQ_delete_attr() {
ret void
}
int fun847() { return 847; }


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

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

LLVM IR (-O0):
define i32 @fun847() {
ret i32 847
}

LLVM IR (-O2):
define i32 @fun847() {
ret i32 847
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void end_asig_section() { write("json-task.json", "]\n", NULL); }


x86 assembly (clang, -O0):
<end_asig_section>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_asig_section>:
lea    0xee9(%rip),%rdi
lea    0xef1(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"json-task.json\00"
@.str.1 = [3 x i8] c"]\0A\00"
define void @end_asig_section() {
%1 = call i32 @write(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"json-task.json\00"
@.str.1 = [3 x i8] c"]\0A\00"
define void @end_asig_section() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
unsigned short int f6(unsigned short int x, unsigned long int y) {
  return (x << y) | (x >> ((-y) & (8 * 2 - 1)));
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0xf,%rcx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
and    $0xf,%cl
shr    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f6(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = shl i32 %6, %8
%10 = load i16, i16* %3
%11 = zext i16 %10 to i32
%12 = load i64, i64* %4
%13 = sub i64 0, %12
%14 = and i64 %13, 15
%15 = trunc i64 %14 to i32
%16 = ashr i32 %11, %15
%17 = or i32 %9, %16
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @f6(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = shl i32 %3, %4
%6 = sub i32 0, %4
%7 = and i32 %6, 15
%8 = lshr i32 %3, %7
%9 = or i32 %8, %5
%10 = trunc i32 %9 to i16
ret i16 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *android_alloc(size_t size) {
  void *block;
  if (size == 0)
    return NULL;
  block = malloc(size);
  if (block != NULL)
    return block;
  fprintf(stderr, "PANIC: not enough memory\n");
  exit(1);
  return NULL;
}


x86 assembly (clang, -O0):
<android_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <android_alloc+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1198 <android_alloc+0x68>
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1179 <android_alloc+0x49>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1198 <android_alloc+0x68>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
lea    0xe77(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<android_alloc>:
push   %rax
test   %rdi,%rdi
je     1142 <android_alloc+0x12>
call   1040 <malloc@plt>
test   %rax,%rax
je     1146 <android_alloc+0x16>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"PANIC: not enough memory\0A\00"
define i8* @android_alloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %19
8: ; preds = %1
%9 = load i64, i64* %3
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i8*, i8** %4
store i8* %14, i8** %2
br label %19
15: ; preds = %8
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %13, %7
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"PANIC: not enough memory\0A\00"
define noalias i8* @android_alloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %3, %1
%11 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %11
}
/* Variables and functions */
double atan2(double, double);
double libm_atan2(double x, double y) { return atan2(x, y); }


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

x86 assembly (clang, -O2):
<libm_atan2>:
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define double @libm_atan2(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* %4
%7 = call double @atan2(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @libm_atan2(double %0, double %1) {
%3 = tail call double @atan2(double %0, double %1)
ret double %3
}