xunge/DecIR huggingface dataset:
int test_imm_7Duint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x7D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_7Duint64_lowword_mem>:
testb  $0x7d,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_7Duint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 125
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
const char *str_stmt_code() { return "code"; }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"code\00"
define i8* @str_stmt_code() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x55() {
  Assert_real((isprint(85)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              430, ("isprint should be 1 for U"));
}


x86 assembly (clang, -O0):
<t_isprint_0x55>:
push   %rbp
mov    %rsp,%rbp
mov    $0x55,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1ae,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x55>:
push   %rax
mov    $0x55,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1ae,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for U\00"
define void @t_isprint_0x55() {
%1 = call i32 @isprint(i32 85)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for U\00"
define void @t_isprint_0x55() {
%1 = tail call i32 @isprint(i32 85)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  int *p = NULL;
  if (p == 0) {
    printf("NULL is 0\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113e <main+0x2e>
lea    0xec7(%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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"NULL is 0\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
store i32* null, i32** %2
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"NULL is 0\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int isoperator(char x) {
  switch (x) {
  case '+': {
    return 1;
    break;
  }
  case '-': {
    return 1;
    break;
  }
  case '*': {
    return 1;
    break;
  }
  case '/': {
    return 1;
    break;
  }
  default: {
    return 0;
    break;
  }
  }
}


x86 assembly (clang, -O0):
<isoperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffd6,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5,%eax
ja     1164 <isoperator+0x64>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    116b <isoperator+0x6b>
movl   $0x1,-0x4(%rbp)
jmp    116b <isoperator+0x6b>
movl   $0x1,-0x4(%rbp)
jmp    116b <isoperator+0x6b>
movl   $0x1,-0x4(%rbp)
jmp    116b <isoperator+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isoperator>:
add    $0xffffffd6,%edi
xor    %eax,%eax
cmp    $0x5,%edi
ja     1117 <isoperator+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @isoperator(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 43, label %6
i32 45, label %7
i32 42, label %8
i32 47, label %9
]
6: ; preds = %1
store i32 1, i32* %2
br label %11
7: ; preds = %1
store i32 1, i32* %2
br label %11
8: ; preds = %1
store i32 1, i32* %2
br label %11
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@switch.table.isoperator = [6 x i32] [i32 1, i32 1, i32 0, i32 1, i32 0, i32 1]
define i32 @isoperator(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -42
%4 = icmp ult i32 %3, 6
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.isoperator, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
void debug_dump_samples() {}


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

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

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

LLVM IR (-O2):
define void @debug_dump_samples() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ I2CSlaveBaseValid(unsigned long);
unsigned long I2CSlaveDataGet(unsigned long ulBase) {
  DEBUG_ASSERT(I2CSlaveBaseValid(ulBase));
  return ((*((volatile unsigned long *)(ulBase + 0x00000008))));
}


x86 assembly (clang, -O0):
<I2CSlaveDataGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <I2CSlaveBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveDataGet>:
push   %rbx
mov    %rdi,%rbx
call   1040 <I2CSlaveBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    0x8(%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @I2CSlaveDataGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @I2CSlaveBaseValid(i64 %3)
%5 = call i32 @DEBUG_ASSERT(i32 %4)
%6 = load i64, i64* %2
%7 = add i64 %6, 8
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @I2CSlaveDataGet(i64 %0) {
%2 = tail call i32 @I2CSlaveBaseValid(i64 %0)
%3 = tail call i32 @DEBUG_ASSERT(i32 %2)
%4 = add i64 %0, 8
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
void transformation_D3(unsigned char *x0, unsigned char *x1) {
  unsigned char temp, L = 0;
  temp = *x1;
  L = (temp << 1) ^ (temp >> 3);
  x0[0] = x0[0] ^ L;
  temp = *x0;
  L = (temp << 1) ^ (temp >> 3);
  x1[0] = x1[0] ^ L;
}


x86 assembly (clang, -O0):
<transformation_D3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x12(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
shl    $0x1,%eax
movzbl -0x11(%rbp),%ecx
sar    $0x3,%ecx
xor    %ecx,%eax
mov    %al,-0x12(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x12(%rbp),%ecx
xor    %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
shl    $0x1,%eax
movzbl -0x11(%rbp),%ecx
sar    $0x3,%ecx
xor    %ecx,%eax
mov    %al,-0x12(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x12(%rbp),%ecx
xor    %ecx,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transformation_D3>:
mov    (%rsi),%al
lea    (%rax,%rax,1),%ecx
shr    $0x3,%al
xor    %cl,%al
xor    (%rdi),%al
mov    %al,(%rdi)
lea    (%rax,%rax,1),%ecx
shr    $0x3,%al
xor    (%rsi),%al
xor    %cl,%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @transformation_D3(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8 0, i8* %6
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
store i8 %8, i8* %5
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 1
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = ashr i32 %13, 3
%15 = xor i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %6
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = xor i32 %20, %22
%24 = trunc i32 %23 to i8
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i64 0
store i8 %24, i8* %26
%27 = load i8*, i8** %3
%28 = load i8, i8* %27
store i8 %28, i8* %5
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = shl i32 %30, 1
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = ashr i32 %33, 3
%35 = xor i32 %31, %34
%36 = trunc i32 %35 to i8
store i8 %36, i8* %6
%37 = load i8*, i8** %4
%38 = getelementptr inbounds i8, i8* %37, i64 0
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = load i8, i8* %6
%42 = zext i8 %41 to i32
%43 = xor i32 %40, %42
%44 = trunc i32 %43 to i8
%45 = load i8*, i8** %4
%46 = getelementptr inbounds i8, i8* %45, i64 0
store i8 %44, i8* %46
ret void
}

LLVM IR (-O2):
define void @transformation_D3(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = shl i8 %3, 1
%5 = lshr i8 %3, 3
%6 = xor i8 %4, %5
%7 = load i8, i8* %0
%8 = xor i8 %6, %7
store i8 %8, i8* %0
%9 = shl i8 %8, 1
%10 = lshr i8 %8, 3
%11 = load i8, i8* %1
%12 = xor i8 %10, %11
%13 = xor i8 %12, %9
store i8 %13, i8* %1
ret void
}
void ff_hevc_put_hevc_bi_epel_hv32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv32_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sgr(char *);
void reset_colors(void) {
  sgr("0;40;37;39;49");
  sgr("0");
}


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

x86 assembly (clang, -O2):
<reset_colors>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <sgr@plt>
lea    0xeea(%rip),%rdi
pop    %rax
jmp    1030 <sgr@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"0;40;37;39;49\00"
@.str.1 = [2 x i8] c"0\00"
define void @reset_colors() {
%1 = call i32 @sgr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @sgr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"0;40;37;39;49\00"
@.str.1 = [2 x i8] c"0\00"
define void @reset_colors() {
%1 = tail call i32 @sgr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @sgr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int w5100_read_byte(int);
unsigned w5100_readUPORT() {
  unsigned res = w5100_read_byte(0x002E);
  res = (res << 8) + w5100_read_byte(0x002E + 1);
  return res;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2e,%edi
call   1030 <w5100_read_byte@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    $0x2f,%edi
call   1030 <w5100_read_byte@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbx
mov    $0x2e,%edi
call   1030 <w5100_read_byte@plt>
mov    %eax,%ebx
shl    $0x8,%ebx
mov    $0x2f,%edi
call   1030 <w5100_read_byte@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @w5100_readUPORT() {
%1 = alloca i32
%2 = call i32 @w5100_read_byte(i32 46)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = shl i32 %3, 8
%5 = call i32 @w5100_read_byte(i32 47)
%6 = add i32 %4, %5
store i32 %6, i32* %1
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @w5100_readUPORT() {
%1 = tail call i32 @w5100_read_byte(i32 46)
%2 = shl i32 %1, 8
%3 = tail call i32 @w5100_read_byte(i32 47)
%4 = add i32 %2, %3
ret i32 %4
}
void mus_set_big_endian_unsigned_short(unsigned char *j, unsigned short x) {
  unsigned char *ox;
  ox = (unsigned char *)&x;
  j[0] = ox[0];
  j[1] = ox[1];
}


x86 assembly (clang, -O0):
<mus_set_big_endian_unsigned_short>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_set_big_endian_unsigned_short>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @mus_set_big_endian_unsigned_short(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i8*
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = bitcast i16* %4 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
ret void
}

LLVM IR (-O2):
define void @mus_set_big_endian_unsigned_short(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = trunc i16 %1 to i8
%4 = lshr i16 %1, 8
%5 = trunc i16 %4 to i8
store i8 %3, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  unsigned long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long getTime() {
  struct timeval temp;
  gettimeofday(&temp, NULL);
  return temp.tv_sec * 1000 * 1000 + temp.tv_usec;
}


x86 assembly (clang, -O0):
<getTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x10(%rbp),%eax
imul   $0x3e8,%eax,%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x8(%rsp),%eax
cltq
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @getTime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = mul nsw i32 %5, 1000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @getTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %9, %7
ret i64 %10
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int mmio_read(int);
int /*<<< orphan*/ mmio_write(int, int);
void sd_power_off() {
  uint32_t control0 = mmio_read(0x20300000 + 0x28);
  control0 &= ~(1 << 8);
  mmio_write(0x20300000 + 0x28, control0);
}


x86 assembly (clang, -O0):
<sd_power_off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20300028,%edi
call   1030 <mmio_read@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffeff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x20300028,%edi
call   1040 <mmio_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_power_off>:
push   %rax
mov    $0x20300028,%edi
call   1030 <mmio_read@plt>
and    $0xfffffeff,%eax
mov    $0x20300028,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <mmio_write@plt>

LLVM IR (-O0):
define void @sd_power_off() {
%1 = alloca i32
%2 = call i32 @mmio_read(i32 540016680)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, -257
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @mmio_write(i32 540016680, i32 %5)
ret void
}

LLVM IR (-O2):
define void @sd_power_off() {
%1 = tail call i32 @mmio_read(i32 540016680)
%2 = and i32 %1, -257
%3 = tail call i32 @mmio_write(i32 540016680, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void c_print_string(char *s) { printf("%s", s); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @c_print_string(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_nmt(int, int, int /*<<< orphan*/);
int init_can_nodes(int sock) { send_nmt(sock, 0x01, 0); }


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

x86 assembly (clang, -O2):
<init_can_nodes>:
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <send_nmt@plt>

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

LLVM IR (-O2):
define i32 @init_can_nodes(i32 %0) {
%2 = tail call i32 @send_nmt(i32 %0, i32 1, i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_close(int /*<<< orphan*/);
void g2_close_(float *dev) { g2_close(dtoi(*dev)); }


x86 assembly (clang, -O0):
<g2_close_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1040 <dtoi@plt>
mov    %eax,%edi
call   1030 <g2_close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_close_>:
push   %rax
movss  (%rdi),%xmm0
call   1040 <dtoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <g2_close@plt>

LLVM IR (-O0):
define void @g2_close_(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = call i32 @dtoi(float %4)
%6 = call i32 @g2_close(i32 %5)
ret void
}

LLVM IR (-O2):
define void @g2_close_(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call i32 @dtoi(float %2)
%4 = tail call i32 @g2_close(i32 %3)
ret void
}
/* Variables and functions */
size_t bcm4908asus_min(size_t x, size_t y) { return x < y ? x : y; }


x86 assembly (clang, -O0):
<bcm4908asus_min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <bcm4908asus_min+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <bcm4908asus_min+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcm4908asus_min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @bcm4908asus_min(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @bcm4908asus_min(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
__attribute__((always_)) void check_trace_callback_type_kfree(
    void (*cb)(void *__data, unsigned long call_site, const void *ptr)) {}


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

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

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

LLVM IR (-O2):
define void @check_trace_callback_type_kfree(void (i8*, i64, i8*)* nocapture %0) {
ret void
}
int mystrcmp(char *str1, char *str2) {
  while (*str1 == *str2 && *str1 != '\0') {
    str1++;
    str2++;
  }
  return (*str1 - *str2);
}


x86 assembly (clang, -O0):
<mystrcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
jne    1137 <mystrcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <mystrcmp+0x47>
jmp    1164 <mystrcmp+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <mystrcmp+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrcmp>:
mov    (%rdi),%al
mov    (%rsi),%cl
test   %al,%al
je     1134 <mystrcmp+0x34>
cmp    %cl,%al
jne    1134 <mystrcmp+0x34>
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
test   %al,%al
je     1134 <mystrcmp+0x34>
add    $0x1,%rdx
cmp    %cl,%al
je     1120 <mystrcmp+0x20>
movsbl %al,%eax
movsbl %cl,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @mystrcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %20, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %8, %11
br i1 %12, label %13, label %18
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %13, %5
%19 = phi i1 [ false, %5 ], [ %17, %13 ]
br i1 %19, label %20, label %25
20: ; preds = %18
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %4
br label %5
25: ; preds = %18
%26 = load i8*, i8** %3
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = load i8*, i8** %4
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = sub nsw i32 %28, %31
ret i32 %32
}

LLVM IR (-O2):
define i32 @mystrcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ne i8 %3, %4
%6 = icmp eq i8 %3, 0
%7 = or i1 %6, %5
br i1 %7, label %18, label %8
8: ; preds = %2, %8
%9 = phi i8* [ %12, %8 ], [ %1, %2 ]
%10 = phi i8* [ %11, %8 ], [ %0, %2 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %11
%14 = load i8, i8* %12
%15 = icmp ne i8 %13, %14
%16 = icmp eq i8 %13, 0
%17 = or i1 %16, %15
br i1 %17, label %18, label %8
18: ; preds = %8, %2
%19 = phi i8 [ %3, %2 ], [ %13, %8 ]
%20 = phi i8 [ %4, %2 ], [ %14, %8 ]
%21 = sext i8 %19 to i32
%22 = sext i8 %20 to i32
%23 = sub nsw i32 %21, %22
ret i32 %23
}
/* Variables and functions */
int /*<<< orphan*/ Timer0_Init();
int /*<<< orphan*/ lcd_clear();
int /*<<< orphan*/ lcd_init();
int /*<<< orphan*/ set_cursor(int /*<<< orphan*/, int);
int /*<<< orphan*/ uart_init_0();
void BSP_Init() {
  Timer0_Init();
  uart_init_0();
  lcd_init();
  lcd_clear();
  set_cursor(0, 1);
}


x86 assembly (clang, -O0):
<BSP_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <Timer0_Init@plt>
mov    $0x0,%al
call   1070 <uart_init_0@plt>
mov    $0x0,%al
call   1040 <lcd_init@plt>
mov    $0x0,%al
call   1050 <lcd_clear@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <set_cursor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_Init>:
push   %rax
xor    %eax,%eax
call   1060 <Timer0_Init@plt>
xor    %eax,%eax
call   1070 <uart_init_0@plt>
xor    %eax,%eax
call   1040 <lcd_init@plt>
xor    %eax,%eax
call   1050 <lcd_clear@plt>
xor    %edi,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <set_cursor@plt>

LLVM IR (-O0):
define void @BSP_Init() {
%1 = call i32 (...) @Timer0_Init()
%2 = call i32 (...) @uart_init_0()
%3 = call i32 (...) @lcd_init()
%4 = call i32 (...) @lcd_clear()
%5 = call i32 @set_cursor(i32 0, i32 1)
ret void
}

LLVM IR (-O2):
define void @BSP_Init() {
%1 = tail call i32 (...) @Timer0_Init()
%2 = tail call i32 (...) @uart_init_0()
%3 = tail call i32 (...) @lcd_init()
%4 = tail call i32 (...) @lcd_clear()
%5 = tail call i32 @set_cursor(i32 0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void tlib_abort(char *message) { abort(); }


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

x86 assembly (clang, -O2):
<tlib_abort>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @tlib_abort(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ b();
void main_main() { b(); }


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

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

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

LLVM IR (-O2):
define void @main_main() {
%1 = tail call i32 (...) @b()
ret void
}
/* Variables and functions */
scalar_t__ isblank(int);
int utlisblank(int ch) { return (ch == 0xA0) || ((ch <= 0xFF) && isblank(ch)); }


x86 assembly (clang, -O0):
<utlisblank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0xa0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1157 <utlisblank+0x47>
xor    %eax,%eax
cmpl   $0xff,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jg     1151 <utlisblank+0x41>
mov    -0x4(%rbp),%edi
call   1030 <isblank@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utlisblank>:
mov    $0x1,%eax
cmp    $0xa0,%edi
je     113c <utlisblank+0x2c>
xor    %eax,%eax
cmp    $0xff,%edi
jg     113c <utlisblank+0x2c>
push   %rax
call   1030 <isblank@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @utlisblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 160
br i1 %4, label %14, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 255
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = call i64 @isblank(i32 %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %8, %5
%13 = phi i1 [ false, %5 ], [ %11, %8 ]
br label %14
14: ; preds = %12, %1
%15 = phi i1 [ true, %1 ], [ %13, %12 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @utlisblank(i32 %0) {
%2 = icmp eq i32 %0, 160
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = icmp slt i32 %0, 256
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = tail call i64 @isblank(i32 %0)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %3, %5, %1
%10 = phi i32 [ 1, %1 ], [ 0, %3 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int tcc_overlay_close(int fb_dev_fd) {
  if (fb_dev_fd == -1)
    return -1;
  close(fb_dev_fd);
  return 0;
}


x86 assembly (clang, -O0):
<tcc_overlay_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1131 <tcc_overlay_close+0x21>
movl   $0xffffffff,-0x4(%rbp)
jmp    1140 <tcc_overlay_close+0x30>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcc_overlay_close>:
cmp    $0xffffffff,%edi
je     1122 <tcc_overlay_close+0x12>
push   %rax
call   1030 <close@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @tcc_overlay_close(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 0, %3 ], [ -1, %1 ]
ret i32 %6
}
int getPriority(char c) {
  if (c == '*')
    return 2;
  else if (c == '+')
    return 1;
  else if (c == '-')
    return 3;
  else
    return -1;
}


x86 assembly (clang, -O0):
<getPriority>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
jne    1123 <getPriority+0x23>
movl   $0x2,-0x4(%rbp)
jmp    115c <getPriority+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
jne    113c <getPriority+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115c <getPriority+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
jne    1155 <getPriority+0x55>
movl   $0x3,-0x4(%rbp)
jmp    115c <getPriority+0x5c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPriority>:
add    $0xd6,%dil
mov    $0xffffffff,%eax
cmp    $0x3,%dil
ja     111d <getPriority+0x1d>
movsbq %dil,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.getPriority = [4 x i32] [i32 2, i32 1, i32 -1, i32 3]
define i32 @getPriority(i8 signext %0) {
%2 = add i8 %0, -42
%3 = icmp ult i8 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.getPriority, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int mkstemp(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ unlink(char *);
int main(int argc, char *argv[]) {
  char template[] = "/tmp/testXXXXXX";
  int filedes = -1;
  filedes = mkstemp(template);
  printf("%s\n", template);
  unlink(template);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0xffffffff,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
call   1050 <mkstemp@plt>
mov    %eax,-0x24(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <unlink@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movaps 0xec4(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <mkstemp@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <unlink@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.template = [16 x i8] c"/tmp/testXXXXXX\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [16 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [16 x i8]* %6 to i8*
store i32 -1, i32* %7
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%10 = call i32 @mkstemp(i8* %9)
store i32 %10, i32* %7
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%14 = call i32 @unlink(i8* %13)
ret i32 0
}

LLVM IR (-O2):
@__const.main.template = [16 x i8] c"/tmp/testXXXXXX\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @mkstemp(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = call i32 @unlink(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void Read_array(int array_of_elements[], int size) {
  int i;
  for (i = 0; i < size; i++)
    scanf("%d", &array_of_elements[i]);
}


x86 assembly (clang, -O0):
<Read_array>:
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
jge    115b <Read_array+0x4b>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <Read_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Read_array>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1145 <Read_array+0x35>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <Read_array+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @Read_array(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 = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %14)
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @Read_array(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float tc;
  printf("Celsius: ");
  scanf("%f", &tc);
  printf("Fahrenheit: %.2f", tc * (9.0 / 5.0) + 32);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9e(%rip),%xmm1
addsd  %xmm1,%xmm0
lea    0xea8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeae(%rip),%xmm0
addsd  0xeae(%rip),%xmm0
lea    0xebc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Celsius: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [17 x i8] c"Fahrenheit: %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = call double @llvm.fmuladd.f64(double %6, double 1.800000e+00, double 3.200000e+01)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Celsius: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [17 x i8] c"Fahrenheit: %.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = call double @llvm.fmuladd.f64(double %6, double 1.800000e+00, double 3.200000e+01)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void formatedOutput(int numberOfTerms) {
  if (numberOfTerms % 10 == 0)
    printf("\n");
}


x86 assembly (clang, -O0):
<formatedOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    113b <formatedOutput+0x2b>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<formatedOutput>:
imul   $0xcccccccd,%edi,%eax
add    $0x19999998,%eax
ror    %eax
cmp    $0x19999998,%eax
jbe    1125 <formatedOutput+0x15>
ret
mov    $0xa,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @formatedOutput(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 10
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @formatedOutput(i32 %0) {
%2 = srem i32 %0, 10
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @putchar(i32 10)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initInterrupt();
int /*<<< orphan*/ initKmem();
int /*<<< orphan*/ initSegment();
void beforeFS() {
  initSegment();
  initInterrupt();
  initKmem();
}


x86 assembly (clang, -O0):
<beforeFS>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initSegment@plt>
mov    $0x0,%al
call   1030 <initInterrupt@plt>
mov    $0x0,%al
call   1040 <initKmem@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<beforeFS>:
push   %rax
xor    %eax,%eax
call   1050 <initSegment@plt>
xor    %eax,%eax
call   1030 <initInterrupt@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <initKmem@plt>

LLVM IR (-O0):
define void @beforeFS() {
%1 = call i32 (...) @initSegment()
%2 = call i32 (...) @initInterrupt()
%3 = call i32 (...) @initKmem()
ret void
}

LLVM IR (-O2):
define void @beforeFS() {
%1 = tail call i32 (...) @initSegment()
%2 = tail call i32 (...) @initInterrupt()
%3 = tail call i32 (...) @initKmem()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, char, int);
void init_vocabulary_frequency(float *frequency) {
  memset((void *)frequency, '\0', 26 * 640 * sizeof(float));
}


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

x86 assembly (clang, -O2):
<init_vocabulary_frequency>:
xor    %esi,%esi
mov    $0x10400,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @init_vocabulary_frequency(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = bitcast float* %3 to i8*
%5 = call i32 @memset(i8* %4, i8 signext 0, i32 66560)
ret void
}

LLVM IR (-O2):
define void @init_vocabulary_frequency(float* %0) {
%2 = bitcast float* %0 to i8*
%3 = tail call i32 @memset(i8* %2, i8 signext 0, i32 66560)
ret void
}
void CL_HTTP_StartDownload(void) {}


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

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

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

LLVM IR (-O2):
define void @CL_HTTP_StartDownload() {
ret void
}
void ioport_out8(unsigned short port, unsigned char b) {
  __asm__ volatile("outb %0, %1;\n\t" : : "a"(b), "d"(port));
}


x86 assembly (clang, -O0):
<ioport_out8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    -0x2(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioport_out8>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @ioport_out8(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i16, i16* %3
ret void
}

LLVM IR (-O2):
define void @ioport_out8(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $0, $1;\0A\09", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
ret void
}
int ft_tablen(char **tab) {
  int i;
  i = 0;
  while (tab[i])
    i++;
  return (i);
}


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

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

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

LLVM IR (-O2):
define i32 @ft_tablen(i8** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}