xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Pl_Fatal_Error(char *);
void Fd_Solver_Missing(void) {
  Pl_Fatal_Error("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/BogdanArdelean/FPWAM/refs/"
                 "heads/master/prologInstallFolder/src/EnginePl/if_no_fd.c"
                 ": FD Solver not linked");
}


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

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

LLVM IR (-O0):
@.str = [195 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/BogdanArdelean/FPWAM/refs/heads/master/prologInstallFolder/src/EnginePl/if_no_fd.c: FD Solver not linked\00"
define void @Fd_Solver_Missing() {
%1 = call i32 @Pl_Fatal_Error(i8* getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [195 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/BogdanArdelean/FPWAM/refs/heads/master/prologInstallFolder/src/EnginePl/if_no_fd.c: FD Solver not linked\00"
define void @Fd_Solver_Missing() {
%1 = tail call i32 @Pl_Fatal_Error(i8* getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_bitmap_to_str();
int /*<<< orphan*/ test_bits_put_get();
int /*<<< orphan*/ test_bytes_to_uint();
int /*<<< orphan*/ test_ipv4_mac_to_str();
int /*<<< orphan*/ test_sockaddr();
int /*<<< orphan*/ test_str_to_ipv4_mac();
int main(int argc, char const *argv[]) {
  test_ipv4_mac_to_str();
  test_str_to_ipv4_mac();
  test_bitmap_to_str();
  test_bits_put_get();
  test_sockaddr();
  test_bytes_to_uint();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <test_ipv4_mac_to_str@plt>
mov    $0x0,%al
call   1080 <test_str_to_ipv4_mac@plt>
mov    $0x0,%al
call   1030 <test_bitmap_to_str@plt>
mov    $0x0,%al
call   1060 <test_bits_put_get@plt>
mov    $0x0,%al
call   1040 <test_sockaddr@plt>
mov    $0x0,%al
call   1050 <test_bytes_to_uint@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <test_ipv4_mac_to_str@plt>
xor    %eax,%eax
call   1080 <test_str_to_ipv4_mac@plt>
xor    %eax,%eax
call   1030 <test_bitmap_to_str@plt>
xor    %eax,%eax
call   1060 <test_bits_put_get@plt>
xor    %eax,%eax
call   1040 <test_sockaddr@plt>
xor    %eax,%eax
call   1050 <test_bytes_to_uint@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_ipv4_mac_to_str()
%7 = call i32 (...) @test_str_to_ipv4_mac()
%8 = call i32 (...) @test_bitmap_to_str()
%9 = call i32 (...) @test_bits_put_get()
%10 = call i32 (...) @test_sockaddr()
%11 = call i32 (...) @test_bytes_to_uint()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_ipv4_mac_to_str()
%4 = tail call i32 (...) @test_str_to_ipv4_mac()
%5 = tail call i32 (...) @test_bitmap_to_str()
%6 = tail call i32 (...) @test_bits_put_get()
%7 = tail call i32 (...) @test_sockaddr()
%8 = tail call i32 (...) @test_bytes_to_uint()
ret i32 0
}
int main() {
  int cookie;
  char buf[80];
  printf("buf: %08x cookie: %08x\n", &buf, &cookie);
  gets(buf);
  printf("cookie: %08x\n", cookie);
  if (cookie == 0x41424344)
    printf("you win!\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x60(%rbp),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1040 <gets@plt>
mov    -0x8(%rbp),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x41424344,-0x8(%rbp)
jne    117c <main+0x5c>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0xec4(%rip),%rdi
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <gets@plt>
mov    0xc(%rsp),%esi
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x41424344,0xc(%rsp)
41
jne    1182 <main+0x52>
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"buf: %08x cookie: %08x\0A\00"
@.str.1 = [14 x i8] c"cookie: %08x\0A\00"
@.str.2 = [10 x i8] c"you win!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [80 x i8]
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), [80 x i8]* %3, i32* %2)
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %5)
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 1094861636
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %0
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@.str = [24 x i8] c"buf: %08x cookie: %08x\0A\00"
@.str.1 = [14 x i8] c"cookie: %08x\0A\00"
@str = [9 x i8] c"you win!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), [80 x i8]* %2, i32* %1)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %4)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 1094861636
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %13
13: ; preds = %11, %0
ret i32 0
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ close(int /*<<< orphan*/);
int /*<<< orphan*/ open_rdonly(char *);
int /*<<< orphan*/ stat(char *, struct stat *);
int execute_stat() {
  struct stat fileStat;
  close(open_rdonly("syscalls.txt"));
  stat("syscalls.txt", &fileStat);
  stat("hopefully_no_such_filename_exists.txt", &fileStat);
  return 0;
}


x86 assembly (clang, -O0):
<execute_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <open_rdonly@plt>
mov    %eax,%edi
call   1040 <close@plt>
lea    0xeae(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <stat@plt>
lea    0xeab(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <stat@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_stat>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%r14
mov    %r14,%rdi
call   1030 <open_rdonly@plt>
mov    %eax,%edi
call   1040 <close@plt>
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <stat@plt>
lea    0xeae(%rip),%rdi
mov    %rbx,%rsi
call   1050 <stat@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [13 x i8] c"syscalls.txt\00"
@.str.1 = [38 x i8] c"hopefully_no_such_filename_exists.txt\00"
define i32 @execute_stat() {
%1 = alloca %struct.stat
%2 = call i32 @open_rdonly(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @close(i32 %2)
%4 = call i32 @stat(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%5 = call i32 @stat(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), %struct.stat* %1)
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [13 x i8] c"syscalls.txt\00"
@.str.1 = [38 x i8] c"hopefully_no_such_filename_exists.txt\00"
define i32 @execute_stat() {
%1 = alloca %struct.stat
%2 = bitcast %struct.stat* %1 to i8*
%3 = tail call i32 @open_rdonly(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @close(i32 %3)
%5 = call i32 @stat(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%6 = call i32 @stat(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), %struct.stat* %1)
ret i32 0
}
/* Variables and functions */
unsigned int next_rand();
unsigned int gg_urand(void) { return next_rand(); }


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

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

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

LLVM IR (-O2):
define i32 @gg_urand() {
%1 = tail call i32 (...) @next_rand()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ dot_ex(int, int, int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basPlot() {
  int x, y, c;
  c = popNumber();
  y = popNumber();
  x = popNumber();
  pushNumber(dot_ex(x, y, c));
}


x86 assembly (clang, -O0):
<basPlot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <dot_ex@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basPlot>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <dot_ex@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basPlot() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @popNumber()
store i32 %4, i32* %3
%5 = call i32 (...) @popNumber()
store i32 %5, i32* %2
%6 = call i32 (...) @popNumber()
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @dot_ex(i32 %7, i32 %8, i32 %9)
%11 = call i32 @pushNumber(i32 %10)
ret void
}

LLVM IR (-O2):
define void @basPlot() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 (...) @popNumber()
%4 = tail call i32 @dot_ex(i32 %3, i32 %2, i32 %1)
%5 = tail call i32 @pushNumber(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void cv_timedwait(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


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

x86 assembly (clang, -O2):
<cv_timedwait>:
xor    %edi,%edi
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
define void @cv_timedwait() {
%1 = call i32 @nsc_assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @cv_timedwait() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
void ff_hevc_put_hevc_uni_pel_pixels64_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_pel_pixels64_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug_msg(char *);
int /*<<< orphan*/ printf(char *);
void clear() {
  debug_msg("Executing clear (builtin).");
  printf("\033[2J");
}


x86 assembly (clang, -O0):
<clear>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <debug_msg@plt>
lea    0xee4(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <debug_msg@plt>
lea    0xee7(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Executing clear (builtin).\00"
@.str.1 = [5 x i8] c"\1B[2J\00"
define void @clear() {
%1 = call i32 @debug_msg(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Executing clear (builtin).\00"
@.str.1 = [5 x i8] c"\1B[2J\00"
define void @clear() {
%1 = tail call i32 @debug_msg(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *const);
extern void eFreeNoNullCheck(void *const ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @eFreeNoNullCheck(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int tds_get_size_by_type(int type) {
  switch (type) {
  case 0x38:
    return 0;
  case 0x68:
    return 1;
  case 0xA7:
    return 2;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<tds_get_size_by_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x38,%eax
je     113f <tds_get_size_by_type+0x3f>
jmp    111b <tds_get_size_by_type+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x68,%eax
je     114b <tds_get_size_by_type+0x4b>
jmp    112c <tds_get_size_by_type+0x2c>
mov    -0xc(%rbp),%eax
sub    $0xa7,%eax
je     1157 <tds_get_size_by_type+0x57>
jmp    1163 <tds_get_size_by_type+0x63>
movl   $0x0,-0x4(%rbp)
jmp    116a <tds_get_size_by_type+0x6a>
movl   $0x1,-0x4(%rbp)
jmp    116a <tds_get_size_by_type+0x6a>
movl   $0x2,-0x4(%rbp)
jmp    116a <tds_get_size_by_type+0x6a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tds_get_size_by_type>:
cmp    $0x38,%edi
je     1118 <tds_get_size_by_type+0x18>
cmp    $0xa7,%edi
je     111b <tds_get_size_by_type+0x1b>
cmp    $0x68,%edi
jne    1121 <tds_get_size_by_type+0x21>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret
mov    $0x2,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @tds_get_size_by_type(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 56, label %5
i32 104, label %6
i32 167, label %7
]
5: ; preds = %1
store i32 0, i32* %2
br label %9
6: ; preds = %1
store i32 1, i32* %2
br label %9
7: ; preds = %1
store i32 2, i32* %2
br label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @tds_get_size_by_type(i32 %0) {
switch i32 %0, label %4 [
i32 56, label %5
i32 104, label %2
i32 167, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i32 [ -1, %4 ], [ 2, %3 ], [ 1, %2 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ assert_str_eq(char *, char *);
void test_assert_eq_string_pass() { assert_str_eq("a string!", "a string!"); }


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

x86 assembly (clang, -O2):
<test_assert_eq_string_pass>:
lea    0xee9(%rip),%rdi
mov    %rdi,%rsi
jmp    1030 <assert_str_eq@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"a string!\00"
define void @test_assert_eq_string_pass() {
%1 = call i32 @assert_str_eq(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"a string!\00"
define void @test_assert_eq_string_pass() {
%1 = tail call i32 @assert_str_eq(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *strchr(char *, char);
char *strclean(char *str) {
  char *semicolon = strchr(str, ';');
  if (semicolon)
    *semicolon = '\0';
  return str;
}


x86 assembly (clang, -O0):
<strclean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3b,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <strclean+0x30>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strclean>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3b,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1126 <strclean+0x16>
movb   $0x0,(%rax)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strclean(i8* returned %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 59)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *const);
int /*<<< orphan*/ stderr;
void usage(char *const str) {
  fprintf(stderr, "usage: %s filename\n", str);
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"usage: %s filename\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void avio_check() {}


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

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

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

LLVM IR (-O2):
define void @avio_check() {
ret void
}
long double test_scalbnl(long double x, int y) {
  return __builtin_scalbnl(x, y);
}


x86 assembly (clang, -O0):
<test_scalbnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %edi,-0x14(%rbp)
fldt   -0x10(%rbp)
mov    -0x14(%rbp),%edi
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <scalbnl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_scalbnl>:
jmp    1030 <scalbnl@plt>

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

LLVM IR (-O2):
define x86_fp80 @test_scalbnl(x86_fp80 %0, i32 %1) {
%3 = tail call x86_fp80 @scalbnl(x86_fp80 %0, i32 %1)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ cgiHeaderLocation(char *);
int cgi_login_puts() {
  cgiHeaderLocation("cgi_rtv_set?flag=1");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"cgi_rtv_set?flag=1\00"
define i32 @cgi_login_puts() {
%1 = call i32 @cgiHeaderLocation(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"cgi_rtv_set?flag=1\00"
define i32 @cgi_login_puts() {
%1 = tail call i32 @cgiHeaderLocation(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clock_update();
void clock_process(void) { clock_update(); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(struct KIrand *);
void KIrand_free(struct KIrand *r) {
  if (r != NULL)
    free(r);
}


x86 assembly (clang, -O0):
<KIrand_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <KIrand_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KIrand_free>:
test   %rdi,%rdi
je     111a <KIrand_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.KIrand = type { i32 }
define void @KIrand_free(%struct.KIrand* %0) {
%2 = alloca %struct.KIrand*
store %struct.KIrand* %0, %struct.KIrand** %2
%3 = load %struct.KIrand*, %struct.KIrand** %2
%4 = icmp ne %struct.KIrand* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.KIrand*, %struct.KIrand** %2
%7 = call i32 @free(%struct.KIrand* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.KIrand = type { i32 }
define void @KIrand_free(%struct.KIrand* %0) {
%2 = icmp eq %struct.KIrand* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.KIrand* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x8a() {
  Assert_real((isupper(138) == 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_isupper.c",
              695, ("isupper should be 0 for 0x8a"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x8a>:
push   %rax
mov    $0x8a,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2b7,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x8a\00"
define void @t_isupper_0x8a() {
%1 = call i64 @isupper(i32 138)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 695, i8* getelementptr inbounds ([29 x i8], [29 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x8a\00"
define void @t_isupper_0x8a() {
%1 = tail call i64 @isupper(i32 138)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 695, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ pause();
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) {
  signal(SIGCHLD, SIG_IGN);
  while (1)
    pause();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    $0x0,%al
call   1040 <pause@plt>
jmp    1146 <main+0x26>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <pause@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SIGCHLD
%3 = load i32, i32* @SIG_IGN
%4 = call i32 @signal(i32 %2, i32 %3)
br label %5
5: ; preds = %0, %5
%6 = call i32 (...) @pause()
br label %5
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @SIGCHLD
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
br label %4
4: ; preds = %0, %4
%5 = tail call i32 (...) @pause()
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printArray(int *A, int len) {
  for (int i = 0; i < len; i++) {
    printf("%d ", A[i]);
  }
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <printArray+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printArray+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printArray+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
uint8_t getProtoDataLength(uint16_t dataLength) {
  return (uint8_t)(dataLength - 1);
}


x86 assembly (clang, -O0):
<getProtoDataLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getProtoDataLength>:
lea    -0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @getProtoDataLength(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = add i32 %2, -1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(int vet[]) {
  printf("---Ordem original---\n");
  for (int i = 0; i < 50; i++) {
    printf("%d ", vet[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x32,-0xc(%rbp)
jge    1162 <print+0x52>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <print+0x21>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
lea    0xec5(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb5(%rip),%r14
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    $0x32,%rbx
jne    1150 <print+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d \00"
@str = [21 x i8] c"---Ordem original---\00"
define void @print(i32* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %5
3: ; preds = %5
%4 = tail call i32 @putchar(i32 10)
ret void
5: ; preds = %1, %5
%6 = phi i64 [ 0, %1 ], [ %10, %5 ]
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = add nuw nsw i64 %6, 1
%11 = icmp eq i64 %10, 50
br i1 %11, label %3, label %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int);
int /*<<< orphan*/ stdout;
scalar_t__ time(int /*<<< orphan*/ *);
void show_time() { fprintf(stdout, "time: %u\n", (unsigned)time(NULL)); }


x86 assembly (clang, -O0):
<show_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%edx
lea    0xeb7(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_time>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
xor    %edi,%edi
call   1040 <time@plt>
lea    0xec8(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [10 x i8] c"time: %u\0A\00"
define void @show_time() {
%1 = load i32, i32* @stdout
%2 = call i64 @time(i32* null)
%3 = trunc i64 %2 to i32
%4 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [10 x i8] c"time: %u\0A\00"
define void @show_time() {
%1 = load i32, i32* @stdout
%2 = tail call i64 @time(i32* null)
%3 = trunc i64 %2 to i32
%4 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
void ScaleRowDown2Box_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2Box_Any_SSSE3() {
ret void
}
int sata_parse_current(char *Temperature) {
  if (Temperature[8] != 0x80)
    return Temperature[8];
  else
    return 0;
}


x86 assembly (clang, -O0):
<sata_parse_current>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x8(%rax),%eax
cmp    $0x80,%eax
je     112b <sata_parse_current+0x2b>
mov    -0x10(%rbp),%rax
movsbl 0x8(%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <sata_parse_current+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sata_parse_current>:
movsbl 0x8(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @sata_parse_current(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ hex;

/* Variables and functions */
scalar_t__ file_get_contents(char const *, char *, int);
int /*<<< orphan*/ sscanf(char *, char *, unsigned int *);
unsigned int file_get_contents_hex(const char *filename) {
  char hex[256];
  unsigned int res = 0;
  if (file_get_contents(filename, hex, sizeof(hex)))
    sscanf(hex, "%x", &res);
  return (res);
}


x86 assembly (clang, -O0):
<file_get_contents_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x114(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
mov    $0x100,%edx
call   1030 <file_get_contents@plt>
cmp    $0x0,%rax
je     1172 <file_get_contents_hex+0x52>
lea    -0x110(%rbp),%rdi
lea    0xe9a(%rip),%rsi
lea    -0x114(%rbp),%rdx
call   1040 <sscanf@plt>
mov    -0x114(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_get_contents_hex>:
sub    $0x118,%rsp
movl   $0x0,0xc(%rsp)
lea    0x10(%rsp),%rsi
mov    $0x100,%edx
call   1030 <file_get_contents@plt>
test   %rax,%rax
je     1165 <file_get_contents_hex+0x45>
lea    0xeb6(%rip),%rsi
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rdx
call   1040 <sscanf@plt>
mov    0xc(%rsp),%eax
add    $0x118,%rsp
ret
xor    %eax,%eax
add    $0x118,%rsp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define i32 @file_get_contents_hex(i8* %0) {
%2 = alloca [256 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = call i64 @file_get_contents(i8* %0, i8* %4, i32 256)
%7 = icmp eq i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %3
br label %11
11: ; preds = %8, %1
%12 = phi i32 [ %10, %8 ], [ 0, %1 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ assertEq(int, int);
int /*<<< orphan*/ endTest();
int main() {
  int total1 = 0, total2 = 0;
  for (int i = 1; i <= 10; i++)
    total1 += i;
  assertEq(total1, 55);
  int i = 1;
  for (;;) {
    if (!(i <= 10))
      break;
    total2 += i++;
  }
  assertEq(total2, 55);
  endTest();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jg     1165 <main+0x45>
mov    -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <main+0x24>
mov    -0x8(%rbp),%edi
mov    $0x37,%esi
call   1040 <assertEq@plt>
movl   $0x1,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jle    1188 <main+0x68>
jmp    119e <main+0x7e>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1179 <main+0x59>
mov    -0xc(%rbp),%edi
mov    $0x37,%esi
call   1040 <assertEq@plt>
mov    $0x0,%al
call   1030 <endTest@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assertEq(i32 55, i32 55)
%2 = tail call i32 @assertEq(i32 55, i32 55)
%3 = tail call i32 (...) @endTest()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PRINT_ERR(char *, char *, int);
int base_main(int argc, char **argv) {
  PRINT_ERR("aubio was not compiled with aubio_source_"
            "undefined"
            ", failed running %s with %d args\n",
            argv[0], argc);
  return 0;
}


x86 assembly (clang, -O0):
<base_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x4(%rbp),%edx
lea    0xed0(%rip),%rdi
call   1030 <PRINT_ERR@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base_main>:
push   %rax
mov    %edi,%edx
mov    (%rsi),%rsi
lea    0xee3(%rip),%rdi
call   1030 <PRINT_ERR@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [84 x i8] c"aubio was not compiled with aubio_source_undefined, failed running %s with %d args\0A\00"
define i32 @base_main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = load i32, i32* %3
%9 = call i32 @PRINT_ERR(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [84 x i8] c"aubio was not compiled with aubio_source_undefined, failed running %s with %d args\0A\00"
define i32 @base_main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @PRINT_ERR(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %0)
ret i32 0
}
int __fesetround(int r) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__fesetround(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
void sprint_cpl(char *str) { sprintf(str, "CPL   A                         "); }


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

x86 assembly (clang, -O2):
<sprint_cpl>:
movups 0xf09(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movups 0xeee(%rip),%xmm0
movups %xmm0,(%rdi)
movb   $0x0,0x20(%rdi)
ret

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

LLVM IR (-O2):
@.str = [33 x i8] c"CPL A \00"
define void @sprint_cpl(i8* nocapture writeonly %0) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(33) %0, i8* align 1 dereferenceable(33) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 33, i1 false)
ret void
}
int main(void) {
  int counter = 0;
  while (counter < 5) {
    counter++;
    int counter2 = 10;
    while (counter2 > 0) {
      counter2--;
    }
    if (10 == counter) {
      goto ERROR;
    }
  }
  while (counter < 10) {
    counter++;
  }
  return (0);
ERROR:
  goto ERROR;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    115c <main+0x5c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1144 <main+0x44>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    112c <main+0x2c>
mov    $0xa,%eax
cmp    -0x8(%rbp),%eax
jne    1157 <main+0x57>
jmp    117d <main+0x7d>
jmp    1112 <main+0x12>
jmp    1161 <main+0x61>
cmpl   $0xa,-0x8(%rbp)
jge    1179 <main+0x79>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1161 <main+0x61>
xor    %eax,%eax
pop    %rbp
ret
jmp    117d <main+0x7d>

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void ux00ddr_mask_outofrange_interrupts(size_t ahbregaddr) {
  (*(volatile uint32_t *)((136 << 2) + (ahbregaddr))) |= ((1 << 1) | (1 << 2));
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x220,%rax
mov    (%rax),%ecx
or     $0x6,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
orl    $0x6,0x220(%rdi)
ret

LLVM IR (-O0):
define void @ux00ddr_mask_outofrange_interrupts(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 544, %3
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = or i32 %6, 6
store volatile i32 %7, i32* %5
ret void
}

LLVM IR (-O2):
define void @ux00ddr_mask_outofrange_interrupts(i64 %0) {
%2 = add i64 %0, 544
%3 = inttoptr i64 %2 to i32*
%4 = load volatile i32, i32* %3
%5 = or i32 %4, 6
store volatile i32 %5, i32* %3
ret void
}