xunge/DecIR huggingface dataset:
void n_mutexNone(struct _WsbmMutex *mutex) { ; }


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

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

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

LLVM IR (-O2):
%struct._WsbmMutex = type opaque
define void @n_mutexNone(%struct._WsbmMutex* nocapture %0) {
ret void
}
int mps_oem_check(struct mp_config_table *mpc, char *oem, char *productid) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.mp_config_table = type opaque
define i32 @mps_oem_check(%struct.mp_config_table* %0, i8* %1, i8* %2) {
%4 = alloca %struct.mp_config_table*
%5 = alloca i8*
%6 = alloca i8*
store %struct.mp_config_table* %0, %struct.mp_config_table** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
%struct.mp_config_table = type opaque
define i32 @mps_oem_check(%struct.mp_config_table* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
void gdk_set_program_class() {}


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

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

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

LLVM IR (-O2):
define void @gdk_set_program_class() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
void getGoodBuffer(char *buf, int size) {
  fgets(buf, size, stdin);
  while (buf[0] == '#') {
    fgets(buf, size, stdin);
  }
}


x86 assembly (clang, -O0):
<getGoodBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
call   1030 <fgets@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    115e <getGoodBuffer+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e96(%rip),%rax
mov    (%rax),%edx
call   1030 <fgets@plt>
jmp    1134 <getGoodBuffer+0x24>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getGoodBuffer>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2ec8(%rip),%r14
mov    (%r14),%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <fgets@plt>
cmpb   $0x23,(%rbx)
jne    1144 <getGoodBuffer+0x34>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    %ebp,%esi
jmp    1130 <getGoodBuffer+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @getGoodBuffer(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 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %5, i32 %6, i32 %7)
br label %9
9: ; preds = %15, %2
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 35
br i1 %14, label %15, label %20
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = load i32, i32* %4
%18 = load i32, i32* @stdin
%19 = call i32 @fgets(i8* %16, i32 %17, i32 %18)
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @getGoodBuffer(i8* %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgets(i8* %0, i32 %1, i32 %3)
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 35
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = load i32, i32* @stdin
%9 = tail call i32 @fgets(i8* %0, i32 %1, i32 %8)
%10 = load i8, i8* %0
%11 = icmp eq i8 %10, 35
br i1 %11, label %7, label %12
12: ; preds = %7, %2
ret void
}
void gtk_widget_get_display() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_get_display() {
ret void
}
int test_imm_F5int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xF5 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F5int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 16056320
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int allowedOp(int op) {
  assert(70 > 69 && 70 < 73);
  assert(72 > 69 && 72 < 73);
  assert(71 > 69 && 71 < 73);
  assert(73 == 69 + 4);
  return op == 65 || (op >= 69 && op <= 73) || op == 66;
}


x86 assembly (clang, -O0):
<allowedOp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%al
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1175 <allowedOp+0x65>
cmpl   $0x45,-0x4(%rbp)
jl     116b <allowedOp+0x5b>
mov    $0x1,%al
cmpl   $0x49,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1175 <allowedOp+0x65>
cmpl   $0x42,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allowedOp>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
lea    -0x45(%rbx),%eax
cmp    $0x5,%eax
setb   %al
add    $0xffffffbf,%ebx
cmp    $0x2,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @allowedOp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @assert(i32 1)
%4 = call i32 @assert(i32 1)
%5 = call i32 @assert(i32 1)
%6 = call i32 @assert(i32 1)
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 65
br i1 %8, label %18, label %9
9: ; preds = %1
%10 = load i32, i32* %2
%11 = icmp sge i32 %10, 69
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp sle i32 %13, 73
br i1 %14, label %18, label %15
15: ; preds = %12, %9
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 66
br label %18
18: ; preds = %15, %12, %1
%19 = phi i1 [ true, %12 ], [ true, %1 ], [ %17, %15 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @allowedOp(i32 %0) {
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
%6 = add i32 %0, -69
%7 = icmp ult i32 %6, 5
%8 = add i32 %0, -65
%9 = icmp ult i32 %8, 2
%10 = or i1 %9, %7
%11 = zext i1 %10 to i32
ret i32 %11
}
void Log_flush() {}


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

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

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

LLVM IR (-O2):
define void @Log_flush() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char const *);
char *u(const char *str) {
  static char buff[1000];
  sprintf(buff, "%s_", str);
  return buff;
}


x86 assembly (clang, -O0):
<u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0x2f19(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f06(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u>:
push   %rbx
mov    %rdi,%rdx
lea    0x2f25(%rip),%rbx
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@u.buff = internal global [1000 x i8] zeroinitializer
@.str = [4 x i8] c"%s_\00"
define i8* @u(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([1000 x i8], [1000 x i8]* @u.buff, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i8* getelementptr inbounds ([1000 x i8], [1000 x i8]* @u.buff, i64 0, i64 0)
}

LLVM IR (-O2):
@u.buff = internal global [1000 x i8] zeroinitializer
@.str = [4 x i8] c"%s_\00"
define i8* @u(i8* %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([1000 x i8], [1000 x i8]* @u.buff, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* getelementptr inbounds ([1000 x i8], [1000 x i8]* @u.buff, i64 0, i64 0)
}
void ata_acpi_bind_dev(struct ata_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.ata_device = type opaque
define void @ata_acpi_bind_dev(%struct.ata_device* nocapture %0) {
ret void
}
/* Variables and functions */
int findComplement(int);
int /*<<< orphan*/ printf(char *, int);
char *when10_shouldReturn5() {
  int complement = findComplement(10);
  printf("%i\n", complement);
  do {
    if (!(complement == 5))
      return "error, something went wrong";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<when10_shouldReturn5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1040 <findComplement@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x5,-0xc(%rbp)
je     115e <when10_shouldReturn5+0x3e>
lea    0xeaf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116b <when10_shouldReturn5+0x4b>
jmp    1163 <when10_shouldReturn5+0x43>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<when10_shouldReturn5>:
push   %rbx
mov    $0xa,%edi
call   1040 <findComplement@plt>
mov    %eax,%ebx
lea    0xecc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
cmp    $0x5,%ebx
lea    0xebd(%rip),%rcx
cmovne %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
@.str.1 = [28 x i8] c"error, something went wrong\00"
define i8* @when10_shouldReturn5() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i32 @findComplement(i32 10)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 5
br i1 %8, label %10, label %9
9: ; preds = %6
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %12
10: ; preds = %6
br label %11
11: ; preds = %10
store i8* null, i8** %1
br label %12
12: ; preds = %11, %9
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
@.str.1 = [28 x i8] c"error, something went wrong\00"
define i8* @when10_shouldReturn5() {
%1 = tail call i32 @findComplement(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i32 %1, 5
%4 = select i1 %3, i8* null, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ my_strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void my_putstr2(char *str) {
  if (str != NULL)
    write(2, str, my_strlen(str));
}


x86 assembly (clang, -O0):
<my_putstr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1158 <my_putstr2+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1040 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putstr2>:
test   %rdi,%rdi
je     113e <my_putstr2+0x1e>
push   %rbx
mov    %rdi,%rbx
call   1030 <my_strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1040 <write@plt>
ret

LLVM IR (-O0):
define void @my_putstr2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @my_strlen(i8* %7)
%9 = call i32 @write(i32 2, i8* %6, i32 %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @my_putstr2(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @my_strlen(i8* %0)
%5 = tail call i32 @write(i32 2, i8* %0, i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_slurp_string_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_slurp_string(struct Cyc_Lexing_lexbuf *lexbuf) {
  return ({ Cyc_slurp_string_rec(lexbuf, 6); });
}


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

x86 assembly (clang, -O2):
<Cyc_slurp_string>:
mov    $0x6,%esi
jmp    1030 <Cyc_slurp_string_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_slurp_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_slurp_string_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 6)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_slurp_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_slurp_string_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 6)
ret i32 %2
}
/* Variables and functions */
float __infer_nondet_float();
float nanf(const char *tagp) { return __infer_nondet_float(); }


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

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

LLVM IR (-O0):
define float @nanf(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call float (...) @__infer_nondet_float()
ret float %3
}

LLVM IR (-O2):
define float @nanf(i8* nocapture readnone %0) {
%2 = tail call float (...) @__infer_nondet_float()
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sig_handler(int sig, siginfo_t *info, void *t) {
  printf("Received signal: %d\n", sig);
  return;
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Received signal: %d\0A\00"
define void @sig_handler(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 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Received signal: %d\0A\00"
define void @sig_handler(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
char foo() { return 0x1; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%al
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @foo() {
ret i8 1
}

LLVM IR (-O2):
define signext i8 @foo() {
ret i8 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int, char);
void printHelp() {
  printf("\nWorlds Scariest Archive Extractor %d.%d%c\nUsage: [options] [-t] "
         "[path to.TOC file] [-i] [path to .IMG file]\nOptions:\n\t-l\tList "
         "files only\n\t-v\tDisplay verbose\n\t-h\tDisplays this screen\n",
         0, 1, 'A');
  exit(0);
}


x86 assembly (clang, -O0):
<printHelp>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x41,%ecx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printHelp>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x41,%ecx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [184 x i8] c"\0AWorlds Scariest Archive Extractor %d.%d%c\0AUsage: [options] [-t] [path to.TOC file] [-i] [path to .IMG file]\0AOptions:\0A\09-l\09List files only\0A\09-v\09Display verbose\0A\09-h\09Displays this screen\0A\00"
define void @printHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([184 x i8], [184 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i8 signext 65)
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [184 x i8] c"\0AWorlds Scariest Archive Extractor %d.%d%c\0AUsage: [options] [-t] [path to.TOC file] [-i] [path to .IMG file]\0AOptions:\0A\09-l\09List files only\0A\09-v\09Display verbose\0A\09-h\09Displays this screen\0A\00"
define void @printHelp() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([184 x i8], [184 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i8 signext 65)
%2 = tail call i32 @exit(i32 0)
unreachable
}
void gtk_selection_mode_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_selection_mode_get_type() {
ret void
}
double _square(double x) { return x * x; }


x86 assembly (clang, -O0):
<_square>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_square>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @_square(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @_square(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Variables and functions */
char *date_get_now_hhmm_colon_ss(int);
char *date_now_hhmmss(int utc_offset) {
  char *return_string;
  return_string = date_get_now_hhmm_colon_ss(utc_offset);
  return return_string;
}


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

x86 assembly (clang, -O2):
<date_now_hhmmss>:
jmp    1030 <date_get_now_hhmm_colon_ss@plt>

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

LLVM IR (-O2):
define i8* @date_now_hhmmss(i32 %0) {
%2 = tail call i8* @date_get_now_hhmm_colon_ss(i32 %0)
ret i8* %2
}
/* Type definitions */
typedef int uint64_t;
typedef void *uint32_t;
struct timespec {
  void *tv_nsec;
  void *tv_sec;
};

/* Variables and functions */
void timespec_from_proto(struct timespec *a, uint32_t tv_sec_hi,
                         uint32_t tv_sec_lo, uint32_t tv_nsec) {
  a->tv_sec = ((uint64_t)tv_sec_hi << 32) + tv_sec_lo;
  a->tv_nsec = tv_nsec;
}


x86 assembly (clang, -O0):
<timespec_from_proto>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x20,%ecx
shl    %cl,%eax
mov    -0x18(%rbp),%rcx
cltq
add    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_from_proto>:
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
%struct.timespec = type { i8*, i8* }
define void @timespec_from_proto(%struct.timespec* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.timespec*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.timespec* %0, %struct.timespec** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = ptrtoint i8* %9 to i32
%11 = shl i32 %10, 32
%12 = load i8*, i8** %7
%13 = sext i32 %11 to i64
%14 = getelementptr i8, i8* %12, i64 %13
%15 = load %struct.timespec*, %struct.timespec** %5
%16 = getelementptr inbounds %struct.timespec, %struct.timespec* %15, i32 0, i32 1
store i8* %14, i8** %16
%17 = load i8*, i8** %8
%18 = load %struct.timespec*, %struct.timespec** %5
%19 = getelementptr inbounds %struct.timespec, %struct.timespec* %18, i32 0, i32 0
store i8* %17, i8** %19
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i8*, i8* }
define void @timespec_from_proto(%struct.timespec* nocapture writeonly %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
store i8* %3, i8** %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DATA_diskio();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_diskio();
LIBRARY_diskio() {
  LibraryHeader("diskio", "Sat Feb  1 10:41:33 2014 ");
  DATA_diskio();
  STARTUP_diskio();
}


x86 assembly (clang, -O0):
<LIBRARY_diskio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1040 <LibraryHeader@plt>
mov    $0x0,%al
call   1030 <DATA_diskio@plt>
mov    $0x0,%al
call   1050 <STARTUP_diskio@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_diskio>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1040 <LibraryHeader@plt>
xor    %eax,%eax
call   1030 <DATA_diskio@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <STARTUP_diskio@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"diskio\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:33 2014 \00"
define i32 @LIBRARY_diskio() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_diskio()
%4 = call i32 (...) @STARTUP_diskio()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [7 x i8] c"diskio\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:33 2014 \00"
define i32 @LIBRARY_diskio() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_diskio()
%3 = tail call i32 (...) @STARTUP_diskio()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  int V1 = 2;
  int V2 = 3;
  int V3 = 1;
  int V4 = (V1 == 2 ? (V3 == 2 ? 1 : 2) : (V2 == 2 ? 3 : 4));
  printf("%d\n", V4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1152 <main+0x42>
mov    -0xc(%rbp),%edx
mov    $0x2,%eax
mov    $0x1,%ecx
cmp    $0x2,%edx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1168 <main+0x58>
mov    -0x8(%rbp),%edx
mov    $0x4,%eax
mov    $0x3,%ecx
cmp    $0x2,%edx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 2, i32* %1
store i32 3, i32* %2
store i32 1, i32* %3
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 2
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 2
br label %17
12: ; preds = %0
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 2
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 3, i32 4
br label %17
17: ; preds = %12, %7
%18 = phi i32 [ %11, %7 ], [ %16, %12 ]
store i32 %18, i32* %4
%19 = load i32, i32* %4
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}
int func1() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @func1() {
ret i32 0
}
/* Variables and functions */
scalar_t__ axis_x_off_double(int);
int axis_x_off(int x) { return (int)axis_x_off_double(x); }


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

x86 assembly (clang, -O2):
<axis_x_off>:
jmp    1030 <axis_x_off_double@plt>

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

LLVM IR (-O2):
define i32 @axis_x_off(i32 %0) {
%2 = tail call i64 @axis_x_off_double(i32 %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
void swap(char a, char b) {
  a = b;
  b = a;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @swap(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
store i8 %5, i8* %3
%6 = load i8, i8* %3
store i8 %6, i8* %4
ret void
}

LLVM IR (-O2):
define void @swap(i8 signext %0, i8 signext %1) {
ret void
}
int function_pointers(int (*a)(int), int (*b)(int)) {
  return a > b;
  return function_pointers > function_pointers;
  return a == (void *)0;
  return a == (void *)1;
}


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

x86 assembly (clang, -O2):
<function_pointers>:
xor    %eax,%eax
cmp    %rsi,%rdi
seta   %al
ret

LLVM IR (-O0):
define i32 @function_pointers(i32 (i32)* %0, i32 (i32)* %1) {
%3 = alloca i32 (i32)*
%4 = alloca i32 (i32)*
store i32 (i32)* %0, i32 (i32)** %3
store i32 (i32)* %1, i32 (i32)** %4
%5 = load i32 (i32)*, i32 (i32)** %3
%6 = load i32 (i32)*, i32 (i32)** %4
%7 = icmp ugt i32 (i32)* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @function_pointers(i32 (i32)* readnone %0, i32 (i32)* readnone %1) {
%3 = icmp ugt i32 (i32)* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int f2() { return (int)(float)(2147483647); }


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

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

LLVM IR (-O0):
define i32 @f2() {
ret i32 poison
}

LLVM IR (-O2):
define i32 @f2() {
ret i32 poison
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t read_FP(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
size_t uint8ReadFromFP(FILE *fp, uint8_t *data) {
  return read_FP(fp, data, sizeof(uint8_t));
}


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

x86 assembly (clang, -O2):
<uint8ReadFromFP>:
mov    $0x4,%edx
jmp    1030 <read_FP@plt>

LLVM IR (-O0):
define i64 @uint8ReadFromFP(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 = call i64 @read_FP(i32* %5, i32* %6, i32 4)
ret i64 %7
}

LLVM IR (-O2):
define i64 @uint8ReadFromFP(i32* %0, i32* %1) {
%3 = tail call i64 @read_FP(i32* %0, i32* %1, i32 4)
ret i64 %3
}
int XCheckWindowEvent() {}


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

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

LLVM IR (-O0):
define i32 @XCheckWindowEvent() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XCheckWindowEvent() {
ret i32 undef
}
void g_tree_foreach() {}


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

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

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

LLVM IR (-O2):
define void @g_tree_foreach() {
ret void
}
/* Type definitions */
struct coprthr_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _printcl(char *, int, char *, char *);
void *copy_image_to_buffer(struct coprthr_device *dev, void *argp) {
  do {
    if ("<4>"
        "cmdcall_x86_64:copy_image_to_buffer: unsupported"[1] <= '0')
      _printcl("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/browndeer/coprthr/refs/heads/"
               "parallellocalypse/src/libcoprthr/arch/x86_64/devcmds_x86_64.c",
               418, "clmesg",
               "<4>"
               "cmdcall_x86_64:copy_image_to_buffer: unsupported");
  } while (0);
  return (0);
}


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

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

LLVM IR (-O0):
%struct.coprthr_device = type { i32 }
define i8* @copy_image_to_buffer(%struct.coprthr_device* %0, i8* %1) {
%3 = alloca %struct.coprthr_device*
%4 = alloca i8*
store %struct.coprthr_device* %0, %struct.coprthr_device** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %2
br label %6
6: ; preds = %5
ret i8* null
}

LLVM IR (-O2):
%struct.coprthr_device = type { i32 }
define noalias i8* @copy_image_to_buffer(%struct.coprthr_device* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void FlxplayHelp() {
  printf("FLX player (%s) with SDL output (jasper@il.fontys.nl)\n", "0.2");
  printf("View readme file for more information\n\n");
  printf("flxplay [-l] [filename]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<FlxplayHelp>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xf05(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<FlxplayHelp>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xef8(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"FLX player (%s) with SDL output (jasper@il.fontys.nl)\0A\00"
@.str.1 = [4 x i8] c"0.2\00"
@.str.2 = [40 x i8] c"View readme file for more information\0A\0A\00"
@.str.3 = [25 x i8] c"flxplay [-l] [filename]\0A\00"
define void @FlxplayHelp() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [55 x i8] c"FLX player (%s) with SDL output (jasper@il.fontys.nl)\0A\00"
@.str.1 = [4 x i8] c"0.2\00"
@str = [39 x i8] c"View readme file for more information\0A\00"
@str.4 = [24 x i8] c"flxplay [-l] [filename]\00"
define void @FlxplayHelp() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
unsigned validUntypedSize(unsigned bits) {
  return (10 <= bits) && (bits <= ((1 << 5) - 1));
}


x86 assembly (clang, -O0):
<validUntypedSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0xa,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
ja     1124 <validUntypedSize+0x24>
cmpl   $0x1f,-0x4(%rbp)
setbe  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<validUntypedSize>:
add    $0xfffffff6,%edi
xor    %eax,%eax
cmp    $0x16,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @validUntypedSize(i32 %0) {
%2 = add i32 %0, -10
%3 = icmp ult i32 %2, 22
%4 = zext i1 %3 to i32
ret i32 %4
}
const char *deviceTestGetName(void) { return "test"; }


x86 assembly (clang, -O0):
<deviceTestGetName>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<deviceTestGetName>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
define i8* @deviceTestGetName() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
define i8* @deviceTestGetName() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int modpow(int, int, int);
int decode(int c, int d, int n) { return modpow(c, d, n); }


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

x86 assembly (clang, -O2):
<decode>:
jmp    1030 <modpow@plt>

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

LLVM IR (-O2):
define i32 @decode(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @modpow(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ handle_ILL(int /*<<< orphan*/);
int gen_ILL(void) {
  handle_ILL(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @gen_ILL() {
%1 = call i32 @handle_ILL(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_ILL() {
%1 = tail call i32 @handle_ILL(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void mains0() {
  alarm(20);
  while (1) {
    printf("Estyo esperando la senial");
    sleep(2);
  }
}


x86 assembly (clang, -O0):
<mains0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
call   1040 <alarm@plt>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1050 <sleep@plt>
jmp    113e <mains0+0xe>

x86 assembly (clang, -O2):
<mains0>:
push   %rbx
mov    $0x14,%edi
call   1040 <alarm@plt>
lea    0xebe(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1050 <sleep@plt>
jmp    1150 <mains0+0x20>

LLVM IR (-O0):
@.str = [26 x i8] c"Estyo esperando la senial\00"
define void @mains0() {
%1 = call i32 @alarm(i32 20)
br label %2
2: ; preds = %0, %2
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @sleep(i32 2)
br label %2
}

LLVM IR (-O2):
@.str = [26 x i8] c"Estyo esperando la senial\00"
define void @mains0() {
%1 = tail call i32 @alarm(i32 20)
br label %2
2: ; preds = %0, %2
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 2)
br label %2
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  char *ss_sp;
  int ss_size;
  scalar_t__ ss_flags;
};
typedef TYPE_1__ stack_t;

/* Variables and functions */
int sigaltstack(TYPE_1__ *, int /*<<< orphan*/ *);
int main(void) {
  stack_t ss;
  static char stack[65536];
  ss.ss_sp = stack;
  ss.ss_size = 65536;
  ss.ss_flags = 0;
  return sigaltstack(&ss, NULL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0x2f1a(%rip),%rax
mov    %rax,-0x20(%rbp)
movl   $0x10000,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <sigaltstack@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x2f25(%rip),%rax
mov    %rax,(%rsp)
movl   $0x10000,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <sigaltstack@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i8*, i32, i64 }
@main.stack = internal global [65536 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.TYPE_3__
store i32 0, i32* %1
%3 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i32 0, i32 0
store i8* getelementptr inbounds ([65536 x i8], [65536 x i8]* @main.stack, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i32 0, i32 1
store i32 65536, i32* %4
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i32 0, i32 2
store i64 0, i64* %5
%6 = call i32 @sigaltstack(%struct.TYPE_3__* %2, i32* null)
ret i32 %6
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i8*, i32, i64 }
@main.stack = internal global [65536 x i8] zeroinitializer
define i32 @main() {
%1 = alloca %struct.TYPE_3__
%2 = bitcast %struct.TYPE_3__* %1 to i8*
%3 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
store i8* getelementptr inbounds ([65536 x i8], [65536 x i8]* @main.stack, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 1
store i32 65536, i32* %4
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 2
store i64 0, i64* %5
%6 = call i32 @sigaltstack(%struct.TYPE_3__* %1, i32* null)
ret i32 %6
}
long nelln42(long a) { return -(a != 42); }


x86 assembly (clang, -O0):
<nelln42>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x2a,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%ecx
xor    %eax,%eax
sub    %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<nelln42>:
xor    %eax,%eax
cmp    $0x2a,%rdi
setne  %al
neg    %rax
ret

LLVM IR (-O0):
define i64 @nelln42(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 42
%5 = zext i1 %4 to i32
%6 = sub nsw i32 0, %5
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @nelln42(i64 %0) {
%2 = icmp ne i64 %0, 42
%3 = sext i1 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ __die_harder();
void __attribute__((noreturn)) _die(void) { __die_harder(); }


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

x86 assembly (clang, -O2):
<_die>:
push   %rax
xor    %eax,%eax
call   1030 <__die_harder@plt>

LLVM IR (-O0):
define void @_die() {
%1 = call i32 (...) @__die_harder()
unreachable
}

LLVM IR (-O2):
define void @_die() {
%1 = tail call i32 (...) @__die_harder()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _close(int);
int gettid();
int /*<<< orphan*/ printf(char *, int);
void thread_close(void *args) {
  int fd = (int)args;
  printf("%d: START\n", gettid());
  _close(fd);
  printf("%d: END\n", gettid());
}


x86 assembly (clang, -O0):
<thread_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <gettid@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%edi
call   1050 <_close@plt>
mov    $0x0,%al
call   1030 <gettid@plt>
mov    %eax,%esi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_close>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <gettid@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1050 <_close@plt>
xor    %eax,%eax
call   1030 <gettid@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%d: START\0A\00"
@.str.1 = [9 x i8] c"%d: END\0A\00"
define void @thread_close(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i32
store i32 %5, i32* %3
%6 = call i32 (...) @gettid()
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @_close(i32 %8)
%10 = call i32 (...) @gettid()
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d: START\0A\00"
@.str.1 = [9 x i8] c"%d: END\0A\00"
define void @thread_close(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 (...) @gettid()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @_close(i32 %3)
%7 = tail call i32 (...) @gettid()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret void
}
int get_ncpu() {
  int ncpu;
  ncpu = -1;
  return ncpu;
}


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

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

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

LLVM IR (-O2):
define i32 @get_ncpu() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void chronopic_close(int fd) { close(fd); }


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

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

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

LLVM IR (-O2):
define void @chronopic_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ log_message(char *);
void log_error(char *message) {
  log_message(message);
  log_message("\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<log_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <log_message@plt>
lea    0xec4(%rip),%rdi
call   1030 <log_message@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<log_error>:
push   %rax
call   1030 <log_message@plt>
lea    0xed3(%rip),%rdi
call   1030 <log_message@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
@EXIT_FAILURE = global i32 0
define void @log_error(i8* %0) {
%2 = tail call i32 @log_message(i8* %0)
%3 = tail call i32 @log_message(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int rand();
int nopStat2(void *a1, void *a2) { return rand(); }


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

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

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

LLVM IR (-O2):
define i32 @nopStat2(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @rand()
ret i32 %3
}
/* Variables and functions */
bool nrf52_errata_193(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_193() {
ret i32 0
}