xunge/DecIR huggingface dataset:
/* Variables and functions */
int SPIFlash_ReadStatusRegister();
void SPIFlash_WaitWriteDone(void) {
  while (SPIFlash_ReadStatusRegister() & 1)
    ;
}


x86 assembly (clang, -O0):
<SPIFlash_WaitWriteDone>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <SPIFlash_WaitWriteDone+0x9>
mov    $0x0,%al
call   1030 <SPIFlash_ReadStatusRegister@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     1131 <SPIFlash_WaitWriteDone+0x21>
jmp    1119 <SPIFlash_WaitWriteDone+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPIFlash_WaitWriteDone>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <SPIFlash_ReadStatusRegister@plt>
test   $0x1,%al
jne    1120 <SPIFlash_WaitWriteDone+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @SPIFlash_WaitWriteDone() {
br label %1
1: ; preds = %5, %0
%2 = call i32 (...) @SPIFlash_ReadStatusRegister()
%3 = and i32 %2, 1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @SPIFlash_WaitWriteDone() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @SPIFlash_ReadStatusRegister()
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
unsigned normal4x_generic_output_fmts(unsigned input_fmts) {
  return input_fmts;
}


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

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

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

LLVM IR (-O2):
define i32 @normal4x_generic_output_fmts(i32 returned %0) {
ret i32 %0
}
int soc_is_sc7715(void) {
  unsigned int flag = 0;
  flag = sci_get_chip_id() & 0xffff0000;
  if (((0x77150000) == flag) || ((0X88150000) == flag)) {
    return 1;
  } else {
    pr_err("%s error chip id\n", __func__);
    return 0;
  }
}


x86 assembly (clang, -O0):
<soc_is_sc7715>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <sci_get_chip_id@plt>
and    $0xffff0000,%eax
mov    %eax,-0x8(%rbp)
mov    $0x77150000,%eax
cmp    -0x8(%rbp),%eax
je     115a <soc_is_sc7715+0x3a>
mov    $0x88150000,%eax
cmp    -0x8(%rbp),%eax
jne    1166 <soc_is_sc7715+0x46>
movl   $0x1,-0x4(%rbp)
jmp    1182 <soc_is_sc7715+0x62>
lea    0xe93(%rip),%rdi
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1040 <pr_err@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soc_is_sc7715>:
push   %rbx
xor    %eax,%eax
call   1030 <sci_get_chip_id@plt>
and    $0xffff0000,%eax
mov    $0x1,%ebx
cmp    $0x88150000,%eax
je     1157 <soc_is_sc7715+0x37>
cmp    $0x77150000,%eax
je     1157 <soc_is_sc7715+0x37>
lea    0xeb9(%rip),%rdi
lea    0xec4(%rip),%rsi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <pr_err@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%s error chip id\0A\00"
@__func__.soc_is_sc7715 = [14 x i8] c"soc_is_sc7715\00"
define i32 @soc_is_sc7715() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
%3 = call i32 (...) @sci_get_chip_id()
%4 = and i32 %3, -65536
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 1997864960, %5
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp eq i32 -2011889664, %8
br i1 %9, label %10, label %11
10: ; preds = %7, %0
store i32 1, i32* %1
br label %13
11: ; preds = %7
%12 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_err to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.soc_is_sc7715, i64 0, i64 0))
store i32 0, i32* %1
br label %13
13: ; preds = %11, %10
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s error chip id\0A\00"
@__func__.soc_is_sc7715 = [14 x i8] c"soc_is_sc7715\00"
define i32 @soc_is_sc7715() {
%1 = tail call i32 (...) @sci_get_chip_id()
%2 = and i32 %1, -65536
switch i32 %2, label %3 [
i32 -2011889664, label %5
i32 1997864960, label %5
]
3: ; preds = %0
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_err to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.soc_is_sc7715, i64 0, i64 0))
br label %5
5: ; preds = %0, %0, %3
%6 = phi i32 [ 0, %3 ], [ 1, %0 ], [ 1, %0 ]
ret i32 %6
}
void XSetForeground() {}


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

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

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

LLVM IR (-O2):
define void @XSetForeground() {
ret void
}
int edflib_version(void) { return (109); }


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

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

LLVM IR (-O0):
define i32 @edflib_version() {
ret i32 109
}

LLVM IR (-O2):
define i32 @edflib_version() {
ret i32 109
}
/* Variables and functions */
int /*<<< orphan*/ body(int, char **);
int /*<<< orphan*/ init();
int /*<<< orphan*/ quit();
int main(int argc, char **argv) {
  init();
  body(argc, argv);
  quit();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <init@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <body@plt>
mov    $0x0,%al
call   1040 <quit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <body@plt>
xor    %eax,%eax
call   1040 <quit@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @init()
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @body(i32 %7, i8** %8)
%10 = call i32 (...) @quit()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @init()
%4 = tail call i32 @body(i32 %0, i8** %1)
%5 = tail call i32 (...) @quit()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int quick_select(int *, int /*<<< orphan*/, int, int);
int main() {
  int ar[] = {10, 5, 1, 6, 7, 3, 2, 4, 8, 9};
  printf("%d\n", quick_select(ar, 0, 9, 3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x9,%edx
mov    $0x3,%ecx
call   1050 <quick_select@plt>
mov    %eax,%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x9,%edx
mov    $0x3,%ecx
call   1040 <quick_select@plt>
lea    0xec6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.ar = [10 x i32] [i32 10, i32 5, i32 1, i32 6, i32 7, i32 3, i32 2, i32 4, i32 8, i32 9]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @quick_select(i32* %4, i32 0, i32 9, i32 3)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.ar = [10 x i32] [i32 10, i32 5, i32 1, i32 6, i32 7, i32 3, i32 2, i32 4, i32 8, i32 9]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @quick_select(i32* %3, i32 0, i32 9, i32 3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void lp_solve_version_info(int *majorversion, int *minorversion, int *release,
                           int *build) {}


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

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

LLVM IR (-O0):
define void @lp_solve_version_info(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
ret void
}

LLVM IR (-O2):
define void @lp_solve_version_info(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char, char, int, char, char);
void b_clr() { printf("%c%c%c%c%c%c", 27, '[', 'H', 27, '[', 'J'); }


x86 assembly (clang, -O0):
<b_clr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x1b,%r8d
mov    $0x5b,%r9d
mov    $0x48,%ecx
mov    %r8d,%esi
mov    %r9d,%edx
movl   $0x4a,(%rsp)
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_clr>:
push   %rax
movl   $0x4a,(%rsp)
lea    0xee1(%rip),%rdi
mov    $0x1b,%esi
mov    $0x5b,%edx
mov    $0x48,%ecx
mov    $0x1b,%r8d
mov    $0x5b,%r9d
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%c%c%c%c%c%c\00"
define void @b_clr() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 27, i8 signext 91, i8 signext 72, i32 27, i8 signext 91, i8 signext 74)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%c%c%c%c%c%c\00"
define void @b_clr() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 27, i8 signext 91, i8 signext 72, i32 27, i8 signext 91, i8 signext 74)
ret void
}
int test_imm_C6uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xC6 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C6uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 198
%7 = icmp ne i64 %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_C6uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 12976128
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
void systick_handler() {
  *(volatile uint32_t *)(((uint32_t)(0xE000E000) + 0x0D00) + 0x004) |=
      (uint32_t)(1 << 28);
}


x86 assembly (clang, -O0):
<systick_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000ed04,%eax
mov    (%rax),%rcx
or     $0x10000000,%rcx
mov    $0xe000ed04,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<systick_handler>:
mov    $0xe000ed04,%eax
orq    $0x10000000,(%rax)
ret

LLVM IR (-O0):
define void @systick_handler() {
%1 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%2 = or i64 %1, 268435456
store volatile i64 %2, i64* inttoptr (i64 3758157060 to i64*)
ret void
}

LLVM IR (-O2):
define void @systick_handler() {
%1 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%2 = or i64 %1, 268435456
store volatile i64 %2, i64* inttoptr (i64 3758157060 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int main() {
  exit(69);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x45,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x45,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @exit(i32 69)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 69)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, void **, int);
char *inject_funcall(char *buf, void *func) {
  buf[0] = 0xb8;
  memcpy(buf + 1, &func, 4);
  buf[5] = 0xff;
  buf[6] = 0xd0;
  return buf + 7;
}


x86 assembly (clang, -O0):
<inject_funcall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0xb8,(%rax)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
movb   $0xff,0x5(%rax)
mov    -0x8(%rbp),%rax
movb   $0xd0,0x6(%rax)
mov    -0x8(%rbp),%rax
add    $0x7,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inject_funcall>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %rsi,0x8(%rsp)
movb   $0xb8,(%rdi)
add    $0x1,%rdi
lea    0x8(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movw   $0xd0ff,0x5(%rbx)
add    $0x7,%rbx
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @inject_funcall(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 -72, i8* %6
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = call i32 @memcpy(i8* %8, i8** %4, i32 4)
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 5
store i8 -1, i8* %11
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 6
store i8 -48, i8* %13
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 7
ret i8* %15
}

LLVM IR (-O2):
define i8* @inject_funcall(i8* %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
store i8 -72, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = call i32 @memcpy(i8* %4, i8** %3, i32 4)
%6 = getelementptr inbounds i8, i8* %0, i64 5
store i8 -1, i8* %6
%7 = getelementptr inbounds i8, i8* %0, i64 6
store i8 -48, i8* %7
%8 = getelementptr inbounds i8, i8* %0, i64 7
ret i8* %8
}
/* Variables and functions */
size_t strlen(char const *);
size_t uint32_size(size_t);
size_t string_size(const char *str) {
  size_t len = str ? strlen(str) : 0;
  return uint32_size(len) + len;
}


x86 assembly (clang, -O0):
<string_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <string_size+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
jmp    1154 <string_size+0x34>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1154 <string_size+0x34>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <uint32_size@plt>
add    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_size>:
push   %rbx
test   %rdi,%rdi
je     1130 <string_size+0x10>
call   1030 <strlen@plt>
mov    %rax,%rbx
jmp    1132 <string_size+0x12>
xor    %ebx,%ebx
mov    %rbx,%rdi
call   1040 <uint32_size@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @string_size(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @strlen(i8* %7)
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %6
%11 = phi i64 [ %8, %6 ], [ 0, %9 ]
store i64 %11, i64* %3
%12 = load i64, i64* %3
%13 = call i64 @uint32_size(i64 %12)
%14 = load i64, i64* %3
%15 = add i64 %13, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @string_size(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i64 [ %4, %3 ], [ 0, %1 ]
%7 = tail call i64 @uint32_size(i64 %6)
%8 = add i64 %7, %6
ret i64 %8
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
int fuzix_tolower(int c) {
  uint8_t cb = c;
  if ((cb >= 'A') && (cb <= 'Z'))
    cb ^= 0x20;
  return cb;
}


x86 assembly (clang, -O0):
<fuzix_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1131 <fuzix_tolower+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1131 <fuzix_tolower+0x31>
movsbl -0x5(%rbp),%eax
xor    $0x20,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fuzix_tolower>:
movsbl %dil,%ecx
shl    $0x18,%edi
add    $0xbfffffff,%edi
mov    %ecx,%eax
xor    $0x20,%eax
cmp    $0x1affffff,%edi
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @fuzix_tolower(i32 %0) {
%2 = shl i32 %0, 24
%3 = add i32 %2, -1073741825
%4 = icmp ult i32 %3, 452984831
%5 = ashr exact i32 %2, 24
%6 = xor i32 %5, 32
%7 = select i1 %4, i32 %6, i32 %5
ret i32 %7
}
int main() { return 2 + 2; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
void foo360() {}


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

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

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

LLVM IR (-O2):
define void @foo360() {
ret void
}
void oscap_iterator_free(struct oscap_iterator *it) {
  __oscap_free_dbg((void **)((void *)&(it)), __PRETTY_FUNCTION__, 305);
}


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

x86 assembly (clang, -O2):
<oscap_iterator_free>:
push   %rax
mov    %rdi,(%rsp)
lea    0xee4(%rip),%rsi
mov    %rsp,%rdi
mov    $0x131,%edx
xor    %eax,%eax
call   1030 <__oscap_free_dbg@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.oscap_iterator = type opaque
@__PRETTY_FUNCTION__.oscap_iterator_free = [50 x i8] c"void oscap_iterator_free(struct oscap_iterator *)\00"
define void @oscap_iterator_free(%struct.oscap_iterator* %0) {
%2 = alloca %struct.oscap_iterator*
store %struct.oscap_iterator* %0, %struct.oscap_iterator** %2
%3 = bitcast %struct.oscap_iterator** %2 to i8*
%4 = bitcast i8* %3 to i8**
%5 = call i32 (i8**, i8*, i32, ...) bitcast (i32 (...)* @__oscap_free_dbg to i32 (i8**, i8*, i32, ...)*)(i8** %4, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @__PRETTY_FUNCTION__.oscap_iterator_free, i64 0, i64 0), i32 305)
ret void
}

LLVM IR (-O2):
%struct.oscap_iterator = type opaque
@__PRETTY_FUNCTION__.oscap_iterator_free = [50 x i8] c"void oscap_iterator_free(struct oscap_iterator *)\00"
define void @oscap_iterator_free(%struct.oscap_iterator* %0) {
%2 = alloca %struct.oscap_iterator*
store %struct.oscap_iterator* %0, %struct.oscap_iterator** %2
%3 = bitcast %struct.oscap_iterator** %2 to i8**
%4 = call i32 (i8**, i8*, i32, ...) bitcast (i32 (...)* @__oscap_free_dbg to i32 (i8**, i8*, i32, ...)*)(i8** %3, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @__PRETTY_FUNCTION__.oscap_iterator_free, i64 0, i64 0), i32 305)
ret void
}
void snprintf_string(char **str, char *str_end, char *value) {
  while (*value && *str != str_end) {
    **str = *value;
    (*str)++;
    value++;
  }
}


x86 assembly (clang, -O0):
<snprintf_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1136 <snprintf_string+0x36>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1146 <snprintf_string+0x46>
jmp    1174 <snprintf_string+0x74>
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <snprintf_string+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<snprintf_string>:
mov    (%rdx),%al
test   %al,%al
je     112c <snprintf_string+0x2c>
mov    (%rdi),%rcx
add    $0x1,%rdx
nopl   (%rax)
cmp    %rsi,%rcx
je     112c <snprintf_string+0x2c>
mov    %al,(%rcx)
mov    (%rdi),%rcx
add    $0x1,%rcx
mov    %rcx,(%rdi)
movzbl (%rdx),%eax
add    $0x1,%rdx
test   %al,%al
jne    1110 <snprintf_string+0x10>
ret

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

LLVM IR (-O2):
define void @snprintf_string(i8** nocapture %0, i8* readnone %1, i8* nocapture %2) {
%4 = load i8, i8* %2
%5 = icmp eq i8 %4, 0
br i1 %5, label %19, label %6
6: ; preds = %3
%7 = load i8*, i8** %0
br label %8
8: ; preds = %6, %13
%9 = phi i8* [ %15, %13 ], [ %7, %6 ]
%10 = phi i8 [ %17, %13 ], [ %4, %6 ]
%11 = phi i8* [ %16, %13 ], [ %2, %6 ]
%12 = icmp eq i8* %9, %1
br i1 %12, label %19, label %13
13: ; preds = %8
store i8 %10, i8* %9
%14 = load i8*, i8** %0
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %0
%16 = getelementptr inbounds i8, i8* %11, i64 1
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %8
19: ; preds = %8, %13, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatserror(char *);
volatile void editLineNumberOverflow() {
  fatserror("edit script refers to line past end of file");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"edit script refers to line past end of file\00"
define void @editLineNumberOverflow() {
%1 = call i32 @fatserror(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"edit script refers to line past end of file\00"
define void @editLineNumberOverflow() {
%1 = tail call i32 @fatserror(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_inc_h(void) { op_write1(0x24); }


x86 assembly (clang, -O0):
<op_enc_inc_h>:
push   %rbp
mov    %rsp,%rbp
mov    $0x24,%edi
call   1030 <op_write1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_enc_inc_h>:
mov    $0x24,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_inc_h() {
%1 = call i32 @op_write1(i32 36)
ret void
}

LLVM IR (-O2):
define void @op_enc_inc_h() {
%1 = tail call i32 @op_write1(i32 36)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_enable(int /*<<< orphan*/);
int /*<<< orphan*/ log_summary();
void __attribute__((destructor)) nu_fini(void) {
  log_enable(0);
  log_summary();
}


x86 assembly (clang, -O0):
<nu_fini>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <log_enable@plt>
mov    $0x0,%al
call   1040 <log_summary@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nu_fini>:
push   %rax
xor    %edi,%edi
call   1030 <log_enable@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <log_summary@plt>

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @nu_fini, i8* null }]
define void @nu_fini() {
%1 = call i32 @log_enable(i32 0)
%2 = call i32 (...) @log_summary()
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @nu_fini, i8* null }]
define void @nu_fini() {
%1 = tail call i32 @log_enable(i32 0)
%2 = tail call i32 (...) @log_summary()
ret void
}
void XcmsCIELuvClipuv() {}


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

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

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

LLVM IR (-O2):
define void @XcmsCIELuvClipuv() {
ret void
}
int sscanf(const char *__restrict str, char const *__restrict fmt, ...) {
  int ret = 0;
  while (*fmt != '\0') {
    if (*fmt++ == '%') {
      ret++;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<sscanf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114c <sscanf+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    1147 <sscanf+0x47>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <sscanf+0x13>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sscanf>:
mov    (%rsi),%cl
test   %cl,%cl
je     1126 <sscanf+0x26>
add    $0x1,%rsi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    $0x25,%cl
sete   %dl
add    %edx,%eax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <sscanf+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sscanf(i8* noalias nocapture readnone %0, i8* noalias nocapture %1, ...) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %12, %5 ], [ 0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = icmp eq i8 %6, 37
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %7, %11
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %12, %5 ]
ret i32 %16
}
/* Type definitions */
typedef scalar_t__ pthread_key_t;

/* Variables and functions */
scalar_t__ __sulong_thread_key_create(void (*)(void *));
int pthread_key_create(pthread_key_t *key, void (*destructor)(void *)) {
  *key = (pthread_key_t)__sulong_thread_key_create(destructor);
  return 0;
}


x86 assembly (clang, -O0):
<pthread_key_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <__sulong_thread_key_create@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @pthread_key_create(i64* nocapture writeonly %0, void (i8*)* %1) {
%3 = tail call i64 @__sulong_thread_key_create(void (i8*)* %1)
store i64 %3, i64* %0
ret i32 0
}
unsigned long QEIVelocityGet(unsigned long ulBase) {
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x0000001C))));
}


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

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

LLVM IR (-O0):
define i64 @QEIVelocityGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 28
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @QEIVelocityGet(i64 %0) {
%2 = add i64 %0, 28
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ rdar6623513(int /*<<< orphan*/, char *, char *, int,
                               char const *);
int rdar6623513_aux(int len, const char *s) {
  rdar6623513(0, "hello", "%.*s", len, s);
}


x86 assembly (clang, -O0):
<rdar6623513_aux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%r8
xor    %edi,%edi
lea    0xed1(%rip),%rsi
lea    0xed0(%rip),%rdx
call   1030 <rdar6623513@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdar6623513_aux>:
mov    %rsi,%r8
mov    %edi,%ecx
lea    0xee4(%rip),%rsi
lea    0xee3(%rip),%rdx
xor    %edi,%edi
jmp    1030 <rdar6623513@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [5 x i8] c"%.*s\00"
define i32 @rdar6623513_aux(i32 %0, i8* %1) {
%3 = tail call i32 @rdar6623513(i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %0, i8* %1)
ret i32 undef
}
/* Variables and functions */
char const *irc_message_get_nick_from_host(char const *);
const char *irc_info_info_irc_nick_from_host_cb(const void *pointer, void *data,
                                                const char *info_name,
                                                const char *arguments) {
  (void)pointer;
  (void)data;
  (void)info_name;
  return (arguments && arguments[0]) ? irc_message_get_nick_from_host(arguments)
                                     : NULL;
}


x86 assembly (clang, -O0):
<irc_info_info_irc_nick_from_host_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1155 <irc_info_info_irc_nick_from_host_cb+0x45>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1155 <irc_info_info_irc_nick_from_host_cb+0x45>
mov    -0x20(%rbp),%rdi
call   1030 <irc_message_get_nick_from_host@plt>
mov    %rax,-0x28(%rbp)
jmp    1160 <irc_info_info_irc_nick_from_host_cb+0x50>
xor    %eax,%eax
mov    %rax,-0x28(%rbp)
jmp    1160 <irc_info_info_irc_nick_from_host_cb+0x50>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_info_info_irc_nick_from_host_cb>:
test   %rcx,%rcx
je     1122 <irc_info_info_irc_nick_from_host_cb+0x12>
cmpb   $0x0,(%rcx)
je     1122 <irc_info_info_irc_nick_from_host_cb+0x12>
mov    %rcx,%rdi
jmp    1030 <irc_message_get_nick_from_host@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @irc_info_info_irc_nick_from_host_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = icmp eq i8* %3, null
br i1 %5, label %11, label %6
6: ; preds = %4
%7 = load i8, i8* %3
%8 = icmp eq i8 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i8* @irc_message_get_nick_from_host(i8* %3)
br label %11
11: ; preds = %4, %6, %9
%12 = phi i8* [ %10, %9 ], [ null, %6 ], [ null, %4 ]
ret i8* %12
}
int test_imm_1Dint32_reg(int val) { return ((val) & (0x1D << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_1Dint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x1d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_1Dint32_reg(i32 %0) {
%2 = and i32 %0, 29
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int enable;
typedef int control_id;

/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void BatchSetEnable(unsigned short int control_id, unsigned char enable) {
  SendChar(((control_id) >> 8) & 0xFF);
  SendChar((control_id)&0xFF);
  SendChar((2) & 0xFF);
  SendChar((enable)&0xFF);
}


x86 assembly (clang, -O0):
<BatchSetEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzwl -0x2(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzwl -0x2(%rbp),%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0x2,%edi
call   1030 <SendChar@plt>
movzbl -0x3(%rbp),%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BatchSetEnable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
shr    $0x8,%edi
call   1030 <SendChar@plt>
movzbl %bpl,%edi
call   1030 <SendChar@plt>
mov    $0x2,%edi
call   1030 <SendChar@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @BatchSetEnable(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = call i32 @SendChar(i32 %8)
%10 = load i16, i16* %3
%11 = zext i16 %10 to i32
%12 = and i32 %11, 255
%13 = call i32 @SendChar(i32 %12)
%14 = call i32 @SendChar(i32 2)
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = and i32 %16, 255
%18 = call i32 @SendChar(i32 %17)
ret void
}

LLVM IR (-O2):
define void @BatchSetEnable(i16 zeroext %0, i8 zeroext %1) {
%3 = zext i16 %0 to i32
%4 = lshr i32 %3, 8
%5 = tail call i32 @SendChar(i32 %4)
%6 = and i32 %3, 255
%7 = tail call i32 @SendChar(i32 %6)
%8 = tail call i32 @SendChar(i32 2)
%9 = zext i8 %1 to i32
%10 = tail call i32 @SendChar(i32 %9)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
int lstat(const char *path, struct stat *buf) { return stat(path, buf); }


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

x86 assembly (clang, -O2):
<lstat>:
jmp    1030 <stat@plt>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @lstat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @stat(i8* %0, %struct.stat* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ wait(int *);
void sig_chld(int signo) {
  pid_t pid;
  int stat;
  while ((pid = wait(&stat)) > 0)
    ;
  return;
}


x86 assembly (clang, -O0):
<sig_chld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <wait@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1135 <sig_chld+0x25>
jmp    111b <sig_chld+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_chld>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <wait@plt>
test   %eax,%eax
jg     1120 <sig_chld+0x10>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @sig_chld(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %8, %1
%6 = call i32 @wait(i32* %4)
store i32 %6, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
br label %5
9: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @sig_chld(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = call i32 @wait(i32* %2)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %4, label %7
7: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void ipsec_help(void) {
  puts("IPSEC Options:\n"
       "    --ipsec-ah-length NUM     IPSec AH header length           "
       "(default NONE)\n"
       "    --ipsec-ah-spi NUM        IPSec AH SPI                     "
       "(default RANDOM)\n"
       "    --ipsec-ah-sequence NUM   IPSec AH sequence #              "
       "(default RANDOM)\n"
       "    --ipsec-esp-spi NUM       IPSec ESP SPI                    "
       "(default RANDOM)\n"
       "    --ipsec-esp-sequence NUM  IPSec ESP sequence #             "
       "(default RANDOM)\n");
}


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

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

LLVM IR (-O0):
@.str = [414 x i8] c"IPSEC Options:\0A --ipsec-ah-length NUM IPSec AH header length (default NONE)\0A --ipsec-ah-spi NUM IPSec AH SPI (default RANDOM)\0A --ipsec-ah-sequence NUM IPSec AH sequence # (default RANDOM)\0A --ipsec-esp-spi NUM IPSec ESP SPI (default RANDOM)\0A --ipsec-esp-sequence NUM IPSec ESP sequence # (default RANDOM)\0A\00"
define void @ipsec_help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([414 x i8], [414 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [414 x i8] c"IPSEC Options:\0A --ipsec-ah-length NUM IPSec AH header length (default NONE)\0A --ipsec-ah-spi NUM IPSec AH SPI (default RANDOM)\0A --ipsec-ah-sequence NUM IPSec AH sequence # (default RANDOM)\0A --ipsec-esp-spi NUM IPSec ESP SPI (default RANDOM)\0A --ipsec-esp-sequence NUM IPSec ESP sequence # (default RANDOM)\0A\00"
define void @ipsec_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([414 x i8], [414 x i8]* @.str, i64 0, i64 0))
ret void
}
void foo754(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo754(i32 %0) {
ret void
}
int is_wall_rubble(int w) { return (w >= 0x51 && w <= 0x62); }


x86 assembly (clang, -O0):
<is_wall_rubble>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x51,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <is_wall_rubble+0x20>
cmpl   $0x62,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_wall_rubble>:
add    $0xffffffaf,%edi
xor    %eax,%eax
cmp    $0x12,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @is_wall_rubble(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 81
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 98
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_wall_rubble(i32 %0) {
%2 = add i32 %0, -81
%3 = icmp ult i32 %2, 18
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void die_perror(char *message) {
  perror(message);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<die_perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die_perror>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @die_perror(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void fdmi_dtype_op_SUM_int(void *a, void *b) {
  (*(int *)a = (*(int *)a) + (*(int *)b));
}


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

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

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

LLVM IR (-O2):
define void @fdmi_dtype_op_SUM_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = add nsw i32 %6, %4
store i32 %7, i32* %3
ret void
}
void wdt_init(void) {}


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

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

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

LLVM IR (-O2):
define void @wdt_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void show_msg_op(char *name, int value) { printf("Msg: %s:%d\n", name, value); }


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

x86 assembly (clang, -O2):
<show_msg_op>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

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

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