xunge/DecIR huggingface dataset:
double CtoR(double C) {
  double r = (1.8 * C + 32) + 459.69;
  return r;
}


x86 assembly (clang, -O0):
<CtoR>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeee(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CtoR>:
mulsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @CtoR(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double 1.800000e+00, double %4, double 3.200000e+01)
%6 = fadd double %5, 4.596900e+02
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @CtoR(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 1.800000e+00, double 3.200000e+01)
%3 = fadd double %2, 4.596900e+02
ret double %3
}
/* Variables and functions */
int inportb(unsigned short);
int /*<<< orphan*/ outportb(unsigned short, unsigned char);
void irq_clear_mask(unsigned char irq) {
  unsigned short port;
  unsigned char value;
  if (irq < 8)
    port = 0x21;
  else {
    port = 0xA1;
    irq -= 8;
  }
  value = inportb(port) & ~(1 << irq);
  outportb(port, value);
}


x86 assembly (clang, -O0):
<irq_clear_mask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x8,%eax
jge    1146 <irq_clear_mask+0x26>
movw   $0x21,-0x4(%rbp)
jmp    1156 <irq_clear_mask+0x36>
movw   $0xa1,-0x4(%rbp)
movzbl -0x1(%rbp),%eax
sub    $0x8,%eax
mov    %al,-0x1(%rbp)
movzwl -0x4(%rbp),%edi
call   1030 <inportb@plt>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%ax
movzwl %ax,%edi
movzbl -0x5(%rbp),%esi
call   1040 <outportb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_clear_mask>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
mov    %edi,%eax
sub    $0x8,%al
movzbl %al,%ebp
cmovb  %edi,%ebp
setae  %bl
shl    $0x7,%ebx
or     $0x21,%ebx
mov    %ebx,%edi
call   1030 <inportb@plt>
btr    %ebp,%eax
movzbl %al,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <outportb@plt>

LLVM IR (-O0):
define void @irq_clear_mask(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i16
%4 = alloca i8
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = icmp slt i32 %6, 8
br i1 %7, label %8, label %9
8: ; preds = %1
store i16 33, i16* %3
br label %14
9: ; preds = %1
store i16 161, i16* %3
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = sub nsw i32 %11, 8
%13 = trunc i32 %12 to i8
store i8 %13, i8* %2
br label %14
14: ; preds = %9, %8
%15 = load i16, i16* %3
%16 = call i32 @inportb(i16 zeroext %15)
%17 = load i8, i8* %2
%18 = zext i8 %17 to i32
%19 = shl i32 1, %18
%20 = xor i32 %19, -1
%21 = and i32 %16, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %4
%23 = load i16, i16* %3
%24 = load i8, i8* %4
%25 = call i32 @outportb(i16 zeroext %23, i8 zeroext %24)
ret void
}

LLVM IR (-O2):
define void @irq_clear_mask(i8 zeroext %0) {
%2 = icmp ult i8 %0, 8
%3 = add i8 %0, -8
%4 = select i1 %2, i16 33, i16 161
%5 = select i1 %2, i8 %0, i8 %3
%6 = tail call i32 @inportb(i16 zeroext %4)
%7 = zext i8 %5 to i32
%8 = shl nuw i32 1, %7
%9 = xor i32 %8, -1
%10 = and i32 %6, %9
%11 = trunc i32 %10 to i8
%12 = tail call i32 @outportb(i16 zeroext %4, i8 zeroext %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_cs_creset(int /*<<< orphan*/, int /*<<< orphan*/);
void sram_reset() { set_cs_creset(0, 0); }


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

x86 assembly (clang, -O2):
<sram_reset>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <set_cs_creset@plt>

LLVM IR (-O0):
define void @sram_reset() {
%1 = call i32 @set_cs_creset(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @sram_reset() {
%1 = tail call i32 @set_cs_creset(i32 0, i32 0)
ret void
}
/* Variables and functions */
int errno;
int journal_open_write(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int fd = journal_open_write("./journal");
  if (fd == -1) {
    printf("An error occured. Shutting down...");
    return errno;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1040 <journal_open_write@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    116c <main+0x4c>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <main+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <journal_open_write@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1138 <main+0x18>
pop    %rcx
ret
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"./journal\00"
@.str.1 = [35 x i8] c"An error occured. Shutting down...\00"
@errno = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @journal_open_write(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @errno
store i32 %12, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [10 x i8] c"./journal\00"
@.str.1 = [35 x i8] c"An error occured. Shutting down...\00"
@errno = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @journal_open_write(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @errno
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %7, %5 ], [ 0, %2 ]
ret i32 %9
}
void g_date_days_between() {}


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

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

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

LLVM IR (-O2):
define void @g_date_days_between() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_err(char *);
void sdram_no_memory(void) {
  print_err("No memory!!\n");
  while (1)
    ;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"No memory!!\0A\00"
define void @sdram_no_memory() {
%1 = call i32 @print_err(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [13 x i8] c"No memory!!\0A\00"
define void @sdram_no_memory() {
%1 = tail call i32 @print_err(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ ExecCfg(char *);
void SIO1configure() { ExecCfg("configure"); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"configure\00"
define void @SIO1configure() {
%1 = tail call i32 @ExecCfg(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
int fun607() { return 607; }


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

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

LLVM IR (-O0):
define i32 @fun607() {
ret i32 607
}

LLVM IR (-O2):
define i32 @fun607() {
ret i32 607
}
/* Variables and functions */
scalar_t__ bitarrayTest();
scalar_t__ planeIntersectTest();
int /*<<< orphan*/ puts(char *);
void testSuite() {
  if (bitarrayTest())
    puts("bitarrayTest failed.");
  if (planeIntersectTest())
    puts("planeIntersectTest failed");
}


x86 assembly (clang, -O0):
<testSuite>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <bitarrayTest@plt>
cmp    $0x0,%rax
je     1151 <testSuite+0x21>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1040 <planeIntersectTest@plt>
cmp    $0x0,%rax
je     116e <testSuite+0x3e>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testSuite>:
push   %rax
xor    %eax,%eax
call   1050 <bitarrayTest@plt>
test   %rax,%rax
je     1149 <testSuite+0x19>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <planeIntersectTest@plt>
test   %rax,%rax
je     1162 <testSuite+0x32>
lea    0xeb9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [21 x i8] c"bitarrayTest failed.\00"
@.str.1 = [26 x i8] c"planeIntersectTest failed\00"
define void @testSuite() {
%1 = call i64 (...) @bitarrayTest()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = call i64 (...) @planeIntersectTest()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"bitarrayTest failed.\00"
@.str.1 = [26 x i8] c"planeIntersectTest failed\00"
define void @testSuite() {
%1 = tail call i64 (...) @bitarrayTest()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i64 (...) @planeIntersectTest()
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void fb_show_cursor(void) {
  printf("\033[10000D\033[?25h");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<fb_show_cursor>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_show_cursor>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"\1B[10000D\1B[?25h\00"
@stdout = global i32 0
define void @fb_show_cursor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"\1B[10000D\1B[?25h\00"
@stdout = global i32 0
define void @fb_show_cursor() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
void gtk_plug_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_plug_get_type() {
ret void
}
void cpureset(void) {}


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

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

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

LLVM IR (-O2):
define void @cpureset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
void print(const int *code, const unsigned n) {
  unsigned i;
  for (i = 0; i < n; i++)
    printf("%4d", code[i]);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1156 <print+0x46>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,4),%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1145 <print+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%4d\00"
define void @print(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%4d\00"
define void @print(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putendl_fd(char *, int);
int ft_sh_error(char *error) {
  ft_putendl_fd(error, 2);
  return (0);
}


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

x86 assembly (clang, -O2):
<ft_sh_error>:
push   %rax
mov    $0x2,%esi
call   1030 <ft_putendl_fd@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ft_sh_error(i8* %0) {
%2 = tail call i32 @ft_putendl_fd(i8* %0, i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ primes(int);
int main() {
  primes(100);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1030 <primes@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @primes(i32 100)
ret i32 0
}
/* Variables and functions */
int tolower(int);
int toLowerCase(int c) { return (tolower(c)); }


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

x86 assembly (clang, -O2):
<toLowerCase>:
jmp    1030 <tolower@plt>

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

LLVM IR (-O2):
define i32 @toLowerCase(i32 %0) {
%2 = tail call i32 @tolower(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ hw_console_init();
void hw_board_init() { hw_console_init(); }


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

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

LLVM IR (-O0):
define void @hw_board_init() {
%1 = call i32 (...) @hw_console_init()
ret void
}

LLVM IR (-O2):
define void @hw_board_init() {
%1 = tail call i32 (...) @hw_console_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello, world");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello, world\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello, world\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int main() {
  struct a {
    int x;
    int y;
    char z;
  };
  struct a k;
  struct a *p;
  p = &k;
  p->z = 'q';
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x71,0x8(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.a = type { i32, i32, i8 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.a
%3 = alloca %struct.a*
store i32 0, i32* %1
store %struct.a* %2, %struct.a** %3
%4 = load %struct.a*, %struct.a** %3
%5 = getelementptr inbounds %struct.a, %struct.a* %4, i32 0, i32 2
store i8 113, i8* %5
ret i32 0
}

LLVM IR (-O2):
%struct.a = type { i32, i32, i8 }
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *const, unsigned char *, unsigned int);
unsigned int pcm_dummy_read(const void *const device_st,
                            unsigned char *const buffer, unsigned int length) {
  memcpy(buffer, (unsigned char *)device_st, length);
  return 0;
}


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

x86 assembly (clang, -O2):
<pcm_dummy_read>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @pcm_dummy_read(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %1, i8* %0, i32 %2)
ret i32 0
}
char *index(s, c)
register char *s, c;
{
  while (*s)
    if (*s++ == c)
      return --s;
  return (char *)0;
}


x86 assembly (clang, -O0):
<index>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1153 <index+0x53>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114e <index+0x4e>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
jmp    115b <index+0x5b>
jmp    110e <index+0xe>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<index>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
test   %cl,%cl
je     1122 <index+0x22>
add    $0x1,%rax
cmp    %sil,%cl
jne    1110 <index+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @index(i8* %0, i8 signext %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %0, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = icmp eq i8 %5, %1
br i1 %9, label %10, label %3
10: ; preds = %3, %7
%11 = phi i8* [ %4, %7 ], [ null, %3 ]
ret i8* %11
}
/* Variables and functions */
int strlen(char const *);
const char *bassname(const char *path) {
  const char *p = path + strlen(path);
  while (p >= path && (*p) != '/')
    --p;
  return p + 1;
}


x86 assembly (clang, -O0):
<bassname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x19(%rbp)
jb     1160 <bassname+0x50>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1170 <bassname+0x60>
jmp    1181 <bassname+0x71>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    113d <bassname+0x2d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bassname>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
lea    (%rbx,%rcx,1),%rax
test   %ecx,%ecx
js     113e <bassname+0x2e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x2f,(%rax)
je     113e <bassname+0x2e>
add    $0xffffffffffffffff,%rax
cmp    %rbx,%rax
jae    1130 <bassname+0x20>
add    $0x1,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @bassname(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
store i8* %8, i8** %3
br label %9
9: ; preds = %20, %1
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = icmp uge i8* %10, %11
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 47
br label %18
18: ; preds = %13, %9
%19 = phi i1 [ false, %9 ], [ %17, %13 ]
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 -1
store i8* %22, i8** %3
br label %9
23: ; preds = %18
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i64 1
ret i8* %25
}

LLVM IR (-O2):
define i8* @bassname(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = icmp slt i32 %2, 0
br i1 %5, label %13, label %6
6: ; preds = %1, %10
%7 = phi i8* [ %11, %10 ], [ %4, %1 ]
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 47
br i1 %9, label %13, label %10
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %7, i64 -1
%12 = icmp ult i8* %11, %0
br i1 %12, label %13, label %6
13: ; preds = %6, %10, %1
%14 = phi i8* [ %4, %1 ], [ %11, %10 ], [ %7, %6 ]
%15 = getelementptr inbounds i8, i8* %14, i64 1
ret i8* %15
}
void AYUVToVURow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @AYUVToVURow_NEON() {
ret void
}
int ft_isblank(int c) { return (c == '\t' || c == ' '); }


x86 assembly (clang, -O0):
<ft_isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <ft_isblank+0x20>
cmpl   $0x20,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isblank>:
cmp    $0x9,%edi
sete   %al
cmp    $0x20,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
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, 9
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 32
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ft_isblank(i32 %0) {
%2 = icmp eq i32 %0, 9
%3 = icmp eq i32 %0, 32
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ logd(char *, char *, char *, char *, char *);
void LogVersionInfo(void) {
  logd(
      "\n"
      ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CedarX <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n"
      "tag   : %s\n"
      "branch: %s\n"
      "commit: %s\n"
      "author: %s\n"
      "----------------------------------------------------------------------"
      "\n",
      "patch0010-cedarx2.3", "master",
      "688cf9db77eec1af142efc4b245c40c05f3d9264", "guoshaomin");
}


x86 assembly (clang, -O0):
<LogVersionInfo>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xf9a(%rip),%rsi
lea    0xfa7(%rip),%rdx
lea    0xfa7(%rip),%rcx
lea    0xfc9(%rip),%r8
call   1030 <logd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LogVersionInfo>:
lea    0xee9(%rip),%rdi
lea    0xf9e(%rip),%rsi
lea    0xfab(%rip),%rdx
lea    0xfab(%rip),%rcx
lea    0xfcd(%rip),%r8
jmp    1030 <logd@plt>

LLVM IR (-O0):
@.str = [188 x i8] c"\0A>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CedarX <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\0Atag : %s\0Abranch: %s\0Acommit: %s\0Aauthor: %s\0A----------------------------------------------------------------------\0A\00"
@.str.1 = [20 x i8] c"patch0010-cedarx2.3\00"
@.str.2 = [7 x i8] c"master\00"
@.str.3 = [41 x i8] c"688cf9db77eec1af142efc4b245c40c05f3d9264\00"
@.str.4 = [11 x i8] c"guoshaomin\00"
define void @LogVersionInfo() {
%1 = call i32 @logd(i8* getelementptr inbounds ([188 x i8], [188 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [188 x i8] c"\0A>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CedarX <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\0Atag : %s\0Abranch: %s\0Acommit: %s\0Aauthor: %s\0A----------------------------------------------------------------------\0A\00"
@.str.1 = [20 x i8] c"patch0010-cedarx2.3\00"
@.str.2 = [7 x i8] c"master\00"
@.str.3 = [41 x i8] c"688cf9db77eec1af142efc4b245c40c05f3d9264\00"
@.str.4 = [11 x i8] c"guoshaomin\00"
define void @LogVersionInfo() {
%1 = tail call i32 @logd(i8* getelementptr inbounds ([188 x i8], [188 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
ret void
}
void waitline(int line) {
  volatile long *lcdcon1 = (long *)0x14a00000;
  while (line != ((*lcdcon1 >> 18) & 0x1ff))
    ;
}


x86 assembly (clang, -O0):
<waitline>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x14a00000,%eax
mov    %rax,-0x10(%rbp)
movslq -0x4(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
sar    $0x12,%rcx
and    $0x1ff,%rcx
cmp    %rcx,%rax
je     1134 <waitline+0x34>
jmp    1110 <waitline+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitline>:
movslq %edi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x14a00000,%rcx
14
shr    $0x12,%ecx
and    $0x1ff,%ecx
cmp    %rax,%rcx
jne    1110 <waitline+0x10>
ret

LLVM IR (-O0):
define void @waitline(i32 %0) {
%2 = alloca i32
%3 = alloca i64*
store i32 %0, i32* %2
store i64* inttoptr (i64 346030080 to i64*), i64** %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = load i64*, i64** %3
%8 = load volatile i64, i64* %7
%9 = ashr i64 %8, 18
%10 = and i64 %9, 511
%11 = icmp ne i64 %6, %10
br i1 %11, label %12, label %13
12: ; preds = %4
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @waitline(i32 %0) {
%2 = sext i32 %0 to i64
br label %3
3: ; preds = %3, %1
%4 = load volatile i64, i64* inttoptr (i64 346030080 to i64*)
%5 = lshr i64 %4, 18
%6 = and i64 %5, 511
%7 = icmp eq i64 %6, %2
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
char toupper(const char c) {
  if ((c >= 'a') && (c <= 'z')) {
    return c - 0x20;
  }
  return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     1133 <toupper+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     1133 <toupper+0x33>
movsbl -0x2(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <toupper+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @toupper(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @toupper(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void timestamp_init(uint64_t base) {}


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

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

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

LLVM IR (-O2):
define void @timestamp_init(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AsyncPowerManagerP__0__ResourceDefaultOwner__requested();
void ArbiterP__1__ResourceDefaultOwner__requested(void) {
  AsyncPowerManagerP__0__ResourceDefaultOwner__requested();
}


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

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

LLVM IR (-O0):
define void @ArbiterP__1__ResourceDefaultOwner__requested() {
%1 = call i32 (...) @AsyncPowerManagerP__0__ResourceDefaultOwner__requested()
ret void
}

LLVM IR (-O2):
define void @ArbiterP__1__ResourceDefaultOwner__requested() {
%1 = tail call i32 (...) @AsyncPowerManagerP__0__ResourceDefaultOwner__requested()
ret void
}
void foo_1_1_2_1_1_1_1_2_1() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ __REV(int /*<<< orphan*/);
uint8_t uint32_big_encode(uint32_t value, uint8_t *p_encoded_data) {
  *(uint32_t *)p_encoded_data = __REV(value);
  return sizeof(uint32_t);
}


x86 assembly (clang, -O0):
<uint32_big_encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__REV@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint32_big_encode>:
push   %rbx
mov    %rsi,%rbx
call   1030 <__REV@plt>
mov    %eax,(%rbx)
mov    $0x4,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @uint32_big_encode(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 = call i32 @__REV(i32 %5)
%7 = load i32*, i32** %4
store i32 %6, i32* %7
ret i32 4
}

LLVM IR (-O2):
define i32 @uint32_big_encode(i32 %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @__REV(i32 %0)
store i32 %3, i32* %1
ret i32 4
}
char *ptbl_get_cp_path_separeter(void) { return "/"; }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @ptbl_get_cp_path_separeter() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
void g_ptr_array_remove_index() {}


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

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

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

LLVM IR (-O2):
define void @g_ptr_array_remove_index() {
ret void
}
void RTMemEfTmpFree(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemEfTmpFree() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ configurePR(int);
void initClockTimer() {
  (*(unsigned int *)0x40048080) |= 1 << 7;
  (*(unsigned int *)0x4000C004) |= 1;
  (*(unsigned int *)0x4000C004) &= ~2;
  configurePR(1000);
}


x86 assembly (clang, -O0):
<initClockTimer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40048080,%eax
mov    (%rax),%ecx
or     $0x80,%ecx
mov    $0x40048080,%eax
mov    %ecx,(%rax)
mov    $0x4000c004,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0x4000c004,%eax
mov    %ecx,(%rax)
mov    $0x4000c004,%eax
mov    (%rax),%ecx
and    $0xfffffffd,%ecx
mov    $0x4000c004,%eax
mov    %ecx,(%rax)
mov    $0x3e8,%edi
call   1030 <configurePR@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initClockTimer>:
orb    $0x80,0x40048080
80
mov    0x4000c004,%eax
and    $0xfffffffc,%eax
or     $0x1,%eax
mov    %eax,0x4000c004
mov    $0x3e8,%edi
jmp    1030 <configurePR@plt>

LLVM IR (-O0):
define void @initClockTimer() {
%1 = load i32, i32* inttoptr (i64 1074036864 to i32*)
%2 = or i32 %1, 128
store i32 %2, i32* inttoptr (i64 1074036864 to i32*)
%3 = load i32, i32* inttoptr (i64 1073790980 to i32*)
%4 = or i32 %3, 1
store i32 %4, i32* inttoptr (i64 1073790980 to i32*)
%5 = load i32, i32* inttoptr (i64 1073790980 to i32*)
%6 = and i32 %5, -3
store i32 %6, i32* inttoptr (i64 1073790980 to i32*)
%7 = call i32 @configurePR(i32 1000)
ret void
}

LLVM IR (-O2):
define void @initClockTimer() {
%1 = load i32, i32* inttoptr (i64 1074036864 to i32*)
%2 = or i32 %1, 128
store i32 %2, i32* inttoptr (i64 1074036864 to i32*)
%3 = load i32, i32* inttoptr (i64 1073790980 to i32*)
%4 = and i32 %3, -4
%5 = or i32 %4, 1
store i32 %5, i32* inttoptr (i64 1073790980 to i32*)
%6 = tail call i32 @configurePR(i32 1000)
ret void
}
int mystrlen(char s[]) {
  int i = 0;
  while (s[i++])
    ;
  return --i;
}


x86 assembly (clang, -O0):
<mystrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1130 <mystrlen+0x30>
jmp    110f <mystrlen+0xf>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <mystrlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @mystrlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %4, %2 ], [ 0, %1 ]
%4 = add nuw i64 %3, 1
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void reset(int *list, int *success, int *i, int people) {
  for (int j = 0; j < people; j++) {
    list[j] = -1;
  }
  *success = 0;
  *i = -1;
}


x86 assembly (clang, -O0):
<reset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1143 <reset+0x43>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    111a <reset+0x1a>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
test   %ecx,%ecx
jle    112e <reset+0x1e>
mov    %ecx,%edx
shl    $0x2,%rdx
mov    $0xff,%esi
call   1030 <memset@plt>
movl   $0x0,(%rbx)
movl   $0xffffffff,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @reset(i32* nocapture writeonly %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32 %3) {
%5 = icmp sgt i32 %3, 0
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = bitcast i32* %0 to i8*
%8 = zext i32 %3 to i64
%9 = shl nuw nsw i64 %8, 2
br label %10
10: ; preds = %6, %4
store i32 0, i32* %1
store i32 -1, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dummy(int, int);
int f2(int);
int f1(int i) {
  dummy(1, i);
  i = f2(i);
  dummy(2, i);
  i = f2(i);
  dummy(3, i);
  return i;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
call   1040 <dummy@plt>
mov    -0x4(%rbp),%edi
call   1030 <f2@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1040 <dummy@plt>
mov    -0x4(%rbp),%edi
call   1030 <f2@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x3,%edi
call   1040 <dummy@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
mov    %ebx,%esi
call   1040 <dummy@plt>
mov    %ebx,%edi
call   1030 <f2@plt>
mov    %eax,%ebx
mov    $0x2,%edi
mov    %eax,%esi
call   1040 <dummy@plt>
mov    %ebx,%edi
call   1030 <f2@plt>
mov    %eax,%ebx
mov    $0x3,%edi
mov    %eax,%esi
call   1040 <dummy@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @dummy(i32 1, i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @f2(i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @dummy(i32 2, i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @f2(i32 %9)
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = call i32 @dummy(i32 3, i32 %11)
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = tail call i32 @dummy(i32 1, i32 %0)
%3 = tail call i32 @f2(i32 %0)
%4 = tail call i32 @dummy(i32 2, i32 %3)
%5 = tail call i32 @f2(i32 %3)
%6 = tail call i32 @dummy(i32 3, i32 %5)
ret i32 %5
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int ValueOfHuffmanTableEntry(uint16_t entry) { return entry & 0xfff; }


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

x86 assembly (clang, -O2):
<ValueOfHuffmanTableEntry>:
mov    %edi,%eax
and    $0xfff,%eax
ret

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

LLVM IR (-O2):
define i32 @ValueOfHuffmanTableEntry(i32 %0) {
%2 = and i32 %0, 4095
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: path ...\n");
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"usage: path ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int cbmarch_clear_eoi(int);
int cbm_clear_eoi(int HandleDevice) {
  ;
  return cbmarch_clear_eoi(HandleDevice);
}


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

x86 assembly (clang, -O2):
<cbm_clear_eoi>:
jmp    1030 <cbmarch_clear_eoi@plt>

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

LLVM IR (-O2):
define i32 @cbm_clear_eoi(i32 %0) {
%2 = tail call i32 @cbmarch_clear_eoi(i32 %0)
ret i32 %2
}
/* Variables and functions */
void *realloc(void *, unsigned int);
void *hot_mem_Realloc(void *mem, unsigned size) { return realloc(mem, size); }


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

x86 assembly (clang, -O2):
<hot_mem_Realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define i8* @hot_mem_Realloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
ret i8* %3
}
int prcmu_disable_spi2(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @prcmu_disable_spi2() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ activity_call_for_help_get_context();
int /*<<< orphan*/ activity_manager_start_activity(int /*<<< orphan*/);
void call_for_help_menu_item_selection_handler() {
  activity_manager_start_activity(activity_call_for_help_get_context());
}


x86 assembly (clang, -O0):
<call_for_help_menu_item_selection_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <activity_call_for_help_get_context@plt>
mov    %eax,%edi
call   1030 <activity_manager_start_activity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_for_help_menu_item_selection_handler>:
push   %rax
xor    %eax,%eax
call   1040 <activity_call_for_help_get_context@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <activity_manager_start_activity@plt>

LLVM IR (-O0):
define void @call_for_help_menu_item_selection_handler() {
%1 = call i32 (...) @activity_call_for_help_get_context()
%2 = call i32 @activity_manager_start_activity(i32 %1)
ret void
}

LLVM IR (-O2):
define void @call_for_help_menu_item_selection_handler() {
%1 = tail call i32 (...) @activity_call_for_help_get_context()
%2 = tail call i32 @activity_manager_start_activity(i32 %1)
ret void
}