xunge/DecIR huggingface dataset:
/* Variables and functions */
int relocate_BZ_grid_address(int **, int *, int **, int const *, double **,
                             int const *);
int kpt_relocate_BZ_grid_address(int bz_grid_address[][3], int bz_map[],
                                 int grid_address[][3], const int mesh[3],
                                 double rec_lattice[3][3],
                                 const int is_shift[3]) {
  return relocate_BZ_grid_address(bz_grid_address, bz_map, grid_address, mesh,
                                  rec_lattice, is_shift);
}


x86 assembly (clang, -O0):
<kpt_relocate_BZ_grid_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <relocate_BZ_grid_address@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kpt_relocate_BZ_grid_address>:
jmp    1030 <relocate_BZ_grid_address@plt>

LLVM IR (-O0):
define i32 @kpt_relocate_BZ_grid_address([3 x i32]* %0, i32* %1, [3 x i32]* %2, i32* %3, [3 x double]* %4, i32* %5) {
%7 = alloca [3 x i32]*
%8 = alloca i32*
%9 = alloca [3 x i32]*
%10 = alloca i32*
%11 = alloca [3 x double]*
%12 = alloca i32*
store [3 x i32]* %0, [3 x i32]** %7
store i32* %1, i32** %8
store [3 x i32]* %2, [3 x i32]** %9
store i32* %3, i32** %10
store [3 x double]* %4, [3 x double]** %11
store i32* %5, i32** %12
%13 = load [3 x i32]*, [3 x i32]** %7
%14 = bitcast [3 x i32]* %13 to i32**
%15 = load i32*, i32** %8
%16 = load [3 x i32]*, [3 x i32]** %9
%17 = bitcast [3 x i32]* %16 to i32**
%18 = load i32*, i32** %10
%19 = load [3 x double]*, [3 x double]** %11
%20 = bitcast [3 x double]* %19 to double**
%21 = load i32*, i32** %12
%22 = call i32 @relocate_BZ_grid_address(i32** %14, i32* %15, i32** %17, i32* %18, double** %20, i32* %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @kpt_relocate_BZ_grid_address([3 x i32]* %0, i32* %1, [3 x i32]* %2, i32* %3, [3 x double]* %4, i32* %5) {
%7 = bitcast [3 x i32]* %0 to i32**
%8 = bitcast [3 x i32]* %2 to i32**
%9 = bitcast [3 x double]* %4 to double**
%10 = tail call i32 @relocate_BZ_grid_address(i32** %7, i32* %1, i32** %8, i32* %3, double** %9, i32* %5)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ print_one_line_t32(int, int /*<<< orphan*/, int);
void print_8_1_t32(int k) {
  for (int loop = 0; loop < 2; ++loop) {
    print_one_line_t32(k, 0, 1);
  }
}


x86 assembly (clang, -O0):
<print_8_1_t32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1149 <print_8_1_t32+0x39>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <print_one_line_t32@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <print_8_1_t32+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_8_1_t32>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <print_one_line_t32@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x1,%edx
pop    %rbx
jmp    1030 <print_one_line_t32@plt>

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

LLVM IR (-O2):
define void @print_8_1_t32(i32 %0) {
%2 = tail call i32 @print_one_line_t32(i32 %0, i32 0, i32 1)
%3 = tail call i32 @print_one_line_t32(i32 %0, i32 0, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ ctime_r(int /*<<< orphan*/ *, char *);
void c_ctime_(char *buf, time_t *tim, int lbuf) { ctime_r(tim, buf); }


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

x86 assembly (clang, -O2):
<c_ctime_>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <ctime_r@plt>

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

LLVM IR (-O2):
define void @c_ctime_(i8* %0, i32* %1, i32 %2) {
%4 = tail call i32 @ctime_r(i32* %1, i8* %0)
ret void
}
/* Variables and functions */
int str_to_decimal(char const *, long long *, int /*<<< orphan*/,
                   int /*<<< orphan*/ *);
int check_str_time(const char *p, long long *val) {
  return str_to_decimal(p, val, 0, NULL);
}


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

x86 assembly (clang, -O2):
<check_str_time>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <str_to_decimal@plt>

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

LLVM IR (-O2):
define i32 @check_str_time(i8* %0, i64* %1) {
%3 = tail call i32 @str_to_decimal(i8* %0, i64* %1, i32 0, i32* null)
ret i32 %3
}
/* Variables and functions */
int mem_read32(unsigned char *);
int get_document_offset_end(unsigned char *signature_header_vals) {
  return mem_read32(signature_header_vals + (5 * 4));
}


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

x86 assembly (clang, -O2):
<get_document_offset_end>:
add    $0x14,%rdi
jmp    1030 <mem_read32@plt>

LLVM IR (-O0):
define i32 @get_document_offset_end(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 20
%5 = call i32 @mem_read32(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_document_offset_end(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 20
%3 = tail call i32 @mem_read32(i8* %2)
ret i32 %3
}
equal(as1, as2) char *as1, *as2;
{
  register char *s1, *s2;
  s1 = as1;
  s2 = as2;
  while (*s1++ == *s2)
    if (*s2++ == '\0')
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
mov    -0x28(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1169 <equal+0x69>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1164 <equal+0x64>
movl   $0x1,-0x4(%rbp)
jmp    1170 <equal+0x70>
jmp    111c <equal+0x1c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1126 <equal+0x26>
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <equal+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @equal(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %10, %9 ]
%5 = phi i8* [ %1, %2 ], [ %11, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %13, label %3
13: ; preds = %3, %9
%14 = phi i32 [ 1, %9 ], [ 0, %3 ]
ret i32 %14
}
char *RCSid() {
  return RCSid("$Id: binary.c,v 1.13 2007/10/02 18:18:57 sfeam Exp $");
}


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

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

LLVM IR (-O0):
@.str = [53 x i8] c"$Id: binary.c,v 1.13 2007/10/02 18:18:57 sfeam Exp $\00"
define i8* @RCSid() {
%1 = call i8* (i8*, ...) bitcast (i8* ()* @RCSid to i8* (i8*, ...)*)(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @RCSid() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) { return (isupper(c) ? c + ('a' - 'A') : c); }


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113b <tolower+0x2b>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <tolower+0x31>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 32
br label %11
9: ; preds = %1
%10 = load i32, i32* %2
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
int rename(from, to)
char *from, *to;
{
  unlink(to);
  if (link(from, to) < 0)
    return -1;
  return (unlink(from));
}


x86 assembly (clang, -O0):
<rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <unlink@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <link@plt>
cmp    $0x0,%eax
jge    115f <rename+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <rename+0x4d>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <unlink@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
xor    %eax,%eax
call   1030 <unlink@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <link@plt>
test   %eax,%eax
js     1156 <rename+0x36>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <unlink@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @rename(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %1)
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @link to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%5 = icmp slt i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %0)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello world\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\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
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void SysCtlIntDisable(uint32_t ui32Ints) {
  (*((volatile unsigned long *)(0x400FE054))) &= ~(ui32Ints);
}


x86 assembly (clang, -O0):
<SysCtlIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    $0x400fe054,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0x400fe054,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlIntDisable>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
not    %rax
and    %rax,0x400fe054
40
ret

LLVM IR (-O0):
define void @SysCtlIntDisable(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074782292 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074782292 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlIntDisable(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074782292 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074782292 to i64*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XModifierKeymap;
typedef scalar_t__ KeyCode;

/* Variables and functions */
int /*<<< orphan*/ *XInsertModifiermapEntry(int /*<<< orphan*/ *, scalar_t__,
                                            int);
int AddModifier(XModifierKeymap **mapp, KeyCode keycode, int modifier) {
  if (keycode) {
    *mapp = XInsertModifiermapEntry(*mapp, keycode, modifier);
    return (0);
  } else {
    return (-1);
  }
}


x86 assembly (clang, -O0):
<AddModifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1157 <AddModifier+0x47>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <XInsertModifiermapEntry@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    115e <AddModifier+0x4e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AddModifier>:
test   %rsi,%rsi
je     1128 <AddModifier+0x18>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <XInsertModifiermapEntry@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @AddModifier(i32** nocapture %0, i64 %1, i32 %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = load i32*, i32** %0
%7 = tail call i32* @XInsertModifiermapEntry(i32* %6, i64 %1, i32 %2)
store i32* %7, i32** %0
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ 0, %5 ], [ -1, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void push_local_close(int fd) { close(fd); }


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

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

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

LLVM IR (-O2):
define void @push_local_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
__attribute__((no, optimize(0))) void empty_fn(void *args) {}


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

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

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

LLVM IR (-O2):
define void @empty_fn(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
int *ivector(int n) {
  int *vec = (int *)malloc(sizeof(int) * n);
  assert(vec);
  memset(vec, 0, n * sizeof(int));
  return vec;
}


x86 assembly (clang, -O0):
<ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivector>:
push   %rbp
push   %rbx
push   %rax
lea    0x0(,%rdi,4),%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32* @ivector(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 4, %5
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = call i32 @assert(i32* %10)
%12 = load i32*, i32** %3
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 4
%16 = trunc i64 %15 to i32
%17 = call i32 @memset(i32* %12, i32 0, i32 %16)
%18 = load i32*, i32** %3
ret i32* %18
}

LLVM IR (-O2):
define i32* @ivector(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i32*
%5 = tail call i32 @assert(i32* %4)
%6 = tail call i32 @memset(i32* %4, i32 0, i32 %2)
ret i32* %4
}
void *_m_buf(int ln, const char *fn, const char *fun, int m) {
  if (!m)
    return 0;
  _mlsdb_caller(__FUNCTION__, ln, fn, fun, 3, m, 0, 0);
  return m_buf(m);
}


x86 assembly (clang, -O0):
<_m_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    114d <_m_buf+0x2d>
movq   $0x0,-0x8(%rbp)
jmp    1191 <_m_buf+0x71>
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r9d
lea    0xe9d(%rip),%rdi
mov    $0x3,%r8d
xor    %eax,%eax
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
mov    $0x0,%al
call   1030 <_mlsdb_caller@plt>
mov    -0x24(%rbp),%edi
mov    $0x0,%al
call   1040 <m_buf@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_m_buf>:
push   %rbx
mov    %ecx,%ebx
test   %ecx,%ecx
je     115b <_m_buf+0x3b>
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xeca(%rip),%rdi
mov    $0x3,%r8d
mov    %ebx,%r9d
xor    %eax,%eax
push   $0x0
push   $0x0
call   1030 <_mlsdb_caller@plt>
add    $0x10,%rsp
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <m_buf@plt>
cltq
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__FUNCTION__._m_buf = [7 x i8] c"_m_buf\00"
define i8* @_m_buf(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
%10 = load i32, i32* %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %4
store i8* null, i8** %5
br label %23
13: ; preds = %4
%14 = load i32, i32* %6
%15 = load i8*, i8** %7
%16 = load i8*, i8** %8
%17 = load i32, i32* %9
%18 = call i32 (i8*, i32, i8*, i8*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @_mlsdb_caller to i32 (i8*, i32, i8*, i8*, i32, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__._m_buf, i64 0, i64 0), i32 %14, i8* %15, i8* %16, i32 3, i32 %17, i32 0, i32 0)
%19 = load i32, i32* %9
%20 = call i32 (i32, ...) bitcast (i32 (...)* @m_buf to i32 (i32, ...)*)(i32 %19)
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to i8*
store i8* %22, i8** %5
br label %23
23: ; preds = %13, %12
%24 = load i8*, i8** %5
ret i8* %24
}

LLVM IR (-O2):
@__FUNCTION__._m_buf = [7 x i8] c"_m_buf\00"
define i8* @_m_buf(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %11, label %6
6: ; preds = %4
%7 = tail call i32 (i8*, i32, i8*, i8*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @_mlsdb_caller to i32 (i8*, i32, i8*, i8*, i32, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__._m_buf, i64 0, i64 0), i32 %0, i8* %1, i8* %2, i32 3, i32 %3, i32 0, i32 0)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @m_buf to i32 (i32, ...)*)(i32 %3)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
br label %11
11: ; preds = %4, %6
%12 = phi i8* [ %10, %6 ], [ null, %4 ]
ret i8* %12
}
void gtk_text_view_get_default_attributes() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_get_default_attributes() {
ret void
}
int non_existing() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @non_existing() {
ret i32 0
}
int func1(int i) {
  printf("%s\n", __func__);
  return i;
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@__func__.func1 = [6 x i8] c"func1\00"
define i32 @func1(i32 returned %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.func1, i64 0, i64 0))
ret i32 %0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_write_solution_dimensions_to_defined_output_file(int len, int dim) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(140, &len, &dim, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_write_solution_dimensions_to_defined_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x8c,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_write_solution_dimensions_to_defined_output_file>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x8c,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_write_solution_dimensions_to_defined_output_file(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load double*, double** %6
%8 = call i32 @_ada_use_c2phc(i32 140, i32* %3, i32* %4, double* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @solcon_write_solution_dimensions_to_defined_output_file(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @_ada_use_c2phc(i32 140, i32* %3, i32* %4, double* undef)
ret i32 %5
}
/* Variables and functions */
int __ltsf2(float, float);
int _COM_CMPLTf(float a, float b) { return __ltsf2(a, b) == -1; }


x86 assembly (clang, -O0):
<_COM_CMPLTf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__ltsf2@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_COM_CMPLTf>:
push   %rax
call   1030 <__ltsf2@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @_COM_CMPLTf(float %0, float %1) {
%3 = tail call i32 @__ltsf2(float %0, float %1)
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
void g_strdup_vprintf() {}


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

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

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

LLVM IR (-O2):
define void @g_strdup_vprintf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xc2() {
  Assert_real((isspace(194) == 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_isspace.c",
              975, ("isspace should be 0 for 0xc2"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xc2>:
push   %rax
mov    $0xc2,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3cf,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xc2\00"
define void @t_isspace_0xc2() {
%1 = call i64 @isspace(i32 194)
%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 975, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xc2\00"
define void @t_isspace_0xc2() {
%1 = tail call i64 @isspace(i32 194)
%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 975, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double acos(double);
double exp(double);
double sqrt(double);
double nordis(double zval) {
  double pi, t;
  pi = 2.0 * acos(0.0);
  t = exp(-0.5 * zval * zval);
  t /= sqrt(2.0 * pi);
  return t;
}


x86 assembly (clang, -O0):
<nordis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
call   1030 <acos@plt>
movaps %xmm0,%xmm1
movsd  0xeb0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xe83(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nordis>:
push   %rax
movsd  0xee7(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
divsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @nordis(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = call double @acos(double 0.000000e+00)
%6 = fmul double 2.000000e+00, %5
store double %6, double* %3
%7 = load double, double* %2
%8 = fmul double -5.000000e-01, %7
%9 = load double, double* %2
%10 = fmul double %8, %9
%11 = call double @exp(double %10)
store double %11, double* %4
%12 = load double, double* %3
%13 = fmul double 2.000000e+00, %12
%14 = call double @sqrt(double %13)
%15 = load double, double* %4
%16 = fdiv double %15, %14
store double %16, double* %4
%17 = load double, double* %4
ret double %17
}

LLVM IR (-O2):
define double @nordis(double %0) {
%2 = fmul double %0, -5.000000e-01
%3 = fmul double %2, %0
%4 = tail call double @exp(double %3)
%5 = fdiv double %4, 0x40040D931FF62705
ret double %5
}
/* Variables and functions */
char *_tparm(char const *, long, long, long, long, long, long, long, long,
             long);
char *tparm(const char *str, long p1, long p2, long p3, long p4, long p5,
            long p6, long p7, long p8, long p9) {
  return _tparm(str, p1, p2, p3, p4, p5, p6, p7, p8, p9);
}


x86 assembly (clang, -O0):
<tparm>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x38(%rbp),%r9
mov    0x10(%rbp),%rbx
mov    0x18(%rbp),%r11
mov    0x20(%rbp),%r10
mov    0x28(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <_tparm@plt>
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<tparm>:
jmp    1030 <_tparm@plt>

LLVM IR (-O0):
define i8* @tparm(i8* %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9) {
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
store i8* %0, i8** %11
store i64 %1, i64* %12
store i64 %2, i64* %13
store i64 %3, i64* %14
store i64 %4, i64* %15
store i64 %5, i64* %16
store i64 %6, i64* %17
store i64 %7, i64* %18
store i64 %8, i64* %19
store i64 %9, i64* %20
%21 = load i8*, i8** %11
%22 = load i64, i64* %12
%23 = load i64, i64* %13
%24 = load i64, i64* %14
%25 = load i64, i64* %15
%26 = load i64, i64* %16
%27 = load i64, i64* %17
%28 = load i64, i64* %18
%29 = load i64, i64* %19
%30 = load i64, i64* %20
%31 = call i8* @_tparm(i8* %21, i64 %22, i64 %23, i64 %24, i64 %25, i64 %26, i64 %27, i64 %28, i64 %29, i64 %30)
ret i8* %31
}

LLVM IR (-O2):
define i8* @tparm(i8* %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9) {
%11 = tail call i8* @_tparm(i8* %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9)
ret i8* %11
}
void INT_Excep_TMR2_OVI2(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR2_OVI2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ default_hash(char **, int);
void test_hash_function_different() {
  char *one = "one";
  char *two = "two";
  assert(default_hash(&one, 20) != default_hash(&two, 20));
}


x86 assembly (clang, -O0):
<test_hash_function_different>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x14,%esi
call   1030 <default_hash@plt>
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x14,%esi
call   1030 <default_hash@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_hash_function_different>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xecc(%rip),%rax
mov    %rax,(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x14,%esi
call   1030 <default_hash@plt>
mov    %rax,%rbx
mov    %rsp,%rdi
mov    $0x14,%esi
call   1030 <default_hash@plt>
xor    %edi,%edi
cmp    %rax,%rbx
setne  %dil
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"one\00"
@.str.1 = [4 x i8] c"two\00"
define void @test_hash_function_different() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = call i64 @default_hash(i8** %1, i32 20)
%4 = call i64 @default_hash(i8** %2, i32 20)
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"one\00"
@.str.1 = [4 x i8] c"two\00"
define void @test_hash_function_different() {
%1 = alloca i8*
%2 = alloca i8*
%3 = bitcast i8** %1 to i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%4 = bitcast i8** %2 to i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%5 = call i64 @default_hash(i8** %1, i32 20)
%6 = call i64 @default_hash(i8** %2, i32 20)
%7 = icmp ne i64 %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret void
}
__attribute__((no)) int nondet_int() {}


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

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

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

LLVM IR (-O2):
define i32 @nondet_int() {
ret i32 undef
}
void dummy_call() { asm("" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @dummy_call() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int strlen(char *s) {
  int i = 0;
  while (*(s + i) != '\0')
    i++;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <strlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ core1_print(char *, char const *);
void U_EMRPOLYLINE_print(const char *contents) {
  core1_print("U_EMRPOLYLINE", contents);
}


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

x86 assembly (clang, -O2):
<U_EMRPOLYLINE_print>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <core1_print@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"U_EMRPOLYLINE\00"
define void @U_EMRPOLYLINE_print(i8* %0) {
%2 = tail call i32 @core1_print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void rts(p, a, s) struct h8_opcode *p;
char *a;
int s;
{
  printf("tmp = reg[7];\n");
  printf("reg[7]+=2;\n");
  printf("npc = saved_state.mem + (WORD_MEM(tmp)>>1);\n");
}


x86 assembly (clang, -O0):
<rts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rts>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
%struct.h8_opcode = type opaque
@.str = [15 x i8] c"tmp = reg[7];\0A\00"
@.str.1 = [12 x i8] c"reg[7]+=2;\0A\00"
@.str.2 = [45 x i8] c"npc = saved_state.mem + (WORD_MEM(tmp)>>1);\0A\00"
define void @rts(%struct.h8_opcode* %0, i8* %1, i32 %2) {
%4 = alloca %struct.h8_opcode*
%5 = alloca i8*
%6 = alloca i32
store %struct.h8_opcode* %0, %struct.h8_opcode** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.h8_opcode = type opaque
@str = [14 x i8] c"tmp = reg[7];\00"
@str.3 = [11 x i8] c"reg[7]+=2;\00"
@str.4 = [44 x i8] c"npc = saved_state.mem + (WORD_MEM(tmp)>>1);\00"
define void @rts(%struct.h8_opcode* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.3, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.4, i64 0, i64 0))
ret void
}
const char *Box_Name(void) { return "Box"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"Box\00"
define i8* @Box_Name() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int key_len;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned int);
void w_key_len(FILE *fp) {
  unsigned int key_len;
  switch (128) {
  case 128:
    key_len = 0x0000;
    break;
  case 192:
    key_len = 0x01;
    break;
  case 256:
    key_len = 0x02;
    break;
  default:
    key_len = 0xffff;
  }
  fprintf(fp, "@%08x\n", 0x00000006);
  fprintf(fp, "%02x\n", (key_len)&0xff);
  fprintf(fp, "%02x\n", (key_len) >> 16);
}


x86 assembly (clang, -O0):
<w_key_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
mov    $0x6,%edx
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
and    $0xff,%edx
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
shr    $0x10,%edx
lea    0xea5(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_key_len>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%rsi
mov    $0x6,%edx
call   1030 <fprintf@plt>
lea    0xed8(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <fprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"@%08x\0A\00"
@.str.1 = [6 x i8] c"%02x\0A\00"
define void @w_key_len(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
%4 = load i32*, i32** %2
%5 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%6 = load i32*, i32** %2
%7 = load i32, i32* %3
%8 = and i32 %7, 255
%9 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32*, i32** %2
%11 = load i32, i32* %3
%12 = lshr i32 %11, 16
%13 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"@%08x\0A\00"
@.str.1 = [6 x i8] c"%02x\0A\00"
define void @w_key_len(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 0)
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int __builtin_ptx_read_tid_w();
int __builtin_ptx_read_tid_x();
int __builtin_ptx_read_tid_y();
int __builtin_ptx_read_tid_z();
int read_tid() {
  int x = __builtin_ptx_read_tid_x();
  int y = __builtin_ptx_read_tid_y();
  int z = __builtin_ptx_read_tid_z();
  int w = __builtin_ptx_read_tid_w();
  return x + y + z + w;
}


x86 assembly (clang, -O0):
<read_tid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <__builtin_ptx_read_tid_x@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__builtin_ptx_read_tid_y@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <__builtin_ptx_read_tid_z@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <__builtin_ptx_read_tid_w@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_tid>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1060 <__builtin_ptx_read_tid_x@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1030 <__builtin_ptx_read_tid_y@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <__builtin_ptx_read_tid_z@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <__builtin_ptx_read_tid_w@plt>
add    %r14d,%ebp
add    %ebx,%ebp
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_tid() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @__builtin_ptx_read_tid_x()
store i32 %5, i32* %1
%6 = call i32 (...) @__builtin_ptx_read_tid_y()
store i32 %6, i32* %2
%7 = call i32 (...) @__builtin_ptx_read_tid_z()
store i32 %7, i32* %3
%8 = call i32 (...) @__builtin_ptx_read_tid_w()
store i32 %8, i32* %4
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @read_tid() {
%1 = tail call i32 (...) @__builtin_ptx_read_tid_x()
%2 = tail call i32 (...) @__builtin_ptx_read_tid_y()
%3 = tail call i32 (...) @__builtin_ptx_read_tid_z()
%4 = tail call i32 (...) @__builtin_ptx_read_tid_w()
%5 = add nsw i32 %2, %1
%6 = add nsw i32 %5, %3
%7 = add nsw i32 %6, %4
ret i32 %7
}