xunge/DecIR huggingface dataset:
int tamMB(unsigned int nblocs) {
  int tam_mb;
  int modul = nblocs % (1024 * 8);
  if (modul == 0) {
    tam_mb = nblocs / (1024 * 8);
  } else {
    tam_mb = (nblocs / (1024 * 8)) + 1;
  }
  return tam_mb;
}


x86 assembly (clang, -O0):
<tamMB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1fff,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    112a <tamMB+0x2a>
mov    -0x4(%rbp),%eax
shr    $0xd,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <tamMB+0x36>
mov    -0x4(%rbp),%eax
shr    $0xd,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tamMB>:
mov    %edi,%eax
mov    %edi,%ecx
and    $0x1fff,%ecx
shr    $0xd,%eax
cmp    $0x1,%ecx
sbb    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @tamMB(i32 %0) {
%2 = and i32 %0, 8191
%3 = icmp ne i32 %2, 0
%4 = lshr i32 %0, 13
%5 = zext i1 %3 to i32
%6 = add nuw nsw i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Say(char *, int);
void hit(void) { Say("Yum, water!", 1); }


x86 assembly (clang, -O0):
<hit>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <Say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hit>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <Say@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Yum, water!\00"
define void @hit() {
%1 = call i32 @Say(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Yum, water!\00"
define void @hit() {
%1 = tail call i32 @Say(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
int superficie(int r) {
  int sup;
  sup = 3.141592654 * (r * r);
  return sup;
}


x86 assembly (clang, -O0):
<superficie>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xee6(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<superficie>:
imul   %edi,%edi
cvtsi2sd %edi,%xmm0
mulsd  0xef1(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @superficie(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
%7 = sitofp i32 %6 to double
%8 = fmul double 0x400921FB54524550, %7
%9 = fptosi double %8 to i32
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @superficie(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x400921FB54524550
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int *, int);
void copy1(int *x, int *y) { memcpy(x, y, 1); }


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

x86 assembly (clang, -O2):
<copy1>:
mov    $0x1,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @copy1(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 = call i32 @memcpy(i32* %5, i32* %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @copy1(i32* %0, i32* %1) {
%3 = tail call i32 @memcpy(i32* %0, i32* %1, i32 1)
ret void
}
/* Variables and functions */
int LireParametre(char *, char *, char *);
int /*<<< orphan*/ printf(char *);
void testLireParametre() {
  char *NomFichier;
  char *Parametre;
  char *valeur;
  int result = LireParametre(NomFichier, Parametre, valeur);
  if (1) {
    printf("%%TEST_FAILED%% time=0 testname=testLireParametre "
           "(Test_gestionfichier) message=error message sample\n");
  }
}


x86 assembly (clang, -O0):
<testLireParametre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <LireParametre@plt>
mov    %eax,-0x1c(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testLireParametre>:
push   %rax
call   1040 <LireParametre@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [102 x i8] c"%%TEST_FAILED%% time=0 testname=testLireParametre (Test_gestionfichier) message=error message sample\0A\00"
define void @testLireParametre() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = load i8*, i8** %1
%6 = load i8*, i8** %2
%7 = load i8*, i8** %3
%8 = call i32 @LireParametre(i8* %5, i8* %6, i8* %7)
store i32 %8, i32* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [102 x i8] c"%%TEST_FAILED%% time=0 testname=testLireParametre (Test_gestionfichier) message=error message sample\0A\00"
define void @testLireParametre() {
%1 = tail call i32 @LireParametre(i8* undef, i8* undef, i8* undef)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0))
ret void
}
void gtk_style_lookup_icon_set() {}


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

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

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

LLVM IR (-O2):
define void @gtk_style_lookup_icon_set() {
ret void
}
/* Type definitions */
typedef char *strrchr;

/* Variables and functions */
char *(rindex)(const char *string, int c) { return (strrchr)(string, c); }


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

x86 assembly (clang, -O2):
<rindex>:
movslq %esi,%rax
ret

LLVM IR (-O0):
define i8* @rindex(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 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @rindex(i8* nocapture readnone %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int compare_keys(void *, void *, int);
int comp_dir_entries(void *key1, void *key2) {
  return compare_keys(key1, key2, 1);
}


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

x86 assembly (clang, -O2):
<comp_dir_entries>:
mov    $0x1,%edx
jmp    1030 <compare_keys@plt>

LLVM IR (-O0):
define i32 @comp_dir_entries(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @compare_keys(i8* %5, i8* %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @comp_dir_entries(i8* %0, i8* %1) {
%3 = tail call i32 @compare_keys(i8* %0, i8* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ VirtualizeTimerC__0__Timer__stop(unsigned int);
void TelosbSensorReadingC__TimerWebCommandLed__stop(void) {
  VirtualizeTimerC__0__Timer__stop(3U);
}


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

x86 assembly (clang, -O2):
<TelosbSensorReadingC__TimerWebCommandLed__stop>:
mov    $0x3,%edi
jmp    1030 <VirtualizeTimerC__0__Timer__stop@plt>

LLVM IR (-O0):
define void @TelosbSensorReadingC__TimerWebCommandLed__stop() {
%1 = call i32 @VirtualizeTimerC__0__Timer__stop(i32 3)
ret void
}

LLVM IR (-O2):
define void @TelosbSensorReadingC__TimerWebCommandLed__stop() {
%1 = tail call i32 @VirtualizeTimerC__0__Timer__stop(i32 3)
ret void
}
unsigned xrop3_15_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = ~T;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_15_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_15_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_15_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
store i32 %14, i32* %6
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 8
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
store i32 %20, i32* %7
%21 = load i32, i32* %7
%22 = xor i32 %21, -1
store i32 %22, i32* %8
%23 = load i32, i32* %8
%24 = load i32, i32* %6
%25 = xor i32 %24, -1
%26 = and i32 %23, %25
%27 = load i32, i32* %5
%28 = load i32, i32* %6
%29 = and i32 %27, %28
%30 = or i32 %26, %29
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_15_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i32 %8, %3
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ testTwin(int);
int main(void) {
  testTwin(7);
  testTwin(13);
  testTwin(823);
  testTwin(2);
  testTwin(23);
  testTwin(100);
  testTwin(-3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <testTwin@plt>
mov    $0xd,%edi
call   1030 <testTwin@plt>
mov    $0x337,%edi
call   1030 <testTwin@plt>
mov    $0x2,%edi
call   1030 <testTwin@plt>
mov    $0x17,%edi
call   1030 <testTwin@plt>
mov    $0x64,%edi
call   1030 <testTwin@plt>
mov    $0xfffffffd,%edi
call   1030 <testTwin@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
call   1030 <testTwin@plt>
mov    $0xd,%edi
call   1030 <testTwin@plt>
mov    $0x337,%edi
call   1030 <testTwin@plt>
mov    $0x2,%edi
call   1030 <testTwin@plt>
mov    $0x17,%edi
call   1030 <testTwin@plt>
mov    $0x64,%edi
call   1030 <testTwin@plt>
mov    $0xfffffffd,%edi
call   1030 <testTwin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @testTwin(i32 7)
%2 = call i32 @testTwin(i32 13)
%3 = call i32 @testTwin(i32 823)
%4 = call i32 @testTwin(i32 2)
%5 = call i32 @testTwin(i32 23)
%6 = call i32 @testTwin(i32 100)
%7 = call i32 @testTwin(i32 -3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @testTwin(i32 7)
%2 = tail call i32 @testTwin(i32 13)
%3 = tail call i32 @testTwin(i32 823)
%4 = tail call i32 @testTwin(i32 2)
%5 = tail call i32 @testTwin(i32 23)
%6 = tail call i32 @testTwin(i32 100)
%7 = tail call i32 @testTwin(i32 -3)
ret i32 0
}
void init_tmr0() {
  (*(volatile unsigned char *)((volatile void *)(0xffd80000 + (4)))) = 0;
  (*(volatile unsigned char *)((volatile void *)(0xffd80000 + (0)))) = 0;
  (*(volatile unsigned int *)((volatile void *)(0xffd80000 + (8)))) = ~0;
  (*(volatile unsigned int *)((volatile void *)(0xffd80000 + (12)))) = ~0;
  (*(volatile unsigned short *)((volatile void *)(0xffd80000 + (16)))) = 4;
  (*(volatile unsigned char *)((volatile void *)(0xffd80000 + (4)))) = 1;
}


x86 assembly (clang, -O0):
<init_tmr0>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffd80004,%eax
movb   $0x0,(%rax)
mov    $0xffd80000,%eax
movb   $0x0,(%rax)
mov    $0xffd80008,%eax
movl   $0xffffffff,(%rax)
mov    $0xffd8000c,%eax
movl   $0xffffffff,(%rax)
mov    $0xffd80010,%eax
movw   $0x4,(%rax)
mov    $0xffd80004,%eax
movb   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_tmr0>:
mov    $0xffd80004,%eax
movb   $0x0,(%rax)
movb   $0x0,-0x4(%rax)
movl   $0xffffffff,0x4(%rax)
movl   $0xffffffff,0x8(%rax)
movw   $0x4,0xc(%rax)
movb   $0x1,(%rax)
ret

LLVM IR (-O0):
define void @init_tmr0() {
store volatile i8 0, i8* inttoptr (i64 4292345860 to i8*)
store volatile i8 0, i8* inttoptr (i64 4292345856 to i8*)
store volatile i32 -1, i32* inttoptr (i64 4292345864 to i32*)
store volatile i32 -1, i32* inttoptr (i64 4292345868 to i32*)
store volatile i16 4, i16* inttoptr (i64 4292345872 to i16*)
store volatile i8 1, i8* inttoptr (i64 4292345860 to i8*)
ret void
}

LLVM IR (-O2):
define void @init_tmr0() {
store volatile i8 0, i8* inttoptr (i64 4292345860 to i8*)
store volatile i8 0, i8* inttoptr (i64 4292345856 to i8*)
store volatile i32 -1, i32* inttoptr (i64 4292345864 to i32*)
store volatile i32 -1, i32* inttoptr (i64 4292345868 to i32*)
store volatile i16 4, i16* inttoptr (i64 4292345872 to i16*)
store volatile i8 1, i8* inttoptr (i64 4292345860 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printids(char *);
void *thr_fn(void *arg) {
  printids("new thread:");
  return NULL;
}


x86 assembly (clang, -O0):
<thr_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printids@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"new thread:\00"
define i8* @thr_fn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printids(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [12 x i8] c"new thread:\00"
define noalias i8* @thr_fn(i8* nocapture readnone %0) {
%2 = tail call i32 @printids(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
int min_heap_replace(int *list[], int value) {}


x86 assembly (clang, -O0):
<min_heap_replace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @min_heap_replace(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @min_heap_replace(i32** nocapture readnone %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int errno;
int WSAGetLastError(void) { return errno; }


x86 assembly (clang, -O0):
<WSAGetLastError>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@errno = global i32 0
define i32 @WSAGetLastError() {
%1 = load i32, i32* @errno
ret i32 %1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @WSAGetLastError() {
%1 = load i32, i32* @errno
ret i32 %1
}
int Power_to_8(int n) {
  int res, i;
  if (n == 0)
    return 1;
  else {
    res = 1;
    for (i = 1; i <= n; i++)
      res *= 8;
  }
  return res;
}


x86 assembly (clang, -O0):
<Power_to_8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <Power_to_8+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1159 <Power_to_8+0x59>
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114e <Power_to_8+0x4e>
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112b <Power_to_8+0x2b>
jmp    1153 <Power_to_8+0x53>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Power_to_8>:
test   %edi,%edi
jle    1118 <Power_to_8+0x18>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    111e <Power_to_8+0x1e>
mov    $0x1,%eax
jmp    1138 <Power_to_8+0x38>
mov    $0x1,%eax
ret
and    $0xfffffff8,%edi
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
shl    $0x18,%eax
add    $0xfffffff8,%edi
jne    1130 <Power_to_8+0x30>
test   %ecx,%ecx
je     1148 <Power_to_8+0x48>
nopl   0x0(%rax)
shl    $0x3,%eax
add    $0xffffffff,%ecx
jne    1140 <Power_to_8+0x40>
ret

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

LLVM IR (-O2):
define i32 @Power_to_8(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %25, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %15, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i32 [ 1, %7 ], [ %12, %9 ]
%11 = phi i32 [ 0, %7 ], [ %13, %9 ]
%12 = shl i32 %10, 24
%13 = add i32 %11, 8
%14 = icmp eq i32 %13, %8
br i1 %14, label %15, label %9
15: ; preds = %9, %3
%16 = phi i32 [ undef, %3 ], [ %12, %9 ]
%17 = phi i32 [ 1, %3 ], [ %12, %9 ]
%18 = icmp eq i32 %5, 0
br i1 %18, label %25, label %19
19: ; preds = %15, %19
%20 = phi i32 [ %22, %19 ], [ %17, %15 ]
%21 = phi i32 [ %23, %19 ], [ 0, %15 ]
%22 = shl nsw i32 %20, 3
%23 = add i32 %21, 1
%24 = icmp eq i32 %23, %5
br i1 %24, label %25, label %19
25: ; preds = %15, %19, %1
%26 = phi i32 [ 1, %1 ], [ %16, %15 ], [ %22, %19 ]
ret i32 %26
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello World!\n");
  printf("I'm matching\n");
  printf("All the strings\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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@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>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
@.str.1 = [14 x i8] c"I'm matching\0A\00"
@.str.2 = [17 x i8] c"All the strings\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello World!\00"
@str.3 = [13 x i8] c"I'm matching\00"
@str.4 = [16 x i8] c"All the strings\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))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cfg_set(char *);
clear_cfg_flag(void) { cfg_set("flag=0"); }


x86 assembly (clang, -O0):
<clear_cfg_flag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <cfg_set@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"flag=0\00"
define i32 @clear_cfg_flag() {
%1 = alloca i32
%2 = call i32 @cfg_set(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [7 x i8] c"flag=0\00"
define i32 @clear_cfg_flag() {
%1 = tail call i32 @cfg_set(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int fib(int);
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i < 1000; i++) {
    assert(fib(20) == 6765);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3e8,-0x14(%rbp)
jge    1174 <main+0x54>
mov    $0x14,%edi
call   1040 <fib@plt>
cmp    $0x1a6d,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3e8,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x14,%edi
call   1040 <fib@plt>
xor    %edi,%edi
cmp    $0x1a6d,%eax
sete   %dil
call   1030 <assert@plt>
add    $0xffffffff,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %9, %3 ]
%5 = tail call i32 @fib(i32 20)
%6 = icmp eq i32 %5, 6765
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = add nuw nsw i32 %4, 1
%10 = icmp eq i32 %9, 1000
br i1 %10, label %11, label %3
11: ; preds = %3
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t clamp_u32(uint32_t x, uint32_t min_, uint32_t max_) {
  return x < min_ ? min_ : (x > max_ ? max_ : x);
}


x86 assembly (clang, -O0):
<clamp_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    112b <clamp_u32+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1156 <clamp_u32+0x56>
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1146 <clamp_u32+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    114e <clamp_u32+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_u32>:
mov    %rdx,%rax
cmp    %rdx,%rdi
cmovle %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @clamp_u32(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = icmp sgt i64 %0, %2
%6 = select i1 %5, i64 %2, i64 %0
%7 = select i1 %4, i64 %1, i64 %6
ret i64 %7
}
double calcCirArea(float radius) { return 3.14 * (radius * radius); }


x86 assembly (clang, -O0):
<calcCirArea>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee1(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcCirArea>:
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @calcCirArea(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = fpext float %5 to double
%7 = fmul double 3.140000e+00, %6
ret double %7
}

LLVM IR (-O2):
define double @calcCirArea(float %0) {
%2 = fmul float %0, %0
%3 = fpext float %2 to double
%4 = fmul double %3, 3.140000e+00
ret double %4
}
int sfxhash_nearest_powerof2(int nrows) {
  unsigned i;
  nrows -= 1;
  for (i = 1; i < sizeof(nrows) * 8; i <<= 1)
    nrows = nrows | (nrows >> i);
  nrows += 1;
  return nrows;
}


x86 assembly (clang, -O0):
<sfxhash_nearest_powerof2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x20,%rax
jae    1144 <sfxhash_nearest_powerof2+0x44>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1117 <sfxhash_nearest_powerof2+0x17>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfxhash_nearest_powerof2>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
sar    %ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
sar    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
sar    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @sfxhash_nearest_powerof2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
store i32 %5, i32* %2
store i32 1, i32* %3
br label %6
6: ; preds = %16, %1
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = icmp ult i64 %8, 32
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = ashr i32 %12, %13
%15 = or i32 %11, %14
store i32 %15, i32* %2
br label %16
16: ; preds = %10
%17 = load i32, i32* %3
%18 = shl i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %6
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @sfxhash_nearest_powerof2(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
%4 = or i32 %3, %2
%5 = ashr i32 %4, 2
%6 = or i32 %5, %4
%7 = ashr i32 %6, 4
%8 = or i32 %7, %6
%9 = ashr i32 %8, 8
%10 = or i32 %9, %8
%11 = ashr i32 %10, 16
%12 = or i32 %11, %10
%13 = add nsw i32 %12, 1
ret i32 %13
}
int main_initialize(int argc, char **argv) {}


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

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

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

LLVM IR (-O2):
define i32 @main_initialize(i32 %0, i8** nocapture readnone %1) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ mpgdecoder_play_frame(void *, int /*<<< orphan*/ **,
                                         unsigned char *, int, int, int);
void default_mpgdecoder_play_skip_frame(void *ctx, FILE **playfp,
                                        unsigned char *buf, int len,
                                        unsigned char *prev_buf, int prev_len,
                                        int rate, int stereo, int *bsbytes) {
  mpgdecoder_play_frame(ctx, playfp, buf, len, rate, stereo);
}


x86 assembly (clang, -O0):
<default_mpgdecoder_play_skip_frame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1030 <mpgdecoder_play_frame@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_mpgdecoder_play_skip_frame>:
mov    0x8(%rsp),%r8d
mov    0x10(%rsp),%r9d
jmp    1030 <mpgdecoder_play_frame@plt>

LLVM IR (-O0):
define void @default_mpgdecoder_play_skip_frame(i8* %0, i32** %1, i8* %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i32* %8) {
%10 = alloca i8*
%11 = alloca i32**
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32*
store i8* %0, i8** %10
store i32** %1, i32*** %11
store i8* %2, i8** %12
store i32 %3, i32* %13
store i8* %4, i8** %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32* %8, i32** %18
%19 = load i8*, i8** %10
%20 = load i32**, i32*** %11
%21 = load i8*, i8** %12
%22 = load i32, i32* %13
%23 = load i32, i32* %16
%24 = load i32, i32* %17
%25 = call i32 @mpgdecoder_play_frame(i8* %19, i32** %20, i8* %21, i32 %22, i32 %23, i32 %24)
ret void
}

LLVM IR (-O2):
define void @default_mpgdecoder_play_skip_frame(i8* %0, i32** %1, i8* %2, i32 %3, i8* nocapture readnone %4, i32 %5, i32 %6, i32 %7, i32* nocapture readnone %8) {
%10 = tail call i32 @mpgdecoder_play_frame(i8* %0, i32** %1, i8* %2, i32 %3, i32 %6, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int maths(int, int, int, int /*<<< orphan*/);
int main() {
  if (maths(1, 2, 3, 0) != 9)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
call   1040 <maths@plt>
cmp    $0x9,%eax
je     1155 <main+0x35>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
call   1040 <maths@plt>
cmp    $0x9,%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @maths(i32 1, i32 2, i32 3, i32 0)
%3 = icmp ne i32 %2, 9
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @maths(i32 1, i32 2, i32 3, i32 0)
%2 = icmp eq i32 %1, 9
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
scalar_t__ errno;
scalar_t__ posix_memalign(void **, int, size_t);
void *malloc_aligned(size_t size) {
  void *mem;
  errno = posix_memalign(&mem, (4 * 1024), size);
  return (errno ? NULL : mem);
}


x86 assembly (clang, -O0):
<malloc_aligned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    -0x10(%rbp),%rdi
mov    $0x1000,%esi
call   1030 <posix_memalign@plt>
mov    %rax,%rcx
mov    0x2ea8(%rip),%rax
mov    %rcx,(%rax)
mov    0x2e9e(%rip),%rax
cmpq   $0x0,(%rax)
je     1157 <malloc_aligned+0x47>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    115f <malloc_aligned+0x4f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_aligned>:
push   %rax
mov    %rdi,%rdx
mov    %rsp,%rdi
mov    $0x1000,%esi
call   1030 <posix_memalign@plt>
mov    0x2eb8(%rip),%rcx
mov    %rax,(%rcx)
test   %rax,%rax
jne    1136 <malloc_aligned+0x26>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
define i8* @malloc_aligned(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @posix_memalign(i8** %3, i32 4096, i64 %4)
store i64 %5, i64* @errno
%6 = load i64, i64* @errno
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
br label %11
9: ; preds = %1
%10 = load i8*, i8** %3
br label %11
11: ; preds = %9, %8
%12 = phi i8* [ null, %8 ], [ %10, %9 ]
ret i8* %12
}

LLVM IR (-O2):
@errno = global i64 0
define i8* @malloc_aligned(i64 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @posix_memalign(i8** %2, i32 4096, i64 %0)
store i64 %4, i64* @errno
%5 = icmp eq i64 %4, 0
%6 = load i8*, i8** %2
%7 = select i1 %5, i8* %6, i8* null
ret i8* %7
}
void addchar2(char *a, char *b, char *sum, char *dig_sum) {
  *sum = (*a - '0') + (*b - '0') + (*dig_sum);
  *dig_sum = *sum / 10;
  *sum = (*sum % 10) + '0';
}


x86 assembly (clang, -O0):
<addchar2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    -0x20(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<addchar2>:
mov    (%rdi),%al
add    (%rsi),%al
add    (%rcx),%al
add    $0xa0,%al
mov    %al,(%rdx)
movsbl %al,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%esi
shr    $0xa,%eax
shr    $0xf,%esi
add    %al,%sil
mov    %sil,(%rcx)
movsbl (%rdx),%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%esi
shr    $0xa,%ecx
shr    $0xf,%esi
add    %cl,%sil
movzbl %sil,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
add    $0x30,%al
mov    %al,(%rdx)
ret

LLVM IR (-O0):
define void @addchar2(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = sub nsw i32 %11, 48
%13 = load i8*, i8** %6
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = sub nsw i32 %15, 48
%17 = add nsw i32 %12, %16
%18 = load i8*, i8** %8
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = add nsw i32 %17, %20
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %7
store i8 %22, i8* %23
%24 = load i8*, i8** %7
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = sdiv i32 %26, 10
%28 = trunc i32 %27 to i8
%29 = load i8*, i8** %8
store i8 %28, i8* %29
%30 = load i8*, i8** %7
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = srem i32 %32, 10
%34 = add nsw i32 %33, 48
%35 = trunc i32 %34 to i8
%36 = load i8*, i8** %7
store i8 %35, i8* %36
ret void
}

LLVM IR (-O2):
define void @addchar2(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i8* nocapture %3) {
%5 = load i8, i8* %0
%6 = load i8, i8* %1
%7 = load i8, i8* %3
%8 = add i8 %5, -96
%9 = add i8 %8, %6
%10 = add i8 %9, %7
store i8 %10, i8* %2
%11 = sdiv i8 %10, 10
store i8 %11, i8* %3
%12 = load i8, i8* %2
%13 = srem i8 %12, 10
%14 = add nsw i8 %13, 48
store i8 %14, i8* %2
ret void
}
/* Variables and functions */
__attribute__((section(".after_vectors"))) void BusFault_Handler(void) {
  while (1) {
  }
}


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

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

LLVM IR (-O0):
define void @BusFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @BusFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
int ld_ge_rc1(long double a1) { return (((a1) >= (100))); }


x86 assembly (clang, -O0):
<ld_ge_rc1>:
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
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ld_ge_rc1(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 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ld_ge_rc1(x86_fp80 %0) {
%2 = fcmp oge x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ hello(char *, int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("in app , call hello \n");
  hello("luorongwei", 11);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0xb,%esi
call   1040 <hello@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"in app , call hello \0A\00"
@.str.1 = [11 x i8] c"luorongwei\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @hello(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 11)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"luorongwei\00"
@str = [21 x i8] c"in app , call hello \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @hello(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_lroundl();
scalar_t__ lroundl(long double);
void test_lroundl(long double ld) {
  if (lroundl(ld) != lroundl(ld))
    link_failure_lroundl();
}


x86 assembly (clang, -O0):
<test_lroundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <lroundl@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <lroundl@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_lroundl+0x43>
mov    $0x0,%al
call   1040 <link_failure_lroundl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lroundl>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1030 <lroundl@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1030 <lroundl@plt>
cmp    %rax,%rbx
jne    1151 <test_lroundl+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1040 <link_failure_lroundl@plt>

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

LLVM IR (-O2):
define void @test_lroundl(x86_fp80 %0) {
%2 = tail call i64 @lroundl(x86_fp80 %0)
%3 = tail call i64 @lroundl(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_lroundl()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_arg_parse();
int /*<<< orphan*/ test_qarg_parse();
int main() {
  test_arg_parse();
  test_qarg_parse();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_arg_parse()
%2 = tail call i32 (...) @test_qarg_parse()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct intfloat {
  int /*<<< orphan*/ i;
  float f;
};

/* Variables and functions */
float int_as_float(uint32_t intval) {
  union intfloat {
    uint32_t i;
    float f;
  } uval;
  uval.i = intval;
  return uval.f;
}


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

x86 assembly (clang, -O2):
<int_as_float>:
movd   %edi,%xmm0
ret

LLVM IR (-O0):
%union.intfloat = type { i32 }
define float @int_as_float(i32 %0) {
%2 = alloca i32
%3 = alloca %union.intfloat
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast %union.intfloat* %3 to i32*
store i32 %4, i32* %5
%6 = bitcast %union.intfloat* %3 to float*
%7 = load float, float* %6
ret float %7
}

LLVM IR (-O2):
define float @int_as_float(i32 %0) {
%2 = bitcast i32 %0 to float
ret float %2
}
/* Variables and functions */
scalar_t__ random_rand();
double random_double_1(void) {
  return (2.0 * (((double)random_rand()) / (double)(unsigned int)0xFFFFFFFF) -
          1.0);
}


x86 assembly (clang, -O0):
<random_double_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random_rand@plt>
cvtsi2sd %rax,%xmm0
movsd  0xee0(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
movsd  0xec8(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_double_1>:
push   %rax
xor    %eax,%eax
call   1030 <random_rand@plt>
cvtsi2sd %rax,%xmm0
divsd  0xedb(%rip),%xmm0
addsd  %xmm0,%xmm0
addsd  0xed7(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @random_double_1() {
%1 = call i64 (...) @random_rand()
%2 = sitofp i64 %1 to double
%3 = fdiv double %2, 0x41EFFFFFFFE00000
%4 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %3, double -1.000000e+00)
ret double %4
}

LLVM IR (-O2):
define double @random_double_1() {
%1 = tail call i64 (...) @random_rand()
%2 = sitofp i64 %1 to double
%3 = fdiv double %2, 0x41EFFFFFFFE00000
%4 = tail call double @llvm.fmuladd.f64(double %3, double 2.000000e+00, double -1.000000e+00)
ret double %4
}
float f1(__attribute__((vector_size(16))) float t) { return ((float *)&t)[1]; }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
movaps %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
shufps $0x55,%xmm0,%xmm0
ret

LLVM IR (-O0):
define float @f1(<4 x float> %0) {
%2 = alloca <4 x float>
store <4 x float> %0, <4 x float>* %2
%3 = bitcast <4 x float>* %2 to float*
%4 = getelementptr inbounds float, float* %3, i64 1
%5 = load float, float* %4
ret float %5
}

LLVM IR (-O2):
define float @f1(<4 x float> %0) {
%2 = extractelement <4 x float> %0, i64 1
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ ll_strlen(int /*<<< orphan*/ *);
scalar_t__ snprintf(char *, scalar_t__, char *, long);
int64_t ll_ltoa(int64_t i, int8_t *dst) {
  int64_t size = ll_strlen(dst);
  return snprintf((char *)dst, size, "%ld", (long)i);
}


x86 assembly (clang, -O0):
<ll_ltoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ll_strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rcx
lea    0xeb0(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ll_ltoa>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <ll_strlen@plt>
lea    0xec7(%rip),%rdx
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define i64 @ll_ltoa(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
%5 = alloca i64
store i64 %0, i64* %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = call i64 @ll_strlen(i32* %6)
store i64 %7, i64* %5
%8 = load i32*, i32** %4
%9 = bitcast i32* %8 to i8*
%10 = load i64, i64* %5
%11 = load i64, i64* %3
%12 = call i64 @snprintf(i8* %9, i64 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %11)
ret i64 %12
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i64 @ll_ltoa(i64 %0, i32* %1) {
%3 = tail call i64 @ll_strlen(i32* %1)
%4 = bitcast i32* %1 to i8*
%5 = tail call i64 @snprintf(i8* %4, i64 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i64 %5
}