xunge/DecIR huggingface dataset:
int intGreaterThan(const void *a, const void *b) {
  int an = *(int *)a;
  int bn = *(int *)b;
  if (an > bn)
    return 1;
  else if (an == bn)
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<intGreaterThan>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1136 <intGreaterThan+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1155 <intGreaterThan+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    114e <intGreaterThan+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1155 <intGreaterThan+0x55>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intGreaterThan>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setne  %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @intGreaterThan(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %24
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = icmp eq i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 0, i32* %3
br label %24
23: ; preds = %18
store i32 -1, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @intGreaterThan(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ memcmp(int /*<<< orphan*/ const *, char *, int);
int check_elf_magic(const uint8_t *buf) {
  if (memcmp(buf, "\177ELF", 4) && memcmp(buf, "\177OLF", 4)) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_elf_magic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
je     1166 <check_elf_magic+0x56>
mov    -0x10(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
je     1166 <check_elf_magic+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <check_elf_magic+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_elf_magic>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     114d <check_elf_magic+0x3d>
lea    0xed4(%rip),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1030 <memcmp@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     114d <check_elf_magic+0x3d>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"\7FELF\00"
@.str.1 = [5 x i8] c"\7FOLF\00"
define i32 @check_elf_magic(i32* %0) {
%2 = tail call i64 @memcmp(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @memcmp(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4, %1
br label %8
8: ; preds = %4, %7
%9 = phi i32 [ 0, %7 ], [ -1, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_cond_init(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_cond_wait(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_mutex_init(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  pthread_mutex_t exitMutex_st;
  pthread_cond_t g_exitCond_st;
  pthread_cond_init(&g_exitCond_st, NULL);
  pthread_mutex_init(&exitMutex_st, NULL);
  pthread_cond_wait(&g_exitCond_st, &exitMutex_st);
  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)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_cond_init@plt>
lea    -0x14(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <pthread_mutex_init@plt>
lea    -0x18(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <pthread_cond_wait@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <pthread_cond_init@plt>
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <pthread_mutex_init@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <pthread_cond_wait@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @pthread_cond_init(i32* %7, i32* null)
%9 = call i32 @pthread_mutex_init(i32* %6, i32* null)
%10 = call i32 @pthread_cond_wait(i32* %7, i32* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @pthread_cond_init(i32* %4, i32* null)
%8 = call i32 @pthread_mutex_init(i32* %3, i32* null)
%9 = call i32 @pthread_cond_wait(i32* %4, i32* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hola mundo!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hola mundo!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hola mundo!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void pause_line(prt_line) int prt_line;
{
  prt("[Press any key to continue.]", prt_line, 23);
  (void)inkey();
  erase_line(prt_line, 0);
}


x86 assembly (clang, -O0):
<pause_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebb(%rip),%rdi
mov    $0x17,%edx
mov    $0x0,%al
call   1030 <prt@plt>
mov    $0x0,%al
call   1050 <inkey@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <erase_line@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause_line>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
mov    $0x17,%edx
xor    %eax,%eax
call   1030 <prt@plt>
xor    %eax,%eax
call   1050 <inkey@plt>
mov    %ebx,%edi
xor    %esi,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <erase_line@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"[Press any key to continue.]\00"
define void @pause_line(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @prt to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %3, i32 23)
%5 = call i32 (...) @inkey()
%6 = load i32, i32* %2
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @erase_line to i32 (i32, i32, ...)*)(i32 %6, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"[Press any key to continue.]\00"
define void @pause_line(i32 %0) {
%2 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @prt to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0, i32 23)
%3 = tail call i32 (...) @inkey()
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @erase_line to i32 (i32, i32, ...)*)(i32 %0, i32 0)
ret void
}
int ctz(unsigned l) {
  int n = 0;
  if (!l)
    return -1;
  while (!(l & 1)) {
    ++n;
    l >>= 1;
  }
  return n;
}


x86 assembly (clang, -O0):
<ctz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <ctz+0x24>
movl   $0xffffffff,-0x4(%rbp)
jmp    1161 <ctz+0x61>
jmp    1129 <ctz+0x29>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1144 <ctz+0x44>
jmp    115b <ctz+0x5b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <ctz+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctz>:
test   %edi,%edi
je     111e <ctz+0x1e>
xor    %eax,%eax
test   $0x1,%dil
jne    111d <ctz+0x1d>
xor    %eax,%eax
mov    %edi,%ecx
add    $0x1,%eax
shr    %ecx
test   $0x2,%dil
mov    %ecx,%edi
je     1110 <ctz+0x10>
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @ctz(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = and i32 %0, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ 0, %3 ]
%8 = phi i32 [ %10, %6 ], [ %0, %3 ]
%9 = add nuw nsw i32 %7, 1
%10 = lshr i32 %8, 1
%11 = and i32 %8, 2
%12 = icmp eq i32 %11, 0
br i1 %12, label %6, label %13
13: ; preds = %6, %3, %1
%14 = phi i32 [ -1, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %14
}
void g_signal_handler_disconnect() {}


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

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

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

LLVM IR (-O2):
define void @g_signal_handler_disconnect() {
ret void
}
/* Variables and functions */
scalar_t__ parse_int(int *, char const **);
int parse_uint8(unsigned char *out, const char **str) {
  int i;
  if (parse_int(&i, str) != 0)
    return -1;
  if (i < 0 || i > 0xff)
    return -1;
  *out = i;
  return 0;
}


x86 assembly (clang, -O0):
<parse_uint8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdi
call   1030 <parse_int@plt>
cmp    $0x0,%rax
je     1143 <parse_uint8+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <parse_uint8+0x68>
cmpl   $0x0,-0x1c(%rbp)
jl     115a <parse_uint8+0x4a>
cmpl   $0xff,-0x1c(%rbp)
jle    1166 <parse_uint8+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <parse_uint8+0x68>
mov    -0x1c(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_uint8>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1030 <parse_int@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    113f <parse_uint8+0x2f>
mov    0xc(%rsp),%ecx
cmp    $0xff,%ecx
ja     113f <parse_uint8+0x2f>
mov    %cl,(%rbx)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @parse_uint8(i8* %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = call i64 @parse_int(i32* %6, i8** %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %22
11: ; preds = %2
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %6
%16 = icmp sgt i32 %15, 255
br i1 %16, label %17, label %18
17: ; preds = %14, %11
store i32 -1, i32* %3
br label %22
18: ; preds = %14
%19 = load i32, i32* %6
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %4
store i8 %20, i8* %21
store i32 0, i32* %3
br label %22
22: ; preds = %18, %17, %10
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @parse_uint8(i8* nocapture writeonly %0, i8** %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i64 @parse_int(i32* %3, i8** %1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp ugt i32 %8, 255
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = trunc i32 %8 to i8
store i8 %11, i8* %0
br label %12
12: ; preds = %7, %2, %10
%13 = phi i32 [ 0, %10 ], [ -1, %2 ], [ -1, %7 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char *);
void map_func(const char *key, void **value, const void *other) {
  printf("%s: %s\n", key, (char *)(*value));
}


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

x86 assembly (clang, -O2):
<map_func>:
mov    %rdi,%rax
mov    (%rsi),%rdx
lea    0xee3(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
define void @map_func(i8* %0, i8** nocapture %1, i8* nocapture readnone %2) {
%4 = load i8*, i8** %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
ret void
}
void DynErrCountCollectIterationNamesAndNominals(int nx_orig, int nx2,
                                                 int start, int n,
                                                 const char *const *varnames,
                                                 const double *const nominals) {
  ;
}


x86 assembly (clang, -O0):
<DynErrCountCollectIterationNamesAndNominals>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @DynErrCountCollectIterationNamesAndNominals(i32 %0, i32 %1, i32 %2, i32 %3, i8** %4, double* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8**
%12 = alloca double*
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i8** %4, i8*** %11
store double* %5, double** %12
ret void
}

LLVM IR (-O2):
define void @DynErrCountCollectIterationNamesAndNominals(i32 %0, i32 %1, i32 %2, i32 %3, i8** nocapture %4, double* nocapture %5) {
ret void
}
__attribute__((no, noclone)) unsigned __int128 t151_3add(unsigned __int128 y) {
  unsigned __int128 r;
  if (__builtin_add_overflow((unsigned __int128)(-1), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t151_3add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
add    $0xffffffffffffffff,%rdx
adc    $0xffffffffffffffff,%rcx
setb   %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1158 <t151_3add+0x48>
jmp    115f <t151_3add+0x4f>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t151_3add>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
adc    $0xffffffffffffffff,%r14
jae    112b <t151_3add+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t151_3add(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.uadd.with.overflow.i128(i128 -1, i128 %11)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t151_3add(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.uadd.with.overflow.i128(i128 %6, i128 -1)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_regexp_test() { exit(1); }


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

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

LLVM IR (-O0):
define void @caml_regexp_test() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_regexp_test() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ strcmp(void *, void *);
int streq(void *s, void *t) {
  if (s == NULL)
    return -1;
  if (t == NULL)
    return 1;
  return strcmp(s, t) == 0;
}


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <streq+0x27>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <streq+0x5a>
cmpq   $0x0,-0x18(%rbp)
jne    114e <streq+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    116a <streq+0x5a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq>:
test   %rdi,%rdi
je     1130 <streq+0x20>
test   %rsi,%rsi
je     1136 <streq+0x26>
push   %rax
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
mov    $0xffffffff,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @streq(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i8* %1, null
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = tail call i64 @strcmp(i8* %0, i8* %1)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %2, %6
%11 = phi i32 [ %9, %6 ], [ -1, %2 ], [ 1, %4 ]
ret i32 %11
}
/* Variables and functions */
int IPC_CREAT;
int shmget(int, int, int);
int cwirc_shm_alloc(int key, int size) {
  return (shmget(key, size, IPC_CREAT | 0600));
}


x86 assembly (clang, -O0):
<cwirc_shm_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
or     $0x180,%edx
call   1030 <shmget@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwirc_shm_alloc>:
mov    0x2ec9(%rip),%rax
mov    $0x180,%edx
or     (%rax),%edx
jmp    1030 <shmget@plt>

LLVM IR (-O0):
@IPC_CREAT = global i32 0
define i32 @cwirc_shm_alloc(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 = load i32, i32* @IPC_CREAT
%8 = or i32 %7, 384
%9 = call i32 @shmget(i32 %5, i32 %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
@IPC_CREAT = global i32 0
define i32 @cwirc_shm_alloc(i32 %0, i32 %1) {
%3 = load i32, i32* @IPC_CREAT
%4 = or i32 %3, 384
%5 = tail call i32 @shmget(i32 %0, i32 %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ tcsendbreak(int /*<<< orphan*/, int /*<<< orphan*/);
void break_sequence() { tcsendbreak(0, 0); }


x86 assembly (clang, -O0):
<break_sequence>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <tcsendbreak@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<break_sequence>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <tcsendbreak@plt>

LLVM IR (-O0):
define void @break_sequence() {
%1 = call i32 @tcsendbreak(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @break_sequence() {
%1 = tail call i32 @tcsendbreak(i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void clearScreen(void) {
  puts("\033[H\033[2J");
  return;
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @clearScreen() {
%1 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @clearScreen() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ generate_states();
int /*<<< orphan*/ set_derives();
int /*<<< orphan*/ set_nullable();
void lr0() {
  set_derives();
  set_nullable();
  generate_states();
}


x86 assembly (clang, -O0):
<lr0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <set_derives@plt>
mov    $0x0,%al
call   1050 <set_nullable@plt>
mov    $0x0,%al
call   1030 <generate_states@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lr0>:
push   %rax
xor    %eax,%eax
call   1040 <set_derives@plt>
xor    %eax,%eax
call   1050 <set_nullable@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <generate_states@plt>

LLVM IR (-O0):
define void @lr0() {
%1 = call i32 (...) @set_derives()
%2 = call i32 (...) @set_nullable()
%3 = call i32 (...) @generate_states()
ret void
}

LLVM IR (-O2):
define void @lr0() {
%1 = tail call i32 (...) @set_derives()
%2 = tail call i32 (...) @set_nullable()
%3 = tail call i32 (...) @generate_states()
ret void
}
void RTCrcAdler32(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCrcAdler32() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void eloop_handle_alarm(int sig) {
  fprintf(stderr,
          "eloop: could not process SIGINT or SIGTERM in two "
          "seconds. Looks like there\n"
          "is a bug that ends up in a busy loop that "
          "prevents clean shutdown.\n"
          "Killing program forcefully.\n"
          "sig is %d.\n",
          sig);
  exit(1);
}


x86 assembly (clang, -O0):
<eloop_handle_alarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<eloop_handle_alarm>:
push   %rax
mov    %edi,%edx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [183 x i8] c"eloop: could not process SIGINT or SIGTERM in two seconds. Looks like there\0Ais a bug that ends up in a busy loop that prevents clean shutdown.\0AKilling program forcefully.\0Asig is %d.\0A\00"
define void @eloop_handle_alarm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([183 x i8], [183 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [183 x i8] c"eloop: could not process SIGINT or SIGTERM in two seconds. Looks like there\0Ais a bug that ends up in a busy loop that prevents clean shutdown.\0AKilling program forcefully.\0Asig is %d.\0A\00"
define void @eloop_handle_alarm(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([183 x i8], [183 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ putDebugChar(char);
void mesg(char *p) {
  while (*p) {
    if (*p == '\n')
      putDebugChar('\r');
    putDebugChar(*p++);
  }
}


x86 assembly (clang, -O0):
<mesg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115f <mesg+0x4f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1143 <mesg+0x33>
mov    $0xd,%edi
call   1030 <putDebugChar@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putDebugChar@plt>
jmp    111c <mesg+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mesg>:
push   %rbx
mov    %rdi,%rbx
jmp    1139 <mesg+0x29>
cs nopw 0x0(%rax,%rax,1)
mov    $0xd,%edi
call   1030 <putDebugChar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
movsbl %al,%edi
call   1030 <putDebugChar@plt>
movzbl (%rbx),%eax
cmp    $0xa,%al
je     1120 <mesg+0x10>
test   %al,%al
jne    112d <mesg+0x1d>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @mesg(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = load i8, i8* %3
switch i8 %4, label %8 [
i8 0, label %12
i8 10, label %5
]
5: ; preds = %2
%6 = tail call i32 @putDebugChar(i8 signext 13)
%7 = load i8, i8* %3
br label %8
8: ; preds = %2, %5
%9 = phi i8 [ %4, %2 ], [ %7, %5 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
%11 = tail call i32 @putDebugChar(i8 signext %9)
br label %2
12: ; preds = %2
ret void
}
/* Type definitions */
struct nlattr {
  int dummy;
};
struct msg_buff {
  int dummy;
};

/* Variables and functions */
struct nlattr *__nla_reserve_64bit(struct msg_buff *, int, int, int);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/, void const *, int);
int /*<<< orphan*/ nla_data(struct nlattr *);
void __nla_put_64bit(struct msg_buff *msg, int attrtype, int attrlen,
                     const void *data, int padattr) {
  struct nlattr *nla;
  nla = __nla_reserve_64bit(msg, attrtype, attrlen, padattr);
  memcpy(nla_data(nla), data, attrlen);
}


x86 assembly (clang, -O0):
<__nla_put_64bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1050 <__nla_reserve_64bit@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <nla_data@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%edx
call   1040 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__nla_put_64bit>:
push   %rbp
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %edx,%ebp
mov    %r8d,%ecx
call   1050 <__nla_reserve_64bit@plt>
mov    %rax,%rdi
call   1030 <nla_data@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
%struct.msg_buff = type { i32 }
%struct.nlattr = type { i32 }
define void @__nla_put_64bit(%struct.msg_buff* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca %struct.msg_buff*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca %struct.nlattr*
store %struct.msg_buff* %0, %struct.msg_buff** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%12 = load %struct.msg_buff*, %struct.msg_buff** %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %10
%16 = call %struct.nlattr* @__nla_reserve_64bit(%struct.msg_buff* %12, i32 %13, i32 %14, i32 %15)
store %struct.nlattr* %16, %struct.nlattr** %11
%17 = load %struct.nlattr*, %struct.nlattr** %11
%18 = call i32 @nla_data(%struct.nlattr* %17)
%19 = load i8*, i8** %9
%20 = load i32, i32* %8
%21 = call i32 @memcpy(i32 %18, i8* %19, i32 %20)
ret void
}

LLVM IR (-O2):
%struct.msg_buff = type { i32 }
%struct.nlattr = type { i32 }
define void @__nla_put_64bit(%struct.msg_buff* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call %struct.nlattr* @__nla_reserve_64bit(%struct.msg_buff* %0, i32 %1, i32 %2, i32 %4)
%7 = tail call i32 @nla_data(%struct.nlattr* %6)
%8 = tail call i32 @memcpy(i32 %7, i8* %3, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scan_hex_Good(char *);
void call_scan_hex_Good_FP() {
  char *cp = "\0";
  scan_hex_Good(cp);
}


x86 assembly (clang, -O0):
<call_scan_hex_Good_FP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <scan_hex_Good@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] zeroinitializer
define void @call_scan_hex_Good_FP() {
%1 = alloca i8*
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @scan_hex_Good(i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] zeroinitializer
define void @call_scan_hex_Good_FP() {
%1 = tail call i32 @scan_hex_Good(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LPUART4_DriverIRQHandler();
__attribute__((weak)) void LPUART4_IRQHandler(void) {
  LPUART4_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @LPUART4_IRQHandler() {
%1 = tail call i32 (...) @LPUART4_DriverIRQHandler()
ret void
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void die(const char *msg) {
  if (errno) {
    perror(msg);
    exit(2);
  } else {
    fprintf(stderr, "ABORT: %s\n", msg);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
cmpq   $0x0,(%rax)
je     1160 <die+0x30>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x2,%edi
call   1050 <exit@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe8c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rdx
mov    0x2e9d(%rip),%rax
cmpq   $0x0,(%rax)
jne    1160 <die+0x30>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xeaf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    %rdx,%rdi
call   1040 <perror@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i64 0
@stderr = global i32 0
@.str = [11 x i8] c"ABORT: %s\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @errno
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @perror(i8* %6)
%8 = call i32 @exit(i32 2)
unreachable
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %2
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@errno = global i64 0
@stderr = global i32 0
@.str = [11 x i8] c"ABORT: %s\0A\00"
define void @die(i8* %0) {
%2 = load i64, i64* @errno
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
%6 = tail call i32 @exit(i32 2)
unreachable
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%10 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ funca();
int main(void) {
  funca();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <funca@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @funca()
ret i32 0
}
void iterate_bdevs(void (*f)(struct block_device *, void *), void *arg) {}


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

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

LLVM IR (-O0):
%struct.block_device = type opaque
define void @iterate_bdevs(void (%struct.block_device*, i8*)* %0, i8* %1) {
%3 = alloca void (%struct.block_device*, i8*)*
%4 = alloca i8*
store void (%struct.block_device*, i8*)* %0, void (%struct.block_device*, i8*)** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.block_device = type opaque
define void @iterate_bdevs(void (%struct.block_device*, i8*)* nocapture %0, i8* nocapture %1) {
ret void
}
int _open_PLX9656(unsigned int *BASEA, unsigned int *BASEB, int *pci_handle,
                  int *interrupt_line, int pci_index) {
  volatile unsigned char *BASE0, *BASE1;
  unsigned flags, lastbus, version, hardware, bus, device;
  int temp;
  unsigned int *mmap_io_ptr;
  return 1;
}


x86 assembly (clang, -O0):
<_open_PLX9656>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_open_PLX9656(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32 %4, i32* %10
ret i32 1
}

LLVM IR (-O2):
define i32 @_open_PLX9656(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i32 %4) {
ret i32 1
}
/* Variables and functions */
int __sys_open(char const *, int, int);
int open(const char *name, int flags, int mode) {
  return __sys_open(name, flags, mode);
}


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

x86 assembly (clang, -O2):
<open>:
jmp    1030 <__sys_open@plt>

LLVM IR (-O0):
define i32 @open(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 i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @__sys_open(i8* %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @open(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @__sys_open(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ mchout(char);
void mcharout(char c) { mchout(c); }


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

x86 assembly (clang, -O2):
<mcharout>:
jmp    1030 <mchout@plt>

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

LLVM IR (-O2):
define void @mcharout(i8 signext %0) {
%2 = tail call i32 @mchout(i8 signext %0)
ret void
}
void rop3_150_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T ^ S;
  stk1 = *D ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_150_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_150_1_0>:
xor    %esi,%edx
mov    (%rdi),%al
xor    %al,%dl
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_150_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8*, i8** %4
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = or i32 %27, %33
%35 = trunc i32 %34 to i8
%36 = load i8*, i8** %4
store i8 %35, i8* %36
ret void
}

LLVM IR (-O2):
define void @rop3_150_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = xor i8 %4, %5
%7 = xor i8 %1, -1
%8 = and i8 %6, %7
%9 = and i8 %5, %1
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
struct addrinfo *getIfAddrs(const struct addrinfo *dest) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.addrinfo = type opaque
define %struct.addrinfo* @getIfAddrs(%struct.addrinfo* %0) {
%2 = alloca %struct.addrinfo*
store %struct.addrinfo* %0, %struct.addrinfo** %2
ret %struct.addrinfo* null
}

LLVM IR (-O2):
%struct.addrinfo = type opaque
define noalias %struct.addrinfo* @getIfAddrs(%struct.addrinfo* nocapture readnone %0) {
ret %struct.addrinfo* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Szymon Majewski\n");
  printf("Szymon\nMajewski\n");
  printf("Szymon ");
  printf("Majewski\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Szymon Majewski\0A\00"
@.str.1 = [17 x i8] c"Szymon\0AMajewski\0A\00"
@.str.2 = [8 x i8] c"Szymon \00"
@.str.3 = [10 x i8] c"Majewski\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [8 x i8] c"Szymon \00"
@str = [16 x i8] c"Szymon Majewski\00"
@str.4 = [16 x i8] c"Szymon\0AMajewski\00"
@str.5 = [9 x i8] c"Majewski\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
float log(float);
float LOG(float x) { return log(x); }


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

x86 assembly (clang, -O2):
<LOG>:
jmp    1030 <log@plt>

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

LLVM IR (-O2):
define float @LOG(float %0) {
%2 = tail call float @log(float %0)
ret float %2
}