xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int metro, cent;
  printf("Digite o valor em metros!\n");
  scanf("%d", &metro);
  cent = (metro * 100);
  printf("O valor em centimetros eh %d\n", cent);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
imul   $0x64,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
imul   $0x64,0x4(%rsp),%esi
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Digite o valor em metros!\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [30 x i8] c"O valor em centimetros eh %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = mul nsw i32 %6, 100
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [30 x i8] c"O valor em centimetros eh %d\0A\00"
@str = [26 x i8] c"Digite o valor em metros!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = mul nsw i32 %5, 100
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
char *disemvowel(char *str) { return ""; }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @disemvowel(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @disemvowel(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int foo();
int main(void) {
  int answer;
  answer = foo();
  answer += 1;
  return answer;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
add    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = add nsw i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void e(void) { printf("e() called\n"); }


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"e() called\00"
define void @e() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_track_dobldobl_solution_path(int k, int i, int otp) {
  int b[2], fail;
  double *c;
  b[0] = i;
  b[1] = otp;
  fail = _ada_use_c2phc4c(467, &k, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_track_dobldobl_solution_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0x14(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1d3,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_track_dobldobl_solution_path>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x1d3,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @celcon_track_dobldobl_solution_path(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [2 x i32]
%8 = alloca i32
%9 = alloca double*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%15 = load double*, double** %9
%16 = call i32 @_ada_use_c2phc4c(i32 467, i32* %4, i32* %14, double* %15, i32 0)
store i32 %16, i32* %8
%17 = load i32, i32* %8
ret i32 %17
}

LLVM IR (-O2):
define i32 @celcon_track_dobldobl_solution_path(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca [2 x i32]
store i32 %0, i32* %4
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %1, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %2, i32* %8
%9 = call i32 @_ada_use_c2phc4c(i32 467, i32* %4, i32* %7, double* undef, i32 0)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void check(int expr) { assert(expr); }


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

x86 assembly (clang, -O2):
<check>:
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define void @check(i32 %0) {
%2 = tail call i32 @assert(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mdelay(int);
void rct_alan_zhu_magic_loop(int clk_chk) { mdelay(2); }


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

x86 assembly (clang, -O2):
<rct_alan_zhu_magic_loop>:
mov    $0x2,%edi
jmp    1030 <mdelay@plt>

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

LLVM IR (-O2):
define void @rct_alan_zhu_magic_loop(i32 %0) {
%2 = tail call i32 @mdelay(i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_free(void *);
void ps_free(void *ptr) { do_free(ptr); }


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

x86 assembly (clang, -O2):
<ps_free>:
jmp    1030 <do_free@plt>

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

LLVM IR (-O2):
define void @ps_free(i8* %0) {
%2 = tail call i32 @do_free(i8* %0)
ret void
}
void option_set2option_set_unit() {}


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

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

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

LLVM IR (-O2):
define void @option_set2option_set_unit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disp_str(char *);
int sys_get_ticks() {
  disp_str("+");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"+\00"
define i32 @sys_get_ticks() {
%1 = call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"+\00"
define i32 @sys_get_ticks() {
%1 = tail call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void ASN1_STRING_TABLE_get(void) {}


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

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

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

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

/* Variables and functions */
int fchown(int, int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((__weak__, __always___)) int
softboundcets_fchown(int fd, uid_t owner, gid_t group) {
  return fchown(fd, owner, group);
}


x86 assembly (clang, -O0):
<softboundcets_fchown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <fchown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_fchown>:
jmp    1030 <fchown@plt>

LLVM IR (-O0):
define weak i32 @softboundcets_fchown(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @fchown(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define weak i32 @softboundcets_fchown(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @fchown(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *tfn1(void *arg) {
  printf("the first\n");
  return (void *)1;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"the first\0A\00"
define i8* @tfn1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i8* inttoptr (i64 1 to i8*)
}

LLVM IR (-O2):
@str = [10 x i8] c"the first\00"
define i8* @tfn1(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i8* inttoptr (i64 1 to i8*)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ libsais_unbwt_aux(int /*<<< orphan*/ const *,
                                     int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                     int /*<<< orphan*/, int /*<<< orphan*/,
                                     int /*<<< orphan*/ *);
int32_t libsais_unbwt(const uint8_t *T, uint8_t *U, int32_t *A, int32_t n,
                      int32_t i) {
  return libsais_unbwt_aux(T, U, A, n, n, &i);
}


x86 assembly (clang, -O0):
<libsais_unbwt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
lea    -0x20(%rbp),%r9
call   1030 <libsais_unbwt_aux@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libsais_unbwt>:
push   %rax
mov    %r8d,0x4(%rsp)
lea    0x4(%rsp),%r9
mov    %ecx,%r8d
call   1030 <libsais_unbwt_aux@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @libsais_unbwt(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32*, i32** %8
%14 = load i32, i32* %9
%15 = load i32, i32* %9
%16 = call i32 @libsais_unbwt_aux(i32* %11, i32* %12, i32* %13, i32 %14, i32 %15, i32* %10)
ret i32 %16
}

LLVM IR (-O2):
define i32 @libsais_unbwt(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i32
store i32 %4, i32* %6
%7 = call i32 @libsais_unbwt_aux(i32* %0, i32* %1, i32* %2, i32 %3, i32 %3, i32* %6)
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int cmp_func_int32_t(void *p1, void *p2) {
  int32_t v1 = *((int32_t *)p1);
  int32_t v2 = *((int32_t *)p2);
  return (v1 > v2) - (v1 < v2);
}


x86 assembly (clang, -O0):
<cmp_func_int32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x18(%rbp),%rcx
cmp    -0x20(%rbp),%rcx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_func_int32_t>:
mov    (%rdi),%rcx
xor    %eax,%eax
xor    %edx,%edx
cmp    (%rsi),%rcx
setg   %al
setl   %dl
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @cmp_func_int32_t(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
%16 = zext i1 %15 to i32
%17 = load i64, i64* %5
%18 = load i64, i64* %6
%19 = icmp slt i64 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @cmp_func_int32_t(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp slt i64 %4, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
unsigned long read_cr2(void) {
  unsigned long val;
  asm volatile("mov %%cr2,%0\n\t" : "=r"(val) : : "memory");
  return val;
}


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

x86 assembly (clang, -O2):
<read_cr2>:
mov    %cr2,%rax
ret

LLVM IR (-O0):
define i64 @read_cr2() {
%1 = alloca i64
%2 = call i64 asm sideeffect "mov %cr2,$0\0A\09", "=r,~{memory},~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @read_cr2() {
%1 = tail call i64 asm sideeffect "mov %cr2,$0\0A\09", "=r,~{memory},~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t ses_config_enclosure_descriptor_subenclosure_identifier(uint8_t *data) {
  return data[1];
}


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

x86 assembly (clang, -O2):
<ses_config_enclosure_descriptor_subenclosure_identifier>:
mov    0x4(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @ses_config_enclosure_descriptor_subenclosure_identifier(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int age = 10;
  int height;
  printf("I am %d years old. \n");
  printf("I am %d inches tall. \n", height);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"I am %d years old. \0A\00"
@.str.1 = [23 x i8] c"I am %d inches tall. \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"I am %d years old. \0A\00"
@.str.1 = [23 x i8] c"I am %d inches tall. \0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ log_entry(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void fatal(const char *s) {
  log_entry(stderr, "%s", s);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @log_entry(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @log_entry(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void ath5k_debug_finish(void) {}


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

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

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

LLVM IR (-O2):
define void @ath5k_debug_finish() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
extern uint32_t cel_djp2_hash(const char *str) {
  register uint32_t h = 5381;
  while (*str != '\0') {
    h = h * 33 ^ (*str++);
  }
  return (h & 0x7FFFFFFF);
}


x86 assembly (clang, -O0):
<cel_djp2_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113f <cel_djp2_hash+0x3f>
imul   $0x21,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <cel_djp2_hash+0xf>
mov    -0xc(%rbp),%eax
and    $0x7fffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cel_djp2_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <cel_djp2_hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
add    %edx,%eax
xor    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <cel_djp2_hash+0x10>
and    $0x7fffffff,%eax
ret
mov    $0x1505,%eax
ret

LLVM IR (-O0):
define i32 @cel_djp2_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 5381, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %4
%10 = load i32, i32* %3
%11 = mul nsw i32 %10, 33
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
%14 = load i8, i8* %12
%15 = sext i8 %14 to i32
%16 = xor i32 %11, %15
store i32 %16, i32* %3
br label %4
17: ; preds = %4
%18 = load i32, i32* %3
%19 = and i32 %18, 2147483647
ret i32 %19
}

LLVM IR (-O2):
define i32 @cel_djp2_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul nsw i32 %6, 33
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = xor i32 %9, %8
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = and i32 %11, 2147483647
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 5381, %1 ], [ %15, %14 ]
ret i32 %17
}
void Act_Mobiles(void) { ; }


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

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

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

LLVM IR (-O2):
define void @Act_Mobiles() {
ret void
}
/* Variables and functions */
bool nrf51_errata_63(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf51_errata_63() {
ret i32 0
}
/* Type definitions */
typedef int int32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *, int);
void mut_print_header_contig(FILE *fpout_vcf, const char *name,
                             int32_t length) {
  fprintf(fpout_vcf, "##contig=<ID=%s,length=%d>\n", name, length);
}


x86 assembly (clang, -O0):
<mut_print_header_contig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mut_print_header_contig>:
mov    %edx,%ecx
mov    %rsi,%rdx
lea    0xee4(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"##contig=<ID=%s,length=%d>\0A\00"
define void @mut_print_header_contig(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"##contig=<ID=%s,length=%d>\0A\00"
define void @mut_print_header_contig(i32* nocapture %0, i8* %1, i32 %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
ret void
}
float fsign(float x) { return (float)((x > 0.0f) - (x < 0.0f)); }


x86 assembly (clang, -O0):
<fsign>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsign>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
ret

LLVM IR (-O0):
define float @fsign(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0.000000e+00
%5 = zext i1 %4 to i32
%6 = load float, float* %2
%7 = fcmp olt float %6, 0.000000e+00
%8 = zext i1 %7 to i32
%9 = sub nsw i32 %5, %8
%10 = sitofp i32 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @fsign(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = zext i1 %2 to i32
%4 = fcmp olt float %0, 0.000000e+00
%5 = sext i1 %4 to i32
%6 = add nsw i32 %5, %3
%7 = sitofp i32 %6 to float
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ fat_dumpFatSector(int /*<<< orphan*/);
int /*<<< orphan*/ fat_dumpPartitionBootSector();
int /*<<< orphan*/ fat_dumpPartitionTable();
int /*<<< orphan*/ fat_dumpRootDirSector(int /*<<< orphan*/, int);
int fat_mountCheck();
int fat_dumpSystemInfo() {
  int ret;
  ret = fat_mountCheck();
  if (ret < 0) {
    return ret;
  }
  fat_dumpPartitionTable();
  fat_dumpPartitionBootSector();
  fat_dumpFatSector(0);
  fat_dumpRootDirSector(0, 10);
}


x86 assembly (clang, -O0):
<fat_dumpSystemInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <fat_mountCheck@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1177 <fat_dumpSystemInfo+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1198 <fat_dumpSystemInfo+0x48>
mov    $0x0,%al
call   1070 <fat_dumpPartitionTable@plt>
mov    $0x0,%al
call   1030 <fat_dumpPartitionBootSector@plt>
xor    %edi,%edi
call   1050 <fat_dumpFatSector@plt>
xor    %edi,%edi
mov    $0xa,%esi
call   1060 <fat_dumpRootDirSector@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fat_dumpSystemInfo>:
push   %rbx
xor    %eax,%eax
call   1040 <fat_mountCheck@plt>
mov    %eax,%ebx
test   %eax,%eax
js     117f <fat_dumpSystemInfo+0x2f>
xor    %eax,%eax
call   1070 <fat_dumpPartitionTable@plt>
xor    %eax,%eax
call   1030 <fat_dumpPartitionBootSector@plt>
xor    %edi,%edi
call   1050 <fat_dumpFatSector@plt>
xor    %edi,%edi
mov    $0xa,%esi
call   1060 <fat_dumpRootDirSector@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @fat_dumpSystemInfo() {
%1 = tail call i32 (...) @fat_mountCheck()
%2 = icmp slt i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 (...) @fat_dumpPartitionTable()
%5 = tail call i32 (...) @fat_dumpPartitionBootSector()
%6 = tail call i32 @fat_dumpFatSector(i32 0)
%7 = tail call i32 @fat_dumpRootDirSector(i32 0, i32 10)
br label %8
8: ; preds = %0, %3
ret i32 %1
}
/* Type definitions */
struct dlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dlist_insert_after(struct dlist *, struct dlist *);
void dlist_insert_front(struct dlist *head, struct dlist *new) {
  dlist_insert_after(head, new);
}


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

x86 assembly (clang, -O2):
<dlist_insert_front>:
jmp    1030 <dlist_insert_after@plt>

LLVM IR (-O0):
%struct.dlist = type { i32 }
define void @dlist_insert_front(%struct.dlist* %0, %struct.dlist* %1) {
%3 = alloca %struct.dlist*
%4 = alloca %struct.dlist*
store %struct.dlist* %0, %struct.dlist** %3
store %struct.dlist* %1, %struct.dlist** %4
%5 = load %struct.dlist*, %struct.dlist** %3
%6 = load %struct.dlist*, %struct.dlist** %4
%7 = call i32 @dlist_insert_after(%struct.dlist* %5, %struct.dlist* %6)
ret void
}

LLVM IR (-O2):
%struct.dlist = type { i32 }
define void @dlist_insert_front(%struct.dlist* %0, %struct.dlist* %1) {
%3 = tail call i32 @dlist_insert_after(%struct.dlist* %0, %struct.dlist* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_resolve_getnameinfo(void *resolve, void **q, const struct sockaddr *sa,
                       socklen_t salen, int flags, uint64_t get, void *callback,
                       void *userdata) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_resolve_getnameinfo>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
xor    %eax,%eax
mov    0x2eb4(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_resolve_getnameinfo>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@EINVAL = global i32 0
define i32 @sd_resolve_getnameinfo(i8* %0, i8** %1, %struct.sockaddr* %2, i32 %3, i32 %4, i32 %5, i8* %6, i8* %7) {
%9 = alloca i8*
%10 = alloca i8**
%11 = alloca %struct.sockaddr*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i8*
store i8* %0, i8** %9
store i8** %1, i8*** %10
store %struct.sockaddr* %2, %struct.sockaddr** %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i8* %6, i8** %15
store i8* %7, i8** %16
%17 = load i32, i32* @EINVAL
%18 = sub nsw i32 0, %17
ret i32 %18
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@EINVAL = global i32 0
define i32 @sd_resolve_getnameinfo(i8* nocapture readnone %0, i8** nocapture readnone %1, %struct.sockaddr* nocapture readnone %2, i32 %3, i32 %4, i32 %5, i8* nocapture readnone %6, i8* nocapture readnone %7) {
%9 = load i32, i32* @EINVAL
%10 = sub nsw i32 0, %9
ret i32 %10
}
char *amf_encode_boolean(char *data, int val) {
  *data++ = 1;
  *data++ = val ? 0x01 : 0x00;
  return data;
}


x86 assembly (clang, -O0):
<amf_encode_boolean>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x1,(%rax)
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<amf_encode_boolean>:
movb   $0x1,(%rdi)
lea    0x2(%rdi),%rax
test   %esi,%esi
setne  0x1(%rdi)
ret

LLVM IR (-O0):
define i8* @amf_encode_boolean(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 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %3
store i8 1, i8* %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
store i8 %11, i8* %12
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @amf_encode_boolean(i8* writeonly %0, i32 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
store i8 1, i8* %0
%4 = icmp ne i32 %1, 0
%5 = zext i1 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %5, i8* %3
ret i8* %6
}
int fun565() { return 565; }


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

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

LLVM IR (-O0):
define i32 @fun565() {
ret i32 565
}

LLVM IR (-O2):
define i32 @fun565() {
ret i32 565
}
/* Variables and functions */
int /*<<< orphan*/ func();
int f1(int val, int g) {
  if (val == 0)
    if (g == 1) {
      func();
    }
  return 0;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113e <f1+0x2e>
cmpl   $0x1,-0x8(%rbp)
jne    1139 <f1+0x29>
mov    $0x0,%al
call   1030 <func@plt>
jmp    113e <f1+0x2e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
test   %edi,%edi
jne    1125 <f1+0x15>
cmp    $0x1,%esi
jne    1125 <f1+0x15>
push   %rax
xor    %eax,%eax
call   1030 <func@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @f1(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 = icmp eq i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @func()
br label %12
12: ; preds = %10, %7
br label %13
13: ; preds = %12, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = icmp eq i32 %1, 1
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @func()
br label %8
8: ; preds = %6, %2
ret i32 0
}
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() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @BusFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
sfuncB(int a, int b) { return a * b + 2; }


x86 assembly (clang, -O0):
<sfuncB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfuncB>:
imul   %esi,%edi
lea    0x2(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @sfuncB(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 = mul nsw i32 %5, %6
%8 = add nsw i32 %7, 2
ret i32 %8
}

LLVM IR (-O2):
define i32 @sfuncB(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = add nsw i32 %3, 2
ret i32 %4
}
const char *deviceRobotSonarDetectorGetName(void) {
  return "robotSonarDetector";
}


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

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

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

LLVM IR (-O2):
@.str = [19 x i8] c"robotSonarDetector\00"
define i8* @deviceRobotSonarDetectorGetName() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}
int count_helper(int driver, void *dat) {
  (*(int *)dat)++;
  return 0;
}


x86 assembly (clang, -O0):
<count_helper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_helper>:
addl   $0x1,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @count_helper(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1
store i32 %8, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @count_helper(i32 %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *NEditRealloc(void *ptr, size_t new_size) {
  void *new_ptr = realloc(ptr, new_size);
  if (!new_ptr && new_size) {
    fprintf(stderr, "NEditRealloc(%lu) failed\n", (unsigned long)new_size);
    exit(1);
  }
  return new_ptr;
}


x86 assembly (clang, -O0):
<NEditRealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    118a <NEditRealloc+0x5a>
cmpq   $0x0,-0x10(%rbp)
je     118a <NEditRealloc+0x5a>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe85(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NEditRealloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <realloc@plt>
test   %rbx,%rbx
je     1143 <NEditRealloc+0x13>
test   %rax,%rax
je     1145 <NEditRealloc+0x15>
pop    %rbx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"NEditRealloc(%lu) failed\0A\00"
define noalias i8* @NEditRealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
%5 = icmp ne i64 %1, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %1)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ do_test(int);
int /*<<< orphan*/ do_utest(int);
int main(int argc, char *argv[]) {
  do_test(0);
  do_test(8);
  do_test(10);
  do_test(16);
  do_test(36);
  do_utest(0);
  do_utest(8);
  do_utest(10);
  do_utest(16);
  do_utest(36);
  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)
xor    %edi,%edi
call   1040 <do_test@plt>
mov    $0x8,%edi
call   1040 <do_test@plt>
mov    $0xa,%edi
call   1040 <do_test@plt>
mov    $0x10,%edi
call   1040 <do_test@plt>
mov    $0x24,%edi
call   1040 <do_test@plt>
xor    %edi,%edi
call   1030 <do_utest@plt>
mov    $0x8,%edi
call   1030 <do_utest@plt>
mov    $0xa,%edi
call   1030 <do_utest@plt>
mov    $0x10,%edi
call   1030 <do_utest@plt>
mov    $0x24,%edi
call   1030 <do_utest@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <do_test@plt>
mov    $0x8,%edi
call   1040 <do_test@plt>
mov    $0xa,%edi
call   1040 <do_test@plt>
mov    $0x10,%edi
call   1040 <do_test@plt>
mov    $0x24,%edi
call   1040 <do_test@plt>
xor    %edi,%edi
call   1030 <do_utest@plt>
mov    $0x8,%edi
call   1030 <do_utest@plt>
mov    $0xa,%edi
call   1030 <do_utest@plt>
mov    $0x10,%edi
call   1030 <do_utest@plt>
mov    $0x24,%edi
call   1030 <do_utest@plt>
xor    %eax,%eax
pop    %rcx
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 = call i32 @do_test(i32 0)
%7 = call i32 @do_test(i32 8)
%8 = call i32 @do_test(i32 10)
%9 = call i32 @do_test(i32 16)
%10 = call i32 @do_test(i32 36)
%11 = call i32 @do_utest(i32 0)
%12 = call i32 @do_utest(i32 8)
%13 = call i32 @do_utest(i32 10)
%14 = call i32 @do_utest(i32 16)
%15 = call i32 @do_utest(i32 36)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @do_test(i32 0)
%4 = tail call i32 @do_test(i32 8)
%5 = tail call i32 @do_test(i32 10)
%6 = tail call i32 @do_test(i32 16)
%7 = tail call i32 @do_test(i32 36)
%8 = tail call i32 @do_utest(i32 0)
%9 = tail call i32 @do_utest(i32 8)
%10 = tail call i32 @do_utest(i32 10)
%11 = tail call i32 @do_utest(i32 16)
%12 = tail call i32 @do_utest(i32 36)
ret i32 0
}
/* Variables and functions */
bool compare_int_sign(int a, int b) {
  return (a > 0 && b > 0) || (a < 0 && b < 0) || (a == 0 && b == 0);
}


x86 assembly (clang, -O0):
<compare_int_sign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1123 <compare_int_sign+0x23>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jg     115b <compare_int_sign+0x5b>
cmpl   $0x0,-0x4(%rbp)
jge    113c <compare_int_sign+0x3c>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     115b <compare_int_sign+0x5b>
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xa(%rbp)
jne    1155 <compare_int_sign+0x55>
cmpl   $0x0,-0x8(%rbp)
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int_sign>:
test   %edi,%edi
setg   %al
test   %esi,%esi
setg   %cl
and    %al,%cl
test   %edi,%esi
sets   %al
or     %edi,%esi
sete   %dl
or     %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @compare_int_sign(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 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 0
br i1 %9, label %24, label %10
10: ; preds = %7, %2
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 0
br i1 %15, label %24, label %16
16: ; preds = %13, %10
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 0
br label %22
22: ; preds = %19, %16
%23 = phi i1 [ false, %16 ], [ %21, %19 ]
br label %24
24: ; preds = %22, %13, %7
%25 = phi i1 [ true, %13 ], [ true, %7 ], [ %23, %22 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @compare_int_sign(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
%4 = icmp sgt i32 %1, 0
%5 = and i1 %3, %4
%6 = and i32 %1, %0
%7 = icmp slt i32 %6, 0
%8 = or i1 %5, %7
%9 = or i32 %1, %0
%10 = icmp eq i32 %9, 0
%11 = or i1 %10, %8
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
struct timeval {
  int tv_sec;
  long tv_usec;
};

/* Variables and functions */
long timerdiff(struct timeval a, struct timeval b) {
  return (a.tv_sec - b.tv_sec) * 1000000 + (a.tv_usec - b.tv_usec);
}


x86 assembly (clang, -O0):
<timerdiff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    %edx,-0x20(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x20(%rbp),%eax
imul   $0xf4240,%eax,%eax
cltq
mov    -0x8(%rbp),%rcx
sub    -0x18(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timerdiff>:
sub    %edx,%edi
imul   $0xf4240,%edi,%eax
cltq
sub    %rcx,%rsi
add    %rsi,%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @timerdiff(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = bitcast %struct.timeval* %5 to { i32, i64 }*
%8 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %7, i32 0, i32 0
store i32 %0, i32* %8
%9 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = bitcast %struct.timeval* %6 to { i32, i64 }*
%11 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %10, i32 0, i32 0
store i32 %2, i32* %11
%12 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %10, i32 0, i32 1
store i64 %3, i64* %12
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%16 = load i32, i32* %15
%17 = sub nsw i32 %14, %16
%18 = mul nsw i32 %17, 1000000
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%21 = load i64, i64* %20
%22 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%23 = load i64, i64* %22
%24 = sub nsw i64 %21, %23
%25 = add nsw i64 %19, %24
ret i64 %25
}

LLVM IR (-O2):
define i64 @timerdiff(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = sub nsw i32 %0, %2
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = sub i64 %1, %3
%9 = add nsw i64 %8, %7
ret i64 %9
}