xunge/DecIR huggingface dataset:
/* Variables and functions */
int receiver_run();
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  const char *ip_addr;
  int result;
  while (true) {
    result = receiver_run();
    if (result == 0) {
      break;
    }
    sleep(3);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <receiver_run@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    114f <main+0x2f>
jmp    115e <main+0x3e>
mov    $0x3,%edi
call   1040 <sleep@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <receiver_run@plt>
test   %eax,%eax
je     1147 <main+0x27>
mov    $0x3,%edi
call   1040 <sleep@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @receiver_run()
%4 = icmp eq i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2, %5
%6 = tail call i32 @sleep(i32 3)
%7 = tail call i32 (...) @receiver_run()
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %5
9: ; preds = %5, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ UART2_RX_TX_DriverIRQHandler();
__attribute__((weak)) void UART2_RX_TX_IRQHandler(void) {
  UART2_RX_TX_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @UART2_RX_TX_IRQHandler() {
%1 = call i32 (...) @UART2_RX_TX_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @UART2_RX_TX_IRQHandler() {
%1 = tail call i32 (...) @UART2_RX_TX_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x60() {
  Assert_real((ispunct(96)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              485, ("ispunct should be 1 for `"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for `\00"
define void @t_ispunct_0x60() {
%1 = tail call i32 @ispunct(i32 96)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 485, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned bitCount_fun_ulong(unsigned long x) {
  unsigned r = x & 1;
  while (x >>= 1)
    r += x & 1;
  return r;
}


x86 assembly (clang, -O0):
<bitCount_fun_ulong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     113f <bitCount_fun_ulong+0x3f>
mov    -0x8(%rbp),%rcx
and    $0x1,%rcx
mov    -0xc(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
jmp    1113 <bitCount_fun_ulong+0x13>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitCount_fun_ulong>:
mov    %edi,%eax
and    $0x1,%eax
cmp    $0x2,%rdi
jb     1123 <bitCount_fun_ulong+0x23>
mov    %rdi,%rcx
xchg   %ax,%ax
shr    %rcx
mov    %ecx,%edx
and    $0x1,%edx
add    %edx,%eax
cmp    $0x3,%rdi
mov    %rcx,%rdi
ja     1110 <bitCount_fun_ulong+0x10>
ret

LLVM IR (-O0):
define i32 @bitCount_fun_ulong(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = and i64 %4, 1
%6 = trunc i64 %5 to i32
store i32 %6, i32* %3
br label %7
7: ; preds = %11, %1
%8 = load i64, i64* %2
%9 = lshr i64 %8, 1
store i64 %9, i64* %2
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i64, i64* %2
%13 = and i64 %12, 1
%14 = load i32, i32* %3
%15 = zext i32 %14 to i64
%16 = add i64 %15, %13
%17 = trunc i64 %16 to i32
store i32 %17, i32* %3
br label %7
18: ; preds = %7
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @bitCount_fun_ulong(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 1
%4 = icmp ult i64 %0, 2
br i1 %4, label %13, label %5
5: ; preds = %1, %5
%6 = phi i64 [ %8, %5 ], [ %0, %1 ]
%7 = phi i32 [ %11, %5 ], [ %3, %1 ]
%8 = lshr i64 %6, 1
%9 = trunc i64 %8 to i32
%10 = and i32 %9, 1
%11 = add i32 %10, %7
%12 = icmp ult i64 %6, 4
br i1 %12, label %13, label %5
13: ; preds = %5, %1
%14 = phi i32 [ %3, %1 ], [ %11, %5 ]
ret i32 %14
}
void internalStructFunc() {
  struct X {
    char c1;
    int t;
    char c2;
  };
  struct X obj;
}


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

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

LLVM IR (-O0):
%struct.X = type { i8, i32, i8 }
define void @internalStructFunc() {
%1 = alloca %struct.X
ret void
}

LLVM IR (-O2):
%struct.X = type { i8, i32, i8 }
define void @internalStructFunc() {
ret void
}
/* Variables and functions */
int chroot(char *);
int /*<<< orphan*/ perror(char *);
void cmd_chroot(int argc, char *argv[]) {
  if (chroot(argv[1]) == -1)
    perror("chroot");
}


x86 assembly (clang, -O0):
<cmd_chroot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <chroot@plt>
cmp    $0xffffffff,%eax
jne    1151 <cmd_chroot+0x31>
lea    0xeb4(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_chroot>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <chroot@plt>
cmp    $0xffffffff,%eax
je     1131 <cmd_chroot+0x11>
pop    %rax
ret
lea    0xec8(%rip),%rdi
pop    %rax
jmp    1040 <perror@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"chroot\00"
define void @cmd_chroot(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @chroot(i8* %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
ret void
}
void I_StopFadingSong(void) {}


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

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

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

LLVM IR (-O2):
define void @I_StopFadingSong() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ error(int, int /*<<< orphan*/, char *, size_t const);
void *realloc(void *const, size_t const);
void *xrealloc(register void *const ptr, register const size_t size) {
  register void *value = realloc(ptr, size);
  if (!value)
    error(3, errno, "can't allocate %zi bytes of memory!", size);
  return value;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116a <xrealloc+0x4a>
mov    0x2e8d(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rcx
mov    $0x3,%edi
lea    0xe9b(%rip),%rdx
call   1040 <error@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1151 <xrealloc+0x31>
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdx
mov    $0x3,%edi
mov    %r14,%rcx
call   1040 <error@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@errno = global i32 0
@.str = [36 x i8] c"can't allocate %zi bytes of memory!\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i32, i32* @errno
%13 = load i64, i64* %4
%14 = call i32 @error(i32 3, i32 %12, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i64 %13)
br label %15
15: ; preds = %11, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [36 x i8] c"can't allocate %zi bytes of memory!\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @errno
%7 = tail call i32 @error(i32 3, i32 %6, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %8
8: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int f(int, int);
int main() {
  int a;
  int b;
  int x = 3;
  int y = x;
  int z = y;
  int w = x + y;
  int *p = &z;
  *p = 2;
  while (x < 10) {
    a = 13;
    p = x;
    x++;
  }
  int c;
  if (y) {
    c = 0;
  } else {
    c = 1;
  }
  int d = 0;
  d = f(2, 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x2,(%rax)
cmpl   $0xa,-0x10(%rbp)
jge    1174 <main+0x64>
movl   $0xd,-0x8(%rbp)
movslq -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114d <main+0x3d>
cmpl   $0x0,-0x14(%rbp)
je     118a <main+0x7a>
movl   $0x0,-0x2c(%rbp)
jmp    1191 <main+0x81>
movl   $0x1,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <f@plt>
mov    %eax,-0x30(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 2, i32 3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
uid_t get_uid() { return syscall(74, 0, 0, 0, 0, 0); }


x86 assembly (clang, -O0):
<get_uid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4a,%edi
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uid>:
mov    $0x4a,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @get_uid() {
%1 = call i32 @syscall(i32 74, i32 0, i32 0, i32 0, i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_uid() {
%1 = tail call i32 @syscall(i32 74, i32 0, i32 0, i32 0, i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
long strtol(char *, char **, int);
long parse_int(char *s) {
  long ret;
  char *endptr;
  ret = strtol(s, &endptr, 10);
  if (*endptr != '\0') {
    printf("parse error: '%s' is not a number\n", s);
    exit(1);
  }
  return ret;
}


x86 assembly (clang, -O0):
<parse_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     117c <parse_int+0x4c>
mov    -0x8(%rbp),%rsi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_int>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    0x8(%rsp),%rcx
cmpb   $0x0,(%rcx)
jne    1157 <parse_int+0x27>
add    $0x10,%rsp
pop    %rbx
ret
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"parse error: '%s' is not a number\0A\00"
define i64 @parse_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strtol(i8* %5, i8** %4, i32 10)
store i64 %6, i64* %3
%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 %15
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %1
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
@.str = [35 x i8] c"parse error: '%s' is not a number\0A\00"
define i64 @parse_int(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtol(i8* %0, i8** %2, i32 10)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ trace_3();
void trace_2() { trace_3(); }


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

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

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

LLVM IR (-O2):
define void @trace_2() {
%1 = tail call i32 (...) @trace_3()
ret void
}
int test_imm_1Aint32_reg(int val) { return ((val) & (0x1A << 0)) ? -20 : -40; }


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

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

LLVM IR (-O0):
define i32 @test_imm_1Aint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 26
%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_1Aint32_reg(i32 %0) {
%2 = and i32 %0, 26
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ECHILD;
int /*<<< orphan*/ errno;
int _wait(int *status) {
  (void)(status);
  errno = ECHILD;
  return -1;
}


x86 assembly (clang, -O0):
<_wait>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_wait>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ECHILD = global i32 0
@errno = global i32 0
define i32 @_wait(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @ECHILD
store i32 %4, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ECHILD = global i32 0
@errno = global i32 0
define i32 @_wait(i32* nocapture readnone %0) {
%2 = load i32, i32* @ECHILD
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void x264_free(void *p) {
  if (p) {
    free(*(((void **)p) - 1));
    p = NULL;
  }
}


x86 assembly (clang, -O0):
<x264_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <x264_free+0x2c>
mov    -0x8(%rbp),%rax
mov    -0x8(%rax),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x264_free>:
test   %rdi,%rdi
je     111e <x264_free+0xe>
mov    -0x8(%rdi),%rdi
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @x264_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i8**
%8 = getelementptr inbounds i8*, i8** %7, i64 -1
%9 = load i8*, i8** %8
%10 = call i32 @free(i8* %9)
store i8* null, i8** %2
br label %11
11: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @x264_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -8
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @free(i8* %6)
br label %8
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
bool cc_is_field_light(int const i, int const j) { return ((i + j) % 2 != 0); }


x86 assembly (clang, -O0):
<cc_is_field_light>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_is_field_light>:
lea    (%rdi,%rsi,1),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @cc_is_field_light(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %5, %6
%8 = srem i32 %7, 2
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @cc_is_field_light(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void sigint_handler(int signum) {
  printf("\n\nCaught signal: %d\n\n", signum);
  exit(signum);
}


x86 assembly (clang, -O0):
<sigint_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigint_handler>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"\0A\0ACaught signal: %d\0A\0A\00"
define void @sigint_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0A\0ACaught signal: %d\0A\0A\00"
define void @sigint_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ basic_test(int);
int /*<<< orphan*/ cleanup_test();
int /*<<< orphan*/ init_test();
int log_read_end(int);
void read_one_sector_end(void) {
  ssize_t n;
  init_test();
  n = log_read_end(512);
  basic_test(n == 512);
  cleanup_test();
}


x86 assembly (clang, -O0):
<read_one_sector_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <init_test@plt>
mov    $0x200,%edi
call   1040 <log_read_end@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x200,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <basic_test@plt>
mov    $0x0,%al
call   1050 <cleanup_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_one_sector_end>:
push   %rax
xor    %eax,%eax
call   1060 <init_test@plt>
mov    $0x200,%edi
call   1040 <log_read_end@plt>
xor    %edi,%edi
cmp    $0x200,%eax
sete   %dil
call   1030 <basic_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cleanup_test@plt>

LLVM IR (-O0):
define void @read_one_sector_end() {
%1 = alloca i32
%2 = call i32 (...) @init_test()
%3 = call i32 @log_read_end(i32 512)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 512
%6 = zext i1 %5 to i32
%7 = call i32 @basic_test(i32 %6)
%8 = call i32 (...) @cleanup_test()
ret void
}

LLVM IR (-O2):
define void @read_one_sector_end() {
%1 = tail call i32 (...) @init_test()
%2 = tail call i32 @log_read_end(i32 512)
%3 = icmp eq i32 %2, 512
%4 = zext i1 %3 to i32
%5 = tail call i32 @basic_test(i32 %4)
%6 = tail call i32 (...) @cleanup_test()
ret void
}
/* Variables and functions */
int close(int);
int posix_close(int fd, int flags) { return close(fd); }


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

x86 assembly (clang, -O2):
<posix_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @posix_close(i32 %0, i32 %1) {
%3 = tail call i32 @close(i32 %0)
ret i32 %3
}
void RTMemEfAllocZ(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemEfAllocZ() {
ret void
}
/* Variables and functions */
long GetMouseWinX288();
long getmousewinx() { return GetMouseWinX288(); }


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

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

LLVM IR (-O0):
define i64 @getmousewinx() {
%1 = call i64 (...) @GetMouseWinX288()
ret i64 %1
}

LLVM IR (-O2):
define i64 @getmousewinx() {
%1 = tail call i64 (...) @GetMouseWinX288()
ret i64 %1
}
void test56_PrintImpl_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test56_PrintImpl_targetInit__I() {
ret void
}
void NES_CHR_INSERT(char *CHR, int counter, int data) { CHR[counter] = data; }


x86 assembly (clang, -O0):
<NES_CHR_INSERT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<NES_CHR_INSERT>:
movslq %esi,%rax
mov    %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @NES_CHR_INSERT(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
store i8 %8, i8* %12
ret void
}

LLVM IR (-O2):
define void @NES_CHR_INSERT(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = trunc i32 %2 to i8
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 %4, i8* %6
ret void
}
int returnHour(int timeCode) { return timeCode / 100; }


x86 assembly (clang, -O0):
<returnHour>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<returnHour>:
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @returnHour(i32 %0) {
%2 = sdiv i32 %0, 100
ret i32 %2
}
/* Type definitions */
struct set {
  int dummy;
};

/* Variables and functions */
int set_prefix(struct set *, void *, size_t);
bool set_prefix_bytes(struct set *t, void *y, size_t n) {
  return set_prefix(t, y, n);
}


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

x86 assembly (clang, -O2):
<set_prefix_bytes>:
jmp    1030 <set_prefix@plt>

LLVM IR (-O0):
%struct.set = type { i32 }
define i32 @set_prefix_bytes(%struct.set* %0, i8* %1, i64 %2) {
%4 = alloca %struct.set*
%5 = alloca i8*
%6 = alloca i64
store %struct.set* %0, %struct.set** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.set*, %struct.set** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @set_prefix(%struct.set* %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.set = type { i32 }
define i32 @set_prefix_bytes(%struct.set* %0, i8* %1, i64 %2) {
%4 = tail call i32 @set_prefix(%struct.set* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int counter;
  for (counter = 1; counter < 7; counter++) {
    if (counter == 10) {
    die:
      printf("Application will be die\n");
      break;
    }
    printf("Number of counter: %d\n", counter);
    goto die;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x7,-0x8(%rbp)
jge    1168 <main+0x58>
cmpl   $0xa,-0x8(%rbp)
jne    1152 <main+0x42>
jmp    113f <main+0x2f>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1168 <main+0x58>
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    113f <main+0x2f>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Application will be die\0A\00"
@.str.1 = [23 x i8] c"Number of counter: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %15, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 7
br i1 %5, label %6, label %18
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 10
br i1 %8, label %9, label %12
9: ; preds = %6
br label %10
10: ; preds = %12, %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %18
12: ; preds = %6
%13 = load i32, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %10
15: ; No predecessors!
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %3
18: ; preds = %10, %3
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str.1 = [23 x i8] c"Number of counter: %d\0A\00"
@str = [24 x i8] c"Application will be die\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t rtp2435r_get_interval(uint8_t *header) {
  return header[0] << 8 | header[1];
}


x86 assembly (clang, -O0):
<rtp2435r_get_interval>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtp2435r_get_interval>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @rtp2435r_get_interval(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @rtp2435r_get_interval(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
void RTDirRename(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDirRename() {
ret void
}
/* Variables and functions */
int myscheduler_get_id_counter();
int mypthread_get_id_counter() { return myscheduler_get_id_counter(); }


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

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

LLVM IR (-O0):
define i32 @mypthread_get_id_counter() {
%1 = call i32 (...) @myscheduler_get_id_counter()
ret i32 %1
}

LLVM IR (-O2):
define i32 @mypthread_get_id_counter() {
%1 = tail call i32 (...) @myscheduler_get_id_counter()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ __do_global_ctors();
void __main(void) {
  static int initialized;
  if (!initialized) {
    initialized = 1;
    __do_global_ctors();
  }
}


x86 assembly (clang, -O0):
<__main>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    1132 <__main+0x22>
movl   $0x1,0x2f01(%rip)
mov    $0x0,%al
call   1030 <__do_global_ctors@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__main>:
cmpb   $0x0,0x2f15(%rip)
je     111a <__main+0xa>
ret
movb   $0x1,0x2f0b(%rip)
xor    %eax,%eax
jmp    1030 <__do_global_ctors@plt>

LLVM IR (-O0):
@__main.initialized = internal global i32 0
define void @__main() {
%1 = load i32, i32* @__main.initialized
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
store i32 1, i32* @__main.initialized
%4 = call i32 (...) @__do_global_ctors()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@__main.initialized = internal unnamed_addr global i1 false
define void @__main() {
%1 = load i1, i1* @__main.initialized
br i1 %1, label %4, label %2
2: ; preds = %0
store i1 true, i1* @__main.initialized
%3 = tail call i32 (...) @__do_global_ctors()
br label %4
4: ; preds = %2, %0
ret void
}
/* Variables and functions */
long ndb_set_ptr_i(long i_index, void *i_ptr, short i_status, size_t i_size,
                   char *i_remark) {
  return 0;
}


x86 assembly (clang, -O0):
<ndb_set_ptr_i>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @ndb_set_ptr_i(i64 %0, i8* %1, i16 signext %2, i64 %3, i8* %4) {
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i16
%9 = alloca i64
%10 = alloca i8*
store i64 %0, i64* %6
store i8* %1, i8** %7
store i16 %2, i16* %8
store i64 %3, i64* %9
store i8* %4, i8** %10
ret i64 0
}

LLVM IR (-O2):
define i64 @ndb_set_ptr_i(i64 %0, i8* nocapture readnone %1, i16 signext %2, i64 %3, i8* nocapture readnone %4) {
ret i64 0
}
void pendfunc3(void) {}


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

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

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

LLVM IR (-O2):
define void @pendfunc3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ReplaceASHI();
int /*<<< orphan*/ installASHI();
void main() {
  installASHI();
  ReplaceASHI();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <installASHI@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ReplaceASHI@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @installASHI()
%2 = call i32 (...) @ReplaceASHI()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @installASHI()
%2 = tail call i32 (...) @ReplaceASHI()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void lmn_free(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @lmn_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sh_map_assign(void *, void *);
void sh_set_assign(void *to, void *from) { sh_map_assign(to, from); }


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

x86 assembly (clang, -O2):
<sh_set_assign>:
jmp    1030 <sh_map_assign@plt>

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

LLVM IR (-O2):
define void @sh_set_assign(i8* %0, i8* %1) {
%3 = tail call i32 @sh_map_assign(i8* %0, i8* %1)
ret void
}
int main(void) {
  goto l;
  int x = 0;
l:
  x + 1;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_num(unsigned long long, int, char *);
void print_oct(unsigned long long n) { print_num(n, 8, "0%s\n"); }


x86 assembly (clang, -O0):
<print_oct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
lea    0xed4(%rip),%rdx
call   1030 <print_num@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_oct>:
lea    0xee9(%rip),%rdx
mov    $0x8,%esi
jmp    1030 <print_num@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"0%s\0A\00"
define void @print_oct(i64 %0) {
%2 = tail call i32 @print_num(i64 %0, i32 8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int Create(int argc, char **argv) {
  printf("Calling from Create\n");
  return 1;
}


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

x86 assembly (clang, -O2):
<Create>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Calling from Create\0A\00"
define i32 @Create(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [20 x i8] c"Calling from Create\00"
define i32 @Create(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 1
}
void Xutf8TextPropertyToTextList() {}


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

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

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

LLVM IR (-O2):
define void @Xutf8TextPropertyToTextList() {
ret void
}
/* Variables and functions */
int errno;
int unlink(char *);
int _remove(char *path) {
  errno = 0;
  if ((unlink(path)) == -1) {
    return -errno;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2ebd(%rip),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0xffffffff,%eax
jne    114e <_remove+0x3e>
xor    %eax,%eax
mov    0x2e9c(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <_remove+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_remove>:
push   %rbx
mov    0x2ec8(%rip),%rbx
movl   $0x0,(%rbx)
call   1030 <unlink@plt>
xor    %ecx,%ecx
sub    (%rbx),%ecx
xor    %edx,%edx
cmp    $0xffffffff,%eax
cmovne %edx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @_remove(i8* nocapture %0) {
store i32 0, i32* @errno
%2 = tail call i32 @unlink(i8* %0)
%3 = icmp eq i32 %2, -1
%4 = load i32, i32* @errno
%5 = sub nsw i32 0, %4
%6 = select i1 %3, i32 %5, i32 0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int Unmount(const char *driver) {
  printf("Unmount %s\n", driver);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Unmount %s\0A\00"
define i32 @Unmount(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int i8k_get_fn_status();
int /*<<< orphan*/ printf(char *, int);
int fn_key() {
  printf("%d\n", i8k_get_fn_status());
  return 0;
}


x86 assembly (clang, -O0):
<fn_key>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <i8k_get_fn_status@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_key>:
push   %rax
xor    %eax,%eax
call   1040 <i8k_get_fn_status@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @fn_key() {
%1 = call i32 (...) @i8k_get_fn_status()
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @fn_key() {
%1 = tail call i32 (...) @i8k_get_fn_status()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int a_ctz_l(unsigned long x) {
  static const char debruijn32[32] = {
      0,  1,  23, 2,  29, 24, 19, 3,  30, 27, 25, 11, 20, 8, 4,  13,
      31, 22, 28, 18, 26, 10, 7,  12, 21, 17, 9,  6,  16, 5, 15, 14};
  return debruijn32[(x & -x) * 0x076be629 >> 27];
}


x86 assembly (clang, -O0):
<a_ctz_l>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
and    %rcx,%rax
imul   $0x76be629,%rax,%rcx
shr    $0x1b,%rcx
lea    0xed9(%rip),%rax
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_ctz_l>:
mov    %rdi,%rax
neg    %rax
and    %rdi,%rax
imul   $0x76be629,%rax,%rax
shr    $0x1b,%rax
lea    0xee5(%rip),%rcx
movsbl (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
@a_ctz_l.debruijn32 = internal constant [32 x i8] c"\00\01\17\02\1D\18\13\03\1E\1B\19\0B\14\08\04\0D\1F\16\1C\12\1A\0A\07\0C\15\11\09\06\10\05\0F\0E"
define i32 @a_ctz_l(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = sub i64 0, %4
%6 = and i64 %3, %5
%7 = mul i64 %6, 124511785
%8 = lshr i64 %7, 27
%9 = getelementptr inbounds [32 x i8], [32 x i8]* @a_ctz_l.debruijn32, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@a_ctz_l.debruijn32 = internal unnamed_addr constant [32 x i8] c"\00\01\17\02\1D\18\13\03\1E\1B\19\0B\14\08\04\0D\1F\16\1C\12\1A\0A\07\0C\15\11\09\06\10\05\0F\0E"
define i32 @a_ctz_l(i64 %0) {
%2 = sub i64 0, %0
%3 = and i64 %2, %0
%4 = mul i64 %3, 124511785
%5 = lshr i64 %4, 27
%6 = getelementptr inbounds [32 x i8], [32 x i8]* @a_ctz_l.debruijn32, i64 0, i64 %5
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t SysCtlLDODeepSleepGet(void) {
  return ((*((volatile uint32_t *)(0x400FE1BC))));
}


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

x86 assembly (clang, -O2):
<SysCtlLDODeepSleepGet>:
mov    0x400fe1bc,%eax
ret

LLVM IR (-O0):
define i32 @SysCtlLDODeepSleepGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074782652 to i32*)
ret i32 %1
}

LLVM IR (-O2):
define i32 @SysCtlLDODeepSleepGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074782652 to i32*)
ret i32 %1
}
void _M2_StdIO_finish(__attribute__((unused)) int argc,
                      __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_StdIO_finish(i32 %0, i8** nocapture %1) {
ret void
}
void gtk_rc_find_pixmap_in_path() {}


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

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

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

LLVM IR (-O2):
define void @gtk_rc_find_pixmap_in_path() {
ret void
}
int task_led_marquee_handler(void *task, int e) { return (-1); }


x86 assembly (clang, -O0):
<task_led_marquee_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @task_led_marquee_handler(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}