xunge/DecIR huggingface dataset:
void nseel_asm_div_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_div_end() {
ret void
}
void UserPostShutdownCalloutf(void) {}


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

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

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

LLVM IR (-O2):
define void @UserPostShutdownCalloutf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x71() {
  Assert_real((isxdigit(113) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              570, ("isxdigit should be 0 for q"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x71>:
push   %rbp
mov    %rsp,%rbp
mov    $0x71,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x23a,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x71>:
push   %rax
mov    $0x71,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x23a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for q\00"
define void @t_isxdigit_0x71() {
%1 = call i64 @isxdigit(i32 113)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 570, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for q\00"
define void @t_isxdigit_0x71() {
%1 = tail call i64 @isxdigit(i32 113)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 570, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ UINT64_C(int);
void fiat_p256_divstep_precomp(uint64_t out1[4]) {
  out1[0] = UINT64_C(0x67ffffffb8000000);
  out1[1] = UINT64_C(0xc000000038000000);
  out1[2] = UINT64_C(0xd80000007fffffff);
  out1[3] = UINT64_C(0x2fffffffffffffff);
}


x86 assembly (clang, -O0):
<fiat_p256_divstep_precomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xb8000000,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x38000000,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    $0x7fffffff,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    $0xffffffff,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_p256_divstep_precomp>:
push   %rbx
mov    %rdi,%rbx
mov    $0xb8000000,%edi
call   1030 <UINT64_C@plt>
mov    %eax,(%rbx)
mov    $0x38000000,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x4(%rbx)
mov    $0x7fffffff,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x8(%rbx)
mov    $0xffffffff,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0xc(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @fiat_p256_divstep_precomp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @UINT64_C(i32 -1207959552)
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
store i32 %3, i32* %5
%6 = call i32 @UINT64_C(i32 939524096)
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %6, i32* %8
%9 = call i32 @UINT64_C(i32 2147483647)
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 2
store i32 %9, i32* %11
%12 = call i32 @UINT64_C(i32 -1)
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 3
store i32 %12, i32* %14
ret void
}

LLVM IR (-O2):
define void @fiat_p256_divstep_precomp(i32* nocapture writeonly %0) {
%2 = tail call i32 @UINT64_C(i32 -1207959552)
store i32 %2, i32* %0
%3 = tail call i32 @UINT64_C(i32 939524096)
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %4
%5 = tail call i32 @UINT64_C(i32 2147483647)
%6 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %5, i32* %6
%7 = tail call i32 @UINT64_C(i32 -1)
%8 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %7, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _ripremove(void *);
int /*<<< orphan*/ free(void *);
extern void _VDBG_free(void *ptr) {
  if (ptr) {
    ptr = (void *)(((char *)ptr) - 64);
    _ripremove(ptr);
    free(ptr);
  }
}


x86 assembly (clang, -O0):
<_VDBG_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1155 <_VDBG_free+0x35>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffc0,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_ripremove@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_VDBG_free>:
test   %rdi,%rdi
je     113e <_VDBG_free+0x1e>
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffc0,%rbx
mov    %rbx,%rdi
call   1040 <_ripremove@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @_VDBG_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 -64
store i8* %7, i8** %2
%8 = load i8*, i8** %2
%9 = call i32 @_ripremove(i8* %8)
%10 = load i8*, i8** %2
%11 = call i32 @free(i8* %10)
br label %12
12: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @_VDBG_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -64
%5 = tail call i32 @_ripremove(i8* %4)
%6 = tail call i32 @free(i8* %4)
br label %7
7: ; preds = %3, %1
ret void
}
/* Type definitions */
struct aa_tree_iterator {
  int dummy;
};
struct aa_tree {
  int dummy;
};

/* Variables and functions */
struct aa_tree_iterator *aa_tree_iterator_new_both(struct aa_tree const *,
                                                   int /*<<< orphan*/);
struct aa_tree_iterator *
aa_tree_reverse_iterator_new(const struct aa_tree *aat) {
  return aa_tree_iterator_new_both(aat, 0);
}


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

x86 assembly (clang, -O2):
<aa_tree_reverse_iterator_new>:
xor    %esi,%esi
jmp    1030 <aa_tree_iterator_new_both@plt>

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

LLVM IR (-O2):
%struct.aa_tree_iterator = type { i32 }
%struct.aa_tree = type { i32 }
define %struct.aa_tree_iterator* @aa_tree_reverse_iterator_new(%struct.aa_tree* %0) {
%2 = tail call %struct.aa_tree_iterator* @aa_tree_iterator_new_both(%struct.aa_tree* %0, i32 0)
ret %struct.aa_tree_iterator* %2
}
int calc_size(const unsigned char *four_bytes) {
  return (four_bytes[3]) + (four_bytes[2] << 8) + (four_bytes[1] << 16) +
         (four_bytes[0] << 24);
}


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

x86 assembly (clang, -O2):
<calc_size>:
mov    (%rdi),%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @calc_size(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 2
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = add nsw i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = add nsw i32 %12, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 0
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = shl i32 %22, 24
%24 = add nsw i32 %18, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @calc_size(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 16
%14 = or i32 %9, %13
%15 = load i8, i8* %0
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %14, %17
ret i32 %18
}
/* Variables and functions */
int plSetOpt(char *, char *);
int c_plsetopt(char *opt, char *myoptarg) { return (plSetOpt(opt, myoptarg)); }


x86 assembly (clang, -O0):
<c_plsetopt>:
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 <plSetOpt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_plsetopt>:
jmp    1030 <plSetOpt@plt>

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

LLVM IR (-O2):
define i32 @c_plsetopt(i8* %0, i8* %1) {
%3 = tail call i32 @plSetOpt(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
unsigned long clk_get_pll_rate();
unsigned int reg_read_32(unsigned int volatile *);
unsigned long clk_get_cpu_rate(void) {
  unsigned long pll_rate, cpu_rate;
  unsigned int ctrl;
  pll_rate = clk_get_pll_rate();
  ctrl = reg_read_32((volatile unsigned int *)(0xbfe78034));
  cpu_rate = pll_rate / ((ctrl & (0x1f << 20)) >> 20);
  return cpu_rate;
}


x86 assembly (clang, -O0):
<clk_get_cpu_rate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <clk_get_pll_rate@plt>
mov    %rax,-0x8(%rbp)
mov    $0xbfe78034,%edi
call   1030 <reg_read_32@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
and    $0x1f00000,%ecx
shr    $0x14,%ecx
mov    %ecx,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clk_get_cpu_rate>:
push   %rbx
xor    %eax,%eax
call   1040 <clk_get_pll_rate@plt>
mov    %rax,%rbx
mov    $0xbfe78034,%edi
call   1030 <reg_read_32@plt>
mov    %eax,%ecx
shr    $0x14,%ecx
and    $0x1f,%ecx
mov    %rbx,%rax
shr    $0x20,%rax
je     1150 <clk_get_cpu_rate+0x30>
mov    %rbx,%rax
xor    %edx,%edx
div    %rcx
pop    %rbx
ret
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i64 @clk_get_cpu_rate() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32
%4 = call i64 (...) @clk_get_pll_rate()
store i64 %4, i64* %1
%5 = call i32 @reg_read_32(i32* inttoptr (i64 3219619892 to i32*))
store i32 %5, i32* %3
%6 = load i64, i64* %1
%7 = load i32, i32* %3
%8 = and i32 %7, 32505856
%9 = lshr i32 %8, 20
%10 = zext i32 %9 to i64
%11 = udiv i64 %6, %10
store i64 %11, i64* %2
%12 = load i64, i64* %2
ret i64 %12
}

LLVM IR (-O2):
define i64 @clk_get_cpu_rate() {
%1 = tail call i64 (...) @clk_get_pll_rate()
%2 = tail call i32 @reg_read_32(i32* inttoptr (i64 3219619892 to i32*))
%3 = lshr i32 %2, 20
%4 = and i32 %3, 31
%5 = zext i32 %4 to i64
%6 = udiv i64 %1, %5
ret i64 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_SIG;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_SIG_it;
void X509_SIG_free(X509_SIG *a) {
  ASN1_item_free((ASN1_VALUE *)a, &X509_SIG_it);
}


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

x86 assembly (clang, -O2):
<X509_SIG_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

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

LLVM IR (-O2):
@X509_SIG_it = global i32 0
define void @X509_SIG_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @X509_SIG_it)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int b(void) {
  puts("3");
  return 3;
}


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"3\00"
define i32 @b() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 3
}
const char *_Locale_pm_str(struct _Locale_time *__DUMMY_PAR) { return 0; }


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

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

LLVM IR (-O0):
%struct._Locale_time = type opaque
define i8* @_Locale_pm_str(%struct._Locale_time* %0) {
%2 = alloca %struct._Locale_time*
store %struct._Locale_time* %0, %struct._Locale_time** %2
ret i8* null
}

LLVM IR (-O2):
%struct._Locale_time = type opaque
define noalias i8* @_Locale_pm_str(%struct._Locale_time* nocapture readnone %0) {
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_path_home(uint64_t type, const char *suffix, char **path) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_path_home>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    0x2ec8(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_path_home(i32 %0, i8* %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8**
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_path_home(i32 %0, i8* nocapture readnone %1, i8** nocapture readnone %2) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Variables and functions */
int starts_withn(char const *, char const *, size_t const);
size_t strlen(char const *);
int starts_with(const char str[], const char prefix[]) {
  const size_t prefix_len = strlen(prefix);
  return starts_withn(str, prefix, prefix_len);
}


x86 assembly (clang, -O0):
<starts_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <starts_withn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<starts_with>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <starts_withn@plt>

LLVM IR (-O0):
define i32 @starts_with(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = call i32 @starts_withn(i8* %8, i8* %9, i64 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @starts_with(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i32 @starts_withn(i8* %0, i8* %1, i64 %3)
ret i32 %4
}
int isLetter(unsigned char c) {
  if (c >= 'a' && c <= 'z')
    return 1;
  else if (c >= 'A' && c <= 'Z')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isLetter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1130 <isLetter+0x30>
movzbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1130 <isLetter+0x30>
movl   $0x1,-0x4(%rbp)
jmp    115d <isLetter+0x5d>
movzbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1156 <isLetter+0x56>
movzbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1156 <isLetter+0x56>
movl   $0x1,-0x4(%rbp)
jmp    115d <isLetter+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLetter>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isLetter(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %22
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = icmp sge i32 %14, 65
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = zext i8 %17 to i32
%19 = icmp sle i32 %18, 90
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %2
br label %22
21: ; preds = %16, %12
store i32 0, i32* %2
br label %22
22: ; preds = %21, %20, %11
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @isLetter(i8 zeroext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
double test1(double i, double j) {
  if (i >= j)
    if (i <= j)
      goto plif;
    else
      goto plouf;
  else
    goto plif;
plif:
  return 0;
plouf:
  return -1;
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     113c <test1+0x3c>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1137 <test1+0x37>
jmp    1141 <test1+0x41>
jmp    114e <test1+0x4e>
jmp    1141 <test1+0x41>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115b <test1+0x5b>
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
cmpltsd %xmm0,%xmm1
movsd  0xef3(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @test1(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp oge double %6, %7
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load double, double* %4
%11 = load double, double* %5
%12 = fcmp ole double %10, %11
br i1 %12, label %13, label %14
13: ; preds = %9
br label %16
14: ; preds = %9
br label %17
15: ; preds = %2
br label %16
16: ; preds = %15, %13
store double 0.000000e+00, double* %3
br label %18
17: ; preds = %14
store double -1.000000e+00, double* %3
br label %18
18: ; preds = %17, %16
%19 = load double, double* %3
ret double %19
}

LLVM IR (-O2):
define double @test1(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double -1.000000e+00, double 0.000000e+00
ret double %4
}
double f4_sum_pre_double_double_long(double v0, double v1, long v) {
  return v0 + v1 + ((double)(v));
}


x86 assembly (clang, -O0):
<f4_sum_pre_double_double_long>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
cvtsi2sdq -0x18(%rbp),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_sum_pre_double_double_long>:
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %rdi,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f4_sum_pre_double_double_long(double %0, double %1, i64 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i64
store double %0, double* %4
store double %1, double* %5
store i64 %2, i64* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fadd double %7, %8
%10 = load i64, i64* %6
%11 = sitofp i64 %10 to double
%12 = fadd double %9, %11
ret double %12
}

LLVM IR (-O2):
define double @f4_sum_pre_double_double_long(double %0, double %1, i64 %2) {
%4 = fadd double %0, %1
%5 = sitofp i64 %2 to double
%6 = fadd double %4, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ find_track(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
int main() {
  char search_for[80];
  printf("Search for: ");
  fgets(search_for, 80, stdin);
  search_for[strlen(search_for) - 1] = 0;
  find_track(search_for);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    0x2e82(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1060 <fgets@plt>
lea    -0x60(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x60(%rbp,%rax,1)
lea    -0x60(%rbp),%rdi
call   1030 <find_track@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
lea    0xeb4(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
call   1030 <find_track@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Search for: \00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 80, i32 %5)
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%8 = call i32 @strlen(i8* %7)
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %10
store i8 0, i8* %11
%12 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%13 = call i32 @find_track(i8* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Search for: \00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 80, i32 %4)
%6 = call i32 @strlen(i8* %2)
%7 = add nsw i32 %6, -1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 %8
store i8 0, i8* %9
%10 = call i32 @find_track(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gptm_set_timer_32periodic(int /*<<< orphan*/);
void initTimer(void) { gptm_set_timer_32periodic(0); }


x86 assembly (clang, -O0):
<initTimer>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <gptm_set_timer_32periodic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initTimer>:
xor    %edi,%edi
jmp    1030 <gptm_set_timer_32periodic@plt>

LLVM IR (-O0):
define void @initTimer() {
%1 = call i32 @gptm_set_timer_32periodic(i32 0)
ret void
}

LLVM IR (-O2):
define void @initTimer() {
%1 = tail call i32 @gptm_set_timer_32periodic(i32 0)
ret void
}
int Operand_art_decode(unsigned int *valp __attribute__((__unused__))) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @Operand_art_decode(i32* nocapture readnone %0) {
ret i32 0
}
int str_strip(char *str, char *substr, char action) { return 0; }


x86 assembly (clang, -O0):
<str_strip>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @str_strip(i8* nocapture readnone %0, i8* nocapture readnone %1, i8 signext %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ myfoo(int *);
void mallocEscapeFreeUse() {
  int *p = malloc(12);
  myfoo(p);
  free(p);
  myfoo(p);
}


x86 assembly (clang, -O0):
<mallocEscapeFreeUse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <myfoo@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1040 <myfoo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mallocEscapeFreeUse>:
push   %rbx
mov    $0xc,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <myfoo@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <myfoo@plt>

LLVM IR (-O0):
define void @mallocEscapeFreeUse() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @myfoo(i32* %3)
%5 = load i32*, i32** %1
%6 = call i32 @free(i32* %5)
%7 = load i32*, i32** %1
%8 = call i32 @myfoo(i32* %7)
ret void
}

LLVM IR (-O2):
define void @mallocEscapeFreeUse() {
%1 = tail call i32* @malloc(i32 12)
%2 = tail call i32 @myfoo(i32* %1)
%3 = tail call i32 @free(i32* %1)
%4 = tail call i32 @myfoo(i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ svcFree(int, void *);
void freeIobuf(void *ptr) { svcFree(0xCAFF, ptr); }


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

x86 assembly (clang, -O2):
<freeIobuf>:
mov    %rdi,%rsi
mov    $0xcaff,%edi
jmp    1030 <svcFree@plt>

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

LLVM IR (-O2):
define void @freeIobuf(i8* %0) {
%2 = tail call i32 @svcFree(i32 51967, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char const *);
void debugm(const char *debug_msg) {
  printf("%s: %s\n", "[\033[35mDEBUG\033[0m]", debug_msg);
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [17 x i8] c"[\1B[35mDEBUG\1B[0m]\00"
define void @debugm(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
void set_bit(int nr, volatile void *addr) {
  ((unsigned char *)addr)[nr / 8] |= 1UL << (nr % 8);
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    %eax,%ecx
mov    $0x1,%esi
shl    %cl,%rsi
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
or     %rsi,%rdx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %edi,%ecx
lea    0x7(%rcx),%eax
test   %edi,%edi
cmovns %edi,%eax
mov    %eax,%edx
and    $0xfffffff8,%edx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%rdx
sar    $0x3,%eax
cltq
or     %dl,(%rsi,%rax,1)
ret

LLVM IR (-O0):
define void @set_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = srem i32 %5, 8
%7 = zext i32 %6 to i64
%8 = shl i64 1, %7
%9 = load i8*, i8** %4
%10 = load i32, i32* %3
%11 = sdiv i32 %10, 8
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i64
%16 = or i64 %15, %8
%17 = trunc i64 %16 to i8
store i8 %17, i8* %13
ret void
}

LLVM IR (-O2):
define void @set_bit(i32 %0, i8* nocapture %1) {
%3 = srem i32 %0, 8
%4 = zext i32 %3 to i64
%5 = shl nuw i64 1, %4
%6 = sdiv i32 %0, 8
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %1, i64 %7
%9 = load i8, i8* %8
%10 = trunc i64 %5 to i8
%11 = or i8 %9, %10
store i8 %11, i8* %8
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ root;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
unsigned long get_XCrossingEvent_root(void *_p) {
  return (unsigned long)((XCrossingEvent *)_p)->root;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XCrossingEvent_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t maj(uint32_t x, uint32_t y, uint32_t z) {
  ;
  return ((x & y) ^ (x & z) ^ (y & z));
}


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

x86 assembly (clang, -O2):
<maj>:
mov    %edx,%eax
xor    %esi,%eax
and    %edi,%eax
and    %esi,%edx
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @maj(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 = and i32 %7, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = and i32 %10, %11
%13 = xor i32 %9, %12
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = and i32 %14, %15
%17 = xor i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @maj(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %2, %1
%5 = and i32 %4, %0
%6 = and i32 %2, %1
%7 = xor i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *realloc(void *, size_t);
void *xrealloc(void *w, size_t n) {
  void *v;
  v = realloc(w, n);
  if (n != 0 && !v)
    abort();
  return v;
}


x86 assembly (clang, -O0):
<xrealloc>:
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,-0x10(%rbp)
je     115e <xrealloc+0x3e>
cmpq   $0x0,-0x18(%rbp)
jne    115e <xrealloc+0x3e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <realloc@plt>
test   %rbx,%rbx
je     1133 <xrealloc+0x13>
test   %rax,%rax
je     1135 <xrealloc+0x15>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @xrealloc(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 i64, i64* %4
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11, %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i64 %1, 0
%5 = icmp ne i8* %3, null
%6 = or i1 %4, %5
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 10, j = 15, k;
  k = 10 * (i) > (j) ? (i) : (j);
  printf("%d\n", k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0xf,-0xc(%rbp)
imul   $0xa,-0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1145 <main+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114b <main+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint32_t QEIIntStatus(uint32_t ui32Base, bool bMasked) {
  ASSERT((ui32Base == 0x4002C000) || (ui32Base == 0x4002D000));
  if (bMasked) {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000028))));
  } else {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000024))));
  }
}


x86 assembly (clang, -O0):
<QEIIntStatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x4002c000,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     113d <QEIIntStatus+0x2d>
cmpl   $0x4002d000,-0x8(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x0,-0xc(%rbp)
je     1166 <QEIIntStatus+0x56>
mov    -0x8(%rbp),%eax
add    $0x28,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <QEIIntStatus+0x63>
mov    -0x8(%rbp),%eax
add    $0x24,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIIntStatus>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x4002c000,%eax
sete   %dil
call   1030 <ASSERT@plt>
xor    %eax,%eax
test   %ebx,%ebx
setne  %al
lea    0x24(,%rax,4),%eax
movslq %ebp,%rcx
mov    (%rax,%rcx,1),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @QEIIntStatus(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 1073922048
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 1073926144
br label %11
11: ; preds = %8, %2
%12 = phi i1 [ true, %2 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
%14 = call i32 @ASSERT(i32 %13)
%15 = load i32, i32* %5
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %11
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 40
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load volatile i32, i32* %21
store i32 %22, i32* %3
br label %29
23: ; preds = %11
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 36
%26 = sext i32 %25 to i64
%27 = inttoptr i64 %26 to i32*
%28 = load volatile i32, i32* %27
store i32 %28, i32* %3
br label %29
29: ; preds = %23, %17
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
define i32 @QEIIntStatus(i32 %0, i32 %1) {
%3 = and i32 %0, -4097
%4 = icmp eq i32 %3, 1073922048
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp eq i32 %1, 0
%8 = select i1 %7, i32 36, i32 40
%9 = add nsw i32 %8, %0
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ allocateDeviceValueMemory();
int /*<<< orphan*/ getJoystickInformation();
int /*<<< orphan*/ openDeviceStream(char const *);
int startDeviceConnection(const char *devname) {
  if (!openDeviceStream(devname)) {
    return 0;
  }
  if (!getJoystickInformation()) {
    return 0;
  }
  if (!allocateDeviceValueMemory()) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<startDeviceConnection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <openDeviceStream@plt>
cmp    $0x0,%eax
jne    115a <startDeviceConnection+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1199 <startDeviceConnection+0x69>
mov    $0x0,%al
call   1030 <getJoystickInformation@plt>
cmp    $0x0,%eax
jne    1176 <startDeviceConnection+0x46>
movl   $0x0,-0x4(%rbp)
jmp    1199 <startDeviceConnection+0x69>
mov    $0x0,%al
call   1050 <allocateDeviceValueMemory@plt>
cmp    $0x0,%eax
jne    1192 <startDeviceConnection+0x62>
movl   $0x0,-0x4(%rbp)
jmp    1199 <startDeviceConnection+0x69>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startDeviceConnection>:
push   %rbx
call   1040 <openDeviceStream@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     1155 <startDeviceConnection+0x25>
xor    %eax,%eax
call   1030 <getJoystickInformation@plt>
test   %eax,%eax
je     1155 <startDeviceConnection+0x25>
xor    %eax,%eax
call   1050 <allocateDeviceValueMemory@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @startDeviceConnection(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @openDeviceStream(i8* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 0, i32* %2
br label %17
8: ; preds = %1
%9 = call i32 (...) @getJoystickInformation()
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %8
store i32 0, i32* %2
br label %17
12: ; preds = %8
%13 = call i32 (...) @allocateDeviceValueMemory()
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %12
store i32 0, i32* %2
br label %17
16: ; preds = %12
store i32 1, i32* %2
br label %17
17: ; preds = %16, %15, %11, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @startDeviceConnection(i8* %0) {
%2 = tail call i32 @openDeviceStream(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i32 (...) @getJoystickInformation()
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i32 (...) @allocateDeviceValueMemory()
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 0, %1 ], [ 0, %4 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ assert(char *);
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void halt(char *errstr) {
  assert(errstr);
  error(errstr);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<halt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <error@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<halt>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <error@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @halt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @error(i8* %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @halt(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i32 @error(i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
float linear_activation(float output) { return output; }


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

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

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

LLVM IR (-O2):
define float @linear_activation(float returned %0) {
ret float %0
}
int calccs(int code) {
  int len = 1;
  code--;
  while (code >>= 1)
    len++;
  return len;
}


x86 assembly (clang, -O0):
<calccs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1137 <calccs+0x37>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1117 <calccs+0x17>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calccs>:
add    $0xffffffff,%edi
mov    $0x1,%eax
cmp    $0x2,%edi
jb     112c <calccs+0x2c>
mov    $0x1,%eax
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sar    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1120 <calccs+0x20>
ret

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

LLVM IR (-O2):
define i32 @calccs(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = icmp ult i32 %2, 2
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i32 [ %7, %4 ], [ %2, %1 ]
%7 = ashr i32 %6, 1
%8 = add nuw nsw i32 %5, 1
%9 = icmp ult i32 %6, 4
br i1 %9, label %10, label %4
10: ; preds = %4, %1
%11 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ PBEPARAM;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PBEPARAM_it;
PBEPARAM *PBEPARAM_new(void) { return (PBEPARAM *)ASN1_item_new(&PBEPARAM_it); }


x86 assembly (clang, -O0):
<PBEPARAM_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PBEPARAM_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@PBEPARAM_it = global i32 0
define i32* @PBEPARAM_new() {
%1 = call i64 @ASN1_item_new(i32* @PBEPARAM_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@PBEPARAM_it = global i32 0
define i32* @PBEPARAM_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PBEPARAM_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, int);
int /*<<< orphan*/ printid(int);
int MAIN() {
  int i = 8;
  int *p = &i;
  i >>= 2;
  print("i ", *p);
  printid(i);
  return 0;
}


x86 assembly (clang, -O0):
<MAIN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x8,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xeb3(%rip),%rdi
call   1030 <print@plt>
mov    -0x4(%rbp),%edi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAIN>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x2,%esi
call   1030 <print@plt>
mov    $0x2,%edi
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i \00"
define i32 @MAIN() {
%1 = alloca i32
%2 = alloca i32*
store i32 8, i32* %1
store i32* %1, i32** %2
%3 = load i32, i32* %1
%4 = ashr i32 %3, 2
store i32 %4, i32* %1
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %1
%9 = call i32 @printid(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"i \00"
define i32 @MAIN() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 @printid(i32 2)
ret i32 0
}