xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ waiter1(int /*<<< orphan*/);
int /*<<< orphan*/ waiter2(int /*<<< orphan*/);
int /*<<< orphan*/ waker1(int /*<<< orphan*/);
int /*<<< orphan*/ waker2(int /*<<< orphan*/);
int /*<<< orphan*/ waker3(int /*<<< orphan*/);
int /*<<< orphan*/ waker4(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_1:
  waiter1(0);
__CPROVER_ASYNC_2:
  waiter2(0);
__CPROVER_ASYNC_3:
  waker1(0);
__CPROVER_ASYNC_4:
  waker2(0);
__CPROVER_ASYNC_5:
  waker3(0);
__CPROVER_ASYNC_6:
  waker4(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1080 <waiter1@plt>
xor    %edi,%edi
call   1050 <waiter2@plt>
xor    %edi,%edi
call   1060 <waker1@plt>
xor    %edi,%edi
call   1030 <waker2@plt>
xor    %edi,%edi
call   1070 <waker3@plt>
xor    %edi,%edi
call   1040 <waker4@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1080 <waiter1@plt>
xor    %edi,%edi
call   1050 <waiter2@plt>
xor    %edi,%edi
call   1060 <waker1@plt>
xor    %edi,%edi
call   1030 <waker2@plt>
xor    %edi,%edi
call   1070 <waker3@plt>
xor    %edi,%edi
call   1040 <waker4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @waiter1(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @waiter2(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @waker1(i32 0)
br label %8
8: ; preds = %6
%9 = call i32 @waker2(i32 0)
br label %10
10: ; preds = %8
%11 = call i32 @waker3(i32 0)
br label %12
12: ; preds = %10
%13 = call i32 @waker4(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @waiter1(i32 0)
%2 = tail call i32 @waiter2(i32 0)
%3 = tail call i32 @waker1(i32 0)
%4 = tail call i32 @waker2(i32 0)
%5 = tail call i32 @waker3(i32 0)
%6 = tail call i32 @waker4(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int find_or_insert(int);
void *process4(void *arg) {
  int val = 20;
  int found = find_or_insert(val);
  assert(found);
  return NULL;
}


x86 assembly (clang, -O0):
<process4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <find_or_insert@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process4>:
push   %rax
mov    $0x14,%edi
call   1040 <find_or_insert@plt>
mov    %eax,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @process4(i8* nocapture readnone %0) {
%2 = tail call i32 @find_or_insert(i32 20)
%3 = tail call i32 @assert(i32 %2)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ stdout;
void WriteString_Real(const char *str) {
  printf("%s", str);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<WriteString_Real>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteString_Real>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@stdout = global i32 0
define void @WriteString_Real(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __llvm_profile_set_filename(char const *);
int /*<<< orphan*/ __llvm_profile_write_file();
int foo(int /*<<< orphan*/);
int main(int argc, const char *argv[]) {
  if (argc < 2)
    return 1;
  __llvm_profile_write_file();
  int Ret = foo(0);
  __llvm_profile_set_filename(argv[1]);
  return Ret;
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    115c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1180 <main+0x50>
mov    $0x0,%al
call   1050 <__llvm_profile_write_file@plt>
xor    %edi,%edi
call   1040 <foo@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <__llvm_profile_set_filename@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jge    113b <main+0xb>
mov    $0x1,%eax
ret
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
xor    %eax,%eax
call   1050 <__llvm_profile_write_file@plt>
xor    %edi,%edi
call   1040 <foo@plt>
mov    %eax,%ebp
mov    0x8(%rbx),%rdi
call   1030 <__llvm_profile_set_filename@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %18
10: ; preds = %2
%11 = call i32 (...) @__llvm_profile_write_file()
%12 = call i32 @foo(i32 0)
store i32 %12, i32* %6
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @__llvm_profile_set_filename(i8* %15)
%17 = load i32, i32* %6
store i32 %17, i32* %3
br label %18
18: ; preds = %10, %9
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i32 (...) @__llvm_profile_write_file()
%6 = tail call i32 @foo(i32 0)
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @__llvm_profile_set_filename(i8* %8)
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %6, %4 ], [ 1, %2 ]
ret i32 %11
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ uwsgi_add_safe_fd(int);
int /*<<< orphan*/ uwsgi_exit(int);
int /*<<< orphan*/ uwsgi_log(char *, int);
void uwsgi_opt_safe_fd(char *opt, char *value, void *foobar) {
  int fd = atoi(value);
  if (fd < 0) {
    uwsgi_log("invalid file descriptor: %d\n", fd);
    uwsgi_exit(1);
  }
  uwsgi_add_safe_fd(fd);
}


x86 assembly (clang, -O0):
<uwsgi_opt_safe_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1183 <uwsgi_opt_safe_fd+0x43>
mov    -0x1c(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1030 <uwsgi_log@plt>
mov    $0x1,%edi
call   1040 <uwsgi_exit@plt>
mov    -0x1c(%rbp),%edi
call   1060 <uwsgi_add_safe_fd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_opt_safe_fd>:
push   %rbx
mov    %rsi,%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1167 <uwsgi_opt_safe_fd+0x27>
lea    0xeaa(%rip),%rdi
mov    %ebx,%esi
call   1030 <uwsgi_log@plt>
mov    $0x1,%edi
call   1040 <uwsgi_exit@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1060 <uwsgi_add_safe_fd@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"invalid file descriptor: %d\0A\00"
define void @uwsgi_opt_safe_fd(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %5
%9 = call i32 @atoi(i8* %8)
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load i32, i32* %7
%14 = call i32 @uwsgi_log(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 @uwsgi_exit(i32 1)
br label %16
16: ; preds = %12, %3
%17 = load i32, i32* %7
%18 = call i32 @uwsgi_add_safe_fd(i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"invalid file descriptor: %d\0A\00"
define void @uwsgi_opt_safe_fd(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = tail call i32 @atoi(i8* %1)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @uwsgi_log(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %4)
%8 = tail call i32 @uwsgi_exit(i32 1)
br label %9
9: ; preds = %6, %3
%10 = tail call i32 @uwsgi_add_safe_fd(i32 %4)
ret void
}
int gcd(int a, int b) {
  if (b) {
    return gcd(b, a % b);
  } else {
    return a;
  }
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1141 <gcd+0x31>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
jmp    1147 <gcd+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned short, ...);
int main(void) {
  unsigned short a, b, c;
  a = 22;
  b = 2570;
  c = 293000;
  printf("sizeof(ushort): %d\n", sizeof(unsigned short));
  printf("a: %d, b: %d, c: %d\n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x16,-0x6(%rbp)
movw   $0xa0a,-0x8(%rbp)
movw   $0x7888,-0xa(%rbp)
lea    0xec8(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6(%rbp),%ax
movzwl -0x8(%rbp),%edx
movzwl -0xa(%rbp),%ecx
lea    0xebd(%rip),%rdi
movzwl %ax,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x16,%esi
mov    $0xa0a,%edx
mov    $0x7888,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"sizeof(ushort): %d\0A\00"
@.str.1 = [21 x i8] c"a: %d, b: %d, c: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i16
%4 = alloca i16
store i32 0, i32* %1
store i16 22, i16* %2
store i16 2570, i16* %3
store i16 30856, i16* %4
%5 = call i32 (i8*, i16, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i16 zeroext 2)
%6 = load i16, i16* %2
%7 = load i16, i16* %3
%8 = zext i16 %7 to i32
%9 = load i16, i16* %4
%10 = zext i16 %9 to i32
%11 = call i32 (i8*, i16, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i16 zeroext %6, i32 %8, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"sizeof(ushort): %d\0A\00"
@.str.1 = [21 x i8] c"a: %d, b: %d, c: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i16, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i16 zeroext 2)
%2 = tail call i32 (i8*, i16, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i16 zeroext 22, i32 2570, i32 30856)
ret i32 0
}
void __attribute__((no)) HEX00_bb_systemDatInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_bb_systemDatInit() {
ret void
}
void yyerror(msg) const char *msg;
{}


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

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

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

LLVM IR (-O2):
define void @yyerror(i8* nocapture %0) {
ret void
}
int equals(void *key1, void *key2) {
  int *p = key1;
  int *q = key2;
  return *p == *q;
}


x86 assembly (clang, -O0):
<equals>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equals>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @equals(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = icmp eq i32 %12, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @equals(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ rra();
void opcode_1f() { rra(); }


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

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

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

LLVM IR (-O2):
define void @opcode_1f() {
%1 = tail call i32 (...) @rra()
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sys_list_add(struct list_head *, struct list_head *);
void list_push_front(struct list_head *node, struct list_head *head) {
  sys_list_add(node, head);
}


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

x86 assembly (clang, -O2):
<list_push_front>:
jmp    1030 <sys_list_add@plt>

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

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_push_front(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @sys_list_add(%struct.list_head* %0, %struct.list_head* %1)
ret void
}
void openOutput() {}


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

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

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

LLVM IR (-O2):
define void @openOutput() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __reset_hardware();
void __attribute__((weak)) _exit(int code __attribute__((unused))) {
  __reset_hardware();
  while (1)
    ;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__reset_hardware@plt>
jmp    1122 <_exit+0x12>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
xor    %eax,%eax
call   1030 <__reset_hardware@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <_exit+0x10>

LLVM IR (-O0):
define weak void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @__reset_hardware()
br label %4
4: ; preds = %1, %4
br label %4
}

LLVM IR (-O2):
define weak void @_exit(i32 %0) {
%2 = tail call i32 (...) @__reset_hardware()
br label %3
3: ; preds = %1, %3
br label %3
}
/* Variables and functions */
int m_new(int, int);
void *mls(int, int);
void *m_add2(int list, int *pos) {
  *pos = m_new(list, 1);
  return mls(list, *pos);
}


x86 assembly (clang, -O0):
<m_add2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <m_new@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1040 <mls@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_add2>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x1,%esi
call   1030 <m_new@plt>
mov    %eax,(%rbx)
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mls@plt>

LLVM IR (-O0):
define i8* @m_add2(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 @m_new(i32 %5, i32 1)
%7 = load i32*, i32** %4
store i32 %6, i32* %7
%8 = load i32, i32* %3
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = call i8* @mls(i32 %8, i32 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @m_add2(i32 %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @m_new(i32 %0, i32 1)
store i32 %3, i32* %1
%4 = tail call i8* @mls(i32 %0, i32 %3)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int_least8_t;

/* Variables and functions */
void SHAREMIND_MAP_KEY_FREE_int_least8_t(int_least8_t *const dest) {
  (void)dest;
}


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

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

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

LLVM IR (-O2):
define void @SHAREMIND_MAP_KEY_FREE_int_least8_t(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ asm_sig_print(int, int /*<<< orphan*/ *, void *);
void sigfn_trap(int signum, siginfo_t *siginfo, void *puctx) {
  asm_sig_print(signum, siginfo, puctx);
}


x86 assembly (clang, -O0):
<sigfn_trap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <asm_sig_print@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigfn_trap>:
jmp    1030 <asm_sig_print@plt>

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

LLVM IR (-O2):
define void @sigfn_trap(i32 %0, i32* %1, i8* %2) {
%4 = tail call i32 @asm_sig_print(i32 %0, i32* %1, i8* %2)
ret void
}
void foo348() {}


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

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

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

LLVM IR (-O2):
define void @foo348() {
ret void
}
unsigned int octave_name_max_wrapper(void) { return 255; }


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

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

LLVM IR (-O0):
define i32 @octave_name_max_wrapper() {
ret i32 255
}

LLVM IR (-O2):
define i32 @octave_name_max_wrapper() {
ret i32 255
}
void ft_ultimate_div_mod(int *a, int *b) {
  int dividend;
  int divisor;
  dividend = *a;
  divisor = *b;
  *a = dividend / divisor;
  *b = dividend % divisor;
}


x86 assembly (clang, -O0):
<ft_ultimate_div_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ultimate_div_mod>:
mov    (%rdi),%eax
cltd
idivl  (%rsi)
mov    %eax,(%rdi)
mov    %edx,(%rsi)
ret

LLVM IR (-O0):
define void @ft_ultimate_div_mod(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
store i32 %8, i32* %5
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = sdiv i32 %11, %12
%14 = load i32*, i32** %3
store i32 %13, i32* %14
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = srem i32 %15, %16
%18 = load i32*, i32** %4
store i32 %17, i32* %18
ret void
}

LLVM IR (-O2):
define void @ft_ultimate_div_mod(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sdiv i32 %3, %4
store i32 %5, i32* %0
%6 = srem i32 %3, %4
store i32 %6, i32* %1
ret void
}
extern int chk_bss(void) {
  static int j[2000];
  int i;
  for (i = 0; i < 2000; i++)
    if (j[i] != 0)
      break;
  return i == 2000;
}


x86 assembly (clang, -O0):
<chk_bss>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x7d0,-0x4(%rbp)
jge    1145 <chk_bss+0x45>
movslq -0x4(%rbp),%rcx
lea    0x2f0d(%rip),%rax
cmpl   $0x0,(%rax,%rcx,4)
je     1132 <chk_bss+0x32>
jmp    1145 <chk_bss+0x45>
jmp    1137 <chk_bss+0x37>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <chk_bss+0xb>
cmpl   $0x7d0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@chk_bss.j = internal global [2000 x i32] zeroinitializer
define i32 @chk_bss() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %13, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 2000
br i1 %4, label %5, label %16
5: ; preds = %2
%6 = load i32, i32* %1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [2000 x i32], [2000 x i32]* @chk_bss.j, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %5
br label %16
12: ; preds = %5
br label %13
13: ; preds = %12
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %2
16: ; preds = %11, %2
%17 = load i32, i32* %1
%18 = icmp eq i32 %17, 2000
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @chk_bss() {
ret i32 1
}
/* Variables and functions */
char *gen_conn_marshall(void *, int /*<<< orphan*/);
char *conn_marshall(void *obj) { return gen_conn_marshall(obj, 0); }


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

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

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

LLVM IR (-O2):
define i8* @conn_marshall(i8* %0) {
%2 = tail call i8* @gen_conn_marshall(i8* %0, i32 0)
ret i8* %2
}
/* Variables and functions */
double exp(int);
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char *argv[]) {
  printf("%f\n", exp(1));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @exp(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__7__IO__makeOutput();
void Msp430GpioC__14__HplGeneralIO__makeOutput(void) {
  HplMsp430GeneralIOP__7__IO__makeOutput();
}


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

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

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

LLVM IR (-O2):
define void @Msp430GpioC__14__HplGeneralIO__makeOutput() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__7__IO__makeOutput()
ret void
}
/* Variables and functions */
scalar_t__ strtol(unsigned char const *, unsigned char **, int);
int atoi(const unsigned char *__p) {
  return (int)strtol(__p, (unsigned char **)0, 10);
}


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

x86 assembly (clang, -O2):
<atoi>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtol(i8* %3, i8** null, i32 10)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i8** null, i32 10)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int ChargerConfiguration(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
void testChargerConfiguration() {
  FILE *fichier;
  int result = ChargerConfiguration(fichier);
  if (1) {
    printf("%%TEST_FAILED%% time=0 testname=testChargerConfiguration "
           "(Test_gestionfichier) message=error message sample\n");
  }
}


x86 assembly (clang, -O0):
<testChargerConfiguration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x8(%rbp),%rdi
call   1040 <ChargerConfiguration@plt>
mov    %eax,-0xc(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testChargerConfiguration>:
push   %rax
call   1040 <ChargerConfiguration@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [109 x i8] c"%%TEST_FAILED%% time=0 testname=testChargerConfiguration (Test_gestionfichier) message=error message sample\0A\00"
define void @testChargerConfiguration() {
%1 = alloca i32*
%2 = alloca i32
%3 = load i32*, i32** %1
%4 = call i32 @ChargerConfiguration(i32* %3)
store i32 %4, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [109 x i8] c"%%TEST_FAILED%% time=0 testname=testChargerConfiguration (Test_gestionfichier) message=error message sample\0A\00"
define void @testChargerConfiguration() {
%1 = tail call i32 @ChargerConfiguration(i32* undef)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([109 x i8], [109 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long crc32finish(unsigned long *crcvar) {
  *crcvar = *crcvar ^ 0xffffffffl;
  return *crcvar;
}


x86 assembly (clang, -O0):
<crc32finish>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movabs $0xffffffff,%rcx
xor    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc32finish>:
mov    $0xffffffff,%eax
xor    (%rdi),%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define i64 @crc32finish(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = xor i64 %4, 4294967295
%6 = load i64*, i64** %2
store i64 %5, i64* %6
%7 = load i64*, i64** %2
%8 = load i64, i64* %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @crc32finish(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = xor i64 %2, 4294967295
store i64 %3, i64* %0
ret i64 %3
}
/* Type definitions */
struct _arrow_mem {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _arrow_mem *);
void _arrow_dealloc(struct _arrow_mem *_alloc) { free(_alloc); }


x86 assembly (clang, -O0):
<_arrow_dealloc>:
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):
<_arrow_dealloc>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct._arrow_mem = type { i32 }
define void @_arrow_dealloc(%struct._arrow_mem* nocapture %0) {
%2 = tail call i32 @free(%struct._arrow_mem* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ perror(char *);
void forkc(void (*child)(), void (*parent)()) {
  pid_t pid;
  if ((pid = fork()) < 0) {
    perror("fork()");
    exit(EXIT_FAILURE);
  } else if (pid == 0) {
    child();
  } else {
    parent();
  }
}


x86 assembly (clang, -O0):
<forkc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jge    116f <forkc+0x3f>
lea    0xea4(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
cmpq   $0x0,-0x18(%rbp)
jne    1184 <forkc+0x54>
mov    $0x0,%al
call   *-0x8(%rbp)
jmp    1189 <forkc+0x59>
mov    $0x0,%al
call   *-0x10(%rbp)
jmp    118e <forkc+0x5e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forkc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
js     1158 <forkc+0x28>
mov    %r14,%rcx
cmove  %rbx,%rcx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    *%rcx
lea    0xea1(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"fork()\00"
@EXIT_FAILURE = global i32 0
define void @forkc(void (...)* %0, void (...)* %1) {
%3 = alloca void (...)*
%4 = alloca void (...)*
%5 = alloca i64
store void (...)* %0, void (...)** %3
store void (...)* %1, void (...)** %4
%6 = call i64 (...) @fork()
store i64 %6, i64* %5
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %2
%13 = load i64, i64* %5
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = load void (...)*, void (...)** %3
br label %19
17: ; preds = %12
%18 = load void (...)*, void (...)** %4
br label %19
19: ; preds = %17, %15
br label %20
20: ; preds = %19
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"fork()\00"
@EXIT_FAILURE = global i32 0
define void @forkc(void (...)* nocapture %0, void (...)* nocapture %1) {
%3 = tail call i64 (...) @fork()
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = icmp eq i64 %3, 0
%11 = select i1 %10, void (...)* %0, void (...)* %1
tail call void (...) %11()
ret void
}
int _atomic_compare_and_swap_ptr(void **ptr, void *old, void *new) {
  return __atomic_compare_exchange_n(ptr, &old, new, 0, 4, 0);
}


x86 assembly (clang, -O0):
<_atomic_compare_and_swap_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
mov    %al,-0x31(%rbp)
mov    %rcx,-0x30(%rbp)
test   $0x1,%al
jne    1151 <_atomic_compare_and_swap_ptr+0x51>
mov    -0x40(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x31(%rbp),%al
and    $0x1,%al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_atomic_compare_and_swap_ptr>:
mov    %rsi,%rax
xor    %ecx,%ecx
lock cmpxchg %rdx,(%rdi)
sete   %cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @_atomic_compare_and_swap_ptr(i8** %0, i8* %1, i8* %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*** %4
%10 = load i8*, i8** %6
store i8* %10, i8** %7
%11 = bitcast i8** %9 to i64*
%12 = bitcast i8** %5 to i64*
%13 = bitcast i8** %7 to i64*
%14 = load i64, i64* %12
%15 = load i64, i64* %13
%16 = cmpxchg i64* %11, i64 %14, i64 %15 acq_rel monotonic
%17 = extractvalue { i64, i1 } %16, 0
%18 = extractvalue { i64, i1 } %16, 1
br i1 %18, label %20, label %19
19: ; preds = %3
store i64 %17, i64* %12
br label %20
20: ; preds = %19, %3
%21 = zext i1 %18 to i8
store i8 %21, i8* %8
%22 = load i8, i8* %8
%23 = trunc i8 %22 to i1
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @_atomic_compare_and_swap_ptr(i8** nocapture %0, i8* %1, i8* %2) {
%4 = bitcast i8** %0 to i64*
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %2 to i64
%7 = cmpxchg i64* %4, i64 %5, i64 %6 acq_rel monotonic
%8 = extractvalue { i64, i1 } %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int setlogin(const char *name) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<setlogin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setlogin>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @setlogin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @setlogin(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *);
int /*<<< orphan*/ stdout;
void userError(const char *err) {
  fprintf(stdout, err);
  fprintf(stdout, "\n");
  exit(1);
}


x86 assembly (clang, -O0):
<userError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<userError>:
push   %rbx
mov    %rdi,%rsi
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @userError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* %4)
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @userError(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* %0)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ c;

/* Variables and functions */
int read(int /*<<< orphan*/, unsigned char *, int);
int getch(void) {
  int r;
  unsigned char c;
  if ((r = read(0, &c, sizeof(c))) < 0) {
    return r;
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<getch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    113f <getch+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <getch+0x36>
movzbl -0x9(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getch>:
push   %rax
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
test   %eax,%eax
movzbl 0x7(%rsp),%ecx
cmovns %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getch() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = call i32 @read(i32 0, i8* %3, i32 1)
store i32 %4, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* %2
store i32 %7, i32* %1
br label %11
8: ; preds = %0
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
store i32 %10, i32* %1
br label %11
11: ; preds = %8, %6
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @getch() {
%1 = alloca i8
%2 = call i32 @read(i32 0, i8* %1, i32 1)
%3 = icmp slt i32 %2, 0
%4 = load i8, i8* %1
%5 = zext i8 %4 to i32
%6 = select i1 %3, i32 %2, i32 %5
ret i32 %6
}
int WebPGetMuxVersion(void) { return (0 << 16) | (2 << 8) | 2; }


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

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

LLVM IR (-O0):
define i32 @WebPGetMuxVersion() {
ret i32 514
}

LLVM IR (-O2):
define i32 @WebPGetMuxVersion() {
ret i32 514
}
/* Variables and functions */
int /*<<< orphan*/ check_overflow_size_t(size_t, size_t);
void *sr_realloc(void *, size_t);
void *sr_realloc_array(void *ptr, size_t elems, size_t elem_size) {
  check_overflow_size_t(elems, elem_size);
  return sr_realloc(ptr, elems * elem_size);
}


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

x86 assembly (clang, -O2):
<sr_realloc_array>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <check_overflow_size_t@plt>
imul   %r14,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <sr_realloc@plt>

LLVM IR (-O0):
define i8* @sr_realloc_array(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = load i64, i64* %6
%9 = call i32 @check_overflow_size_t(i64 %7, i64 %8)
%10 = load i8*, i8** %4
%11 = load i64, i64* %5
%12 = load i64, i64* %6
%13 = mul i64 %11, %12
%14 = call i8* @sr_realloc(i8* %10, i64 %13)
ret i8* %14
}

LLVM IR (-O2):
define i8* @sr_realloc_array(i8* %0, i64 %1, i64 %2) {
%4 = tail call i32 @check_overflow_size_t(i64 %1, i64 %2)
%5 = mul i64 %2, %1
%6 = tail call i8* @sr_realloc(i8* %0, i64 %5)
ret i8* %6
}
/* Variables and functions */
unsigned int __os_crc32(int /*<<< orphan*/, void const *, unsigned int);
unsigned int os_crc32(const void *buf, unsigned int size) {
  return __os_crc32(0, buf, size);
}


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

x86 assembly (clang, -O2):
<os_crc32>:
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <__os_crc32@plt>

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

LLVM IR (-O2):
define i32 @os_crc32(i8* %0, i32 %1) {
%3 = tail call i32 @__os_crc32(i32 0, i8* %0, i32 %1)
ret i32 %3
}
unsigned char bin2gray(unsigned char bin) { return bin ^ (bin >> 1); }


x86 assembly (clang, -O0):
<bin2gray>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x1(%rbp),%ecx
sar    $0x1,%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin2gray>:
mov    %edi,%eax
shr    %al
xor    %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @bin2gray(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = ashr i32 %6, 1
%8 = xor i32 %4, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define zeroext i8 @bin2gray(i8 zeroext %0) {
%2 = lshr i8 %0, 1
%3 = xor i8 %2, %0
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ pre_ptrn_flag_exclusive_short(char, void *);
void pre_ptrn_flag_exclusive_long(const char *const s __attribute__((unused)),
                                  const char *const unused
                                  __attribute__((unused)),
                                  void *data) {
  pre_ptrn_flag_exclusive_short('x', data);
}


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

x86 assembly (clang, -O2):
<pre_ptrn_flag_exclusive_long>:
mov    $0x78,%edi
mov    %rdx,%rsi
jmp    1030 <pre_ptrn_flag_exclusive_short@plt>

LLVM IR (-O0):
define void @pre_ptrn_flag_exclusive_long(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** %6
%8 = call i32 @pre_ptrn_flag_exclusive_short(i8 signext 120, i8* %7)
ret void
}

LLVM IR (-O2):
define void @pre_ptrn_flag_exclusive_long(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* %2) {
%4 = tail call i32 @pre_ptrn_flag_exclusive_short(i8 signext 120, i8* %2)
ret void
}
/* Variables and functions */
int rom_present(char *);
int sega_standalone_available(void) {
  return rom_present(L"roms/video/ega/lega.vbi");
}


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

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

LLVM IR (-O0):
@.str = [24 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 101, i32 103, i32 97, i32 47, i32 108, i32 101, i32 103, i32 97, i32 46, i32 118, i32 98, i32 105, i32 0]
define i32 @sega_standalone_available() {
%1 = call i32 @rom_present(i8* bitcast ([24 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [24 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 101, i32 103, i32 97, i32 47, i32 108, i32 101, i32 103, i32 97, i32 46, i32 118, i32 98, i32 105, i32 0]
define i32 @sega_standalone_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([24 x i32]* @.str to i8*))
ret i32 %1
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, char *);
void getClientPipePath(pid_t pid, char *bufferPath) {
  sprintf(bufferPath, "./%d%s", pid, "_client_pipe");
}


x86 assembly (clang, -O0):
<getClientPipePath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xed3(%rip),%rsi
lea    0xed3(%rip),%rcx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getClientPipePath>:
mov    %rsi,%rax
mov    %edi,%edx
lea    0xee4(%rip),%rsi
lea    0xee4(%rip),%rcx
mov    %rax,%rdi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"./%d%s\00"
@.str.1 = [13 x i8] c"_client_pipe\00"
define void @getClientPipePath(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 = load i32, i32* %3
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"./%d%s\00"
@.str.1 = [13 x i8] c"_client_pipe\00"
define void @getClientPipePath(i32 %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void enablePromiscuousReception(void) {}


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

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

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

LLVM IR (-O2):
define void @enablePromiscuousReception() {
ret void
}