xunge/DecIR huggingface dataset:
unsigned bi_reverse(unsigned code, int len) {
  register unsigned res = 0;
  do {
    res |= code & 1;
    code >>= 1, res <<= 1;
  } while (--len > 0);
  return res >> 1;
}


x86 assembly (clang, -O0):
<bi_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jg     1111 <bi_reverse+0x11>
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bi_reverse>:
add    $0x1,%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%eax
and    $0x1,%eax
or     %ecx,%eax
shr    %edi
lea    (%rax,%rax,1),%ecx
add    $0xffffffff,%esi
cmp    $0x1,%esi
jg     1110 <bi_reverse+0x10>
and    $0x7fffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @bi_reverse(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %9, %3 ]
%5 = phi i32 [ %1, %2 ], [ %11, %3 ]
%6 = phi i32 [ 0, %2 ], [ %10, %3 ]
%7 = and i32 %4, 1
%8 = or i32 %6, %7
%9 = lshr i32 %4, 1
%10 = shl i32 %8, 1
%11 = add nsw i32 %5, -1
%12 = icmp sgt i32 %5, 1
br i1 %12, label %3, label %13
13: ; preds = %3
%14 = and i32 %8, 2147483647
ret i32 %14
}
void timing_leave_max_prio(void) {}


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

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

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

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

/* Variables and functions */
void push_i32(char *stream, int32_t i32) {}


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

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

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

LLVM IR (-O2):
define void @push_i32(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int ERR_isError(size_t);
unsigned FSEv06_isError(size_t code) { return ERR_isError(code); }


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

x86 assembly (clang, -O2):
<FSEv06_isError>:
jmp    1030 <ERR_isError@plt>

LLVM IR (-O0):
define i32 @FSEv06_isError(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @ERR_isError(i64 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @FSEv06_isError(i64 %0) {
%2 = tail call i32 @ERR_isError(i64 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ reload_watchdog();
void watchdog_task(__attribute__((unused)) void *arg) { reload_watchdog(); }


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

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

LLVM IR (-O0):
define void @watchdog_task(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @reload_watchdog()
ret void
}

LLVM IR (-O2):
define void @watchdog_task(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @reload_watchdog()
ret void
}
int __fegetround(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__fegetround() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ wNotYet(char *);
void wBuiltinRun() { wNotYet("Run"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"Run\00"
define void @wBuiltinRun() {
%1 = call i32 @wNotYet(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"Run\00"
define void @wBuiltinRun() {
%1 = tail call i32 @wNotYet(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long hash_krm(const char *chave, int tamanho) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @hash_krm(i8* nocapture readnone %0, i32 %1) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int strfree(char *s) {
  free(s);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @strfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CompileWord(int, long);
long DecodeLiteral();
void DoNot(void) { CompileWord(50, (DecodeLiteral() == 0L ? 1L : 0L)); }


x86 assembly (clang, -O0):
<DoNot>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <DecodeLiteral@plt>
mov    %rax,%rcx
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%eax
cmp    $0x0,%rcx
cmove  %rax,%rsi
mov    $0x32,%edi
call   1030 <CompileWord@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoNot>:
push   %rax
xor    %eax,%eax
call   1040 <DecodeLiteral@plt>
xor    %esi,%esi
test   %rax,%rax
sete   %sil
mov    $0x32,%edi
pop    %rax
jmp    1030 <CompileWord@plt>

LLVM IR (-O0):
define void @DoNot() {
%1 = call i64 (...) @DecodeLiteral()
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i64 1, i64 0
%5 = call i32 @CompileWord(i32 50, i64 %4)
ret void
}

LLVM IR (-O2):
define void @DoNot() {
%1 = tail call i64 (...) @DecodeLiteral()
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i64
%4 = tail call i32 @CompileWord(i32 50, i64 %3)
ret void
}
int fun_call_base_0() { return 1; }


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

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

LLVM IR (-O0):
define i32 @fun_call_base_0() {
ret i32 1
}

LLVM IR (-O2):
define i32 @fun_call_base_0() {
ret i32 1
}
int execute_vm86old() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_vm86old() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("hello word");
  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>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"hello word\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 ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"hello word\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned short **__ctype_b_loc();
int /*<<< orphan*/ assert(int);
int main(void) {
  int i = 5;
  unsigned short const **tmp;
  tmp = __ctype_b_loc();
  i = (int)(*((*tmp) + 13));
  assert(i == 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__ctype_b_loc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movzwl 0x1a(%rax),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <__ctype_b_loc@plt>
mov    (%rax),%rax
xor    %edi,%edi
cmpw   $0x5,0x1a(%rax)
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i16**
store i32 0, i32* %1
store i32 5, i32* %2
%4 = call i16** (...) @__ctype_b_loc()
store i16** %4, i16*** %3
%5 = load i16**, i16*** %3
%6 = load i16*, i16** %5
%7 = getelementptr inbounds i16, i16* %6, i64 13
%8 = load i16, i16* %7
%9 = zext i16 %8 to i32
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 5
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i16** (...) @__ctype_b_loc()
%2 = load i16*, i16** %1
%3 = getelementptr inbounds i16, i16* %2, i64 13
%4 = load i16, i16* %3
%5 = icmp eq i16 %4, 5
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ assert(int);
scalar_t__ sysconf(int /*<<< orphan*/);
size_t get_pagesize(void) {
  static size_t pagesize = 0;
  if (pagesize == 0) {
    pagesize = (size_t)sysconf(_SC_PAGESIZE);
  }
  assert(pagesize != 0);
  return pagesize;
}


x86 assembly (clang, -O0):
<get_pagesize>:
push   %rbp
mov    %rsp,%rbp
cmpq   $0x0,0x2f0c(%rip)
jne    1147 <get_pagesize+0x27>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,0x2ef1(%rip)
cmpq   $0x0,0x2ee9(%rip)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2ed5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pagesize>:
push   %rax
mov    0x2f10(%rip),%rax
test   %rax,%rax
jne    1142 <get_pagesize+0x22>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,0x2ef6(%rip)
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    0x2ee1(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@get_pagesize.pagesize = internal global i64 0
@_SC_PAGESIZE = global i32 0
define i64 @get_pagesize() {
%1 = load i64, i64* @get_pagesize.pagesize
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @_SC_PAGESIZE
%5 = call i64 @sysconf(i32 %4)
store i64 %5, i64* @get_pagesize.pagesize
br label %6
6: ; preds = %3, %0
%7 = load i64, i64* @get_pagesize.pagesize
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i64, i64* @get_pagesize.pagesize
ret i64 %11
}

LLVM IR (-O2):
@get_pagesize.pagesize = internal unnamed_addr global i64 0
@_SC_PAGESIZE = global i32 0
define i64 @get_pagesize() {
%1 = load i64, i64* @get_pagesize.pagesize
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @_SC_PAGESIZE
%5 = tail call i64 @sysconf(i32 %4)
store i64 %5, i64* @get_pagesize.pagesize
br label %6
6: ; preds = %3, %0
%7 = phi i64 [ %5, %3 ], [ %1, %0 ]
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = load i64, i64* @get_pagesize.pagesize
ret i64 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void const *, int);
uint64_t load64(const void *in) {
  uint64_t v;
  memcpy(&v, in, sizeof v);
  return v;
}


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

x86 assembly (clang, -O2):
<load64>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @load64(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
unsigned unsigned_exponential(unsigned i) {
  unsigned j;
  for (j = 1; i; i--, j = j << 1)
    ;
  return (j);
}


x86 assembly (clang, -O0):
<unsigned_exponential>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <unsigned_exponential+0x34>
jmp    111d <unsigned_exponential+0x1d>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <unsigned_exponential+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @unsigned_exponential(i32 %0) {
%2 = icmp eq i32 %0, 0
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, 8
%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 i32 %20, 1
%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*/ sleep(unsigned long);
void mSleep(unsigned long int mSeconds) { sleep((mSeconds / 1000.0)); }


x86 assembly (clang, -O0):
<mSleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movaps 0xedd(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xedc(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rdi
mov    %rdi,%rcx
sar    $0x3f,%rcx
movsd  0xec2(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
and    %rcx,%rax
or     %rax,%rdi
call   1030 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mSleep>:
movq   %rdi,%xmm0
punpckldq 0xee3(%rip),%xmm0
subpd  0xeeb(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
divsd  0xee7(%rip),%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
subsd  0xedb(%rip),%xmm1
cvttsd2si %xmm1,%rdi
and    %rcx,%rdi
or     %rax,%rdi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @mSleep(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = uitofp i64 %3 to double
%5 = fdiv double %4, 1.000000e+03
%6 = fptoui double %5 to i64
%7 = call i32 @sleep(i64 %6)
ret void
}

LLVM IR (-O2):
define void @mSleep(i64 %0) {
%2 = uitofp i64 %0 to double
%3 = fdiv double %2, 1.000000e+03
%4 = fptoui double %3 to i64
%5 = tail call i32 @sleep(i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int n;
  double x;
  int a[3];
  printf("n address:%p\n", &n);
  printf("x address:%p\n", &x);
  printf("a[0] address:%p\n", &a[0]);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xee5(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    0x1c(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"n address:%p\0A\00"
@.str.1 = [14 x i8] c"x address:%p\0A\00"
@.str.2 = [17 x i8] c"a[0] address:%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca [3 x i32]
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double* %3)
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"n address:%p\0A\00"
@.str.1 = [14 x i8] c"x address:%p\0A\00"
@.str.2 = [17 x i8] c"a[0] address:%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [3 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast [3 x i32]* %3 to i8*
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double* %2)
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32* %9)
ret i32 0
}
void __attribute__((weak)) dma1_stream5_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<dma1_stream5_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dma1_stream5_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.dma1_stream5_isr = [17 x i8] c"dma1_stream5_isr\00"
define weak void @dma1_stream5_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma1_stream5_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.dma1_stream5_isr = [17 x i8] c"dma1_stream5_isr\00"
define weak void @dma1_stream5_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma1_stream5_isr, i64 0, i64 0))
ret void
}
__attribute__((no, noclone)) int g0(int A, int B) {
  int C = A & ~B;
  return C ^ ~A;
}


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

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

LLVM IR (-O0):
define i32 @g0(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* %3
%7 = load i32, i32* %4
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = xor i32 %11, -1
%13 = xor i32 %10, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @g0(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = xor i32 %3, -1
ret i32 %4
}
int test_imm_F1int64_midword_reg(long long val) {
  return ((val >> 16) & (0xF1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F1int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xf1,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F1int64_midword_reg>:
test   $0xf10000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F1int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 241
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_F1int64_midword_reg(i64 %0) {
%2 = and i64 %0, 15794176
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
double bar(double);
double foo();
int __attribute__((no)) test(void) {
  double x = foo();
  x = bar(x);
  x /= 1024 * 1024 * 1024;
  x *= 70;
  x = x < 70 ? x : 70;
  x += 30;
  return x;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <foo@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <bar@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xe9f(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xe8d(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    118d <test+0x6d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    119f <test+0x7f>
movsd  0xe6b(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    119f <test+0x7f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xe5f(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
call   1030 <bar@plt>
mulsd  0xecb(%rip),%xmm0
movsd  0xecb(%rip),%xmm1
mulsd  %xmm1,%xmm0
minsd  %xmm1,%xmm0
addsd  0xec3(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test() {
%1 = alloca double
%2 = call double (...) @foo()
store double %2, double* %1
%3 = load double, double* %1
%4 = call double @bar(double %3)
store double %4, double* %1
%5 = load double, double* %1
%6 = fdiv double %5, 0x41D0000000000000
store double %6, double* %1
%7 = load double, double* %1
%8 = fmul double %7, 7.000000e+01
store double %8, double* %1
%9 = load double, double* %1
%10 = fcmp olt double %9, 7.000000e+01
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = load double, double* %1
br label %14
13: ; preds = %0
br label %14
14: ; preds = %13, %11
%15 = phi double [ %12, %11 ], [ 7.000000e+01, %13 ]
store double %15, double* %1
%16 = load double, double* %1
%17 = fadd double %16, 3.000000e+01
store double %17, double* %1
%18 = load double, double* %1
%19 = fptosi double %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @test() {
%1 = tail call double (...) @foo()
%2 = tail call double @bar(double %1)
%3 = fmul double %2, 0x3E10000000000000
%4 = fmul double %3, 7.000000e+01
%5 = fcmp olt double %4, 7.000000e+01
%6 = select i1 %5, double %4, double 7.000000e+01
%7 = fadd double %6, 3.000000e+01
%8 = fptosi double %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ int80(int, unsigned char, int, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void putchar(unsigned char c) { int80(1, c, 1, 0, 0, 0); }


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edx
xor    %r9d,%r9d
mov    %edx,%edi
movzbl -0x1(%rbp),%esi
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <int80@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
mov    %edi,%esi
mov    $0x1,%edi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <int80@plt>

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

LLVM IR (-O2):
define void @putchar(i8 zeroext %0) {
%2 = tail call i32 @int80(i32 1, i8 zeroext %0, i32 1, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int gprc_default_instruction_set(int *);
int gprcm_default_instruction_set(int *instruction_set) {
  return gprc_default_instruction_set(instruction_set);
}


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

x86 assembly (clang, -O2):
<gprcm_default_instruction_set>:
jmp    1030 <gprc_default_instruction_set@plt>

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

LLVM IR (-O2):
define i32 @gprcm_default_instruction_set(i32* %0) {
%2 = tail call i32 @gprc_default_instruction_set(i32* %0)
ret i32 %2
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
char *getUsertype(void) {
  char *usertype = malloc(sizeof(char) * 100);
  printf("Usertype: ");
  scanf("%s", usertype);
  return usertype;
}


x86 assembly (clang, -O0):
<getUsertype>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getUsertype>:
push   %rbx
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Usertype: \00"
@.str.1 = [3 x i8] c"%s\00"
define i8* @getUsertype() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 100)
store i8* %2, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %1
ret i8* %6
}

LLVM IR (-O2):
@.str = [11 x i8] c"Usertype: \00"
@.str.1 = [3 x i8] c"%s\00"
define i8* @getUsertype() {
%1 = tail call dereferenceable_or_null(100) i8* @malloc(i32 100)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i8* %1
}
int middle(x)
int x;
{
  if (x == 0)
    return inner(5);
  else
    return inner(6);
}


x86 assembly (clang, -O0):
<middle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1139 <middle+0x29>
mov    $0x5,%edi
mov    $0x0,%al
call   1030 <inner@plt>
mov    %eax,-0x4(%rbp)
jmp    1148 <middle+0x38>
mov    $0x6,%edi
mov    $0x0,%al
call   1030 <inner@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<middle>:
cmp    $0x1,%edi
mov    $0x6,%edi
sbb    $0x0,%edi
xor    %eax,%eax
jmp    1030 <inner@plt>

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

LLVM IR (-O2):
define i32 @middle(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 5, i32 6
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @inner to i32 (i32, ...)*)(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void f(void) { puts("Hello"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
define void @f() {
%1 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define void @f() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double mywtime() {
  double time[2];
  struct timeval time1;
  gettimeofday(&time1, NULL);
  time[0] = time1.tv_sec;
  time[1] = time1.tv_usec;
  return time[0] + time[1] * 1.0e-6;
}


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

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

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @mywtime() {
%1 = alloca [2 x double]
%2 = alloca %struct.timeval
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
store double %5, double* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%8 = load double, double* %7
%9 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 1
store double %8, double* %9
%10 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%11 = load double, double* %10
%12 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 1
%13 = load double, double* %12
%14 = call double @llvm.fmuladd.f64(double %13, double 0x3EB0C6F7A0B5ED8D, double %11)
ret double %14
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @mywtime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = tail call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %8
}
int toint(char *str) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @toint(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ inverser(char *);
int lireligne(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  int l;
  char ligne[1000];
  while ((l = lireligne(ligne, 1000)) > 0) {
    inverser(ligne);
    printf("%s", ligne);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <lireligne@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1183 <main+0x53>
lea    -0x3f0(%rbp),%rdi
call   1050 <inverser@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <lireligne@plt>
test   %eax,%eax
jle    1184 <main+0x54>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1050 <inverser@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <lireligne@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @lireligne(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = call i32 @inverser(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i32 @lireligne(i8* %2, i32 1000)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ tran(char const *);
int main(int argc, char const *argv[]) {
  if (argc == 2) {
    tran(argv[1]);
  }
  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)
cmpl   $0x2,-0x8(%rbp)
jne    113d <main+0x2d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <tran@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jne    1123 <main+0x13>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <tran@plt>
add    $0x8,%rsp
xor    %eax,%eax
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 = icmp eq i32 %6, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @tran(i8* %11)
br label %13
13: ; preds = %8, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @tran(i8* %6)
br label %8
8: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
int f1(int, int);
int f2(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("3 + 2 = %d\n", f1(3, 2));
  printf("3 - 2 = %d\n", f2(3, 2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x2,%esi
call   1050 <f1@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <f2@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x2,%esi
call   1050 <f1@plt>
lea    0xeb9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <f2@plt>
lea    0xea8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"3 + 2 = %d\0A\00"
@.str.1 = [12 x i8] c"3 - 2 = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @f1(i32 3, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @f2(i32 3, i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clientf(char *);
void clientfb(char *string) {
  clientf("\33[1;34m"
          "["
          "\33[1;31m");
  clientf(string);
  clientf("\33[1;34m"
          "]\r\n"
          "\33[0;37m");
}


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

x86 assembly (clang, -O2):
<clientfb>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <clientf@plt>
mov    %rbx,%rdi
call   1030 <clientf@plt>
lea    0xee1(%rip),%rdi
pop    %rbx
jmp    1030 <clientf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\1B[1;34m[\1B[1;31m\00"
@.str.1 = [18 x i8] c"\1B[1;34m]\0D\0A\1B[0;37m\00"
define void @clientfb(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @clientf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @clientf(i8* %4)
%6 = call i32 @clientf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\1B[1;34m[\1B[1;31m\00"
@.str.1 = [18 x i8] c"\1B[1;34m]\0D\0A\1B[0;37m\00"
define void @clientfb(i8* %0) {
%2 = tail call i32 @clientf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @clientf(i8* %0)
%4 = tail call i32 @clientf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int set_maxfiles(int requested_max) { return requested_max; }


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

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

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

LLVM IR (-O2):
define i32 @set_maxfiles(i32 returned %0) {
ret i32 %0
}
void prefetch(void *a) { __asm volatile("prefetch (%0)" : : "r"(a)); }


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

x86 assembly (clang, -O2):
<prefetch>:
prefetch (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetch(i8* %0) {
tail call void asm sideeffect "prefetch ($0)", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
void z80_init(void) {}


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

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

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

LLVM IR (-O2):
define void @z80_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, float);
int main() {
  char str[30];
  float one = 13.9;
  snprintf(str, 30, "GET /save?temp=%f", one);
  printf("%s", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
movss  -0x34(%rbp),%xmm0
mov    $0x1e,%esi
lea    0xeb3(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x30(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed8(%rip),%rdx
mov    %rsp,%rbx
movss  0xec9(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1e,%esi
call   1040 <snprintf@plt>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"GET /save?temp=%f\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x i8]
%3 = alloca float
store i32 0, i32* %1
store float 0x402BCCCCC0000000, float* %3
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%5 = load float, float* %3
%6 = call i32 @snprintf(i8* %4, i32 30, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float %5)
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"GET /save?temp=%f\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 30, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float 0x402BCCCCC0000000)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
void mcm_parse_update(struct mcm_service_session_t *this_session) {}


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

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

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

LLVM IR (-O2):
%struct.mcm_service_session_t = type opaque
define void @mcm_parse_update(%struct.mcm_service_session_t* nocapture %0) {
ret void
}
void foo_1_1_2_1_1_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_1_1_1_1_1_2() {
ret void
}
void example_NCC__typ_generic_functor(struct module *mod) {}


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

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

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

LLVM IR (-O2):
%struct.module = type opaque
define void @example_NCC__typ_generic_functor(%struct.module* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
uint32_t host_to_network_long(uint32_t l) { return htonl(l); }


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

x86 assembly (clang, -O2):
<host_to_network_long>:
jmp    1030 <htonl@plt>

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

LLVM IR (-O2):
define i32 @host_to_network_long(i32 %0) {
%2 = tail call i32 @htonl(i32 %0)
ret i32 %2
}