xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr,
          "Usage: fsastar [-ip d/s[dr]] [-op d/s] [-silent] [-v] filename\n");
  exit(1);
}


x86 assembly (clang, -O0):
<badusage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<badusage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [64 x i8] c"Usage: fsastar [-ip d/s[dr]] [-op d/s] [-silent] [-v] filename\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [64 x i8] c"Usage: fsastar [-ip d/s[dr]] [-op d/s] [-silent] [-v] filename\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit_if_null(void *);
void *malloc(size_t const);
void *malloc_exit_if_null(const size_t size) {
  void *p = malloc(size);
  exit_if_null(p);
  return p;
}


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

x86 assembly (clang, -O2):
<malloc_exit_if_null>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <exit_if_null@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @malloc_exit_if_null(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @exit_if_null(i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @malloc_exit_if_null(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = tail call i32 @exit_if_null(i8* %2)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ _verbprintf(int, char *);
void fms_print_crc(char crc[7]) {
  int i;
  do {
    if (2 <= 0)
      _verbprintf(2, "FMS CRC:");
  } while (0);
  for (i = 0; i < 7; ++i) {
    if (crc[i]) {
      do {
        if (2 <= 0)
          _verbprintf(2, "1");
      } while (0);
    } else {
      do {
        if (2 <= 0)
          _verbprintf(2, "0");
      } while (0);
    }
  }
  do {
    if (2 <= 0)
      _verbprintf(2, "\n");
  } while (0);
}


x86 assembly (clang, -O0):
<fms_print_crc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
jmp    110d <fms_print_crc+0xd>
movl   $0x0,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    1161 <fms_print_crc+0x61>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     113f <fms_print_crc+0x3f>
jmp    1135 <fms_print_crc+0x35>
jmp    113a <fms_print_crc+0x3a>
jmp    114e <fms_print_crc+0x4e>
jmp    1144 <fms_print_crc+0x44>
jmp    1149 <fms_print_crc+0x49>
jmp    114e <fms_print_crc+0x4e>
jmp    1153 <fms_print_crc+0x53>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <fms_print_crc+0x14>
jmp    1166 <fms_print_crc+0x66>
jmp    116b <fms_print_crc+0x6b>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @fms_print_crc(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ majorAndMinor(int, unsigned int *, unsigned int *);
int open(char *, int /*<<< orphan*/);
void majorAndMinorFromFilename(char *filename, unsigned int *major,
                               unsigned int *minor) {
  int fd = open(filename, O_RDONLY);
  *major = 0;
  *minor = 0;
  if (fd > 0) {
    majorAndMinor(fd, major, minor);
    close(fd);
  }
}


x86 assembly (clang, -O0):
<majorAndMinorFromFilename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpl   $0x0,-0x1c(%rbp)
jle    118f <majorAndMinorFromFilename+0x5f>
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <majorAndMinor@plt>
mov    -0x1c(%rbp),%edi
call   1030 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<majorAndMinorFromFilename>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
movl   $0x0,(%rbx)
movl   $0x0,(%r14)
test   %eax,%eax
jle    1173 <majorAndMinorFromFilename+0x43>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <majorAndMinor@plt>
mov    %ebp,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <close@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
define void @majorAndMinorFromFilename(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* @O_RDONLY
%10 = call i32 @open(i8* %8, i32 %9)
store i32 %10, i32* %7
%11 = load i32*, i32** %5
store i32 0, i32* %11
%12 = load i32*, i32** %6
store i32 0, i32* %12
%13 = load i32, i32* %7
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %22
15: ; preds = %3
%16 = load i32, i32* %7
%17 = load i32*, i32** %5
%18 = load i32*, i32** %6
%19 = call i32 @majorAndMinor(i32 %16, i32* %17, i32* %18)
%20 = load i32, i32* %7
%21 = call i32 @close(i32 %20)
br label %22
22: ; preds = %15, %3
ret void
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define void @majorAndMinorFromFilename(i8* nocapture %0, i32* %1, i32* %2) {
%4 = load i32, i32* @O_RDONLY
%5 = tail call i32 @open(i8* %0, i32 %4)
store i32 0, i32* %1
store i32 0, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i32 @majorAndMinor(i32 %5, i32* %1, i32* %2)
%9 = tail call i32 @close(i32 %5)
br label %10
10: ; preds = %7, %3
ret void
}
/* Variables and functions */
bool is_leap_year(int year) {
  if (!(year % 4) && ((year % 100) || !(year % 400)))
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<is_leap_year>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <is_leap_year+0x4f>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <is_leap_year+0x43>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <is_leap_year+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <is_leap_year+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap_year>:
test   $0x3,%dil
jne    1143 <is_leap_year+0x43>
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
ror    $0x2,%ecx
mov    $0x1,%eax
cmp    $0x28f5c28,%ecx
ja     1145 <is_leap_year+0x45>
movslq %edi,%rcx
imul   $0x51eb851f,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x27,%rcx
add    %edx,%ecx
imul   $0x190,%ecx,%ecx
sub    %ecx,%edi
je     1145 <is_leap_year+0x45>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_leap_year(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = srem i32 %0, 100
%6 = icmp ne i32 %5, 0
%7 = srem i32 %0, 400
%8 = icmp eq i32 %7, 0
%9 = or i1 %6, %8
br i1 %9, label %11, label %10
10: ; preds = %4, %1
br label %11
11: ; preds = %4, %10
%12 = phi i32 [ 0, %10 ], [ 1, %4 ]
ret i32 %12
}
int jac_chain_nm8_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 2;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 50;
  return 0;
}


x86 assembly (clang, -O0):
<jac_chain_nm8_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <jac_chain_nm8_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <jac_chain_nm8_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <jac_chain_nm8_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <jac_chain_nm8_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x32,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm8_work>:
test   %rdi,%rdi
je     110b <jac_chain_nm8_work+0xb>
movl   $0x2,(%rdi)
test   %rsi,%rsi
je     1116 <jac_chain_nm8_work+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <jac_chain_nm8_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <jac_chain_nm8_work+0x2c>
movl   $0x32,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @jac_chain_nm8_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 2, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 50, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
/* Type definitions */
struct table_cell {
  int dummy;
};

/* Variables and functions */
int table_cell_colspan(struct table_cell const *);
int table_cell_rowspan(struct table_cell const *);
bool table_cell_is_joined(const struct table_cell *cell) {
  return table_cell_colspan(cell) > 1 || table_cell_rowspan(cell) > 1;
}


x86 assembly (clang, -O0):
<table_cell_is_joined>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <table_cell_colspan@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x1,%ecx
mov    %al,-0x9(%rbp)
jg     1157 <table_cell_is_joined+0x37>
mov    -0x8(%rbp),%rdi
call   1040 <table_cell_rowspan@plt>
cmp    $0x1,%eax
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<table_cell_is_joined>:
push   %rbx
mov    %rdi,%rbx
call   1030 <table_cell_colspan@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
jg     1147 <table_cell_is_joined+0x27>
mov    %rbx,%rdi
call   1040 <table_cell_rowspan@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
setge  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.table_cell = type { i32 }
define i32 @table_cell_is_joined(%struct.table_cell* %0) {
%2 = alloca %struct.table_cell*
store %struct.table_cell* %0, %struct.table_cell** %2
%3 = load %struct.table_cell*, %struct.table_cell** %2
%4 = call i32 @table_cell_colspan(%struct.table_cell* %3)
%5 = icmp sgt i32 %4, 1
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load %struct.table_cell*, %struct.table_cell** %2
%8 = call i32 @table_cell_rowspan(%struct.table_cell* %7)
%9 = icmp sgt i32 %8, 1
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.table_cell = type { i32 }
define i32 @table_cell_is_joined(%struct.table_cell* %0) {
%2 = tail call i32 @table_cell_colspan(%struct.table_cell* %0)
%3 = icmp sgt i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @table_cell_rowspan(%struct.table_cell* %0)
%6 = icmp sgt i32 %5, 1
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
AX0AR1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if ((((unsigned short *)10000000)[x0]) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AX0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
movzwl (%rax,%rcx,2),%eax
mov    -0x20(%rbp),%rcx
movzwl 0x87a22(%rcx),%ecx
cmp    %ecx,%eax
jg     114b <AX0AR1+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <AX0AR1+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AX0AR1>:
movslq %edx,%rax
movzwl 0x989680(%rax,%rax,1),%ecx
xor    %eax,%eax
cmp    0x87a22(%r9),%cx
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @AX0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %7
%9 = load i16, i16* %8
%10 = getelementptr inbounds i16, i16* %5, i64 277777
%11 = load i16, i16* %10
%12 = icmp ule i16 %9, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
void debug_yield_init(void) {}


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

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

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

LLVM IR (-O2):
define void @debug_yield_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct dynar {
  int dummy;
};
typedef int /*<<< orphan*/ nlen;

/* Variables and functions */
scalar_t__ dynar_data(struct dynar const *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, scalar_t__, int);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
uint32_t msg_get_len(const struct dynar *msg) {
  uint32_t nlen;
  uint32_t len;
  memcpy(&nlen, dynar_data(msg) + 2, sizeof(nlen));
  len = ntohl(nlen);
  return (len);
}


x86 assembly (clang, -O0):
<msg_get_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <dynar_data@plt>
mov    %rax,%rsi
add    $0x2,%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0xc(%rbp),%edi
call   1050 <ntohl@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_get_len>:
push   %rax
call   1030 <dynar_data@plt>
lea    0x2(%rax),%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    0x4(%rsp),%edi
call   1050 <ntohl@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.dynar = type { i32 }
define i32 @msg_get_len(%struct.dynar* %0) {
%2 = alloca %struct.dynar*
%3 = alloca i32
%4 = alloca i32
store %struct.dynar* %0, %struct.dynar** %2
%5 = load %struct.dynar*, %struct.dynar** %2
%6 = call i64 @dynar_data(%struct.dynar* %5)
%7 = add nsw i64 %6, 2
%8 = call i32 @memcpy(i32* %3, i64 %7, i32 4)
%9 = load i32, i32* %3
%10 = call i32 @ntohl(i32 %9)
store i32 %10, i32* %4
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
%struct.dynar = type { i32 }
define i32 @msg_get_len(%struct.dynar* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i64 @dynar_data(%struct.dynar* %0)
%5 = add nsw i64 %4, 2
%6 = call i32 @memcpy(i32* %2, i64 %5, i32 4)
%7 = load i32, i32* %2
%8 = call i32 @ntohl(i32 %7)
ret i32 %8
}
void f0(int a[restrict]) {
  int **b = &a;
  int *restrict *c = &a;
}


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f0(i32* noalias nocapture %0) {
ret void
}
void plugin_seek(struct playerHandles *ph, int modtime) { return; }


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

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

LLVM IR (-O0):
%struct.playerHandles = type opaque
define void @plugin_seek(%struct.playerHandles* %0, i32 %1) {
%3 = alloca %struct.playerHandles*
%4 = alloca i32
store %struct.playerHandles* %0, %struct.playerHandles** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.playerHandles = type opaque
define void @plugin_seek(%struct.playerHandles* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
char *null_array_SINT32(int32_t *arr) {
  if (arr == NULL) {
    return "null";
  } else {
    return "non_null";
  }
}


x86 assembly (clang, -O0):
<null_array_SINT32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1123 <null_array_SINT32+0x23>
lea    0xeea(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112e <null_array_SINT32+0x2e>
lea    0xed6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_array_SINT32>:
test   %rdi,%rdi
lea    0xefa(%rip),%rcx
lea    0xeef(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"null\00"
@.str.1 = [9 x i8] c"non_null\00"
define i8* @null_array_SINT32(i32* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"null\00"
@.str.1 = [9 x i8] c"non_null\00"
define i8* @null_array_SINT32(i32* readnone %0) {
%2 = icmp eq i32* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ getkey(int, int);
void op_keyinc() { getkey(1, -1); }


x86 assembly (clang, -O0):
<op_keyinc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   1030 <getkey@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_keyinc>:
mov    $0x1,%edi
mov    $0xffffffff,%esi
jmp    1030 <getkey@plt>

LLVM IR (-O0):
define void @op_keyinc() {
%1 = call i32 @getkey(i32 1, i32 -1)
ret void
}

LLVM IR (-O2):
define void @op_keyinc() {
%1 = tail call i32 @getkey(i32 1, i32 -1)
ret void
}
unsigned int get_input_length(char *input) {
  return sizeof(input) / sizeof(input[0]);
}


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

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

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

LLVM IR (-O2):
define i32 @get_input_length(i8* nocapture readnone %0) {
ret i32 8
}
float calculaX2(float a, float b, float c) {}


x86 assembly (clang, -O0):
<calculaX2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @calculaX2(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %4
ret float %8
}

LLVM IR (-O2):
define float @calculaX2(float %0, float %1, float %2) {
ret float undef
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ *opendir(char const *);
DIR *outside_opendir(const char *name) { return opendir(name); }


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

x86 assembly (clang, -O2):
<outside_opendir>:
jmp    1030 <opendir@plt>

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

LLVM IR (-O2):
define noalias i32* @outside_opendir(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
ret i32* %2
}
int f2au_DH_from_file(const char *file) {
  (void)file;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @f2au_DH_from_file(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
void *malloc(int);
void *f7(int n) {
  if (n > 10)
    return ((void *)0);
  return malloc(n * sizeof(int));
}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jle    1132 <f7+0x22>
movq   $0x0,-0x8(%rbp)
jmp    1145 <f7+0x35>
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
cmp    $0xa,%edi
jle    1118 <f7+0x8>
xor    %eax,%eax
ret
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @f7(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 10
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* null, i8** %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = mul i64 %9, 4
%11 = trunc i64 %10 to i32
%12 = call i8* @malloc(i32 %11)
store i8* %12, i8** %2
br label %13
13: ; preds = %7, %6
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @f7(i32 %0) {
%2 = icmp sgt i32 %0, 10
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = shl i32 %0, 2
%5 = tail call i8* @malloc(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i8* [ %5, %3 ], [ null, %1 ]
ret i8* %7
}
void RTProcGetAffinityMask(void) {}


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

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

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

LLVM IR (-O2):
define void @RTProcGetAffinityMask() {
ret void
}
/* Variables and functions */
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int compare_key(char *key1, char *key2) {
  int sz = strlen(key1);
  if (sz != strlen(key2)) {
    return -1;
  }
  if (strncmp(key1, key2, sz) != 0) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<compare_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
je     1164 <compare_key+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    1191 <compare_key+0x71>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     118a <compare_key+0x6a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1191 <compare_key+0x71>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_key>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%ebp
jne    1156 <compare_key+0x36>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <strncmp@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @compare_key(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%8 = icmp ne i64 %7, 0
%9 = sext i1 %8 to i32
br label %10
10: ; preds = %6, %2
%11 = phi i32 [ -1, %2 ], [ %9, %6 ]
ret i32 %11
}
int test_imm_31int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x31 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_31int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 3211264
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int numero = 1;
  int resultado = 0;
  while (numero < 65)
    resultado += numero++;
  printf("%d\n", resultado);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x41,-0x8(%rbp)
jge    114d <main+0x3d>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2080)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
scalar_t__ _getReg(int);
float getHum() {
  uint16_t ret;
  ret = _getReg(0x01);
  if (ret < 0)
    return -999.;
  return (float)ret / 65536. * 100.;
}


x86 assembly (clang, -O0):
<getHum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <_getReg@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1143 <getHum+0x33>
movss  0xed7(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    116e <getHum+0x5e>
cvtsi2ssq -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getHum>:
push   %rax
mov    $0x1,%edi
call   1030 <_getReg@plt>
test   %rax,%rax
js     113f <getHum+0x2f>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xed7(%rip),%xmm0
mulsd  0xed7(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret
movss  0xeb9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @getHum() {
%1 = alloca float
%2 = alloca i64
%3 = call i64 @_getReg(i32 1)
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store float -9.990000e+02, float* %1
br label %14
7: ; preds = %0
%8 = load i64, i64* %2
%9 = sitofp i64 %8 to float
%10 = fpext float %9 to double
%11 = fdiv double %10, 6.553600e+04
%12 = fmul double %11, 1.000000e+02
%13 = fptrunc double %12 to float
store float %13, float* %1
br label %14
14: ; preds = %7, %6
%15 = load float, float* %1
ret float %15
}

LLVM IR (-O2):
define float @getHum() {
%1 = tail call i64 @_getReg(i32 1)
%2 = icmp slt i64 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = sitofp i64 %1 to float
%5 = fpext float %4 to double
%6 = fmul double %5, 0x3EF0000000000000
%7 = fmul double %6, 1.000000e+02
%8 = fptrunc double %7 to float
br label %9
9: ; preds = %0, %3
%10 = phi float [ %8, %3 ], [ -9.990000e+02, %0 ]
ret float %10
}
void doStuff_pointerToConstPointerToConstInt(int const *const *u) {}


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

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

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

LLVM IR (-O2):
define void @doStuff_pointerToConstPointerToConstInt(i32** nocapture %0) {
ret void
}
void RTStrCacheEnter(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrCacheEnter() {
ret void
}
unsigned char _BitScanReverse(unsigned long *Index, unsigned long Mask) {
  *Index = __builtin_clzl(Mask);
  return (Mask != 0);
}


x86 assembly (clang, -O0):
<_BitScanReverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
bsr    %rax,%rax
xor    $0x3f,%rax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_BitScanReverse>:
bsr    %rsi,%rax
xor    $0x3f,%rax
mov    %rax,(%rdi)
test   %rsi,%rsi
setne  %al
ret

LLVM IR (-O0):
define zeroext i8 @_BitScanReverse(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i64 @llvm.ctlz.i64(i64 %5, i1 true)
%7 = trunc i64 %6 to i32
%8 = sext i32 %7 to i64
%9 = load i64*, i64** %3
store i64 %8, i64* %9
%10 = load i64, i64* %4
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
%13 = trunc i32 %12 to i8
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @_BitScanReverse(i64* nocapture writeonly %0, i64 %1) {
%3 = tail call i64 @llvm.ctlz.i64(i64 %1, i1 true)
store i64 %3, i64* %0
%4 = icmp ne i64 %1, 0
%5 = zext i1 %4 to i8
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
long main() {
  long i;
  for (i = 1; i > 0; i = i + 1) {
    break;
  }
  printf("break works :)\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x1,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1130 <main+0x20>
jmp    1130 <main+0x20>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"break works :)\0A\00"
define i64 @main() {
%1 = alloca i64
%2 = alloca i64
store i64 1, i64* %2
br label %3
3: ; preds = %7, %0
%4 = load i64, i64* %2
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
br label %10
7: ; No predecessors!
%8 = load i64, i64* %2
%9 = add nsw i64 %8, 1
store i64 %9, i64* %2
br label %3
10: ; preds = %6, %3
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%12 = load i64, i64* %1
ret i64 %12
}

LLVM IR (-O2):
@str = [15 x i8] c"break works :)\00"
define i64 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i64 undef
}
void sigchld_handler(int signum) {}


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

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

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

LLVM IR (-O2):
define void @sigchld_handler(i32 %0) {
ret void
}
int readZacceleration() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @readZacceleration() {
ret i32 0
}
int ld_le_rm1(long double a1, long double *a2) { return (((a1) <= (*a2))); }


x86 assembly (clang, -O0):
<ld_le_rm1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_le_rm1>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setae  %al
ret

LLVM IR (-O0):
define i32 @ld_le_rm1(x86_fp80 %0, x86_fp80* %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80*
store x86_fp80 %0, x86_fp80* %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80*, x86_fp80** %4
%7 = load x86_fp80, x86_fp80* %6
%8 = fcmp ole x86_fp80 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ld_le_rm1(x86_fp80 %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %1
%4 = fcmp oge x86_fp80 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int wscanw(int /*<<< orphan*/ *, char *, short *);
int i2_wscanw(WINDOW *win, char *fmt, short *i) {
  return (wscanw(win, fmt, i));
}


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

x86 assembly (clang, -O2):
<i2_wscanw>:
jmp    1030 <wscanw@plt>

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

LLVM IR (-O2):
define i32 @i2_wscanw(i32* %0, i8* %1, i16* %2) {
%4 = tail call i32 @wscanw(i32* %0, i8* %1, i16* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Reserved41_DriverIRQHandler();
__attribute__((weak)) void Reserved41_IRQHandler(void) {
  Reserved41_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @Reserved41_IRQHandler() {
%1 = call i32 (...) @Reserved41_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @Reserved41_IRQHandler() {
%1 = tail call i32 (...) @Reserved41_DriverIRQHandler()
ret void
}
double log(double x) { return __builtin_log(x); }


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

x86 assembly (clang, -O2):
<log>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    1110 <log+0x10>
ret
nopl   0x0(%rax,%rax,1)
jmp    1110 <log+0x10>

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

LLVM IR (-O2):
define double @log(double %0) {
%2 = fcmp ugt double %0, 0.000000e+00
br i1 %2, label %4, label %3
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret double undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x9d() {
  Assert_real((isalnum(157) == 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_isalnum.c",
              790, ("isalnum should be 0 for 0x9d"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x9d>:
push   %rax
mov    $0x9d,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x316,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x9d\00"
define void @t_isalnum_0x9d() {
%1 = call i64 @isalnum(i32 157)
%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 790, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x9d\00"
define void @t_isalnum_0x9d() {
%1 = tail call i64 @isalnum(i32 157)
%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 790, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strtoul(char *, int /*<<< orphan*/ *, int);
unsigned int _parse_hex(char *str) {
  return (unsigned int)strtoul(str, NULL, 16);
}


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

x86 assembly (clang, -O2):
<_parse_hex>:
xor    %esi,%esi
mov    $0x10,%edx
jmp    1030 <strtoul@plt>

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

LLVM IR (-O2):
define i32 @_parse_hex(i8* nocapture %0) {
%2 = tail call i64 @strtoul(i8* nocapture %0, i32* null, i32 16)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
unsigned int _bkdr_hash(char const *);
unsigned int hash(const char *str) { return _bkdr_hash(str); }


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

x86 assembly (clang, -O2):
<hash>:
jmp    1030 <_bkdr_hash@plt>

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

LLVM IR (-O2):
define i32 @hash(i8* %0) {
%2 = tail call i32 @_bkdr_hash(i8* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
char *strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strdup2(char *s) {
  char *p;
  p = (char *)malloc(strlen(s) + 1);
  if (p != NULL)
    p = strcpy(p, s);
  return p;
}


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

x86 assembly (clang, -O2):
<strdup2>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     115a <strdup2+0x2a>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    115c <strdup2+0x2c>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strdup2(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = inttoptr i64 %4 to i8*
%8 = tail call i8* @strcpy(i8* %7, i8* dereferenceable(1) %0)
br label %9
9: ; preds = %6, %1
%10 = phi i8* [ %7, %6 ], [ null, %1 ]
ret i8* %10
}
void handle_45(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_45(i32 %0) {
ret void
}
void _mprec_log10(void) {}


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

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

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

LLVM IR (-O2):
define void @_mprec_log10() {
ret void
}
void run_reps(void (*func)(void), unsigned long reps) {
  do {
    func();
  } while (--reps);
}


x86 assembly (clang, -O0):
<run_reps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
call   *-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1110 <run_reps+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_reps>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
call   *%r14
add    $0xffffffffffffffff,%rbx
jne    1110 <run_reps+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @run_reps(void ()* %0, i64 %1) {
%3 = alloca void ()*
%4 = alloca i64
store void ()* %0, void ()** %3
store i64 %1, i64* %4
br label %5
5: ; preds = %7, %2
%6 = load void ()*, void ()** %3
br label %7
7: ; preds = %5
%8 = load i64, i64* %4
%9 = add i64 %8, -1
store i64 %9, i64* %4
%10 = icmp ne i64 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @run_reps(void ()* nocapture %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %1, %2 ], [ %5, %3 ]
tail call void %0()
%5 = add i64 %4, -1
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3
ret void
}