xunge/DecIR huggingface dataset:
int is_mnemonic_begin(char *s) {
  return (((*s >= 'a') && (*s <= 'z')) || ((*s >= 'A') && (*s <= 'Z')) ||
          (*s == '_') || (*s == '%'));
}


x86 assembly (clang, -O0):
<is_mnemonic_begin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     112d <is_mnemonic_begin+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x9(%rbp)
jle    1177 <is_mnemonic_begin+0x77>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1152 <is_mnemonic_begin+0x52>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x9(%rbp)
jle    1177 <is_mnemonic_begin+0x77>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x9(%rbp)
je     1177 <is_mnemonic_begin+0x77>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_mnemonic_begin>:
mov    (%rdi),%cl
lea    -0x61(%rcx),%edx
mov    $0x1,%eax
cmp    $0x1a,%dl
jb     1124 <is_mnemonic_begin+0x24>
cmp    $0x5f,%cl
je     1124 <is_mnemonic_begin+0x24>
lea    -0x41(%rcx),%edx
cmp    $0x1a,%dl
jb     1124 <is_mnemonic_begin+0x24>
xor    %eax,%eax
cmp    $0x25,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @is_mnemonic_begin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 122
br i1 %11, label %32, label %12
12: ; preds = %7, %1
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp sge i32 %15, 65
br i1 %16, label %17, label %22
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp sle i32 %20, 90
br i1 %21, label %32, label %22
22: ; preds = %17, %12
%23 = load i8*, i8** %2
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 95
br i1 %26, label %32, label %27
27: ; preds = %22
%28 = load i8*, i8** %2
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 37
br label %32
32: ; preds = %27, %22, %17, %7
%33 = phi i1 [ true, %22 ], [ true, %17 ], [ true, %7 ], [ %31, %27 ]
%34 = zext i1 %33 to i32
ret i32 %34
}

LLVM IR (-O2):
define i32 @is_mnemonic_begin(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -97
%4 = icmp ult i8 %3, 26
br i1 %4, label %13, label %5
5: ; preds = %1
%6 = add i8 %2, -65
%7 = icmp ult i8 %6, 26
%8 = icmp eq i8 %2, 95
%9 = or i1 %8, %7
br i1 %9, label %13, label %10
10: ; preds = %5
%11 = icmp eq i8 %2, 37
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %5, %1, %10
%14 = phi i32 [ %12, %10 ], [ 1, %1 ], [ 1, %5 ]
ret i32 %14
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ cmap;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
unsigned long get_Screen_cmap(void *_p) {
  return (unsigned long)((Screen *)_p)->cmap;
}


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

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

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

LLVM IR (-O2):
define i64 @get_Screen_cmap(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
float pow(float, int);
float func5(float x) {
  float s;
  s = pow(x, 3);
  return s;
}


x86 assembly (clang, -O0):
<func5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func5>:
mov    $0x3,%edi
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define float @func5(float %0) {
%2 = tail call float @pow(float %0, i32 3)
ret float %2
}
int gap_penalty(int value, int penalty) { return (value - penalty); }


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

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

LLVM IR (-O0):
define i32 @gap_penalty(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @gap_penalty(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
void outd(unsigned long data, unsigned short addr) {
  __asm__("outl %%eax, %%dx" ::"a"(data), "d"(addr));
}


x86 assembly (clang, -O0):
<outd>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa(%rbp),%dx
out    %eax,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outd>:
mov    %esi,%edx
mov    %rdi,%rax
out    %eax,(%dx)
ret

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

LLVM IR (-O2):
define void @outd(i64 %0, i16 zeroext %1) {
tail call void asm sideeffect "outl %eax, %dx", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i64 %0, i16 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clean();
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
char *malloc(int);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strip(char *);
char *readln(int m_size) {
  char *line;
  int c;
  line = malloc(m_size + 1);
  clean();
  fgets(line, m_size, stdin);
  strip(line);
  return line;
}


x86 assembly (clang, -O0):
<readln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <clean@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    0x2e79(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
mov    -0x10(%rbp),%rdi
call   1030 <strip@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readln>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
lea    0x1(%r14),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <clean@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <fgets@plt>
mov    %rbx,%rdi
call   1030 <strip@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
define i8* @readln(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
%7 = call i8* @malloc(i32 %6)
store i8* %7, i8** %3
%8 = call i32 (...) @clean()
%9 = load i8*, i8** %3
%10 = load i32, i32* %2
%11 = load i32, i32* @stdin
%12 = call i32 @fgets(i8* %9, i32 %10, i32 %11)
%13 = load i8*, i8** %3
%14 = call i32 @strip(i8* %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@stdin = global i32 0
define i8* @readln(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i8* @malloc(i32 %2)
%4 = tail call i32 (...) @clean()
%5 = load i32, i32* @stdin
%6 = tail call i32 @fgets(i8* %3, i32 %0, i32 %5)
%7 = tail call i32 @strip(i8* %3)
ret i8* %3
}
int test_imm_74uint8_mem(unsigned char *val) {
  return ((*val) & (-0x74 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_74uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -116
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ A2C128_A(unsigned char **, unsigned char);
int /*<<< orphan*/ A2C128_B(unsigned char **, unsigned char);
int /*<<< orphan*/ A2C128_C(unsigned char **, unsigned char, unsigned char);
void ASCIIZ128(unsigned char **ppOutPos, int CharacterSet, unsigned char c1,
               unsigned char c2) {
  if (CharacterSet == 1)
    A2C128_A(ppOutPos, c1);
  else if (CharacterSet == 2)
    A2C128_B(ppOutPos, c1);
  else
    A2C128_C(ppOutPos, c1, c2);
}


x86 assembly (clang, -O0):
<ASCIIZ128>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %cl,-0xd(%rbp)
mov    %al,-0xe(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1165 <ASCIIZ128+0x35>
mov    -0x8(%rbp),%rdi
movzbl -0xd(%rbp),%esi
call   1050 <A2C128_A@plt>
jmp    1199 <ASCIIZ128+0x69>
cmpl   $0x2,-0xc(%rbp)
jne    1181 <ASCIIZ128+0x51>
mov    -0x8(%rbp),%rdi
movzbl -0xd(%rbp),%esi
call   1030 <A2C128_B@plt>
jmp    1194 <ASCIIZ128+0x64>
mov    -0x8(%rbp),%rdi
mov    -0xd(%rbp),%al
movzbl %al,%esi
movzbl -0xe(%rbp),%edx
call   1040 <A2C128_C@plt>
jmp    1199 <ASCIIZ128+0x69>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASCIIZ128>:
cmp    $0x2,%esi
je     1142 <ASCIIZ128+0x12>
cmp    $0x1,%esi
jne    114a <ASCIIZ128+0x1a>
movzbl %dl,%esi
jmp    1050 <A2C128_A@plt>
movzbl %dl,%esi
jmp    1030 <A2C128_B@plt>
movzbl %dl,%esi
movzbl %cl,%edx
jmp    1040 <A2C128_C@plt>

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

LLVM IR (-O2):
define void @ASCIIZ128(i8** %0, i32 %1, i8 zeroext %2, i8 zeroext %3) {
switch i32 %1, label %9 [
i32 1, label %5
i32 2, label %7
]
5: ; preds = %4
%6 = tail call i32 @A2C128_A(i8** %0, i8 zeroext %2)
br label %11
7: ; preds = %4
%8 = tail call i32 @A2C128_B(i8** %0, i8 zeroext %2)
br label %11
9: ; preds = %4
%10 = tail call i32 @A2C128_C(i8** %0, i8 zeroext %2, i8 zeroext %3)
br label %11
11: ; preds = %7, %9, %5
ret void
}
void pll_feed(void) {
  (*(volatile unsigned long *)(0xE01FC000 + 0x08C)) = 0xAA;
  (*(volatile unsigned long *)(0xE01FC000 + 0x08C)) = 0x55;
}


x86 assembly (clang, -O0):
<pll_feed>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe01fc08c,%eax
movq   $0xaa,(%rax)
mov    $0xe01fc08c,%eax
movq   $0x55,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pll_feed>:
mov    $0xe01fc08c,%eax
movq   $0xaa,(%rax)
movq   $0x55,(%rax)
ret

LLVM IR (-O0):
define void @pll_feed() {
store volatile i64 170, i64* inttoptr (i64 3760177292 to i64*)
store volatile i64 85, i64* inttoptr (i64 3760177292 to i64*)
ret void
}

LLVM IR (-O2):
define void @pll_feed() {
store volatile i64 170, i64* inttoptr (i64 3760177292 to i64*)
store volatile i64 85, i64* inttoptr (i64 3760177292 to i64*)
ret void
}
int bsrq(long long x) {
  asm("bsrq %0,%0" : "=r"(x) : "r"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<bsrq>:
bsr    %rax,%rax
ret

LLVM IR (-O0):
define i32 @bsrq(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 asm "bsrq $0,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i64 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @bsrq(i64 %0) {
%2 = tail call i64 asm "bsrq $0,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __free_cf(void *);
void CGPathRelease(void *item) { __free_cf(item); }


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

x86 assembly (clang, -O2):
<CGPathRelease>:
jmp    1030 <__free_cf@plt>

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

LLVM IR (-O2):
define void @CGPathRelease(i8* %0) {
%2 = tail call i32 @__free_cf(i8* %0)
ret void
}
/* Variables and functions */
unsigned char flash_readcommand(int);
void flash_togglewait() {
  unsigned char temp = 0;
  unsigned char temp1 = flash_readcommand(0x0000);
  do {
    temp = temp1;
    temp1 = flash_readcommand(0x0000);
  } while (temp != temp1);
  flash_readcommand(0x0000);
  flash_readcommand(0x0000);
}


x86 assembly (clang, -O0):
<flash_togglewait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
xor    %edi,%edi
call   1030 <flash_readcommand@plt>
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
xor    %edi,%edi
call   1030 <flash_readcommand@plt>
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
jne    1126 <flash_togglewait+0x16>
xor    %edi,%edi
call   1030 <flash_readcommand@plt>
xor    %edi,%edi
call   1030 <flash_readcommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flash_togglewait>:
push   %rbx
xor    %edi,%edi
call   1030 <flash_readcommand@plt>
mov    %eax,%ebx
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <flash_readcommand@plt>
cmp    %al,%bl
mov    %eax,%ebx
jne    1120 <flash_togglewait+0x10>
xor    %edi,%edi
call   1030 <flash_readcommand@plt>
xor    %edi,%edi
pop    %rbx
jmp    1030 <flash_readcommand@plt>

LLVM IR (-O0):
define void @flash_togglewait() {
%1 = alloca i8
%2 = alloca i8
store i8 0, i8* %1
%3 = call zeroext i8 @flash_readcommand(i32 0)
store i8 %3, i8* %2
br label %4
4: ; preds = %7, %0
%5 = load i8, i8* %2
store i8 %5, i8* %1
%6 = call zeroext i8 @flash_readcommand(i32 0)
store i8 %6, i8* %2
br label %7
7: ; preds = %4
%8 = load i8, i8* %1
%9 = zext i8 %8 to i32
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = icmp ne i32 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %7
%14 = call zeroext i8 @flash_readcommand(i32 0)
%15 = call zeroext i8 @flash_readcommand(i32 0)
ret void
}

LLVM IR (-O2):
define void @flash_togglewait() {
%1 = tail call zeroext i8 @flash_readcommand(i32 0)
br label %2
2: ; preds = %2, %0
%3 = phi i8 [ %1, %0 ], [ %4, %2 ]
%4 = tail call zeroext i8 @flash_readcommand(i32 0)
%5 = icmp eq i8 %3, %4
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = tail call zeroext i8 @flash_readcommand(i32 0)
%8 = tail call zeroext i8 @flash_readcommand(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
scalar_t__ strftime(char *const, size_t const, char *, int /*<<< orphan*/);
int rat_lib_time_to_str(char *const buf, const size_t buflen, time_t *t) {
  if (strftime(buf, buflen, "%Y-%m-%d %H:%M:%S", localtime(t)))
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<rat_lib_time_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %eax,%ecx
lea    0xea2(%rip),%rdx
call   1040 <strftime@plt>
cmp    $0x0,%rax
je     1179 <rat_lib_time_to_str+0x59>
movl   $0x0,-0x4(%rbp)
jmp    1180 <rat_lib_time_to_str+0x60>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rat_lib_time_to_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rdi
call   1030 <localtime@plt>
lea    0xec7(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%ecx
call   1040 <strftime@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i32 @rat_lib_time_to_str(i8* %0, i64 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i32* %2, i32** %7
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = load i32*, i32** %7
%11 = call i32 @localtime(i32* %10)
%12 = call i64 @strftime(i8* %8, i64 %9, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 0, i32* %4
br label %16
15: ; preds = %3
store i32 -1, i32* %4
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i32 @rat_lib_time_to_str(i8* %0, i64 %1, i32* %2) {
%4 = tail call i32 @localtime(i32* %2)
%5 = tail call i64 @strftime(i8* %0, i64 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = icmp eq i64 %5, 0
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
struct vm_area_struct {
  int dummy;
};
struct kobject {
  int dummy;
};
struct file {
  int dummy;
};
struct bin_attribute {
  int dummy;
};

/* Variables and functions */
int pci_mmap_resource(struct kobject *, struct bin_attribute *,
                      struct vm_area_struct *, int /*<<< orphan*/);
int pci_mmap_resource_dense(struct file *filp, struct kobject *kobj,
                            struct bin_attribute *attr,
                            struct vm_area_struct *vma) {
  return pci_mmap_resource(kobj, attr, vma, 0);
}


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

x86 assembly (clang, -O2):
<pci_mmap_resource_dense>:
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
xor    %ecx,%ecx
jmp    1030 <pci_mmap_resource@plt>

LLVM IR (-O0):
%struct.file = type { i32 }
%struct.kobject = type { i32 }
%struct.bin_attribute = type { i32 }
%struct.vm_area_struct = type { i32 }
define i32 @pci_mmap_resource_dense(%struct.file* %0, %struct.kobject* %1, %struct.bin_attribute* %2, %struct.vm_area_struct* %3) {
%5 = alloca %struct.file*
%6 = alloca %struct.kobject*
%7 = alloca %struct.bin_attribute*
%8 = alloca %struct.vm_area_struct*
store %struct.file* %0, %struct.file** %5
store %struct.kobject* %1, %struct.kobject** %6
store %struct.bin_attribute* %2, %struct.bin_attribute** %7
store %struct.vm_area_struct* %3, %struct.vm_area_struct** %8
%9 = load %struct.kobject*, %struct.kobject** %6
%10 = load %struct.bin_attribute*, %struct.bin_attribute** %7
%11 = load %struct.vm_area_struct*, %struct.vm_area_struct** %8
%12 = call i32 @pci_mmap_resource(%struct.kobject* %9, %struct.bin_attribute* %10, %struct.vm_area_struct* %11, i32 0)
ret i32 %12
}

LLVM IR (-O2):
%struct.file = type { i32 }
%struct.kobject = type { i32 }
%struct.bin_attribute = type { i32 }
%struct.vm_area_struct = type { i32 }
define i32 @pci_mmap_resource_dense(%struct.file* nocapture readnone %0, %struct.kobject* %1, %struct.bin_attribute* %2, %struct.vm_area_struct* %3) {
%5 = tail call i32 @pci_mmap_resource(%struct.kobject* %1, %struct.bin_attribute* %2, %struct.vm_area_struct* %3, i32 0)
ret i32 %5
}
void __parse_string_emit(void *user, char c) {
  char **pstr = (char **)user;
  *(*pstr)++ = c;
}


x86 assembly (clang, -O0):
<__parse_string_emit>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x18(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__parse_string_emit>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
mov    %sil,(%rax)
ret

LLVM IR (-O0):
define void @__parse_string_emit(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8**
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i8**
store i8** %7, i8*** %5
%8 = load i8, i8* %4
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %9
store i8 %8, i8* %10
ret void
}

LLVM IR (-O2):
define void @__parse_string_emit(i8* nocapture %0, i8 signext %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %5, i8** %3
store i8 %1, i8* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MCP4461_SetValue(int, int, char);
void setSolderStepper2Current(char current) {
  MCP4461_SetValue(0x5A, 0x01, current);
}


x86 assembly (clang, -O0):
<setSolderStepper2Current>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x5a,%edi
mov    $0x1,%esi
movsbl -0x1(%rbp),%edx
call   1030 <MCP4461_SetValue@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setSolderStepper2Current>:
mov    %edi,%edx
mov    $0x5a,%edi
mov    $0x1,%esi
jmp    1030 <MCP4461_SetValue@plt>

LLVM IR (-O0):
define void @setSolderStepper2Current(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @MCP4461_SetValue(i32 90, i32 1, i8 signext %3)
ret void
}

LLVM IR (-O2):
define void @setSolderStepper2Current(i8 signext %0) {
%2 = tail call i32 @MCP4461_SetValue(i32 90, i32 1, i8 signext %0)
ret void
}
__attribute__((always_)) unsigned long pud_index(unsigned long address) {
  return (address >> 30) & (512 - 1);
}


x86 assembly (clang, -O0):
<pud_index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1e,%rax
and    $0x1ff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pud_index>:
mov    %rdi,%rax
shr    $0x1e,%rax
and    $0x1ff,%eax
ret

LLVM IR (-O0):
define i64 @pud_index(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 30
%5 = and i64 %4, 511
ret i64 %5
}

LLVM IR (-O2):
define i64 @pud_index(i64 %0) {
%2 = lshr i64 %0, 30
%3 = and i64 %2, 511
ret i64 %3
}
/* Type definitions */
struct rb3_head {
  int dummy;
};

/* Variables and functions */
scalar_t__ rb3_get_color_bit(struct rb3_head *, int);
__attribute__((always_)) int rb3_is_red(struct rb3_head *head, int dir) {
  return rb3_get_color_bit(head, dir) != 0;
}


x86 assembly (clang, -O0):
<rb3_is_red>:
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 <rb3_get_color_bit@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb3_is_red>:
push   %rax
call   1030 <rb3_get_color_bit@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rb3_head = type { i32 }
define i32 @rb3_is_red(%struct.rb3_head* %0, i32 %1) {
%3 = alloca %struct.rb3_head*
%4 = alloca i32
store %struct.rb3_head* %0, %struct.rb3_head** %3
store i32 %1, i32* %4
%5 = load %struct.rb3_head*, %struct.rb3_head** %3
%6 = load i32, i32* %4
%7 = call i64 @rb3_get_color_bit(%struct.rb3_head* %5, i32 %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.rb3_head = type { i32 }
define i32 @rb3_is_red(%struct.rb3_head* %0, i32 %1) {
%3 = tail call i64 @rb3_get_color_bit(%struct.rb3_head* %0, i32 %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int getopt(int, char **, char *);
int /*<<< orphan*/ getopt_dump();
scalar_t__ opterr;
int /*<<< orphan*/ printf(char *, int);
void process(int argc, char *argv[], char *options) {
  opterr = 0;
  int result;
  do {
    result = getopt(argc, argv, options);
    printf("  getopt returned %d\n", result);
    getopt_dump();
  } while (-1 != result);
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2e96(%rip),%rax
movq   $0x0,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <getopt@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <getopt_dump@plt>
mov    $0xffffffff,%eax
cmp    -0x1c(%rbp),%eax
jne    1151 <process+0x21>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r12
mov    %edi,%ebp
mov    0x2e99(%rip),%rax
movq   $0x0,(%rax)
lea    0xeab(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r14,%rdx
call   1050 <getopt@plt>
mov    %eax,%ebx
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <getopt_dump@plt>
cmp    $0xffffffff,%ebx
jne    1160 <process+0x30>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@opterr = global i64 0
@.str = [22 x i8] c" getopt returned %d\0A\00"
define void @process(i32 %0, i8** %1, i8* %2) {
store i64 0, i64* @opterr
br label %4
4: ; preds = %4, %3
%5 = tail call i32 @getopt(i32 %0, i8** %1, i8* %2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @getopt_dump()
%8 = icmp eq i32 %5, -1
br i1 %8, label %9, label %4
9: ; preds = %4
ret void
}
/* Variables and functions */
int fatfs_chdir(char const *);
int chdir(const char *path) { return fatfs_chdir(path); }


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

x86 assembly (clang, -O2):
<chdir>:
jmp    1030 <fatfs_chdir@plt>

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

LLVM IR (-O2):
define i32 @chdir(i8* %0) {
%2 = tail call i32 @fatfs_chdir(i8* %0)
ret i32 %2
}
/* Type definitions */
struct ds_resources {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ds_resources *);
void ds_resources_delete(struct ds_resources *r) { free(r); }


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

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

LLVM IR (-O0):
%struct.ds_resources = type { i32 }
define void @ds_resources_delete(%struct.ds_resources* %0) {
%2 = alloca %struct.ds_resources*
store %struct.ds_resources* %0, %struct.ds_resources** %2
%3 = load %struct.ds_resources*, %struct.ds_resources** %2
%4 = call i32 @free(%struct.ds_resources* %3)
ret void
}

LLVM IR (-O2):
%struct.ds_resources = type { i32 }
define void @ds_resources_delete(%struct.ds_resources* nocapture %0) {
%2 = tail call i32 @free(%struct.ds_resources* %0)
ret void
}
void give_func(int (*give_func_arg)() __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @give_func(i32 (...)* nocapture %0) {
ret void
}
int verificarAltura(const int *COLUNAS, int indice, int tamanho, int direcao) {
  if (tamanho == 1) {
    return 1;
  } else if (COLUNAS[indice] >= tamanho) {
    return verificarAltura(COLUNAS, indice + direcao, tamanho - 1, direcao);
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<verificarAltura>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x1,-0x18(%rbp)
jne    113b <verificarAltura+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1176 <verificarAltura+0x66>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jl     116f <verificarAltura+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
mov    -0x1c(%rbp),%ecx
call   1030 <verificarAltura@plt>
mov    %eax,-0x4(%rbp)
jmp    1176 <verificarAltura+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verificarAltura>:
mov    $0x1,%eax
cmp    $0x1,%edx
je     112f <verificarAltura+0x2f>
movslq %esi,%rsi
movslq %ecx,%rcx
lea    (%rdi,%rsi,4),%rsi
shl    $0x2,%rcx
nopl   0x0(%rax,%rax,1)
cmp    %edx,(%rsi)
jl     1130 <verificarAltura+0x30>
add    $0xffffffff,%edx
add    %rcx,%rsi
cmp    $0x1,%edx
jne    1120 <verificarAltura+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @verificarAltura(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** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %8
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %4
store i32 1, i32* %5
br label %31
13: ; preds = %4
%14 = load i32*, i32** %6
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = load i32, i32* %17
%19 = load i32, i32* %8
%20 = icmp sge i32 %18, %19
br i1 %20, label %21, label %30
21: ; preds = %13
%22 = load i32*, i32** %6
%23 = load i32, i32* %7
%24 = load i32, i32* %9
%25 = add nsw i32 %23, %24
%26 = load i32, i32* %8
%27 = sub nsw i32 %26, 1
%28 = load i32, i32* %9
%29 = call i32 @verificarAltura(i32* %22, i32 %25, i32 %27, i32 %28)
store i32 %29, i32* %5
br label %31
30: ; preds = %13
store i32 0, i32* %5
br label %31
31: ; preds = %30, %21, %12
%32 = load i32, i32* %5
ret i32 %32
}

LLVM IR (-O2):
define i32 @verificarAltura(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %2, 1
br i1 %5, label %19, label %6
6: ; preds = %4
%7 = sext i32 %1 to i64
%8 = sext i32 %3 to i64
br label %9
9: ; preds = %6, %15
%10 = phi i64 [ %7, %6 ], [ %16, %15 ]
%11 = phi i32 [ %2, %6 ], [ %17, %15 ]
%12 = getelementptr inbounds i32, i32* %0, i64 %10
%13 = load i32, i32* %12
%14 = icmp slt i32 %13, %11
br i1 %14, label %19, label %15
15: ; preds = %9
%16 = add i64 %10, %8
%17 = add nsw i32 %11, -1
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %9
19: ; preds = %15, %9, %4
%20 = phi i32 [ 1, %4 ], [ 0, %9 ], [ 1, %15 ]
ret i32 %20
}
int fun_0_in_release_so() { return 20; }


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

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

LLVM IR (-O0):
define i32 @fun_0_in_release_so() {
ret i32 20
}

LLVM IR (-O2):
define i32 @fun_0_in_release_so() {
ret i32 20
}
void __DELETE_java_lang_Integer(void *me, void *client_data) {}


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

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

LLVM IR (-O0):
define void @__DELETE_java_lang_Integer(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @__DELETE_java_lang_Integer(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int open(char const *, int);
int tio(const char *a, int f) {
  f = open(a, f);
  if (f >= 0) {
    close(f);
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<tio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     115c <tio+0x3c>
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
movl   $0x1,-0x4(%rbp)
jmp    1163 <tio+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tio>:
push   %rax
call   1040 <open@plt>
test   %eax,%eax
js     1138 <tio+0x18>
mov    %eax,%edi
call   1030 <close@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tio(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = load i32, i32* %5
%8 = call i32 @open(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i32, i32* %5
%13 = call i32 @close(i32 %12)
store i32 1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %11
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @tio(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
%4 = icmp sgt i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @close(i32 %3)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ hello_world();
void start() { hello_world(); }


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

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

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

LLVM IR (-O2):
define void @start() {
%1 = tail call i32 (...) @hello_world()
ret void
}
/* Variables and functions */
char *ProtectedIntegerField(int, int);
int /*<<< orphan*/ printf(char *, char *);
main() { printf("$%s.00\n", ProtectedIntegerField(123, 8)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7b,%edi
mov    $0x8,%esi
call   1030 <ProtectedIntegerField@plt>
mov    %rax,%rsi
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7b,%edi
mov    $0x8,%esi
call   1030 <ProtectedIntegerField@plt>
lea    0xec9(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"$%s.00\0A\00"
define i32 @main() {
%1 = call i8* @ProtectedIntegerField(i32 123, i32 8)
%2 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"$%s.00\0A\00"
define i32 @main() {
%1 = tail call i8* @ProtectedIntegerField(i32 123, i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void mem_cpy(void *mem, const void *src, size_t size) {
  memcpy(mem, src, size);
}


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

x86 assembly (clang, -O2):
<mem_cpy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @mem_cpy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void troca2(int p, int q) {
  int temp;
  temp = p;
  p = q;
  q = temp;
  printf("@@@@   %d %d\n", p, q);
}


x86 assembly (clang, -O0):
<troca2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<troca2>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"@@@@ %d %d\0A\00"
define void @troca2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %4
store i32 %7, i32* %3
%8 = load i32, i32* %5
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"@@@@ %d %d\0A\00"
define void @troca2(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
void bitfix_finish(void) { ; }


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

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

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

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

/* Variables and functions */
unsigned int scgc_hash_key(void *keyPtr) {
  int64_t x = (intptr_t) * ((void **)keyPtr);
  int64_t a = 2348923;
  int64_t b = 3292;
  int64_t c = 9893487421;
  int32_t low = (int)x;
  int32_t high = (int)(x >> 32);
  return (unsigned int)((a * low + b * high + c) >> 32);
}


x86 assembly (clang, -O0):
<scgc_hash_key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %eax,-0xc(%rbp)
movl   $0x23d77b,-0x10(%rbp)
movl   $0xcdc,-0x14(%rbp)
movl   $0x4db2a33d,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x20(%rbp),%ecx
add    %ecx,%eax
add    -0x18(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @scgc_hash_key(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %2
%9 = load i8*, i8** %2
%10 = bitcast i8* %9 to i8**
%11 = load i8*, i8** %10
%12 = ptrtoint i8* %11 to i64
%13 = trunc i64 %12 to i32
store i32 %13, i32* %3
store i32 2348923, i32* %4
store i32 3292, i32* %5
store i32 1303552829, i32* %6
%14 = load i32, i32* %3
store i32 %14, i32* %7
%15 = load i32, i32* %3
%16 = ashr i32 %15, 32
store i32 %16, i32* %8
%17 = load i32, i32* %4
%18 = load i32, i32* %7
%19 = mul nsw i32 %17, %18
%20 = load i32, i32* %5
%21 = load i32, i32* %8
%22 = mul nsw i32 %20, %21
%23 = add nsw i32 %19, %22
%24 = load i32, i32* %6
%25 = add nsw i32 %23, %24
%26 = ashr i32 %25, 32
ret i32 %26
}

LLVM IR (-O2):
define i32 @scgc_hash_key(i8* nocapture readnone %0) {
ret i32 poison
}
/* Variables and functions */
scalar_t__ thread(int /*<<< orphan*/);
int main(void) {
  int x = 0;
  x += thread(0);
  return x;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i64 @thread(i32 0)
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = add nsw i64 %5, %3
%7 = trunc i64 %6 to i32
store i32 %7, i32* %2
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @thread(i32 0)
%2 = trunc i64 %1 to i32
ret i32 %2
}
/* Variables and functions */
void clr(int *p, size_t i) { p[i >> 5] &= ~(1 << (i & 0x1f)); }


x86 assembly (clang, -O0):
<clr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1f,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x5,%rcx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr>:
mov    %rsi,%rcx
mov    $0xfffffffe,%eax
rol    %cl,%eax
shr    $0x5,%rcx
and    %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @clr(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 31
%7 = trunc i64 %6 to i32
%8 = shl i32 1, %7
%9 = xor i32 %8, -1
%10 = load i32*, i32** %3
%11 = load i64, i64* %4
%12 = lshr i64 %11, 5
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = and i32 %14, %9
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @clr(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = and i32 %3, 31
%5 = shl nuw i32 1, %4
%6 = xor i32 %5, -1
%7 = lshr i64 %1, 5
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %9, %6
store i32 %10, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mp_hal_setLed(int, int);
int /*<<< orphan*/ mp_hal_testLed(int);
int /*<<< orphan*/ utest_assertEqualsInt(int, int /*<<< orphan*/);
void testLeds1(void) {
  mp_hal_setLed(0, 1);
  utest_assertEqualsInt(1, mp_hal_testLed(0));
  mp_hal_setLed(1, 0);
  utest_assertEqualsInt(0, mp_hal_testLed(1));
  mp_hal_setLed(2, 1);
  utest_assertEqualsInt(1, mp_hal_testLed(2));
}


x86 assembly (clang, -O0):
<testLeds1>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <mp_hal_setLed@plt>
xor    %edi,%edi
call   1030 <mp_hal_testLed@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   1050 <utest_assertEqualsInt@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <mp_hal_setLed@plt>
mov    $0x1,%edi
call   1030 <mp_hal_testLed@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1050 <utest_assertEqualsInt@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <mp_hal_setLed@plt>
mov    $0x2,%edi
call   1030 <mp_hal_testLed@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   1050 <utest_assertEqualsInt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testLeds1>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <mp_hal_setLed@plt>
xor    %edi,%edi
call   1030 <mp_hal_testLed@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   1050 <utest_assertEqualsInt@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <mp_hal_setLed@plt>
mov    $0x1,%edi
call   1030 <mp_hal_testLed@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1050 <utest_assertEqualsInt@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <mp_hal_setLed@plt>
mov    $0x2,%edi
call   1030 <mp_hal_testLed@plt>
mov    $0x1,%edi
mov    %eax,%esi
pop    %rax
jmp    1050 <utest_assertEqualsInt@plt>

LLVM IR (-O0):
define void @testLeds1() {
%1 = call i32 @mp_hal_setLed(i32 0, i32 1)
%2 = call i32 @mp_hal_testLed(i32 0)
%3 = call i32 @utest_assertEqualsInt(i32 1, i32 %2)
%4 = call i32 @mp_hal_setLed(i32 1, i32 0)
%5 = call i32 @mp_hal_testLed(i32 1)
%6 = call i32 @utest_assertEqualsInt(i32 0, i32 %5)
%7 = call i32 @mp_hal_setLed(i32 2, i32 1)
%8 = call i32 @mp_hal_testLed(i32 2)
%9 = call i32 @utest_assertEqualsInt(i32 1, i32 %8)
ret void
}

LLVM IR (-O2):
define void @testLeds1() {
%1 = tail call i32 @mp_hal_setLed(i32 0, i32 1)
%2 = tail call i32 @mp_hal_testLed(i32 0)
%3 = tail call i32 @utest_assertEqualsInt(i32 1, i32 %2)
%4 = tail call i32 @mp_hal_setLed(i32 1, i32 0)
%5 = tail call i32 @mp_hal_testLed(i32 1)
%6 = tail call i32 @utest_assertEqualsInt(i32 0, i32 %5)
%7 = tail call i32 @mp_hal_setLed(i32 2, i32 1)
%8 = tail call i32 @mp_hal_testLed(i32 2)
%9 = tail call i32 @utest_assertEqualsInt(i32 1, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ testMerge();
int /*<<< orphan*/ testScore();
int main() {
  printf("board.h test\n");
  testMerge();
  testScore();
  printf("All good.\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <testMerge@plt>
xor    %eax,%eax
call   1030 <testScore@plt>
lea    0xebb(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"board.h test\0A\00"
@.str.1 = [11 x i8] c"All good.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @testMerge()
%4 = call i32 (...) @testScore()
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"board.h test\00"
@str.2 = [10 x i8] c"All good.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @testMerge()
%3 = tail call i32 (...) @testScore()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}