xunge/DecIR huggingface dataset:
int ctz2(unsigned x) {
  static short table[64] = {32, 0,  1,  12, 2,  6,  0,  13, 3,  0,  7,  0, 0,
                            0,  0,  14, 10, 4,  0,  0,  8,  0,  0,  25, 0, 0,
                            0,  0,  0,  21, 27, 15, 31, 11, 5,  0,  0,  0, 0,
                            0,  9,  0,  0,  24, 0,  0,  20, 26, 30, 0,  0, 0,
                            0,  23, 0,  19, 29, 0,  22, 18, 28, 17, 16, 0};
  x = (x & -x) * 0x0450FBAF;
  return table[x >> 26];
}


x86 assembly (clang, -O0):
<ctz2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
and    %ecx,%eax
imul   $0x450fbaf,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1a,%eax
mov    %eax,%eax
mov    %eax,%ecx
lea    0x2f05(%rip),%rax
movswl (%rax,%rcx,2),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctz2>:
mov    %edi,%eax
neg    %eax
and    %edi,%eax
imul   $0x450fbaf,%eax,%eax
shr    $0x1a,%eax
lea    0xeea(%rip),%rcx
movswl (%rcx,%rax,2),%eax
ret

LLVM IR (-O0):
@ctz2.table = internal global [64 x i16] [i16 32, i16 0, i16 1, i16 12, i16 2, i16 6, i16 0, i16 13, i16 3, i16 0, i16 7, i16 0, i16 0, i16 0, i16 0, i16 14, i16 10, i16 4, i16 0, i16 0, i16 8, i16 0, i16 0, i16 25, i16 0, i16 0, i16 0, i16 0, i16 0, i16 21, i16 27, i16 15, i16 31, i16 11, i16 5, i16 0, i16 0, i16 0, i16 0, i16 0, i16 9, i16 0, i16 0, i16 24, i16 0, i16 0, i16 20, i16 26, i16 30, i16 0, i16 0, i16 0, i16 0, i16 23, i16 0, i16 19, i16 29, i16 0, i16 22, i16 18, i16 28, i16 17, i16 16, i16 0]
define i32 @ctz2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub i32 0, %4
%6 = and i32 %3, %5
%7 = mul i32 %6, 72416175
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = lshr i32 %8, 26
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds [64 x i16], [64 x i16]* @ctz2.table, i64 0, i64 %10
%12 = load i16, i16* %11
%13 = sext i16 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@ctz2.table = internal unnamed_addr constant [64 x i16] [i16 32, i16 0, i16 1, i16 12, i16 2, i16 6, i16 0, i16 13, i16 3, i16 0, i16 7, i16 0, i16 0, i16 0, i16 0, i16 14, i16 10, i16 4, i16 0, i16 0, i16 8, i16 0, i16 0, i16 25, i16 0, i16 0, i16 0, i16 0, i16 0, i16 21, i16 27, i16 15, i16 31, i16 11, i16 5, i16 0, i16 0, i16 0, i16 0, i16 0, i16 9, i16 0, i16 0, i16 24, i16 0, i16 0, i16 20, i16 26, i16 30, i16 0, i16 0, i16 0, i16 0, i16 23, i16 0, i16 19, i16 29, i16 0, i16 22, i16 18, i16 28, i16 17, i16 16, i16 0]
define i32 @ctz2(i32 %0) {
%2 = sub i32 0, %0
%3 = and i32 %2, %0
%4 = mul i32 %3, 72416175
%5 = lshr i32 %4, 26
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds [64 x i16], [64 x i16]* @ctz2.table, i64 0, i64 %6
%8 = load i16, i16* %7
%9 = sext i16 %8 to i32
ret i32 %9
}
int clz(const unsigned int mask) { return __builtin_clz(mask); }


x86 assembly (clang, -O0):
<clz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
bsr    %eax,%eax
xor    $0x1f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clz>:
bsr    %edi,%eax
xor    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @clz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @llvm.ctlz.i32(i32 %3, i1 true)
ret i32 %4
}

LLVM IR (-O2):
define i32 @clz(i32 %0) {
%2 = tail call i32 @llvm.ctlz.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(void *);
void *malloc(size_t);
void *s_malloc(size_t len) {
  void *ptr = malloc(len);
  assert(ptr);
  return ptr;
}


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

x86 assembly (clang, -O2):
<s_malloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @s_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @assert(i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @s_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = tail call i32 @assert(i8* %2)
ret i8* %2
}
sub2(i) int i;
{ return i + (5 + i); }


x86 assembly (clang, -O0):
<sub2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x5,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub2>:
lea    (%rdi,%rdi,1),%eax
add    $0x5,%eax
ret

LLVM IR (-O0):
define i32 @sub2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 5, %4
%6 = add nsw i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @sub2(i32 %0) {
%2 = shl i32 %0, 1
%3 = add i32 %2, 5
ret i32 %3
}
int ProcTime(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ProcTime() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ D();
int C() { D(); }


x86 assembly (clang, -O0):
<C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <D@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @C() {
%1 = alloca i32
%2 = call i32 (...) @D()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @C() {
%1 = tail call i32 (...) @D()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _sys_printf(char *);
void trap_eflags() {
  _sys_printf("trap\n");
  for (;;) {
  };
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"trap\0A\00"
define void @trap_eflags() {
%1 = tail call i32 @_sys_printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
ISR(TIMER0_COMPA_vect) {
  DEBUG("ISR "
        "TIMER0_COMPA"
        " occured");
}


x86 assembly (clang, -O0):
<ISR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <DEBUG@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISR>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <DEBUG@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"ISR TIMER0_COMPA occured\00"
define i32 @ISR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [25 x i8] c"ISR TIMER0_COMPA occured\00"
define i32 @ISR(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glGetTexGenfv_size(int /*<<< orphan*/);
GLint __glGetTexGendv_size(GLenum pname) { return __glGetTexGenfv_size(pname); }


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

x86 assembly (clang, -O2):
<__glGetTexGendv_size>:
jmp    1030 <__glGetTexGenfv_size@plt>

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

LLVM IR (-O2):
define i32 @__glGetTexGendv_size(i32 %0) {
%2 = tail call i32 @__glGetTexGenfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int);
void print_version() {
  printf(
      "fork %i.%i\n"
      "Copyright (C) 2009-2009 Simon Schönfeld.\n"
      "This is free software.  You may redistribute copies of it under the "
      "terms of\n"
      "the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\n"
      "There is NO WARRANTY, to the extent permitted by law.\n"
      "\n"
      "Written by Simon Schönfeld\n",
      0, 9);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
mov    $0x9,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [285 x i8] c"fork %i.%i\0ACopyright (C) 2009-2009 Simon Sch\C3\B6nfeld.\0AThis is free software. You may redistribute copies of it under the terms of\0Athe GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\0AWritten by Simon Sch\C3\B6nfeld\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([285 x i8], [285 x i8]* @.str, i64 0, i64 0), i32 0, i32 9)
ret void
}

LLVM IR (-O2):
@.str = [285 x i8] c"fork %i.%i\0ACopyright (C) 2009-2009 Simon Sch\C3\B6nfeld.\0AThis is free software. You may redistribute copies of it under the terms of\0Athe GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\0AWritten by Simon Sch\C3\B6nfeld\0A\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([285 x i8], [285 x i8]* @.str, i64 0, i64 0), i32 0, i32 9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, char *, int);
void om_text_print_numkey_entry(FILE *fp, char *key, int val, char *link,
                                int num) {
  link = link;
  fprintf(fp, "%d)    %s: %d\n", num, key, val);
}


x86 assembly (clang, -O0):
<om_text_print_numkey_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xeb7(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_text_print_numkey_entry>:
mov    %edx,%eax
mov    %rsi,%rcx
lea    0xee4(%rip),%rsi
mov    %r8d,%edx
mov    %eax,%r8d
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"%d) %s: %d\0A\00"
define void @om_text_print_numkey_entry(i32* nocapture %0, i8* %1, i32 %2, i8* nocapture readnone %3, i32 %4) {
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clrtoeol();
int igetkey();
int /*<<< orphan*/ move(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ top_show(char *);
int ask(char *prompt) {
  int ch;
  top_show(prompt);
  ch = igetkey();
  move(0, 0);
  clrtoeol();
  return (ch);
}


x86 assembly (clang, -O0):
<ask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <top_show@plt>
mov    $0x0,%al
call   1040 <igetkey@plt>
mov    %eax,-0xc(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1060 <move@plt>
mov    $0x0,%al
call   1050 <clrtoeol@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ask>:
push   %rbx
call   1030 <top_show@plt>
xor    %eax,%eax
call   1040 <igetkey@plt>
mov    %eax,%ebx
xor    %edi,%edi
xor    %esi,%esi
call   1060 <move@plt>
xor    %eax,%eax
call   1050 <clrtoeol@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ask(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @top_show(i8* %4)
%6 = call i32 (...) @igetkey()
store i32 %6, i32* %3
%7 = call i32 @move(i32 0, i32 0)
%8 = call i32 (...) @clrtoeol()
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @ask(i8* %0) {
%2 = tail call i32 @top_show(i8* %0)
%3 = tail call i32 (...) @igetkey()
%4 = tail call i32 @move(i32 0, i32 0)
%5 = tail call i32 (...) @clrtoeol()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ dequeue();
int /*<<< orphan*/ display();
int /*<<< orphan*/ enqueue(int);
int main(void) {
  for (int i = 0; i < 10; i++) {
    enqueue(i);
  }
  dequeue();
  dequeue();
  enqueue(10);
  enqueue(11);
  display();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1166 <main+0x36>
mov    -0x8(%rbp),%edi
call   1050 <enqueue@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
mov    $0x0,%al
call   1040 <dequeue@plt>
mov    $0x0,%al
call   1040 <dequeue@plt>
mov    $0xa,%edi
call   1050 <enqueue@plt>
mov    $0xb,%edi
call   1050 <enqueue@plt>
mov    $0x0,%al
call   1030 <display@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <enqueue@plt>
mov    $0x1,%edi
call   1050 <enqueue@plt>
mov    $0x2,%edi
call   1050 <enqueue@plt>
mov    $0x3,%edi
call   1050 <enqueue@plt>
mov    $0x4,%edi
call   1050 <enqueue@plt>
mov    $0x5,%edi
call   1050 <enqueue@plt>
mov    $0x6,%edi
call   1050 <enqueue@plt>
mov    $0x7,%edi
call   1050 <enqueue@plt>
mov    $0x8,%edi
call   1050 <enqueue@plt>
mov    $0x9,%edi
call   1050 <enqueue@plt>
xor    %eax,%eax
call   1040 <dequeue@plt>
xor    %eax,%eax
call   1040 <dequeue@plt>
mov    $0xa,%edi
call   1050 <enqueue@plt>
mov    $0xb,%edi
call   1050 <enqueue@plt>
xor    %eax,%eax
call   1030 <display@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @enqueue(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
%13 = call i32 (...) @dequeue()
%14 = call i32 (...) @dequeue()
%15 = call i32 @enqueue(i32 10)
%16 = call i32 @enqueue(i32 11)
%17 = call i32 (...) @display()
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @enqueue(i32 0)
%2 = tail call i32 @enqueue(i32 1)
%3 = tail call i32 @enqueue(i32 2)
%4 = tail call i32 @enqueue(i32 3)
%5 = tail call i32 @enqueue(i32 4)
%6 = tail call i32 @enqueue(i32 5)
%7 = tail call i32 @enqueue(i32 6)
%8 = tail call i32 @enqueue(i32 7)
%9 = tail call i32 @enqueue(i32 8)
%10 = tail call i32 @enqueue(i32 9)
%11 = tail call i32 (...) @dequeue()
%12 = tail call i32 (...) @dequeue()
%13 = tail call i32 @enqueue(i32 10)
%14 = tail call i32 @enqueue(i32 11)
%15 = tail call i32 (...) @display()
ret i32 0
}
int min(int x, int y, int z) {
  if (x < y)
    return ((x < z) ? x : z);
  else
    return ((y < z) ? y : z);
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1141 <min+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1130 <min+0x30>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <min+0x36>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <min+0x64>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1158 <min+0x58>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    115e <min+0x5e>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edx,%eax
cmp    %edx,%edi
cmovl  %edi,%eax
cmp    %esi,%eax
cmovge %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %2
%5 = select i1 %4, i32 %0, i32 %2
%6 = icmp slt i32 %5, %1
%7 = select i1 %6, i32 %5, i32 %1
ret i32 %7
}
/* Type definitions */
struct block {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_header_and_footer(struct block *, int,
                                         int /*<<< orphan*/);
void mark_block_free(struct block *blk, int size) {
  set_header_and_footer(blk, size, 0);
}


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

x86 assembly (clang, -O2):
<mark_block_free>:
xor    %edx,%edx
jmp    1030 <set_header_and_footer@plt>

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

LLVM IR (-O2):
%struct.block = type { i32 }
define void @mark_block_free(%struct.block* %0, i32 %1) {
%3 = tail call i32 @set_header_and_footer(%struct.block* %0, i32 %1, i32 0)
ret void
}
void f9(int x __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @f9(i32 %0) {
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvhline_set(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvhline_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvhline_set+0x2a>
jmp    1170 <cmd_mvhline_set+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvhline_set>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvhline_set+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvhline_set(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
float *mmap_time(char *);
int main(int agrc, char **argv) {
  char *file = argv[1];
  float *mmap = mmap_time(file);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <mmap_time@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca float*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = call float* @mmap_time(i8* %10)
store float* %11, float** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call float* @mmap_time(i8* %4)
ret i32 0
}
is_table_start(s) char *s;
{
  if (!prefix(".TS", s))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_table_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <prefix@plt>
cmp    $0x0,%eax
jne    1143 <is_table_start+0x33>
movl   $0x0,-0x4(%rbp)
jmp    114a <is_table_start+0x3a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_table_start>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <prefix@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c".TS\00"
define i32 @is_table_start(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @prefix to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 0, i32* %2
br label %9
8: ; preds = %1
store i32 1, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [4 x i8] c".TS\00"
define i32 @is_table_start(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @prefix to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *CON_Input();
char *Sys_ConsoleInput(void) { return CON_Input(); }


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

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

LLVM IR (-O0):
define i8* @Sys_ConsoleInput() {
%1 = call i8* (...) @CON_Input()
ret i8* %1
}

LLVM IR (-O2):
define i8* @Sys_ConsoleInput() {
%1 = tail call i8* (...) @CON_Input()
ret i8* %1
}
/* Variables and functions */
int board_flash_reboot();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ sync();
int reboot_system() {
  fprintf(stderr, "Rebooting...\n");
  sync();
  return board_flash_reboot();
}


x86 assembly (clang, -O0):
<reboot_system>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <sync@plt>
mov    $0x0,%al
call   1050 <board_flash_reboot@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reboot_system>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1040 <sync@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <board_flash_reboot@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"Rebooting...\0A\00"
define i32 @reboot_system() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @sync()
%4 = call i32 (...) @board_flash_reboot()
ret i32 %4
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"Rebooting...\0A\00"
define i32 @reboot_system() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @sync()
%4 = tail call i32 (...) @board_flash_reboot()
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ GetStringDone(int);
void GStrOK() { GetStringDone(1); }


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

x86 assembly (clang, -O2):
<GStrOK>:
mov    $0x1,%edi
jmp    1030 <GetStringDone@plt>

LLVM IR (-O0):
define void @GStrOK() {
%1 = call i32 @GetStringDone(i32 1)
ret void
}

LLVM IR (-O2):
define void @GStrOK() {
%1 = tail call i32 @GetStringDone(i32 1)
ret void
}
int test_imm_D2int32_mem(int *val) {
  return ((*val) & (0xD2 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D2int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 210
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *skip_token(char const *);
char *skip_multiple_token(const char *p, size_t count) {
  while (count--)
    p = skip_token(p);
  return (char *)p;
}


x86 assembly (clang, -O0):
<skip_multiple_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     114b <skip_multiple_token+0x3b>
mov    -0x8(%rbp),%rdi
call   1030 <skip_token@plt>
mov    %rax,-0x8(%rbp)
jmp    1120 <skip_multiple_token+0x10>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_multiple_token>:
push   %rbx
mov    %rdi,%rax
test   %rsi,%rsi
je     112e <skip_multiple_token+0x1e>
mov    %rsi,%rbx
nopl   0x0(%rax)
mov    %rax,%rdi
call   1030 <skip_token@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <skip_multiple_token+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_multiple_token(i8* %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %7, %4 ], [ %1, %2 ]
%6 = phi i8* [ %8, %4 ], [ %0, %2 ]
%7 = add i64 %5, -1
%8 = tail call i8* @skip_token(i8* %6)
%9 = icmp eq i64 %7, 0
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = phi i8* [ %0, %2 ], [ %8, %4 ]
ret i8* %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool within_screen_bounds(uint32_t x, uint32_t y) { return x < 240 && y < 160; }


x86 assembly (clang, -O0):
<within_screen_bounds>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0xf0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jge    1129 <within_screen_bounds+0x29>
cmpl   $0xa0,-0x8(%rbp)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<within_screen_bounds>:
cmp    $0xf0,%edi
setl   %al
cmp    $0xa0,%esi
setl   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @within_screen_bounds(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 = icmp slt i32 %5, 240
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 160
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @within_screen_bounds(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 240
%4 = icmp slt i32 %1, 160
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int _close(fd)
int fd;
{ return (0); }


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

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

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

LLVM IR (-O2):
define i32 @_close(i32 %0) {
ret i32 0
}
/* Variables and functions */
char *strstr(const char *haystack, const char *needle) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @strstr(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
int memtype_check_insert(struct memtype *new, enum page_cache_mode *new_type) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.memtype = type opaque
define i32 @memtype_check_insert(%struct.memtype* %0, i32* %1) {
%3 = alloca %struct.memtype*
%4 = alloca i32*
store %struct.memtype* %0, %struct.memtype** %3
store i32* %1, i32** %4
ret i32 0
}

LLVM IR (-O2):
%struct.memtype = type opaque
define i32 @memtype_check_insert(%struct.memtype* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ p2k_set_bits(int, int);
extern void pinio_active_led_toggle(void) { p2k_set_bits(13, 0x10); }


x86 assembly (clang, -O0):
<pinio_active_led_toggle>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd,%edi
mov    $0x10,%esi
call   1030 <p2k_set_bits@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pinio_active_led_toggle>:
mov    $0xd,%edi
mov    $0x10,%esi
jmp    1030 <p2k_set_bits@plt>

LLVM IR (-O0):
define void @pinio_active_led_toggle() {
%1 = call i32 @p2k_set_bits(i32 13, i32 16)
ret void
}

LLVM IR (-O2):
define void @pinio_active_led_toggle() {
%1 = tail call i32 @p2k_set_bits(i32 13, i32 16)
ret void
}
/* Variables and functions */
int __set_errno(int);
int __set_syscall_errno(int n) {
  if (n > -256) {
    return __set_errno(-n);
  } else {
    return n;
  }
}


x86 assembly (clang, -O0):
<__set_syscall_errno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffff00,-0x8(%rbp)
jle    113a <__set_syscall_errno+0x2a>
xor    %edi,%edi
sub    -0x8(%rbp),%edi
call   1030 <__set_errno@plt>
mov    %eax,-0x4(%rbp)
jmp    1140 <__set_syscall_errno+0x30>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__set_syscall_errno>:
cmp    $0xffffff01,%edi
jl     111f <__set_syscall_errno+0xf>
neg    %edi
jmp    1030 <__set_errno@plt>
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @__set_syscall_errno(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, -256
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub nsw i32 0, %7
%9 = call i32 @__set_errno(i32 %8)
store i32 %9, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %3
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @__set_syscall_errno(i32 %0) {
%2 = icmp sgt i32 %0, -256
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = sub nsw i32 0, %0
%5 = tail call i32 @__set_errno(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
ret i32 %7
}
/* Type definitions */
struct aFILE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
void funlockfile(int /*<<< orphan*/);
void my_funlockfile(struct aFILE *fp) {
  return funlockfile(_get_actual_fp(fp));
}


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

x86 assembly (clang, -O2):
<my_funlockfile>:
push   %rax
call   1040 <_get_actual_fp@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <funlockfile@plt>

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

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define void @my_funlockfile(%struct.aFILE* %0) {
%2 = tail call i32 @_get_actual_fp(%struct.aFILE* %0)
tail call void @funlockfile(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
char *malloc(int);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
char *timef(time_t t, char *format, int chars) {
  char *buffer;
  buffer = malloc(sizeof(char) * ++chars);
  struct tm *tm_info;
  tm_info = localtime(&t);
  strftime(buffer, chars, format, tm_info);
  return buffer;
}


x86 assembly (clang, -O0):
<timef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1050 <strftime@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timef>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %edi,0xc(%rsp)
lea    0x1(%rdx),%ebp
mov    %ebp,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i8* @timef(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca %struct.tm*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = add nsw i32 %9, 1
store i32 %10, i32* %6
%11 = sext i32 %10 to i64
%12 = mul i64 1, %11
%13 = trunc i64 %12 to i32
%14 = call i8* @malloc(i32 %13)
store i8* %14, i8** %7
%15 = call %struct.tm* @localtime(i32* %4)
store %struct.tm* %15, %struct.tm** %8
%16 = load i8*, i8** %7
%17 = load i32, i32* %6
%18 = load i8*, i8** %5
%19 = load %struct.tm*, %struct.tm** %8
%20 = call i32 @strftime(i8* %16, i32 %17, i8* %18, %struct.tm* %19)
%21 = load i8*, i8** %7
ret i8* %21
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @timef(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
store i32 %0, i32* %4
%5 = add nsw i32 %2, 1
%6 = tail call i8* @malloc(i32 %5)
%7 = call %struct.tm* @localtime(i32* %4)
%8 = call i32 @strftime(i8* %6, i32 %5, i8* %1, %struct.tm* %7)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ term_send(char);
void term_print_screen() {
  term_send(27);
  term_send('[');
  term_send('i');
}


x86 assembly (clang, -O0):
<term_print_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
call   1030 <term_send@plt>
mov    $0x5b,%edi
call   1030 <term_send@plt>
mov    $0x69,%edi
call   1030 <term_send@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_print_screen>:
push   %rax
mov    $0x1b,%edi
call   1030 <term_send@plt>
mov    $0x5b,%edi
call   1030 <term_send@plt>
mov    $0x69,%edi
pop    %rax
jmp    1030 <term_send@plt>

LLVM IR (-O0):
define void @term_print_screen() {
%1 = call i32 @term_send(i8 signext 27)
%2 = call i32 @term_send(i8 signext 91)
%3 = call i32 @term_send(i8 signext 105)
ret void
}

LLVM IR (-O2):
define void @term_print_screen() {
%1 = tail call i32 @term_send(i8 signext 27)
%2 = tail call i32 @term_send(i8 signext 91)
%3 = tail call i32 @term_send(i8 signext 105)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(char);
comment() {
  outbyte('#');
  outbyte(':');
}


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

x86 assembly (clang, -O2):
<comment>:
push   %rax
mov    $0x23,%edi
call   1030 <outbyte@plt>
mov    $0x3a,%edi
pop    %rax
jmp    1030 <outbyte@plt>

LLVM IR (-O0):
define i32 @comment() {
%1 = alloca i32
%2 = call i32 @outbyte(i8 signext 35)
%3 = call i32 @outbyte(i8 signext 58)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @comment() {
%1 = tail call i32 @outbyte(i8 signext 35)
%2 = tail call i32 @outbyte(i8 signext 58)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int,
                          unsigned int);
void _callback(unsigned int depth, unsigned int nodes, unsigned int inner,
               unsigned int hits) {
  printf("%u %u %u %u\n", depth, nodes, inner, hits);
}


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

x86 assembly (clang, -O2):
<_callback>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%u %u %u %u\0A\00"
define void @_callback(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
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%u %u %u %u\0A\00"
define void @_callback(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Type definitions */
struct ps_summary {
  int dummy;
};

/* Variables and functions */
void *obus_object_get_user_data(int /*<<< orphan*/);
int /*<<< orphan*/ ps_summary_const_object(struct ps_summary const *);
void *ps_summary_get_user_data(const struct ps_summary *object) {
  return obus_object_get_user_data(ps_summary_const_object(object));
}


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

x86 assembly (clang, -O2):
<ps_summary_get_user_data>:
push   %rax
call   1040 <ps_summary_const_object@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <obus_object_get_user_data@plt>

LLVM IR (-O0):
%struct.ps_summary = type { i32 }
define i8* @ps_summary_get_user_data(%struct.ps_summary* %0) {
%2 = alloca %struct.ps_summary*
store %struct.ps_summary* %0, %struct.ps_summary** %2
%3 = load %struct.ps_summary*, %struct.ps_summary** %2
%4 = call i32 @ps_summary_const_object(%struct.ps_summary* %3)
%5 = call i8* @obus_object_get_user_data(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.ps_summary = type { i32 }
define i8* @ps_summary_get_user_data(%struct.ps_summary* %0) {
%2 = tail call i32 @ps_summary_const_object(%struct.ps_summary* %0)
%3 = tail call i8* @obus_object_get_user_data(i32 %2)
ret i8* %3
}
/* Variables and functions */
size_t bnode_get_ref(size_t ref) { return ((((ref) >> 1)) - 1); }


x86 assembly (clang, -O0):
<bnode_get_ref>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bnode_get_ref>:
shr    %rdi
lea    -0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @bnode_get_ref(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 1
%5 = sub i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @bnode_get_ref(i64 %0) {
%2 = lshr i64 %0, 1
%3 = add nsw i64 %2, -1
ret i64 %3
}
/* Variables and functions */
int isnan(double);
int __pruabi_isnan(double a) { return isnan(a); }


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

x86 assembly (clang, -O2):
<__pruabi_isnan>:
jmp    1030 <isnan@plt>

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

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

/* Variables and functions */
void _mm512_storeu_epi32(void *, int /*<<< orphan*/);
void test_mm512_storeu_epi32(void *__P, __m512i __A) {
  return _mm512_storeu_epi32(__P, __A);
}


x86 assembly (clang, -O0):
<test_mm512_storeu_epi32>:
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 <_mm512_storeu_epi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm512_storeu_epi32>:
jmp    1030 <_mm512_storeu_epi32@plt>

LLVM IR (-O0):
define void @test_mm512_storeu_epi32(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
ret void
}

LLVM IR (-O2):
define void @test_mm512_storeu_epi32(i8* %0, i32 %1) {
tail call void @_mm512_storeu_epi32(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ get_uint16(int /*<<< orphan*/ *, int /*<<< orphan*/);
uint16_t log_sense_param_code(uint8_t *param) { return get_uint16(param, 0); }


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

x86 assembly (clang, -O2):
<log_sense_param_code>:
xor    %esi,%esi
jmp    1030 <get_uint16@plt>

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

LLVM IR (-O2):
define i32 @log_sense_param_code(i32* %0) {
%2 = tail call i32 @get_uint16(i32* %0, i32 0)
ret i32 %2
}
int main() { return '\b'; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 8
}