xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void err_quit(char *msg) {
  perror(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<err_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define void @err_quit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @err_quit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void __DELETE_java_nio_charset_Charset(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_nio_charset_Charset(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int do_317() { return 317; }


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

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

LLVM IR (-O0):
define i32 @do_317() {
ret i32 317
}

LLVM IR (-O2):
define i32 @do_317() {
ret i32 317
}
void CyBle_Hal_smp_sc_cmac_complete(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @hdmi_uninit_platform_driver() {
ret void
}
int test_imm_4Auint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x4A << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_4Auint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 74
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int core7_swap(char *, int);
int U_EMRSETVIEWPORTEXTEX_swap(char *record, int torev) {
  return (core7_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRSETVIEWPORTEXTEX_swap>:
jmp    1030 <core7_swap@plt>

LLVM IR (-O0):
define i32 @U_EMRSETVIEWPORTEXTEX_swap(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 @core7_swap(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @U_EMRSETVIEWPORTEXTEX_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core7_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void test_val(int a, int b) {
  printf("Test_val: before add, a = %d, b = %d\n", a, b);
  a = a + b;
  printf("Test_val: after add, a = %d, b = %d\n", a, b);
}


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

x86 assembly (clang, -O2):
<test_val>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    %ebx,%ebp
lea    0xef6(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Test_val: before add, a = %d, b = %d\0A\00"
@.str.1 = [37 x i8] c"Test_val: after add, a = %d, b = %d\0A\00"
define void @test_val(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 i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Test_val: before add, a = %d, b = %d\0A\00"
@.str.1 = [37 x i8] c"Test_val: after add, a = %d, b = %d\0A\00"
define void @test_val(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = add nsw i32 %1, %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %1)
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_is_deauth(__le16 fc) {
  return (fc & __cpu_to_le16(0x000c | 0x00f0)) ==
         __cpu_to_le16(0x0000 | 0x00C0);
}


x86 assembly (clang, -O0):
<ieee80211_is_deauth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xc0,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_deauth>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0xc0,%edi
call   1030 <__cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_deauth(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @__cpu_to_le16(i32 192)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_deauth(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @__cpu_to_le16(i32 192)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x6e() {
  Assert_real((isalpha(110)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              555, ("isalpha should be 1 for n"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for n\00"
define void @t_isalpha_0x6e() {
%1 = tail call i32 @isalpha(i32 110)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 555, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void Wheels_1_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @Wheels_1_SaveConfig() {
ret void
}
/* Variables and functions */
scalar_t__ test_sat_parser_should_succeed(char *);
int test23(void) {
  return test_sat_parser_should_succeed("(a or -b)") ||
         test_sat_parser_should_succeed("  (  a    or  -b )  ");
}


x86 assembly (clang, -O0):
<test23>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <test_sat_parser_should_succeed@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    114c <test23+0x3c>
lea    0xecd(%rip),%rdi
call   1030 <test_sat_parser_should_succeed@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test23>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <test_sat_parser_should_succeed@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112c <test23+0x1c>
pop    %rcx
ret
lea    0xed7(%rip),%rdi
call   1030 <test_sat_parser_should_succeed@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"(a or -b)\00"
@.str.1 = [21 x i8] c" ( a or -b ) \00"
define i32 @test23() {
%1 = call i64 @test_sat_parser_should_succeed(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i64 @test_sat_parser_should_succeed(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ true, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [10 x i8] c"(a or -b)\00"
@.str.1 = [21 x i8] c" ( a or -b ) \00"
define i32 @test23() {
%1 = tail call i64 @test_sat_parser_should_succeed(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 @test_sat_parser_should_succeed(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
struct ihex_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ihex_write_data(struct ihex_state *const);
int /*<<< orphan*/ ihex_write_end_of_file(struct ihex_state *const);
void ihex_end_write(struct ihex_state *const ihex) {
  ihex_write_data(ihex);
  ihex_write_end_of_file(ihex);
}


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

x86 assembly (clang, -O2):
<ihex_end_write>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ihex_write_data@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <ihex_write_end_of_file@plt>

LLVM IR (-O0):
%struct.ihex_state = type { i32 }
define void @ihex_end_write(%struct.ihex_state* %0) {
%2 = alloca %struct.ihex_state*
store %struct.ihex_state* %0, %struct.ihex_state** %2
%3 = load %struct.ihex_state*, %struct.ihex_state** %2
%4 = call i32 @ihex_write_data(%struct.ihex_state* %3)
%5 = load %struct.ihex_state*, %struct.ihex_state** %2
%6 = call i32 @ihex_write_end_of_file(%struct.ihex_state* %5)
ret void
}

LLVM IR (-O2):
%struct.ihex_state = type { i32 }
define void @ihex_end_write(%struct.ihex_state* %0) {
%2 = tail call i32 @ihex_write_data(%struct.ihex_state* %0)
%3 = tail call i32 @ihex_write_end_of_file(%struct.ihex_state* %0)
ret void
}
/* Type definitions */
struct buffer {
  int dummy;
};
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int /*<<< orphan*/ buffer_read(struct buffer *, float *, int);
float buffer_read_float(struct buffer *__restrict buf) {
  float data;
  buffer_read(buf, &data, sizeof(data));
  return data;
}


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

x86 assembly (clang, -O2):
<buffer_read_float>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <buffer_read@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.buffer = type { i32 }
define float @buffer_read_float(%struct.buffer* noalias %0) {
%2 = alloca %struct.buffer*
%3 = alloca float
store %struct.buffer* %0, %struct.buffer** %2
%4 = load %struct.buffer*, %struct.buffer** %2
%5 = call i32 @buffer_read(%struct.buffer* %4, float* %3, i32 4)
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define float @buffer_read_float(%struct.buffer* noalias %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i32 @buffer_read(%struct.buffer* %0, float* %2, i32 4)
%5 = load float, float* %2
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int testfile() {
  FILE *f;
  f = fopen("/etc/passwd", "r");
  fclose(f);
}


x86 assembly (clang, -O0):
<testfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testfile>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedd(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"/etc/passwd\00"
@.str.1 = [2 x i8] c"r\00"
define i32 @testfile() {
%1 = alloca i32
%2 = alloca i32*
%3 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fclose(i32* %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [12 x i8] c"/etc/passwd\00"
@.str.1 = [2 x i8] c"r\00"
define i32 @testfile() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @fclose(i32* %1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  if (-1) {
    printf("-1 got here\n");
  } else if (0) {
    printf("0 got here\n");
  }
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"-1 got here\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int buscaSequencialRecursiva(int vetor[], int i, int buscado, int size) {
  if (i == size) {
    return -1;
  } else if (vetor[i] == buscado) {
    return i;
  } else {
    return buscaSequencialRecursiva(vetor, i + 1, buscado, size);
  }
}


x86 assembly (clang, -O0):
<buscaSequencialRecursiva>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    113d <buscaSequencialRecursiva+0x2d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <buscaSequencialRecursiva+0x64>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    115c <buscaSequencialRecursiva+0x4c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <buscaSequencialRecursiva+0x64>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <buscaSequencialRecursiva@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buscaSequencialRecursiva>:
mov    $0xffffffff,%eax
cmp    %ecx,%esi
je     111f <buscaSequencialRecursiva+0x1f>
movslq %esi,%r8
lea    (%rdi,%r8,4),%rdi
cmp    %edx,(%rdi)
je     1120 <buscaSequencialRecursiva+0x20>
add    $0x1,%esi
add    $0x4,%rdi
cmp    %esi,%ecx
jne    1110 <buscaSequencialRecursiva+0x10>
ret
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @buscaSequencialRecursiva(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %1, %3
br i1 %5, label %19, label %6
6: ; preds = %4
%7 = sext i32 %1 to i64
br label %8
8: ; preds = %6, %13
%9 = phi i64 [ %7, %6 ], [ %14, %13 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, %2
br i1 %12, label %17, label %13
13: ; preds = %8
%14 = add nsw i64 %9, 1
%15 = trunc i64 %14 to i32
%16 = icmp eq i32 %15, %3
br i1 %16, label %19, label %8
17: ; preds = %8
%18 = trunc i64 %9 to i32
br label %19
19: ; preds = %13, %17, %4
%20 = phi i32 [ -1, %4 ], [ %18, %17 ], [ -1, %13 ]
ret i32 %20
}
void unloadClkCtrlDriver(void) {}


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

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

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

LLVM IR (-O2):
define void @unloadClkCtrlDriver() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void assign(char *a, char *b) { strcpy(a, b); }


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

x86 assembly (clang, -O2):
<assign>:
jmp    1030 <strcpy@plt>

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

LLVM IR (-O2):
define void @assign(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* %1)
ret void
}
int cpusupport_x86_aesni_detect(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @cpusupport_x86_aesni_detect() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void double_free() {
  int *i = (int *)sizeof(int);
  free(i);
  free(i);
}


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

x86 assembly (clang, -O2):
<double_free>:
push   %rax
mov    $0x4,%edi
call   1030 <free@plt>
mov    $0x4,%edi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @double_free() {
%1 = alloca i32*
store i32* inttoptr (i64 4 to i32*), i32** %1
%2 = load i32*, i32** %1
%3 = call i32 @free(i32* %2)
%4 = load i32*, i32** %1
%5 = call i32 @free(i32* %4)
ret void
}

LLVM IR (-O2):
define void @double_free() {
%1 = tail call i32 @free(i32* inttoptr (i64 4 to i32*))
%2 = tail call i32 @free(i32* inttoptr (i64 4 to i32*))
ret void
}
void HardFault_Handler(void) {
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<HardFault_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <HardFault_Handler+0x9>
jmp    1109 <HardFault_Handler+0x9>

x86 assembly (clang, -O2):
<HardFault_Handler>:
jmp    1100 <HardFault_Handler>

LLVM IR (-O0):
define void @HardFault_Handler() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @HardFault_Handler() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
long abctol(char const *, char **);
long strtol(char const *, char **, int);
long inchi_strtol(const char *str, const char **p, int base) {
  if (base == 27) {
    return abctol(str, (char **)p);
  } else {
    return strtol(str, (char **)p, base);
  }
}


x86 assembly (clang, -O0):
<inchi_strtol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x1b,-0x1c(%rbp)
jne    1153 <inchi_strtol+0x33>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <abctol@plt>
mov    %rax,-0x8(%rbp)
jmp    1167 <inchi_strtol+0x47>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <strtol@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inchi_strtol>:
cmp    $0x1b,%edx
jne    112a <inchi_strtol+0xa>
jmp    1030 <abctol@plt>
jmp    1040 <strtol@plt>

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

LLVM IR (-O2):
define i64 @inchi_strtol(i8* %0, i8** %1, i32 %2) {
%4 = icmp eq i32 %2, 27
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i64 @abctol(i8* %0, i8** %1)
br label %9
7: ; preds = %3
%8 = tail call i64 @strtol(i8* %0, i8** %1, i32 %2)
br label %9
9: ; preds = %7, %5
%10 = phi i64 [ %6, %5 ], [ %8, %7 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x3c() {
  Assert_real((isbdigit(60) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              305, ("isbdigit should be 0 for <"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x3c>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3c,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x131,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x3c>:
push   %rax
mov    $0x3c,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x131,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for <\00"
define void @t_isbdigit_0x3c() {
%1 = call i64 @isbdigit(i32 60)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 305, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for <\00"
define void @t_isbdigit_0x3c() {
%1 = tail call i64 @isbdigit(i32 60)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 305, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned xrop3_9_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ S;
  stk1 = T | stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_9_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_9_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
xor    $0xff,%eax
or     %ecx,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_9_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_9_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, 255
%8 = or i32 %6, %7
%9 = xor i32 %8, -1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ dir_iterator(char const *, int,
                                void (*)(char const *, void *), void *);
void foreach_file_recursive(const char *path,
                            void (*f)(const char *the_filename,
                                      void *the_userdata),
                            void *userdata) {
  dir_iterator(path, 1, f, userdata);
}


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

x86 assembly (clang, -O2):
<foreach_file_recursive>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <dir_iterator@plt>

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

LLVM IR (-O2):
define void @foreach_file_recursive(i8* %0, void (i8*, i8*)* %1, i8* %2) {
%4 = tail call i32 @dir_iterator(i8* %0, i32 1, void (i8*, i8*)* %1, i8* %2)
ret void
}
/* Variables and functions */
unsigned long long __blsmsk_u64(unsigned long long);
unsigned long long func_blsmsk64(unsigned long long X) {
  return __blsmsk_u64(X);
}


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

x86 assembly (clang, -O2):
<func_blsmsk64>:
jmp    1030 <__blsmsk_u64@plt>

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

LLVM IR (-O2):
define i64 @func_blsmsk64(i64 %0) {
%2 = tail call i64 @__blsmsk_u64(i64 %0)
ret i64 %2
}
/* Type definitions */
struct diGraph {
  int dummy;
};
struct dgNode {
  int dummy;
};

/* Variables and functions */
struct dgNode *dgAddNode(struct diGraph *, char *, void *);
int /*<<< orphan*/ sprintf(char *, char *, int);
struct dgNode *dgAddNumberedNode(struct diGraph *dg, int id, void *val) {
  char buf[16];
  sprintf(buf, "%d", id);
  return dgAddNode(dg, buf, val);
}


x86 assembly (clang, -O0):
<dgAddNumberedNode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <dgAddNode@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgAddNumberedNode>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xec8(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <dgAddNode@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.dgNode = type { i32 }
%struct.diGraph = type { i32 }
@.str = [3 x i8] c"%d\00"
define %struct.dgNode* @dgAddNumberedNode(%struct.diGraph* %0, i32 %1, i8* %2) {
%4 = alloca %struct.diGraph*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [16 x i8]
store %struct.diGraph* %0, %struct.diGraph** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %5
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load %struct.diGraph*, %struct.diGraph** %4
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%13 = load i8*, i8** %6
%14 = call %struct.dgNode* @dgAddNode(%struct.diGraph* %11, i8* %12, i8* %13)
ret %struct.dgNode* %14
}

LLVM IR (-O2):
%struct.dgNode = type { i32 }
%struct.diGraph = type { i32 }
@.str = [3 x i8] c"%d\00"
define %struct.dgNode* @dgAddNumberedNode(%struct.diGraph* %0, i32 %1, i8* %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%7 = call %struct.dgNode* @dgAddNode(%struct.diGraph* %0, i8* %5, i8* %2)
ret %struct.dgNode* %7
}
void beepRight() {}


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

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

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

LLVM IR (-O2):
define void @beepRight() {
ret void
}
unsigned short swapu16(unsigned short x) { return __builtin_bswap16(x); }


x86 assembly (clang, -O0):
<swapu16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%ax
rol    $0x8,%ax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapu16>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @swapu16(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i16 @llvm.bswap.i16(i16 %3)
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @swapu16(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
double ms2FtMin(double valueMs) { return valueMs / 0.00508; }


x86 assembly (clang, -O0):
<ms2FtMin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ms2FtMin>:
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @ms2FtMin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 5.080000e-03
ret double %4
}

LLVM IR (-O2):
define double @ms2FtMin(double %0) {
%2 = fdiv double %0, 5.080000e-03
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_free__(void *);
int /*<<< orphan*/ __coverity_mark_as_afm_freed__(void *, char *);
void H5Gclose(void *id) {
  __coverity_free__(id);
  __coverity_mark_as_afm_freed__(id, "H5Gclose");
}


x86 assembly (clang, -O0):
<H5Gclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__coverity_free__@plt>
mov    -0x8(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1030 <__coverity_mark_as_afm_freed__@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<H5Gclose>:
push   %rbx
mov    %rdi,%rbx
call   1040 <__coverity_free__@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <__coverity_mark_as_afm_freed__@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"H5Gclose\00"
define void @H5Gclose(i8* %0) {
%2 = tail call i32 @__coverity_free__(i8* %0)
%3 = tail call i32 @__coverity_mark_as_afm_freed__(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpuid(unsigned int, unsigned int *, unsigned int *,
                         unsigned int *, unsigned int *);
__attribute__((always_)) unsigned int cpuid_eax(unsigned int op) {
  unsigned int eax, ebx, ecx, edx;
  cpuid(op, &eax, &ebx, &ecx, &edx);
  return eax;
}


x86 assembly (clang, -O0):
<cpuid_eax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_eax>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @cpuid_eax(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = call i32 @cpuid(i32 %0, i32* %2, i32* %3, i32* %4, i32* %5)
%11 = load i32, i32* %2
ret i32 %11
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
char *strcpy(char *, char *);
scalar_t__ strlen(char *);
char *mkstr(char *s) { return strcpy((char *)malloc(strlen(s) + 1), s); }


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

x86 assembly (clang, -O2):
<mkstr>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @mkstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 %4, 1
%6 = call i64 @malloc(i64 %5)
%7 = inttoptr i64 %6 to i8*
%8 = load i8*, i8** %2
%9 = call i8* @strcpy(i8* %7, i8* %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @mkstr(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %0)
ret i8* %5
}
void test_four(int x, int y) {
#pragma omp target
#pragma omp teams distribute collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_four>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_four+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_four+0x43>
jmp    1135 <test_four+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_four+0x24>
jmp    1148 <test_four+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_four+0x11>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_four(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
store i32 0, i32* %5
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %7
store i32 0, i32* %6
br label %12
12: ; preds = %17, %11
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %20
16: ; preds = %12
br label %17
17: ; preds = %16
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %12
20: ; preds = %12
br label %21
21: ; preds = %20
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %7
24: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @test_four(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glutPostRedisplay();
void delay(int n) {
  glutPostRedisplay();
  int i = 0;
  while (i < n) {
    i++;
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <glutPostRedisplay@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1143 <delay+0x33>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <delay+0x19>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @glutPostRedisplay()
store i32 0, i32* %3
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = tail call i32 (...) @glutPostRedisplay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ swap(int *, int *);
int main(int argc, char **argv) {
  int i;
  for (i = 0; i < 999999999; i++) {
    int a = 2;
    int b = 123;
    swap(&a, &b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3b9ac9ff,-0x14(%rbp)
jge    1163 <main+0x53>
movl   $0x2,-0x18(%rbp)
movl   $0x7b,-0x1c(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1030 <swap@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    $0x3b9ac9ff,%ebp
lea    0xc(%rsp),%r14
lea    0x8(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
movl   $0x2,0xc(%rsp)
movl   $0x7b,0x8(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <swap@plt>
add    $0xffffffff,%ebp
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
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
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %9
9: ; preds = %14, %2
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 999999999
br i1 %11, label %12, label %17
12: ; preds = %9
store i32 2, i32* %7
store i32 123, i32* %8
%13 = call i32 @swap(i32* %7, i32* %8)
br label %14
14: ; preds = %12
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 1
store i32 %16, i32* %6
br label %9
17: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
br label %7
7: ; preds = %2, %7
%8 = phi i32 [ 0, %2 ], [ %10, %7 ]
store i32 2, i32* %3
store i32 123, i32* %4
%9 = call i32 @swap(i32* %3, i32* %4)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, 999999999
br i1 %11, label %12, label %7
12: ; preds = %7
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, unsigned short);
void fb_move_cursor(unsigned char row, unsigned char col) {
  unsigned short pos = (row * 80) + col;
  outb(0x3D4, 0x0F);
  outb(0x3D5, pos & 0x00ff);
  outb(0x3D4, 0x0E);
  outb(0x3D5, ((pos >> 8) & 0x00ff));
}


x86 assembly (clang, -O0):
<fb_move_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
imul   $0x50,%eax,%eax
movzbl -0x2(%rbp),%ecx
add    %ecx,%eax
mov    %ax,-0x4(%rbp)
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <outb@plt>
movzwl -0x4(%rbp),%eax
and    $0xff,%eax
mov    $0x3d5,%edi
movzwl %ax,%esi
call   1030 <outb@plt>
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <outb@plt>
movzwl -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    $0x3d5,%edi
movzwl %ax,%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_move_cursor>:
push   %rbx
mov    %esi,%ebx
lea    (%rdi,%rdi,4),%eax
shl    $0x4,%eax
add    %eax,%ebx
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <outb@plt>
movzbl %bl,%esi
mov    $0x3d5,%edi
call   1030 <outb@plt>
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <outb@plt>
shr    $0x8,%ebx
mov    $0x3d5,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @fb_move_cursor(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i16
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
%8 = mul nsw i32 %7, 80
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = add nsw i32 %8, %10
%12 = trunc i32 %11 to i16
store i16 %12, i16* %5
%13 = call i32 @outb(i32 980, i16 zeroext 15)
%14 = load i16, i16* %5
%15 = zext i16 %14 to i32
%16 = and i32 %15, 255
%17 = trunc i32 %16 to i16
%18 = call i32 @outb(i32 981, i16 zeroext %17)
%19 = call i32 @outb(i32 980, i16 zeroext 14)
%20 = load i16, i16* %5
%21 = zext i16 %20 to i32
%22 = ashr i32 %21, 8
%23 = and i32 %22, 255
%24 = trunc i32 %23 to i16
%25 = call i32 @outb(i32 981, i16 zeroext %24)
ret void
}

LLVM IR (-O2):
define void @fb_move_cursor(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 80
%5 = zext i8 %1 to i32
%6 = add nuw nsw i32 %4, %5
%7 = tail call i32 @outb(i32 980, i16 zeroext 15)
%8 = trunc i32 %6 to i16
%9 = and i16 %8, 255
%10 = tail call i32 @outb(i32 981, i16 zeroext %9)
%11 = tail call i32 @outb(i32 980, i16 zeroext 14)
%12 = lshr i32 %6, 8
%13 = trunc i32 %12 to i16
%14 = tail call i32 @outb(i32 981, i16 zeroext %13)
ret void
}