xunge/DecIR huggingface dataset:
/* Variables and functions */
double exec(void const *);
int /*<<< orphan*/ printf(char *, double);
void process(const void *tree) { printf("\t%g\n", exec(tree)); }


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <exec@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %rax
call   1040 <exec@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\09%g\0A\00"
define void @process(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call double @exec(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %4)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\09%g\0A\00"
define void @process(i8* %0) {
%2 = tail call double @exec(i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OPER_AL_16();
int /*<<< orphan*/ m68ki_set_ccr(int /*<<< orphan*/);
void m68k_op_move_16_toc_al(void) { m68ki_set_ccr(OPER_AL_16()); }


x86 assembly (clang, -O0):
<m68k_op_move_16_toc_al>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <OPER_AL_16@plt>
mov    %eax,%edi
call   1030 <m68ki_set_ccr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_move_16_toc_al>:
push   %rax
xor    %eax,%eax
call   1040 <OPER_AL_16@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <m68ki_set_ccr@plt>

LLVM IR (-O0):
define void @m68k_op_move_16_toc_al() {
%1 = call i32 (...) @OPER_AL_16()
%2 = call i32 @m68ki_set_ccr(i32 %1)
ret void
}

LLVM IR (-O2):
define void @m68k_op_move_16_toc_al() {
%1 = tail call i32 (...) @OPER_AL_16()
%2 = tail call i32 @m68ki_set_ccr(i32 %1)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int copy_multprec_target_system_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(281, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<copy_multprec_target_system_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x119,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_multprec_target_system_to_container>:
mov    $0x119,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @copy_multprec_target_system_to_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 281, i32* undef, i32* undef, double* undef)
ret i32 %1
}
void foo802() {}


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

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

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

LLVM IR (-O2):
define void @foo802() {
ret void
}
void ff_hevc_put_hevc_uni_qpel_hv64_10_avx2() {}


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

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

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

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

/* Variables and functions */
void dump_params(uint32_t server, const char *path,
                 const struct nfs_mount_data *data) {
  (void)server;
  (void)path;
  (void)data;
}


x86 assembly (clang, -O0):
<dump_params>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.nfs_mount_data = type { i32 }
define void @dump_params(i32 %0, i8* %1, %struct.nfs_mount_data* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.nfs_mount_data*
store i32 %0, i32* %4
store i8* %1, i8** %5
store %struct.nfs_mount_data* %2, %struct.nfs_mount_data** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load %struct.nfs_mount_data*, %struct.nfs_mount_data** %6
ret void
}

LLVM IR (-O2):
%struct.nfs_mount_data = type { i32 }
define void @dump_params(i32 %0, i8* nocapture %1, %struct.nfs_mount_data* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void svd_errm() {
  fprintf(stderr, "memory allocation error in module dsvdcmp0\n");
  exit(-1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"memory allocation error in module dsvdcmp0\0A\00"
define void @svd_errm() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"memory allocation error in module dsvdcmp0\0A\00"
define void @svd_errm() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
struct sembuf {
  int sem_op;
  scalar_t__ sem_flg;
  scalar_t__ sem_num;
};

/* Variables and functions */
int semop(int, struct sembuf *, int);
int wait(int semid) {
  struct sembuf operacion;
  operacion.sem_num = 0;
  operacion.sem_op = -1;
  operacion.sem_flg = 0;
  if (semop(semid, &operacion, 1) == -1) {
    return (-1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0xffffffff,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
cmp    $0xffffffff,%eax
jne    1158 <wait+0x48>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <wait+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait>:
sub    $0x18,%rsp
movl   $0xffffffff,(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
neg    %ecx
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i64, i64 }
define i32 @wait(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.sembuf
store i32 %0, i32* %3
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %4, i32 0, i32 2
store i64 0, i64* %5
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %4, i32 0, i32 0
store i32 -1, i32* %6
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %4, i32 0, i32 1
store i64 0, i64* %7
%8 = load i32, i32* %3
%9 = call i32 @semop(i32 %8, %struct.sembuf* %4, i32 1)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i64, i64 }
define i32 @wait(i32 %0) {
%2 = alloca %struct.sembuf
%3 = bitcast %struct.sembuf* %2 to i8*
%4 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 0
store i32 -1, i32* %4
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 1
%6 = bitcast i64* %5 to <2 x i64>*
store <2 x i64> zeroinitializer, <2 x i64>* %6
%7 = call i32 @semop(i32 %0, %struct.sembuf* %2, i32 1)
%8 = icmp eq i32 %7, -1
%9 = sext i1 %8 to i32
ret i32 %9
}
int g_is_lower_f(float s, float d) {
  if (s < d) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<g_is_lower_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    112d <g_is_lower_f+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1134 <g_is_lower_f+0x34>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_is_lower_f>:
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setbe  %al
ret

LLVM IR (-O0):
define i32 @g_is_lower_f(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp olt float %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %11
10: ; preds = %2
store i32 1, i32* %3
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @g_is_lower_f(float %0, float %1) {
%3 = fcmp uge float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ prtime();
void txt_metaeot() {
  prtime();
  printf("Meta event, end of track\n");
}


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

x86 assembly (clang, -O2):
<txt_metaeot>:
push   %rax
xor    %eax,%eax
call   1040 <prtime@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Meta event, end of track\0A\00"
define void @txt_metaeot() {
%1 = call i32 (...) @prtime()
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"Meta event, end of track\00"
define void @txt_metaeot() {
%1 = tail call i32 (...) @prtime()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
__attribute__((always_)) uint64_t
detexPack64RGBA16(uint16_t r16, uint16_t g16, uint16_t b16, uint16_t a16) {
  return (uint64_t)r16 | ((uint64_t)g16 << 16) | ((uint64_t)b16 << 32) |
         ((uint64_t)a16 << 48);
}


x86 assembly (clang, -O0):
<detexPack64RGBA16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%rcx
mov    %ecx,%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
mov    %ecx,%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @detexPack64RGBA16(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %5
%10 = trunc i64 %9 to i32
%11 = load i64, i64* %6
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 16
%14 = or i32 %10, %13
%15 = load i64, i64* %7
%16 = trunc i64 %15 to i32
%17 = shl i32 %16, 32
%18 = or i32 %14, %17
%19 = load i64, i64* %8
%20 = trunc i64 %19 to i32
%21 = shl i32 %20, 48
%22 = or i32 %18, %21
ret i32 %22
}

LLVM IR (-O2):
define i32 @detexPack64RGBA16(i64 %0, i64 %1, i64 %2, i64 %3) {
ret i32 poison
}
void foo744(int p) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_1_2_1_1_2_1() {
ret void
}
/* Type definitions */
typedef size_t uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
size_t atoi(char *);
char *strtok(char *, char *);
uint32_t makeStrToIpv4Address(char *str) {
  uint32_t ip_addr;
  char *pch;
  uint8_t x = 3;
  pch = strtok(str, ".");
  while ((pch != NULL)) {
    ((uint8_t *)&ip_addr)[x] = atoi(pch);
    x--;
    pch = strtok(NULL, ".");
  }
  return ip_addr;
}


x86 assembly (clang, -O0):
<makeStrToIpv4Address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x3,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1030 <strtok@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     118d <makeStrToIpv4Address+0x6d>
mov    -0x18(%rbp),%rdi
call   1040 <atoi@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,-0xc(%rbp,%rax,8)
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe81(%rip),%rsi
call   1030 <strtok@plt>
mov    %rax,-0x18(%rbp)
jmp    1148 <makeStrToIpv4Address+0x28>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeStrToIpv4Address>:
push   %rbx
lea    0xee8(%rip),%rsi
call   1030 <strtok@plt>
test   %rax,%rax
je     113f <makeStrToIpv4Address+0x2f>
lea    0xed7(%rip),%rbx
nopl   0x0(%rax)
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <strtok@plt>
test   %rax,%rax
jne    1130 <makeStrToIpv4Address+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @makeStrToIpv4Address(i8* %0) {
%2 = tail call i8* @strtok(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1, %4
%5 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %4
7: ; preds = %4, %1
ret i32 undef
}
/* Variables and functions */
int strcmp(char const *, char const *);
int mavl_cmpstr(const void *s1, const void *s2) {
  return strcmp(*((const char **)s1), *((const char **)s2));
}


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

x86 assembly (clang, -O2):
<mavl_cmpstr>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @mavl_cmpstr(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @mavl_cmpstr(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
scalar_t__ findDir(char *);
bool existsFile(char *name) {
  if (findDir(name) > 0)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<existsFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <findDir@plt>
cmp    $0x0,%rax
jle    113b <existsFile+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <existsFile+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<existsFile>:
push   %rax
call   1030 <findDir@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @existsFile(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @findDir(i8* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @existsFile(i8* %0) {
%2 = tail call i64 @findDir(i8* %0)
%3 = icmp sgt i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void *malloc(size_t);
void *allocate(size_t size, size_t num) { return malloc(size * num); }


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

x86 assembly (clang, -O2):
<allocate>:
imul   %rsi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @allocate(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
%6 = load i64, i64* %4
%7 = mul i64 %5, %6
%8 = call i8* @malloc(i64 %7)
ret i8* %8
}

LLVM IR (-O2):
define noalias i8* @allocate(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
ret i8* %4
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int iw_stricmp(const char *s1, const char *s2) { return strcasecmp(s1, s2); }


x86 assembly (clang, -O0):
<iw_stricmp>:
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 <strcasecmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iw_stricmp>:
jmp    1030 <strcasecmp@plt>

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

LLVM IR (-O2):
define i32 @iw_stricmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x20() {
  Assert_real((isalpha(32) == 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_isalpha.c",
              165, ("isalpha should be 0 for  "));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x20>:
push   %rax
mov    $0x20,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xa5,%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 0 for \00"
define void @t_isalpha_0x20() {
%1 = call i64 @isalpha(i32 32)
%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 165, 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 0 for \00"
define void @t_isalpha_0x20() {
%1 = tail call i64 @isalpha(i32 32)
%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 165, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ intif_guild_request_info(int);
void guild_request_info(int guild_id) {
  intif_guild_request_info(guild_id);
  return;
}


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

x86 assembly (clang, -O2):
<guild_request_info>:
jmp    1030 <intif_guild_request_info@plt>

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

LLVM IR (-O2):
define void @guild_request_info(i32 %0) {
%2 = tail call i32 @intif_guild_request_info(i32 %0)
ret void
}
void lldt(unsigned int seg) {
  __asm__ volatile("lldt %0" : : "rm"((unsigned short)(seg)));
}


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

x86 assembly (clang, -O2):
<lldt>:
mov    %di,-0x2(%rsp)
lldt   -0x2(%rsp)
ret

LLVM IR (-O0):
define void @lldt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i16
ret void
}

LLVM IR (-O2):
define void @lldt(i32 %0) {
%2 = trunc i32 %0 to i16
tail call void asm sideeffect "lldt $0", "rm,~{dirflag},~{fpsr},~{flags}"(i16 %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int place;
};
struct TYPE_4__ {
  TYPE_1__ xcirculate;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcirculate_place(void *_p, int _v) {
  ((XEvent *)_p)->xcirculate.place = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xcirculate_place>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xcirculate_place(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xcirculate_place(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_setcolumns(int, int);
void j_setcolumns(int arg0, int arg1) { japi_setcolumns(arg0, arg1); }


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

x86 assembly (clang, -O2):
<j_setcolumns>:
jmp    1030 <japi_setcolumns@plt>

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

LLVM IR (-O2):
define void @j_setcolumns(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setcolumns(i32 %0, i32 %1)
ret void
}
void *nopPtr0(void) { return 0; }


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

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

LLVM IR (-O0):
define i8* @nopPtr0() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @nopPtr0() {
ret i8* null
}
/* Variables and functions */
int strlen(char *);
int get_header_length(char *_header_line) {
  int header_len;
  header_len = strlen(_header_line);
  return header_len;
}


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

x86 assembly (clang, -O2):
<get_header_length>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @get_header_length(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void do_audio() {
  fprintf(stderr, "Unsupported audio system in audiolib.c: no soundcard.hn");
}


x86 assembly (clang, -O0):
<do_audio>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_audio>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"Unsupported audio system in audiolib.c: no soundcard.hn\00"
define void @do_audio() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"Unsupported audio system in audiolib.c: no soundcard.hn\00"
define void @do_audio() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Mem_Free(void *, int, int /*<<< orphan*/, char const *,
                             int);
void Com_ScriptModule_MemFree(void *data, const char *filename, int fileline) {
  _Mem_Free(data, 64, 0, filename, fileline);
}


x86 assembly (clang, -O0):
<Com_ScriptModule_MemFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x40,%esi
xor    %edx,%edx
call   1030 <_Mem_Free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Com_ScriptModule_MemFree>:
mov    %edx,%r8d
mov    %rsi,%rcx
mov    $0x40,%esi
xor    %edx,%edx
jmp    1030 <_Mem_Free@plt>

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

LLVM IR (-O2):
define void @Com_ScriptModule_MemFree(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_Mem_Free(i8* %0, i32 64, i32 0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
int strtol(char const *, char **, int);
int atoi_or_die(const char *s, const char *name) {
  char *endptr;
  int base = 10;
  int n = strtol(s, &endptr, base);
  if (*endptr != '\0') {
    printf("%s must be an integer.\n", name);
    exit(-1);
  }
  return (n);
}


x86 assembly (clang, -O0):
<atoi_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    -0x18(%rbp),%rsi
call   1040 <strtol@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1184 <atoi_or_die+0x54>
mov    -0x10(%rbp),%rsi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi_or_die>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    0x8(%rsp),%rcx
cmpb   $0x0,(%rcx)
jne    1157 <atoi_or_die+0x27>
add    $0x10,%rsp
pop    %rbx
ret
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"%s must be an integer.\0A\00"
define i32 @atoi_or_die(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 10, i32* %6
%8 = load i8*, i8** %3
%9 = load i32, i32* %6
%10 = call i32 @strtol(i8* %8, i8** %5, i32 %9)
store i32 %10, i32* %7
%11 = load i8*, i8** %5
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = call i32 @exit(i32 -1)
unreachable
19: ; preds = %2
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
@.str = [24 x i8] c"%s must be an integer.\0A\00"
define i32 @atoi_or_die(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @strtol(i8* %0, i8** %3, i32 10)
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %1)
%11 = tail call i32 @exit(i32 -1)
unreachable
12: ; preds = %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int);
int /*<<< orphan*/ output_byte(int);
void emit_fadd(int r) {
  assem_debug("fadd st%d\n", r);
  output_byte(0xd8);
  output_byte(0xc0 + r);
}


x86 assembly (clang, -O0):
<emit_fadd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd8,%edi
call   1040 <output_byte@plt>
mov    -0x4(%rbp),%edi
add    $0xc0,%edi
call   1040 <output_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fadd>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <assem_debug@plt>
mov    $0xd8,%edi
call   1040 <output_byte@plt>
add    $0xc0,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <output_byte@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"fadd st%d\0A\00"
define void @emit_fadd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @assem_debug(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @output_byte(i32 216)
%6 = load i32, i32* %2
%7 = add nsw i32 192, %6
%8 = call i32 @output_byte(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"fadd st%d\0A\00"
define void @emit_fadd(i32 %0) {
%2 = tail call i32 @assem_debug(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @output_byte(i32 216)
%4 = add nsw i32 %0, 192
%5 = tail call i32 @output_byte(i32 %4)
ret void
}
int SND_FreeOldestSound(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @SND_FreeOldestSound() {
ret i32 0
}
/* Variables and functions */
int CanGetSpeedConfig(int, unsigned long *);
void BootComCanInit(void) {
  unsigned long btr_reg_value;
  (*((volatile unsigned char *)0xE003C000)) = 0x00000002L;
  (*((volatile unsigned long *)0xE0044000)) = 1;
  (*((volatile unsigned long *)0xE0044010)) = 0;
  (*((volatile unsigned long *)0xE0044008)) = 0;
  if (CanGetSpeedConfig((500000) / 1000, &btr_reg_value) == 1) {
    (*((volatile unsigned long *)0xE0044014)) = btr_reg_value;
  }
  (*((volatile unsigned long *)0xE0044000)) = 0;
}


x86 assembly (clang, -O0):
<BootComCanInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xe003c000,%eax
movb   $0x2,(%rax)
mov    $0xe0044000,%eax
movq   $0x1,(%rax)
mov    $0xe0044010,%eax
movq   $0x0,(%rax)
mov    $0xe0044008,%eax
movq   $0x0,(%rax)
mov    $0x1f4,%edi
lea    -0x8(%rbp),%rsi
call   1030 <CanGetSpeedConfig@plt>
cmp    $0x1,%eax
jne    1167 <BootComCanInit+0x57>
mov    -0x8(%rbp),%rcx
mov    $0xe0044014,%eax
mov    %rcx,(%rax)
mov    $0xe0044000,%eax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BootComCanInit>:
push   %rbx
sub    $0x10,%rsp
mov    $0xe0044000,%ebx
movb   $0x2,-0x8000(%rbx)
movq   $0x1,(%rbx)
movq   $0x0,0x10(%rbx)
movq   $0x0,0x8(%rbx)
lea    0x8(%rsp),%rsi
mov    $0x1f4,%edi
call   1030 <CanGetSpeedConfig@plt>
cmp    $0x1,%eax
jne    1155 <BootComCanInit+0x45>
mov    0x8(%rsp),%rax
mov    %rax,0x14(%rbx)
movq   $0x0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @BootComCanInit() {
%1 = alloca i64
store volatile i8 2, i8* inttoptr (i64 3758342144 to i8*)
store volatile i64 1, i64* inttoptr (i64 3758374912 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758374928 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758374920 to i64*)
%2 = call i32 @CanGetSpeedConfig(i32 500, i64* %1)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i64, i64* %1
store volatile i64 %5, i64* inttoptr (i64 3758374932 to i64*)
br label %6
6: ; preds = %4, %0
store volatile i64 0, i64* inttoptr (i64 3758374912 to i64*)
ret void
}

LLVM IR (-O2):
define void @BootComCanInit() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store volatile i8 2, i8* inttoptr (i64 3758342144 to i8*)
store volatile i64 1, i64* inttoptr (i64 3758374912 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758374928 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758374920 to i64*)
%3 = call i32 @CanGetSpeedConfig(i32 500, i64* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i64, i64* %1
store volatile i64 %6, i64* inttoptr (i64 3758374932 to i64*)
br label %7
7: ; preds = %5, %0
store volatile i64 0, i64* inttoptr (i64 3758374912 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void inv_sleep(int mSecs) { usleep(mSecs * 1000); }


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

x86 assembly (clang, -O2):
<inv_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @inv_sleep(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
int my_str_isnum(char *str) {
  int i;
  i = 0;
  while (str[i]) {
    if (str[i] < '0' || str[i] > '9')
      return (0);
    ++i;
  }
  return (1);
}


x86 assembly (clang, -O0):
<my_str_isnum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1165 <my_str_isnum+0x65>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
jl     114b <my_str_isnum+0x4b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jle    1157 <my_str_isnum+0x57>
movl   $0x0,-0x4(%rbp)
jmp    116c <my_str_isnum+0x6c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <my_str_isnum+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_str_isnum>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <my_str_isnum+0x23>
add    $0x1,%rdi
nop
add    $0xc6,%cl
cmp    $0xf5,%cl
jbe    1124 <my_str_isnum+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <my_str_isnum+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @my_str_isnum(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -58
%12 = icmp ult i8 %11, -10
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _HibernateWriteComplete();
void HibernateTamperLock(void) {
  _HibernateWriteComplete();
  (*((volatile uint32_t *)(0x400FC360))) = 0;
  _HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateTamperLock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <_HibernateWriteComplete@plt>
mov    $0x400fc360,%eax
movq   $0x0,(%rax)
mov    $0x0,%al
call   1030 <_HibernateWriteComplete@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateTamperLock>:
push   %rax
xor    %eax,%eax
call   1030 <_HibernateWriteComplete@plt>
movq   $0x0,0x400fc360
xor    %eax,%eax
pop    %rcx
jmp    1030 <_HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateTamperLock() {
%1 = call i32 (...) @_HibernateWriteComplete()
store volatile i64 0, i64* inttoptr (i64 1074774880 to i64*)
%2 = call i32 (...) @_HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateTamperLock() {
%1 = tail call i32 (...) @_HibernateWriteComplete()
store volatile i64 0, i64* inttoptr (i64 1074774880 to i64*)
%2 = tail call i32 (...) @_HibernateWriteComplete()
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr8setBank0(int);
int /*<<< orphan*/ prg32setBank0(int);
void m144_setParams(uint16_t addr, uint8_t val) {
  (void)addr;
  prg32setBank0((val & 3) << 15);
  chr8setBank0((val >> 4) << 13);
}


x86 assembly (clang, -O0):
<m144_setParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0x3,%edi
shl    $0xf,%edi
call   1030 <prg32setBank0@plt>
mov    -0x8(%rbp),%edi
sar    $0x4,%edi
shl    $0xd,%edi
call   1040 <chr8setBank0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m144_setParams>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%edi
and    $0x3,%edi
shl    $0xf,%edi
call   1030 <prg32setBank0@plt>
and    $0xfffffff0,%ebx
shl    $0x9,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <chr8setBank0@plt>

LLVM IR (-O0):
define void @m144_setParams(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %6, 3
%8 = shl i32 %7, 15
%9 = call i32 @prg32setBank0(i32 %8)
%10 = load i32, i32* %4
%11 = ashr i32 %10, 4
%12 = shl i32 %11, 13
%13 = call i32 @chr8setBank0(i32 %12)
ret void
}

LLVM IR (-O2):
define void @m144_setParams(i32 %0, i32 %1) {
%3 = shl i32 %1, 15
%4 = and i32 %3, 98304
%5 = tail call i32 @prg32setBank0(i32 %4)
%6 = shl i32 %1, 9
%7 = and i32 %6, -8192
%8 = tail call i32 @chr8setBank0(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_post_solib(void) {
  printf("This is a \"post/solib\" target.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"This is a \22post/solib\22 target.\0A\00"
define i32 @test_post_solib() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [31 x i8] c"This is a \22post/solib\22 target.\00"
define i32 @test_post_solib() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Log_Print(char *);
void ThreadSetupLock(void) { Log_Print("no multi-threading\n"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"no multi-threading\0A\00"
define void @ThreadSetupLock() {
%1 = call i32 @Log_Print(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"no multi-threading\0A\00"
define void @ThreadSetupLock() {
%1 = tail call i32 @Log_Print(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void baz() { bar(); }


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

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

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

LLVM IR (-O2):
define void @baz() {
%1 = tail call i32 (...) @bar()
ret void
}
void __attribute__((always_)) f8(void) {}


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

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

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

LLVM IR (-O2):
define void @f8() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long file_size(FILE *f) {
  long savedPos = ftell(f);
  fseek(f, 0, SEEK_END);
  long size = ftell(f);
  fseek(f, savedPos, SEEK_SET);
  return (size);
}


x86 assembly (clang, -O0):
<file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_size>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @file_size(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i64, i64* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %4
ret i64 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @file_size(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
/* Variables and functions */
scalar_t__ _stdarg(char *);
int main(int argc, char *argv[]) {
  int ret = 0;
  (void)argc;
  ret += _stdarg(argv[0]);
  return (ret == 0) ? 0 : 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <_stdarg@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    $0x2,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rdi
call   1030 <_stdarg@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
add    %ecx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i64 @_stdarg(i8* %10)
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = add nsw i64 %13, %11
%15 = trunc i64 %14 to i32
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 0, i32 2
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i64 @_stdarg(i8* %3)
%5 = trunc i64 %4 to i32
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 0, i32 2
ret i32 %7
}