xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ DrawTextlnw144(char const *, unsigned long, unsigned long);
void drawtextlnw(const char *s, unsigned long cfg, unsigned long cbg) {
  DrawTextlnw144(s, cfg, cbg);
}


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

x86 assembly (clang, -O2):
<drawtextlnw>:
jmp    1030 <DrawTextlnw144@plt>

LLVM IR (-O0):
define void @drawtextlnw(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i32 @DrawTextlnw144(i8* %7, i64 %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @drawtextlnw(i8* %0, i64 %1, i64 %2) {
%4 = tail call i32 @DrawTextlnw144(i8* %0, i64 %1, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t SysTickValueGet(void) {
  return ((*((volatile uint32_t *)(0xE000E018))));
}


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

x86 assembly (clang, -O2):
<SysTickValueGet>:
mov    $0xe000e018,%eax
mov    (%rax),%eax
ret

LLVM IR (-O0):
define i32 @SysTickValueGet() {
%1 = load volatile i32, i32* inttoptr (i64 3758153752 to i32*)
ret i32 %1
}

LLVM IR (-O2):
define i32 @SysTickValueGet() {
%1 = load volatile i32, i32* inttoptr (i64 3758153752 to i32*)
ret i32 %1
}
/* Type definitions */
struct obj {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cintern(char *);
int /*<<< orphan*/ setvar(int /*<<< orphan*/, int /*<<< orphan*/, struct obj *);
void init_sliba_version(void) {
  setvar(
      cintern("*sliba-version*"),
      cintern("$Id: sliba.c,v 1.1 2001/02/03 15:38:49 gjcarret Exp gjcarret $"),
      ((struct obj *)0));
}


x86 assembly (clang, -O0):
<init_sliba_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <cintern@plt>
mov    %eax,-0x4(%rbp)
lea    0xed2(%rip),%rdi
call   1040 <cintern@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <setvar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_sliba_version>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <cintern@plt>
mov    %eax,%ebx
lea    0xeda(%rip),%rdi
call   1040 <cintern@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %edx,%edx
pop    %rbx
jmp    1030 <setvar@plt>

LLVM IR (-O0):
%struct.obj = type { i32 }
@.str = [16 x i8] c"*sliba-version*\00"
@.str.1 = [63 x i8] c"$Id: sliba.c,v 1.1 2001/02/03 15:38:49 gjcarret Exp gjcarret $\00"
define void @init_sliba_version() {
%1 = call i32 @cintern(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @cintern(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @setvar(i32 %1, i32 %2, %struct.obj* null)
ret void
}

LLVM IR (-O2):
%struct.obj = type { i32 }
@.str = [16 x i8] c"*sliba-version*\00"
@.str.1 = [63 x i8] c"$Id: sliba.c,v 1.1 2001/02/03 15:38:49 gjcarret Exp gjcarret $\00"
define void @init_sliba_version() {
%1 = tail call i32 @cintern(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @cintern(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @setvar(i32 %1, i32 %2, %struct.obj* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ base_test();
int /*<<< orphan*/ report_end();
int /*<<< orphan*/ report_start();
main() {
  report_start();
  base_test();
  report_end();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <report_start@plt>
mov    $0x0,%al
call   1040 <base_test@plt>
mov    $0x0,%al
call   1030 <report_end@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @report_start()
%2 = call i32 (...) @base_test()
%3 = call i32 (...) @report_end()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @report_start()
%2 = tail call i32 (...) @base_test()
%3 = tail call i32 (...) @report_end()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cmdline_clear();
int /*<<< orphan*/ cmdline_reset();
void cmdline_init(void) {
  cmdline_clear();
  cmdline_reset();
}


x86 assembly (clang, -O0):
<cmdline_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cmdline_clear@plt>
mov    $0x0,%al
call   1040 <cmdline_reset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdline_init>:
push   %rax
xor    %eax,%eax
call   1030 <cmdline_clear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <cmdline_reset@plt>

LLVM IR (-O0):
define void @cmdline_init() {
%1 = call i32 (...) @cmdline_clear()
%2 = call i32 (...) @cmdline_reset()
ret void
}

LLVM IR (-O2):
define void @cmdline_init() {
%1 = tail call i32 (...) @cmdline_clear()
%2 = tail call i32 (...) @cmdline_reset()
ret void
}
int test_imm_CAint16_mem(short *val) {
  return ((*val) & (-0xCA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CAint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff36,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CAint16_mem>:
movzwl (%rdi),%eax
test   $0xff36,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_CAint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -202
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fs_univ_freeinodes(int /*<<< orphan*/, int,
                                      int /*<<< orphan*/);
uint8_t fs_mr_freeinodes(uint32_t ts, uint32_t freeinodes) {
  return fs_univ_freeinodes(ts, 0x80, freeinodes);
}


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

x86 assembly (clang, -O2):
<fs_mr_freeinodes>:
mov    %esi,%edx
mov    $0x80,%esi
jmp    1030 <fs_univ_freeinodes@plt>

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

LLVM IR (-O2):
define i32 @fs_mr_freeinodes(i32 %0, i32 %1) {
%3 = tail call i32 @fs_univ_freeinodes(i32 %0, i32 128, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _HibernateWriteComplete();
void HibernateIntDisable(uint32_t ui32IntFlags) {

  ;
  (*((volatile uint32_t *)(0x400FC014))) &= ~ui32IntFlags;
  _HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateIntDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    $0x400fc014,%ecx
mov    (%rcx),%ecx
and    %eax,%ecx
mov    $0x400fc014,%eax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <_HibernateWriteComplete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateIntDisable>:
mov    %edi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
not    %eax
and    %eax,0x400fc014
xor    %eax,%eax
jmp    1030 <_HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateIntDisable(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = xor i32 %3, -1
%5 = load volatile i32, i32* inttoptr (i64 1074774036 to i32*)
%6 = and i32 %5, %4
store volatile i32 %6, i32* inttoptr (i64 1074774036 to i32*)
%7 = call i32 (...) @_HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateIntDisable(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = xor i32 %3, -1
%5 = load volatile i32, i32* inttoptr (i64 1074774036 to i32*)
%6 = and i32 %5, %4
store volatile i32 %6, i32* inttoptr (i64 1074774036 to i32*)
%7 = tail call i32 (...) @_HibernateWriteComplete()
ret void
}
unsigned int AT91F_AIC_SetExceptionVector(unsigned int *pVector,
                                          void (*Handler)()) {
  unsigned int oldVector = *pVector;
  if ((unsigned int)Handler == (unsigned int)((void (*)())0xE51FFF20))
    *pVector = (unsigned int)((void (*)())0xE51FFF20);
  else
    *pVector =
        (((((unsigned int)Handler) - ((unsigned int)pVector) - 0x8) >> 2) &
         0x00FFFFFF) |
        0xEA000000;
  return oldVector;
}


x86 assembly (clang, -O0):
<AT91F_AIC_SetExceptionVector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xe51fff20,%ecx
cmp    %ecx,%eax
jne    1136 <AT91F_AIC_SetExceptionVector+0x36>
mov    -0x8(%rbp),%rax
mov    $0xe51fff20,%ecx
mov    %ecx,(%rax)
jmp    115a <AT91F_AIC_SetExceptionVector+0x5a>
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
sub    %eax,%ecx
sub    $0x8,%ecx
shr    $0x2,%ecx
and    $0xffffff,%ecx
or     $0xea000000,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AT91F_AIC_SetExceptionVector>:
mov    (%rdi),%eax
mov    $0xe51fff20,%ecx
cmp    $0xe51fff20,%esi
je     1128 <AT91F_AIC_SetExceptionVector+0x28>
sub    %edi,%esi
add    $0x3fffff8,%esi
shr    $0x2,%esi
and    $0xffffff,%esi
or     $0xea000000,%esi
mov    %esi,%ecx
mov    %ecx,(%rdi)
ret

LLVM IR (-O0):
define i32 @AT91F_AIC_SetExceptionVector(i32* %0, void (...)* %1) {
%3 = alloca i32*
%4 = alloca void (...)*
%5 = alloca i32
store i32* %0, i32** %3
store void (...)* %1, void (...)** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load void (...)*, void (...)** %4
%9 = ptrtoint void (...)* %8 to i32
%10 = icmp eq i32 %9, ptrtoint (void (...)* inttoptr (i64 3844079392 to void (...)*) to i32)
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32*, i32** %3
store i32 ptrtoint (void (...)* inttoptr (i64 3844079392 to void (...)*) to i32), i32* %12
br label %24
13: ; preds = %2
%14 = load void (...)*, void (...)** %4
%15 = ptrtoint void (...)* %14 to i32
%16 = load i32*, i32** %3
%17 = ptrtoint i32* %16 to i32
%18 = sub i32 %15, %17
%19 = sub i32 %18, 8
%20 = lshr i32 %19, 2
%21 = and i32 %20, 16777215
%22 = or i32 %21, -369098752
%23 = load i32*, i32** %3
store i32 %22, i32* %23
br label %24
24: ; preds = %13, %11
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @AT91F_AIC_SetExceptionVector(i32* %0, void (...)* %1) {
%3 = load i32, i32* %0
%4 = ptrtoint void (...)* %1 to i64
%5 = trunc i64 %4 to i32
%6 = icmp eq i32 %5, -450887904
br i1 %6, label %15, label %7
7: ; preds = %2
%8 = ptrtoint i32* %0 to i64
%9 = trunc i64 %8 to i32
%10 = sub i32 67108856, %9
%11 = add i32 %10, %5
%12 = lshr i32 %11, 2
%13 = and i32 %12, 16777215
%14 = or i32 %13, -369098752
br label %15
15: ; preds = %2, %7
%16 = phi i32 [ %14, %7 ], [ -450887904, %2 ]
store i32 %16, i32* %0
ret i32 %3
}
int ft_isblank(int c) { return (((c == 32) || (c == 9) || (c == 10)) ? 1 : 0); }


x86 assembly (clang, -O0):
<ft_isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <ft_isblank+0x2f>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <ft_isblank+0x2f>
cmpl   $0xa,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isblank>:
mov    $0x1,%eax
cmp    $0x9,%edi
je     110f <ft_isblank+0xf>
cmp    $0x20,%edi
jne    1110 <ft_isblank+0x10>
ret
xor    %eax,%eax
cmp    $0xa,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @ft_isblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br label %11
11: ; preds = %8, %5, %1
%12 = phi i1 [ true, %5 ], [ true, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
ret i32 %14
}

LLVM IR (-O2):
define i32 @ft_isblank(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 10
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
int test_imm_C7uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xC7 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C7uint64_lowword_reg>:
test   $0xc7,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C7uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 199
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int compar(const void *p1, const void *p2) {
  int *i1, *i2;
  i1 = (int *)p1;
  i2 = (int *)p2;
  return *i1 - *i2;
}


x86 assembly (clang, -O0):
<compar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compar>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @compar(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @compar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
sreplace(f, n) int f;
int n;
{ return (replaces(0, f, n)); }


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

x86 assembly (clang, -O2):
<sreplace>:
mov    %esi,%edx
mov    %edi,%esi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <replaces@plt>

LLVM IR (-O0):
define i32 @sreplace(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @replaces to i32 (i32, i32, i32, ...)*)(i32 0, i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @sreplace(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @replaces to i32 (i32, i32, i32, ...)*)(i32 0, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ putpwd(char *);
void freePassword(char *password) { putpwd(password); }


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

x86 assembly (clang, -O2):
<freePassword>:
jmp    1030 <putpwd@plt>

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

LLVM IR (-O2):
define void @freePassword(i8* %0) {
%2 = tail call i32 @putpwd(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t hash_id(uint32_t a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @hash_id(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int optimal(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, int, int);
void main() {
  int a[] = {8, 15, 3, 7};
  int len = sizeof(a) / sizeof(a[0]);
  int res = optimal(a, 0, len - 1);
  printf(" Max value user can get by playing first %d  %d", res, len);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1040 <optimal@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1040 <optimal@plt>
lea    0xecb(%rip),%rdi
mov    %eax,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [4 x i32] [i32 8, i32 15, i32 3, i32 7]
@.str = [48 x i8] c" Max value user can get by playing first %d %d\00"
define void @main() {
%1 = alloca [4 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [4 x i32]* %1 to i8*
store i32 4, i32* %2
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%6 = load i32, i32* %2
%7 = sub nsw i32 %6, 1
%8 = call i32 @optimal(i32* %5, i32 0, i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@__const.main.a = [4 x i32] [i32 8, i32 15, i32 3, i32 7]
@.str = [48 x i8] c" Max value user can get by playing first %d %d\00"
define void @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @optimal(i32* %3, i32 0, i32 3)
%5 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %4, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void hfs_panic(const char *hfs_panicString) {
  fprintf(stderr, "%s\n", hfs_panicString);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @hfs_panic(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
FILE *file___new_NativeFile_io_open_read___impl(char *path) {
  return fopen(path, "r");
}


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

x86 assembly (clang, -O2):
<file___new_NativeFile_io_open_read___impl>:
lea    0xee9(%rip),%rsi
jmp    1030 <fopen@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32* @file___new_NativeFile_io_open_read___impl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @fopen(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32* %4
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define noalias i32* @file___new_NativeFile_io_open_read___impl(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
float DotProduct(float v0[3], float v1[3]) {
  float dot;
  dot = v0[0] * v1[0] + v0[1] * v1[1] + v0[2] * v1[2];
  return dot;
}


x86 assembly (clang, -O0):
<DotProduct>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<DotProduct>:
movss  0x4(%rdi),%xmm0
mulss  0x4(%rsi),%xmm0
movss  (%rdi),%xmm1
mulss  (%rsi),%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  0x8(%rsi),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @DotProduct(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %3
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %4
%10 = getelementptr inbounds float, float* %9, i64 0
%11 = load float, float* %10
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = load float*, float** %4
%16 = getelementptr inbounds float, float* %15, i64 1
%17 = load float, float* %16
%18 = fmul float %14, %17
%19 = call float @llvm.fmuladd.f32(float %8, float %11, float %18)
%20 = load float*, float** %3
%21 = getelementptr inbounds float, float* %20, i64 2
%22 = load float, float* %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 2
%25 = load float, float* %24
%26 = call float @llvm.fmuladd.f32(float %22, float %25, float %19)
store float %26, float* %5
%27 = load float, float* %5
ret float %27
}

LLVM IR (-O2):
define float @DotProduct(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
ret float %15
}
void noaction(char *line) {}


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

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

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

LLVM IR (-O2):
define void @noaction(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ heartbeat_forever();
int /*<<< orphan*/ init_led_output();
int c_entry(void) {
  init_led_output();
  heartbeat_forever();
  return 0;
}


x86 assembly (clang, -O0):
<c_entry>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <init_led_output@plt>
mov    $0x0,%al
call   1030 <heartbeat_forever@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @c_entry() {
%1 = call i32 (...) @init_led_output()
%2 = call i32 (...) @heartbeat_forever()
ret i32 0
}

LLVM IR (-O2):
define i32 @c_entry() {
%1 = tail call i32 (...) @init_led_output()
%2 = tail call i32 (...) @heartbeat_forever()
ret i32 0
}
/* Variables and functions */
int strcmp(char *, char *);
int mystrcmp(char *s1, char *s2) {
  if (s1 == NULL && s2 == NULL)
    return 0;
  if (s1 == NULL)
    return -1;
  if (s2 == NULL)
    return 1;
  return strcmp(s1, s2);
}


x86 assembly (clang, -O0):
<mystrcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1142 <mystrcmp+0x32>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <mystrcmp+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1180 <mystrcmp+0x70>
cmpq   $0x0,-0x10(%rbp)
jne    1159 <mystrcmp+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <mystrcmp+0x70>
cmpq   $0x0,-0x18(%rbp)
jne    1170 <mystrcmp+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1180 <mystrcmp+0x70>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrcmp>:
xor    %ecx,%ecx
mov    %rdi,%rax
or     %rsi,%rax
setne  %cl
neg    %ecx
mov    $0x1,%eax
test   %rdi,%rdi
cmove  %ecx,%eax
je     1134 <mystrcmp+0x24>
test   %rsi,%rsi
je     1134 <mystrcmp+0x24>
jmp    1030 <strcmp@plt>
ret

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

LLVM IR (-O2):
define i32 @mystrcmp(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = and i1 %3, %4
%6 = xor i1 %5, true
%7 = sext i1 %6 to i32
%8 = or i1 %3, %4
%9 = select i1 %3, i32 %7, i32 1
br i1 %8, label %12, label %10
10: ; preds = %2
%11 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %12
12: ; preds = %2, %10
%13 = phi i32 [ %11, %10 ], [ %9, %2 ]
ret i32 %13
}
/* Variables and functions */
double log10(double);
double kx_log10(register double _x_) { return log10(_x_); }


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

x86 assembly (clang, -O2):
<kx_log10>:
jmp    1030 <log10@plt>

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

LLVM IR (-O2):
define double @kx_log10(double %0) {
%2 = tail call double @log10(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int);
int /*<<< orphan*/ output_byte(int);
void emit_fsub(int r) {
  assem_debug("fsub st%d", r);
  output_byte(0xd8);
  output_byte(0xe0 + r);
}


x86 assembly (clang, -O0):
<emit_fsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd8,%edi
call   1040 <output_byte@plt>
mov    -0x4(%rbp),%edi
add    $0xe0,%edi
call   1040 <output_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fsub>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <assem_debug@plt>
mov    $0xd8,%edi
call   1040 <output_byte@plt>
add    $0xe0,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <output_byte@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"fsub st%d\00"
define void @emit_fsub(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @assem_debug(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @output_byte(i32 216)
%6 = load i32, i32* %2
%7 = add nsw i32 224, %6
%8 = call i32 @output_byte(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"fsub st%d\00"
define void @emit_fsub(i32 %0) {
%2 = tail call i32 @assem_debug(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @output_byte(i32 216)
%4 = add nsw i32 %0, 224
%5 = tail call i32 @output_byte(i32 %4)
ret void
}
int GetShareCount(void *pMem) { return *(int *)((char *)(pMem)-4); }


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

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

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

LLVM IR (-O2):
define i32 @GetShareCount(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -4
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
void RTStrSpaceEnumerate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrSpaceEnumerate() {
ret void
}
/* Variables and functions */
double log(double);
double hl_math_log(double a) { return log(a); }


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

x86 assembly (clang, -O2):
<hl_math_log>:
jmp    1030 <log@plt>

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

LLVM IR (-O2):
define double @hl_math_log(double %0) {
%2 = tail call double @log(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_secp256k1_add(uintptr_t, uintptr_t, uintptr_t);
void fiat_secp256k1_add(uint64_t out1[4], const uint64_t arg1[4],
                        const uint64_t arg2[4]) {
  internal_fiat_secp256k1_add((uintptr_t)out1, (uintptr_t)arg1,
                              (uintptr_t)arg2);
}


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

x86 assembly (clang, -O2):
<fiat_secp256k1_add>:
jmp    1030 <internal_fiat_secp256k1_add@plt>

LLVM IR (-O0):
define void @fiat_secp256k1_add(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 = ptrtoint i32* %7 to i64
%9 = load i32*, i32** %5
%10 = ptrtoint i32* %9 to i64
%11 = load i32*, i32** %6
%12 = ptrtoint i32* %11 to i64
%13 = call i32 @internal_fiat_secp256k1_add(i64 %8, i64 %10, i64 %12)
ret void
}

LLVM IR (-O2):
define void @fiat_secp256k1_add(i32* %0, i32* %1, i32* %2) {
%4 = ptrtoint i32* %0 to i64
%5 = ptrtoint i32* %1 to i64
%6 = ptrtoint i32* %2 to i64
%7 = tail call i32 @internal_fiat_secp256k1_add(i64 %4, i64 %5, i64 %6)
ret void
}
/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/ *);
int IDK_Timer(long *time_count, long seconds) {
  long _time_ = ((unsigned)time(NULL) - (*time_count));
  (*time_count) = (unsigned)time(NULL);
  return (_time_ >= seconds);
}


x86 assembly (clang, -O0):
<IDK_Timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,%eax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IDK_Timer>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,%ebx
sub    (%r15),%rbx
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,%eax
mov    %rax,(%r15)
xor    %eax,%eax
cmp    %r14,%rbx
setge  %al
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @IDK_Timer(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%6 = call i64 @time(i32* null)
%7 = trunc i64 %6 to i32
%8 = zext i32 %7 to i64
%9 = load i64*, i64** %3
%10 = load i64, i64* %9
%11 = sub nsw i64 %8, %10
store i64 %11, i64* %5
%12 = call i64 @time(i32* null)
%13 = trunc i64 %12 to i32
%14 = zext i32 %13 to i64
%15 = load i64*, i64** %3
store i64 %14, i64* %15
%16 = load i64, i64* %5
%17 = load i64, i64* %4
%18 = icmp sge i64 %16, %17
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @IDK_Timer(i64* nocapture %0, i64 %1) {
%3 = tail call i64 @time(i32* null)
%4 = and i64 %3, 4294967295
%5 = load i64, i64* %0
%6 = sub nsw i64 %4, %5
%7 = tail call i64 @time(i32* null)
%8 = and i64 %7, 4294967295
store i64 %8, i64* %0
%9 = icmp sge i64 %6, %1
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
struct ctrl_command {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ send_error(char *);
void cmd_set_crypt_out_cipher(struct ctrl_command *cmd) {
  send_error("can't set encryption cipher - no OpenSSL support!");
}


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

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

LLVM IR (-O0):
%struct.ctrl_command = type { i32 }
@.str = [50 x i8] c"can't set encryption cipher - no OpenSSL support!\00"
define void @cmd_set_crypt_out_cipher(%struct.ctrl_command* %0) {
%2 = alloca %struct.ctrl_command*
store %struct.ctrl_command* %0, %struct.ctrl_command** %2
%3 = call i32 @send_error(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.ctrl_command = type { i32 }
@.str = [50 x i8] c"can't set encryption cipher - no OpenSSL support!\00"
define void @cmd_set_crypt_out_cipher(%struct.ctrl_command* nocapture readnone %0) {
%2 = tail call i32 @send_error(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initBaseClasses();
int /*<<< orphan*/ initializeStuff();
int main() {
  initBaseClasses();
  initializeStuff();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initBaseClasses()
%2 = tail call i32 (...) @initializeStuff()
ret i32 0
}
int main() {
  int n;
  for (n = 4; n <= 100; n += 2) {
    do {
      if (!(gotbaha(n) == 1))
        asm volatile(".byte 0xd6" : : "a"(1));
    } while (0);
  }
  do {
    if (!(n == 102))
      asm volatile(".byte 0xd6" : : "a"(1));
  } while (0);
  asm volatile(".byte 0xd6" : : "a"(0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1166 <main+0x56>
jmp    1135 <main+0x25>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <gotbaha@plt>
cmp    $0x1,%eax
je     114e <main+0x3e>
mov    $0x1,%eax
(bad)
jmp    1153 <main+0x43>
jmp    1158 <main+0x48>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
jmp    116b <main+0x5b>
cmpl   $0x66,-0x8(%rbp)
je     117b <main+0x6b>
mov    $0x1,%eax
(bad)
jmp    1180 <main+0x70>
xor    %eax,%eax
(bad)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2,%ebx
jmp    1125 <main+0x15>
nopl   0x0(%rax,%rax,1)
cmp    $0x63,%ebx
jae    113e <main+0x2e>
add    $0x2,%ebx
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <gotbaha@plt>
cmp    $0x1,%eax
je     1120 <main+0x10>
mov    $0x1,%eax
(bad)
jmp    1120 <main+0x10>
xor    %eax,%eax
(bad)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %6
%2 = phi i32 [ 4, %0 ], [ %7, %6 ]
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @gotbaha to i32 (i32, ...)*)(i32 %2)
%4 = icmp eq i32 %3, 1
br i1 %4, label %6, label %5
5: ; preds = %1
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
br label %6
6: ; preds = %1, %5
%7 = add nuw nsw i32 %2, 2
%8 = icmp ult i32 %2, 99
br i1 %8, label %1, label %9
9: ; preds = %6
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ printw(char *);
void cprint(int i, char *str) {
  attron(COLOR_PAIR(i));
  printw(str);
  attroff(COLOR_PAIR(i));
}


x86 assembly (clang, -O0):
<cprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
mov    -0x10(%rbp),%rdi
call   1050 <printw@plt>
mov    -0x4(%rbp),%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprint>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
mov    %rbx,%rdi
call   1050 <printw@plt>
mov    %ebp,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <attroff@plt>

LLVM IR (-O0):
define void @cprint(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 = call i32 @COLOR_PAIR(i32 %5)
%7 = call i32 @attron(i32 %6)
%8 = load i8*, i8** %4
%9 = call i32 @printw(i8* %8)
%10 = load i32, i32* %3
%11 = call i32 @COLOR_PAIR(i32 %10)
%12 = call i32 @attroff(i32 %11)
ret void
}

LLVM IR (-O2):
define void @cprint(i32 %0, i8* %1) {
%3 = tail call i32 @COLOR_PAIR(i32 %0)
%4 = tail call i32 @attron(i32 %3)
%5 = tail call i32 @printw(i8* %1)
%6 = tail call i32 @COLOR_PAIR(i32 %0)
%7 = tail call i32 @attroff(i32 %6)
ret void
}
/* Variables and functions */
int strlen(char *);
bool isPalindrome(char *input) {
  if (strlen(input) < 2) {
    return 1;
  } else {
  }
  return 1;
}


x86 assembly (clang, -O0):
<isPalindrome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
jge    113a <isPalindrome+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1146 <isPalindrome+0x36>
jmp    113f <isPalindrome+0x2f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPalindrome>:
push   %rax
call   1030 <strlen@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @isPalindrome(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void MemFree(void *p) {
  free(p);
  p = NULL;
}


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

x86 assembly (clang, -O2):
<MemFree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @MemFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ largest(int, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c;
  printf("Enter three numbers: ");
  scanf("%d %d %d", &a, &b, &c);
  largest(a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <largest@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
call   1040 <largest@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Enter three numbers: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @largest(i32 %7, i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Enter three numbers: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @largest(i32 %9, i32 %10, i32 %11)
ret i32 0
}
void __attribute__((weak)) EXTI7_Callback(void) {}


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

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

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

LLVM IR (-O2):
define weak void @EXTI7_Callback() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void halt(void) {
  printf("bootstrap halted\n");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<halt>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
jmp    1120 <halt+0x10>

x86 assembly (clang, -O2):
<halt>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <halt+0x10>

LLVM IR (-O0):
@.str = [18 x i8] c"bootstrap halted\0A\00"
define void @halt() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@str = [17 x i8] c"bootstrap halted\00"
define void @halt() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}