xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x4c() {
  Assert_real((isalpha(76)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              385, ("isalpha should be 1 for L"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for L\00"
define void @t_isalpha_0x4c() {
%1 = tail call i32 @isalpha(i32 76)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 385, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int x;
  long long int y;
  for (x = 1; x <= 100; x++)
    printf("%d ", x);
  printf("\n1-100 printed\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     114f <main+0x3f>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xed0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1130 <main+0x10>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
@str = [15 x i8] c"\0A1-100 printed\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 101
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int test_imm_4Cint16_reg(short val) {
  return ((val) & (0x4C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Cint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x4c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Cint16_reg>:
test   $0x4c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Cint16_reg(i16 signext %0) {
%2 = and i16 %0, 76
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
float fabsf_(float x) { return x < 0 ? -x : x; }


x86 assembly (clang, -O0):
<fabsf_>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1132 <fabsf_+0x32>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113c <fabsf_+0x3c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabsf_>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fabsf_(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fneg float %6
br label %10
8: ; preds = %1
%9 = load float, float* %2
br label %10
10: ; preds = %8, %5
%11 = phi float [ %7, %5 ], [ %9, %8 ]
ret float %11
}

LLVM IR (-O2):
define float @fabsf_(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
unsigned long long int
unsignedlonglongint_ignoring_longint(unsigned long long int x, long int y) {
  return x;
}


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

x86 assembly (clang, -O2):
<unsignedlonglongint_ignoring_longint>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @unsignedlonglongint_ignoring_longint(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlonglongint_ignoring_longint(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char const *);
FILE *os_fopen(const char *path, const char *mode) { return fopen(path, mode); }


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

x86 assembly (clang, -O2):
<os_fopen>:
jmp    1030 <fopen@plt>

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

LLVM IR (-O2):
define noalias i32* @os_fopen(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ dubijarInto();
char getch();
int /*<<< orphan*/ salir();
void menu() {
  char tecla;
  dubijarInto();
  while (tecla = getch()) {
    if (tecla == 'q') {
      salir();
    } else if (tecla == 's') {
      return;
    }
  }
}


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <dubijarInto@plt>
mov    $0x0,%al
call   1050 <getch@plt>
mov    %al,-0x1(%rbp)
cmp    $0x0,%al
je     1186 <menu+0x56>
movsbl -0x1(%rbp),%eax
cmp    $0x71,%eax
jne    116a <menu+0x3a>
mov    $0x0,%al
call   1030 <salir@plt>
jmp    1181 <menu+0x51>
movsbl -0x1(%rbp),%eax
cmp    $0x73,%eax
jne    117c <menu+0x4c>
jmp    1186 <menu+0x56>
jmp    1181 <menu+0x51>
jmp    113f <menu+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
push   %rax
xor    %eax,%eax
call   1040 <dubijarInto@plt>
jmp    1147 <menu+0x17>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <salir@plt>
xor    %eax,%eax
call   1050 <getch@plt>
cmp    $0x71,%al
je     1140 <menu+0x10>
test   %al,%al
je     115a <menu+0x2a>
cmp    $0x73,%al
jne    1147 <menu+0x17>
pop    %rax
ret

LLVM IR (-O0):
define void @menu() {
%1 = alloca i8
%2 = call i32 (...) @dubijarInto()
br label %3
3: ; preds = %18, %0
%4 = call signext i8 (...) @getch()
store i8 %4, i8* %1
%5 = icmp ne i8 %4, 0
br i1 %5, label %6, label %19
6: ; preds = %3
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 113
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 (...) @salir()
br label %18
12: ; preds = %6
%13 = load i8, i8* %1
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 115
br i1 %15, label %16, label %17
16: ; preds = %12
br label %19
17: ; preds = %12
br label %18
18: ; preds = %17, %10
br label %3
19: ; preds = %16, %3
ret void
}

LLVM IR (-O2):
define void @menu() {
%1 = tail call i32 (...) @dubijarInto()
br label %2
2: ; preds = %4, %0
%3 = tail call signext i8 (...) @getch()
switch i8 %3, label %4 [
i8 0, label %7
i8 113, label %5
i8 115, label %7
]
4: ; preds = %2, %5
br label %2
5: ; preds = %2
%6 = tail call i32 (...) @salir()
br label %4
7: ; preds = %2, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ SQLITE_OK;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ sqlite3_close(int /*<<< orphan*/ *);
void closedatabase(sqlite3 *db) {
  if (sqlite3_close(db) != SQLITE_OK)
    exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<closedatabase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sqlite3_close@plt>
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%rax
je     1153 <closedatabase+0x33>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closedatabase>:
push   %rax
call   1030 <sqlite3_close@plt>
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%rax
jne    1134 <closedatabase+0x14>
pop    %rax
ret
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SQLITE_OK = global i64 0
@EXIT_FAILURE = global i32 0
define void @closedatabase(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @sqlite3_close(i32* %3)
%5 = load i64, i64* @SQLITE_OK
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@SQLITE_OK = global i64 0
@EXIT_FAILURE = global i32 0
define void @closedatabase(i32* %0) {
%2 = tail call i64 @sqlite3_close(i32* %0)
%3 = load i64, i64* @SQLITE_OK
%4 = icmp eq i64 %2, %3
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ usleep(int /*<<< orphan*/);
void _prim_usleep(int64_t p1) { usleep(p1); }


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

x86 assembly (clang, -O2):
<_prim_usleep>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @_prim_usleep(i32 %0) {
%2 = tail call i32 @usleep(i32 %0)
ret void
}
__attribute__((always_)) void __NOP(void) { __asm("  nop"); }


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

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

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

LLVM IR (-O2):
define void @__NOP() {
tail call void asm sideeffect " nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_24(int /*<<< orphan*/ const *, int);
uint32_t
hci_event_connection_request_get_class_of_device(const uint8_t *event) {
  return little_endian_read_24(event, 8);
}


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

x86 assembly (clang, -O2):
<hci_event_connection_request_get_class_of_device>:
mov    $0x8,%esi
jmp    1030 <little_endian_read_24@plt>

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

LLVM IR (-O2):
define i32 @hci_event_connection_request_get_class_of_device(i32* %0) {
%2 = tail call i32 @little_endian_read_24(i32* %0, i32 8)
ret i32 %2
}
const char *skip_alternative(const char *p) {
  const char *r = p;
  while (*r != '\0' && *r != ',')
    r++;
  if (*r == ',')
    r++;
  return r;
}


x86 assembly (clang, -O0):
<skip_alternative>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1135 <skip_alternative+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1145 <skip_alternative+0x45>
jmp    1156 <skip_alternative+0x56>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <skip_alternative+0x10>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
jne    1172 <skip_alternative+0x72>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_alternative>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1122 <skip_alternative+0x22>
cmp    $0x2c,%cl
je     1122 <skip_alternative+0x22>
add    $0x1,%rax
jmp    1110 <skip_alternative+0x10>
xor    %edx,%edx
cmp    $0x2c,%cl
sete   %dl
add    %rdx,%rax
ret

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

LLVM IR (-O2):
define i8* @skip_alternative(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 44, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
%8 = icmp eq i8 %4, 44
%9 = zext i1 %8 to i64
%10 = getelementptr i8, i8* %3, i64 %9
ret i8* %10
}
/* Variables and functions */
float round(float);
int calculateHarshnessFromHeight(double y, float harshness) {
  static const float maxY = 179;
  float numberOfSamplesHarshness = (y / maxY) * harshness;
  numberOfSamplesHarshness = round(numberOfSamplesHarshness);
  if (numberOfSamplesHarshness == 0) {
    numberOfSamplesHarshness = 1;
  }
  return (int)numberOfSamplesHarshness;
}


x86 assembly (clang, -O0):
<calculateHarshnessFromHeight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
call   1030 <round@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    117c <calculateHarshnessFromHeight+0x6c>
jp     117c <calculateHarshnessFromHeight+0x6c>
movss  0xe91(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
cvttss2si -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateHarshnessFromHeight>:
push   %rax
divsd  0xee7(%rip),%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
call   1030 <roundf@plt>
xorps  %xmm1,%xmm1
cmpeqss %xmm0,%xmm1
movss  0xecb(%rip),%xmm2
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm1,%xmm2
cvttss2si %xmm2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@calculateHarshnessFromHeight.maxY = internal constant float 1.790000e+02
define i32 @calculateHarshnessFromHeight(double %0, float %1) {
%3 = alloca double
%4 = alloca float
%5 = alloca float
store double %0, double* %3
store float %1, float* %4
%6 = load double, double* %3
%7 = fdiv double %6, 1.790000e+02
%8 = load float, float* %4
%9 = fpext float %8 to double
%10 = fmul double %7, %9
%11 = fptrunc double %10 to float
store float %11, float* %5
%12 = load float, float* %5
%13 = call float @round(float %12)
store float %13, float* %5
%14 = load float, float* %5
%15 = fcmp oeq float %14, 0.000000e+00
br i1 %15, label %16, label %17
16: ; preds = %2
store float 1.000000e+00, float* %5
br label %17
17: ; preds = %16, %2
%18 = load float, float* %5
%19 = fptosi float %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @calculateHarshnessFromHeight(double %0, float %1) {
%3 = fdiv double %0, 1.790000e+02
%4 = fpext float %1 to double
%5 = fmul double %3, %4
%6 = fptrunc double %5 to float
%7 = tail call float @llvm.round.f32(float %6)
%8 = fcmp oeq float %7, 0.000000e+00
%9 = select i1 %8, float 1.000000e+00, float %7
%10 = fptosi float %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ OSD9616_send(int, int);
int16_t printCharacter(int *src) {
  OSD9616_send(0x40, src[0]);
  OSD9616_send(0x40, src[1]);
  OSD9616_send(0x40, src[2]);
  OSD9616_send(0x40, src[3]);
  OSD9616_send(0x40, 0x00);
  return 0;
}


x86 assembly (clang, -O0):
<printCharacter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    $0x40,%edi
call   1030 <OSD9616_send@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
mov    $0x40,%edi
call   1030 <OSD9616_send@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
mov    $0x40,%edi
call   1030 <OSD9616_send@plt>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%esi
mov    $0x40,%edi
call   1030 <OSD9616_send@plt>
mov    $0x40,%edi
xor    %esi,%esi
call   1030 <OSD9616_send@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCharacter>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%esi
mov    $0x40,%edi
call   1030 <OSD9616_send@plt>
mov    0x4(%rbx),%esi
mov    $0x40,%edi
call   1030 <OSD9616_send@plt>
mov    0x8(%rbx),%esi
mov    $0x40,%edi
call   1030 <OSD9616_send@plt>
mov    0xc(%rbx),%esi
mov    $0x40,%edi
call   1030 <OSD9616_send@plt>
mov    $0x40,%edi
xor    %esi,%esi
call   1030 <OSD9616_send@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @printCharacter(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = call i32 @OSD9616_send(i32 64, i32 %5)
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = call i32 @OSD9616_send(i32 64, i32 %9)
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 2
%13 = load i32, i32* %12
%14 = call i32 @OSD9616_send(i32 64, i32 %13)
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 3
%17 = load i32, i32* %16
%18 = call i32 @OSD9616_send(i32 64, i32 %17)
%19 = call i32 @OSD9616_send(i32 64, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @printCharacter(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @OSD9616_send(i32 64, i32 %2)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @OSD9616_send(i32 64, i32 %5)
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = tail call i32 @OSD9616_send(i32 64, i32 %8)
%10 = getelementptr inbounds i32, i32* %0, i64 3
%11 = load i32, i32* %10
%12 = tail call i32 @OSD9616_send(i32 64, i32 %11)
%13 = tail call i32 @OSD9616_send(i32 64, i32 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ memcmp(void *, void *, size_t);
int dict_cmp_key(void *k1, size_t k1_len, void *k2, size_t k2_len) {
  if (k1_len != k2_len)
    return 1;
  if (memcmp(k1, k1, k1_len) != 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<dict_cmp_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x28(%rbp),%rax
je     1142 <dict_cmp_key+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1170 <dict_cmp_key+0x60>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
je     1169 <dict_cmp_key+0x59>
movl   $0x1,-0x4(%rbp)
jmp    1170 <dict_cmp_key+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dict_cmp_key>:
mov    $0x1,%eax
cmp    %rcx,%rsi
jne    1135 <dict_cmp_key+0x25>
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
call   1030 <memcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @dict_cmp_key(i8* %0, i64 %1, i8* nocapture readnone %2, i64 %3) {
%5 = icmp eq i64 %1, %3
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = tail call i64 @memcmp(i8* %0, i8* %0, i64 %1)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ 1, %4 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
scalar_t__ is_prime_int(int);
int /*<<< orphan*/ printf(char *, int, int);
int problem7(void) {
  int i, prime_num = 1;
  for (i = 2; prime_num < 10001; i++) {
    if (is_prime_int(i)) {
      prime_num++;
    }
  }
  printf("The %dth prime is %d\n", 10001, i - 1);
  return 0;
}


x86 assembly (clang, -O0):
<problem7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0x4(%rbp)
cmpl   $0x2711,-0x8(%rbp)
jge    1171 <problem7+0x51>
mov    -0x4(%rbp),%edi
call   1040 <is_prime_int@plt>
cmp    $0x0,%rax
je     115e <problem7+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1163 <problem7+0x43>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <problem7+0x16>
mov    -0x4(%rbp),%edx
sub    $0x1,%edx
lea    0xe82(%rip),%rdi
mov    $0x2711,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<problem7>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebx
mov    $0x1,%ebp
nopl   (%rax)
add    $0x1,%ebx
mov    %ebx,%edi
call   1040 <is_prime_int@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
cmp    $0x2711,%ebp
jb     1130 <problem7+0x10>
lea    0xeb0(%rip),%rdi
mov    $0x2711,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"The %dth prime is %d\0A\00"
define i32 @problem7() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %8, %1 ]
%3 = phi i32 [ 2, %0 ], [ %6, %1 ]
%4 = tail call i64 @is_prime_int(i32 %3)
%5 = icmp ne i64 %4, 0
%6 = add nuw nsw i32 %3, 1
%7 = zext i1 %5 to i32
%8 = add nuw nsw i32 %2, %7
%9 = icmp ult i32 %8, 10001
br i1 %9, label %1, label %10
10: ; preds = %1
%11 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 10001, i32 %3)
ret i32 0
}
__float128 from_uns_char(unsigned char a) { return (__float128)a; }


x86 assembly (clang, -O0):
<from_uns_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1120 <__floatsitf>
add    $0x10,%rsp
pop    %rbp
ret
nopl   (%rax)

x86 assembly (clang, -O2):
<from_uns_char>:
push   %rax
call   1110 <__floatsitf>
pop    %rax
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define fp128 @from_uns_char(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = uitofp i8 %3 to fp128
ret fp128 %4
}

LLVM IR (-O2):
define fp128 @from_uns_char(i8 zeroext %0) {
%2 = uitofp i8 %0 to fp128
ret fp128 %2
}
void batadv_nc_init_bat_priv(struct batadv_priv *bat_priv) {}


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

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

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

LLVM IR (-O2):
%struct.batadv_priv = type opaque
define void @batadv_nc_init_bat_priv(%struct.batadv_priv* nocapture %0) {
ret void
}
/* Type definitions */
struct fileinfo {
  int dummy;
};

/* Variables and functions */
struct fileinfo *ftp_parse_unix_ls(char const *);
struct fileinfo *ftp_parse_ls(const char *file) {
  return ftp_parse_unix_ls(file);
}


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

x86 assembly (clang, -O2):
<ftp_parse_ls>:
jmp    1030 <ftp_parse_unix_ls@plt>

LLVM IR (-O0):
%struct.fileinfo = type { i32 }
define %struct.fileinfo* @ftp_parse_ls(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.fileinfo* @ftp_parse_unix_ls(i8* %3)
ret %struct.fileinfo* %4
}

LLVM IR (-O2):
%struct.fileinfo = type { i32 }
define %struct.fileinfo* @ftp_parse_ls(i8* %0) {
%2 = tail call %struct.fileinfo* @ftp_parse_unix_ls(i8* %0)
ret %struct.fileinfo* %2
}
unsigned MEM_64bits(void) { return sizeof(void *) == 8; }


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

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

LLVM IR (-O0):
define i32 @MEM_64bits() {
ret i32 1
}

LLVM IR (-O2):
define i32 @MEM_64bits() {
ret i32 1
}
/* Variables and functions */
int shim_enosys(int /*<<< orphan*/, char const *, char const *);
int shim_removexattr(const char *path, const char *name) {
  return shim_enosys(0, path, name);
}


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

x86 assembly (clang, -O2):
<shim_removexattr>:
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

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

LLVM IR (-O2):
define i32 @shim_removexattr(i8* %0, i8* %1) {
%3 = tail call i32 @shim_enosys(i32 0, i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ pthread_create;
int main(int argc, char **argv) {
  if (pthread_create) {
    printf("This is multi-thread version!\n");
  } else {
    printf("This is sigle-thread version\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
cmpq   $0x0,(%rax)
je     1148 <main+0x38>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    1154 <main+0x44>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
cmpq   $0x0,(%rax)
lea    0xedd(%rip),%rax
lea    0xef3(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@pthread_create = global i64 0
@.str = [31 x i8] c"This is multi-thread version!\0A\00"
@.str.1 = [30 x i8] c"This is sigle-thread version\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i64, i64* @pthread_create
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@pthread_create = global i64 0
@str = [29 x i8] c"This is sigle-thread version\00"
@str.2 = [30 x i8] c"This is multi-thread version!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i64, i64* @pthread_create
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void my_err(const char *err_string, int line) {
  fprintf(stderr, "line: %d", line);
  perror(err_string);
  exit(1);
}


x86 assembly (clang, -O0):
<my_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
lea    0xeae(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<my_err>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c"line: %d\00"
define void @my_err(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %3
%9 = call i32 @perror(i8* %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"line: %d\00"
define void @my_err(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
%5 = tail call i32 @perror(i8* %0)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t mp2vseqx_get_chroma(const uint8_t *p_mp2vseqx) {
  return ((p_mp2vseqx[5] & 0x06) >> 1);
}


x86 assembly (clang, -O0):
<mp2vseqx_get_chroma>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
and    $0x6,%eax
sar    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseqx_get_chroma>:
mov    0x14(%rdi),%eax
shr    %eax
and    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @mp2vseqx_get_chroma(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 5
%5 = load i32, i32* %4
%6 = and i32 %5, 6
%7 = ashr i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @mp2vseqx_get_chroma(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = and i32 %4, 3
ret i32 %5
}
int vrt_msg_subsystem_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @vrt_msg_subsystem_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
char *kju_gitsha1();
int /*<<< orphan*/ stdout;
void print_version(void) {
  fprintf(stdout, "kju %s (build %s)\n", "0.0.0+", kju_gitsha1());
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <kju_gitsha1@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
lea    0xeb8(%rip),%rsi
lea    0xec4(%rip),%rdx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stdout = global i32 0
@.str = [19 x i8] c"kju %s (build %s)\0A\00"
@.str.1 = [7 x i8] c"0.0.0+\00"
define void @print_version() {
%1 = load i32, i32* @stdout
%2 = call i8* (...) @kju_gitsha1()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [19 x i8] c"kju %s (build %s)\0A\00"
@.str.1 = [7 x i8] c"0.0.0+\00"
define void @print_version() {
%1 = load i32, i32* @stdout
%2 = tail call i8* (...) @kju_gitsha1()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}
unsigned long strlen(const char *s) {
  int l = 0;
  while (*s)
    ++l;
  return l;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     112a <strlen+0x2a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
movslq -0xc(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ _dump_buf_with_offset(unsigned char *, int,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ _printk(char *);
void _dump_buf(unsigned char *p, int s) {
  _printk("\n");
  _dump_buf_with_offset(p, s, 0);
}


x86 assembly (clang, -O0):
<_dump_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <_printk@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <_dump_buf_with_offset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dump_buf>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
call   1040 <_printk@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_dump_buf_with_offset@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @_dump_buf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @_printk(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @_dump_buf_with_offset(i8* %6, i32 %7, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @_dump_buf(i8* %0, i32 %1) {
%3 = tail call i32 @_printk(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @_dump_buf_with_offset(i8* %0, i32 %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
smile() { printf("Usmiech!"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"Usmiech!\00"
define i32 @smile() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [9 x i8] c"Usmiech!\00"
define i32 @smile() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int RAND_MAX;
int rand();
int randBetween(int min, int max) {
  int range = max - min + 1;
  int binSize = RAND_MAX / range;
  int randNumber;
  do {
    randNumber = rand();
  } while (randNumber >= binSize * range);
  return randNumber / binSize + min;
}


x86 assembly (clang, -O0):
<randBetween>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    113a <randBetween+0x2a>
mov    -0x14(%rbp),%eax
cltd
idivl  -0x10(%rbp)
add    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randBetween>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %edi,%r14d
sub    %edi,%ebp
add    $0x1,%ebp
mov    0x2ec3(%rip),%rax
mov    (%rax),%eax
cltd
idiv   %ebp
mov    %eax,%ebx
imul   %eax,%ebp
nop
xor    %eax,%eax
call   1030 <rand@plt>
cmp    %ebp,%eax
jge    1130 <randBetween+0x20>
cltd
idiv   %ebx
add    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global i32 0
define i32 @randBetween(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = sub nsw i32 %8, %9
%11 = add nsw i32 %10, 1
store i32 %11, i32* %5
%12 = load i32, i32* @RAND_MAX
%13 = load i32, i32* %5
%14 = sdiv i32 %12, %13
store i32 %14, i32* %6
br label %15
15: ; preds = %17, %2
%16 = call i32 (...) @rand()
store i32 %16, i32* %7
br label %17
17: ; preds = %15
%18 = load i32, i32* %7
%19 = load i32, i32* %6
%20 = load i32, i32* %5
%21 = mul nsw i32 %19, %20
%22 = icmp sge i32 %18, %21
br i1 %22, label %15, label %23
23: ; preds = %17
%24 = load i32, i32* %7
%25 = load i32, i32* %6
%26 = sdiv i32 %24, %25
%27 = load i32, i32* %3
%28 = add nsw i32 %26, %27
ret i32 %28
}

LLVM IR (-O2):
@RAND_MAX = global i32 0
define i32 @randBetween(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = add nsw i32 %3, 1
%5 = load i32, i32* @RAND_MAX
%6 = sdiv i32 %5, %4
%7 = mul nsw i32 %6, %4
br label %8
8: ; preds = %8, %2
%9 = tail call i32 (...) @rand()
%10 = icmp slt i32 %9, %7
br i1 %10, label %11, label %8
11: ; preds = %8
%12 = sdiv i32 %9, %6
%13 = add nsw i32 %12, %0
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ glVertex3dv(int /*<<< orphan*/ *);
void Vertex3dv(GLdouble v[3]) { glVertex3dv(v); }


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

x86 assembly (clang, -O2):
<Vertex3dv>:
jmp    1030 <glVertex3dv@plt>

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

LLVM IR (-O2):
define void @Vertex3dv(i32* %0) {
%2 = tail call i32 @glVertex3dv(i32* %0)
ret void
}
void vec_zerof(float z[], int n) {
  int i;
  for (i = 0; i < n; i++)
    z[i] = 0.0f;
}


x86 assembly (clang, -O0):
<vec_zerof>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <vec_zerof+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <vec_zerof+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec_zerof>:
test   %esi,%esi
jle    1126 <vec_zerof+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @vec_zerof(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load float*, float** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %11, i64 %13
store float 0.000000e+00, float* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @vec_zerof(float* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast float* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
double area(double radius) { return radius * radius * 3.14; }


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

x86 assembly (clang, -O2):
<area>:
mulsd  %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @area(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = fmul double %5, 3.140000e+00
ret double %6
}

LLVM IR (-O2):
define double @area(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, 3.140000e+00
ret double %3
}
double sqr2(z)
double z;
{ return (z * z); }


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

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

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

LLVM IR (-O2):
define double @sqr2(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void dump_eqm(float eqm) { printf("Set error:\t%f\t", eqm); }


x86 assembly (clang, -O0):
<dump_eqm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Set error:\09%f\09\00"
define void @dump_eqm(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), float %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Set error:\09%f\09\00"
define void @dump_eqm(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Variables and functions */
int syscall(int, char const *, unsigned int, char *, unsigned int);
int kifs(const char *entry_name, unsigned int op_mode, char *user_buffer,
         unsigned int maxchars) {
  return syscall(351, entry_name, op_mode, user_buffer, maxchars);
}


x86 assembly (clang, -O0):
<kifs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x15f,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kifs>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x15f,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @kifs(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @syscall(i32 351, i8* %9, i32 %10, i8* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @kifs(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @syscall(i32 351, i8* %0, i32 %1, i8* %2, i32 %3)
ret i32 %5
}