xunge/DecIR huggingface dataset:
void tegra_bpmp_mail_return(int ch, int code, int v) {}


x86 assembly (clang, -O0):
<tegra_bpmp_mail_return>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @tegra_bpmp_mail_return(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @tegra_bpmp_mail_return(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int randM();
int randBound(int min, int max) { return randM() % (max - min) + min; }


x86 assembly (clang, -O0):
<randBound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <randM@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randBound>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <randM@plt>
sub    %ebp,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @randBound(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @randM()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = srem i32 %5, %8
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @randBound(i32 %0, i32 %1) {
%3 = tail call i32 (...) @randM()
%4 = sub nsw i32 %1, %0
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
void threaten(struct battle_char *origin, struct battle_char *target) {}


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

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

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

LLVM IR (-O2):
%struct.battle_char = type opaque
define void @threaten(%struct.battle_char* nocapture %0, %struct.battle_char* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *path_absolute(char const *);
char *path_real_rec(char *, int *);
char *path_real(const char *orig) {
  int links = 0;
  char *tmp, *ret;
  if (orig == NULL)
    return NULL;
  if ((tmp = path_absolute(orig)) == NULL)
    return NULL;
  ret = path_real_rec(tmp, &links);
  free(tmp);
  return ret;
}


x86 assembly (clang, -O0):
<path_real>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <path_real+0x2b>
movq   $0x0,-0x8(%rbp)
jmp    11a1 <path_real+0x71>
mov    -0x10(%rbp),%rdi
call   1040 <path_absolute@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    117f <path_real+0x4f>
movq   $0x0,-0x8(%rbp)
jmp    11a1 <path_real+0x71>
mov    -0x20(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <path_real_rec@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_real>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
test   %rdi,%rdi
je     1168 <path_real+0x38>
call   1040 <path_absolute@plt>
test   %rax,%rax
je     1168 <path_real+0x38>
mov    %rax,%rbx
lea    0x4(%rsp),%rsi
mov    %rax,%rdi
call   1050 <path_real_rec@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
jmp    116b <path_real+0x3b>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @path_real(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = icmp eq i8* %0, null
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = tail call i8* @path_absolute(i8* %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = call i8* @path_real_rec(i8* %6, i32* %2)
%10 = call i32 @free(i8* %6)
br label %11
11: ; preds = %5, %1, %8
%12 = phi i8* [ %9, %8 ], [ null, %1 ], [ null, %5 ]
ret i8* %12
}
void genc_ngt_d() {}


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

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

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

LLVM IR (-O2):
define void @genc_ngt_d() {
ret void
}
/* Variables and functions */
int look_for_symbol(void *, char *);
int detect_cuda(void *handle) { return look_for_symbol(handle, "cudaLaunch"); }


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

x86 assembly (clang, -O2):
<detect_cuda>:
lea    0xee9(%rip),%rsi
jmp    1030 <look_for_symbol@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"cudaLaunch\00"
define i32 @detect_cuda(i8* %0) {
%2 = tail call i32 @look_for_symbol(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void main() {
  time_t tm;
  time(&tm);
  printf("%s\n", ctime(&tm));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1050 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1030 <ctime@plt>
lea    0xeaf(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @time(i32* %1)
%3 = call i8* @ctime(i32* %1)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call i8* @ctime(i32* %1)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
float tanf(float);
void sTan_process(float bIn, float *bOut) { *bOut = tanf(bIn); }


x86 assembly (clang, -O0):
<sTan_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <tanf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sTan_process>:
push   %rbx
mov    %rdi,%rbx
call   1030 <tanf@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @sTan_process(float %0, float* nocapture writeonly %1) {
%3 = tail call float @tanf(float %0)
store float %3, float* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dt_free_align(unsigned int *);
void free_tea_states(unsigned int *states) { dt_free_align(states); }


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

x86 assembly (clang, -O2):
<free_tea_states>:
jmp    1030 <dt_free_align@plt>

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

LLVM IR (-O2):
define void @free_tea_states(i32* %0) {
%2 = tail call i32 @dt_free_align(i32* %0)
ret void
}
/* Variables and functions */
int _amd_erase8(long, int, int);
int amd_erase8(long base, int offset) { return _amd_erase8(base, offset, 1); }


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

x86 assembly (clang, -O2):
<amd_erase8>:
mov    $0x1,%edx
jmp    1030 <_amd_erase8@plt>

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

LLVM IR (-O2):
define i32 @amd_erase8(i64 %0, i32 %1) {
%3 = tail call i32 @_amd_erase8(i64 %0, i32 %1, i32 1)
ret i32 %3
}
int getVal(char c) {
  int rtVal = 0;
  if (c >= '0' && c <= '9') {
    rtVal = c - '0';
  } else {
    rtVal = c - 'A' + 10;
  }
  return rtVal;
}


x86 assembly (clang, -O0):
<getVal>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     113a <getVal+0x3a>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     113a <getVal+0x3a>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <getVal+0x47>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getVal>:
lea    -0x30(%rdi),%ecx
lea    -0x37(%rdi),%edx
lea    -0x30(%rdi),%eax
cmp    $0xa,%cl
cmovae %edx,%eax
ret

LLVM IR (-O0):
define i32 @getVal(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
store i32 %14, i32* %3
br label %20
15: ; preds = %7, %1
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 65
%19 = add nsw i32 %18, 10
store i32 %19, i32* %3
br label %20
20: ; preds = %15, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @getVal(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -48
%4 = icmp ult i8 %3, 10
%5 = select i1 %4, i32 -48, i32 -55
%6 = add nsw i32 %5, %2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void banner() {
  print("Tic Tac Toe for KinOS v0.1 (December 2009)\r\n\n");
  print("Type 'q' in both Row and Column fields anytime to quit\r\n\n");
}


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

x86 assembly (clang, -O2):
<banner>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print@plt>
lea    0xf0a(%rip),%rdi
pop    %rax
jmp    1030 <print@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Tic Tac Toe for KinOS v0.1 (December 2009)\0D\0A\0A\00"
@.str.1 = [58 x i8] c"Type 'q' in both Row and Column fields anytime to quit\0D\0A\0A\00"
define void @banner() {
%1 = call i32 @print(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @print(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"Tic Tac Toe for KinOS v0.1 (December 2009)\0D\0A\0A\00"
@.str.1 = [58 x i8] c"Type 'q' in both Row and Column fields anytime to quit\0D\0A\0A\00"
define void @banner() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LoadScript(void *);
int /*<<< orphan*/ OnLoadComplete();
void *thread_routine1(void *aspt) {
  {
    LoadScript(aspt);
    OnLoadComplete();
  }
}


x86 assembly (clang, -O0):
<thread_routine1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <LoadScript@plt>
mov    $0x0,%al
call   1040 <OnLoadComplete@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_routine1>:
push   %rax
call   1030 <LoadScript@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <OnLoadComplete@plt>

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

LLVM IR (-O2):
define noalias i8* @thread_routine1(i8* %0) {
%2 = tail call i32 @LoadScript(i8* %0)
%3 = tail call i32 (...) @OnLoadComplete()
ret i8* undef
}
/* Type definitions */
struct ooc_vm_area {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ ooc_vma_free(struct ooc_vm_area *const);
void S_sp_node_free(struct ooc_vm_area *const n) {
  int ret;
  ret = 0;
  assert(!ret);
  ooc_vma_free(n);
}


x86 assembly (clang, -O0):
<S_sp_node_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ooc_vma_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_sp_node_free>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <ooc_vma_free@plt>

LLVM IR (-O0):
%struct.ooc_vm_area = type { i32 }
define void @S_sp_node_free(%struct.ooc_vm_area* %0) {
%2 = alloca %struct.ooc_vm_area*
%3 = alloca i32
store %struct.ooc_vm_area* %0, %struct.ooc_vm_area** %2
store i32 0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load %struct.ooc_vm_area*, %struct.ooc_vm_area** %2
%10 = call i32 @ooc_vma_free(%struct.ooc_vm_area* %9)
ret void
}

LLVM IR (-O2):
%struct.ooc_vm_area = type { i32 }
define void @S_sp_node_free(%struct.ooc_vm_area* %0) {
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @ooc_vma_free(%struct.ooc_vm_area* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x43() {
  Assert_real((isodigit(67) == 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_isodigit.c",
              340, ("isodigit should be 0 for C"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x43>:
push   %rax
mov    $0x43,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x154,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for C\00"
define void @t_isodigit_0x43() {
%1 = call i64 @isodigit(i32 67)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 340, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for C\00"
define void @t_isodigit_0x43() {
%1 = tail call i64 @isodigit(i32 67)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 340, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int xmlUCSIsVariationSelectorsSupplement(int code) {
  return (((code >= 0xE0100) && (code <= 0xE01EF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsVariationSelectorsSupplement>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xe0100,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsVariationSelectorsSupplement+0x26>
cmpl   $0xe01ef,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsVariationSelectorsSupplement>:
add    $0xfff1ff00,%edi
xor    %eax,%eax
cmp    $0xf0,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsVariationSelectorsSupplement(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 917760
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 917999
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsVariationSelectorsSupplement(i32 %0) {
%2 = add i32 %0, -917760
%3 = icmp ult i32 %2, 240
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int PTHREAD_PRIO_NONE;
void test_PTHREAD_PRIO_NONE(void) {
  int dummy = PTHREAD_PRIO_NONE;
  (void)dummy;
}


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

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

LLVM IR (-O0):
@PTHREAD_PRIO_NONE = global i32 0
define void @test_PTHREAD_PRIO_NONE() {
%1 = alloca i32
%2 = load i32, i32* @PTHREAD_PRIO_NONE
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret void
}

LLVM IR (-O2):
@PTHREAD_PRIO_NONE = global i32 0
define void @test_PTHREAD_PRIO_NONE() {
ret void
}
/* Type definitions */
struct bkey {
  int dummy;
};
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
struct bkey *bkey_last(const struct bkey *k, unsigned nr_keys) {
  __u64 *d = (void *)k;
  return (struct bkey *)(d + nr_keys);
}


x86 assembly (clang, -O0):
<bkey_last>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bkey_last>:
mov    %esi,%eax
lea    (%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
%struct.bkey = type { i32 }
define %struct.bkey* @bkey_last(%struct.bkey* %0, i32 %1) {
%3 = alloca %struct.bkey*
%4 = alloca i32
%5 = alloca i32*
store %struct.bkey* %0, %struct.bkey** %3
store i32 %1, i32* %4
%6 = load %struct.bkey*, %struct.bkey** %3
%7 = bitcast %struct.bkey* %6 to i8*
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = bitcast i32* %12 to %struct.bkey*
ret %struct.bkey* %13
}

LLVM IR (-O2):
%struct.bkey = type { i32 }
define %struct.bkey* @bkey_last(%struct.bkey* readnone %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr inbounds %struct.bkey, %struct.bkey* %0, i64 %3, i32 0
%5 = bitcast i32* %4 to %struct.bkey*
ret %struct.bkey* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ InitApp();
int /*<<< orphan*/ Run_Game_Tasks();
int32_t main(void) {
  InitApp();
  Run_Game_Tasks();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <InitApp@plt>
mov    $0x0,%al
call   1040 <Run_Game_Tasks@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <InitApp@plt>
xor    %eax,%eax
call   1040 <Run_Game_Tasks@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @InitApp()
%2 = call i32 (...) @Run_Game_Tasks()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @InitApp()
%2 = tail call i32 (...) @Run_Game_Tasks()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ checked_free(char *);
char *getCurrentLevelDir();
char *getPath2(char *, char *);
char *getSolutionTapeDir() {
  static char *tape_dir = NULL;
  char *data_dir = getCurrentLevelDir();
  char *tape_subdir = "tapes";
  checked_free(tape_dir);
  tape_dir = getPath2(data_dir, tape_subdir);
  return tape_dir;
}


x86 assembly (clang, -O0):
<getSolutionTapeDir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getCurrentLevelDir@plt>
mov    %rax,-0x8(%rbp)
lea    0xeb6(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0x2eeb(%rip),%rdi
call   1040 <checked_free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <getPath2@plt>
mov    %rax,0x2ed2(%rip)
mov    0x2ecb(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSolutionTapeDir>:
push   %rbx
xor    %eax,%eax
call   1050 <getCurrentLevelDir@plt>
mov    %rax,%rbx
mov    0x2efe(%rip),%rdi
call   1040 <checked_free@plt>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <getPath2@plt>
mov    %rax,0x2ee3(%rip)
pop    %rbx
ret

LLVM IR (-O0):
@getSolutionTapeDir.tape_dir = internal global i8* null
@.str = [6 x i8] c"tapes\00"
define i8* @getSolutionTapeDir() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* (...) @getCurrentLevelDir()
store i8* %3, i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
%4 = load i8*, i8** @getSolutionTapeDir.tape_dir
%5 = call i32 @checked_free(i8* %4)
%6 = load i8*, i8** %1
%7 = load i8*, i8** %2
%8 = call i8* @getPath2(i8* %6, i8* %7)
store i8* %8, i8** @getSolutionTapeDir.tape_dir
%9 = load i8*, i8** @getSolutionTapeDir.tape_dir
ret i8* %9
}

LLVM IR (-O2):
@getSolutionTapeDir.tape_dir = internal unnamed_addr global i8* null
@.str = [6 x i8] c"tapes\00"
define i8* @getSolutionTapeDir() {
%1 = tail call i8* (...) @getCurrentLevelDir()
%2 = load i8*, i8** @getSolutionTapeDir.tape_dir
%3 = tail call i32 @checked_free(i8* %2)
%4 = tail call i8* @getPath2(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** @getSolutionTapeDir.tape_dir
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: mmap_truncate [-c csize_bits] [-s seconds] FILE\n\n"
         "Stress file system stability by testing end of file boundary\n"
         "conditions with mmap by racing truncates and writes to a\n"
         "shared writeable region.\n\n"
         "FILE\ta path to a file that will be created and truncated if "
         "it already exists.\n"
         "-c\tsets the fs clustersize used by the test.\n"
         "\tThe default is to use a csize_bits of 12 (4096 bytes).\n"
         "-s\tsets the number of seconds to run the test.\n"
         "\tThe default is to run for 300 seconds.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [468 x i8] c"Usage: mmap_truncate [-c csize_bits] [-s seconds] FILE\0A\0AStress file system stability by testing end of file boundary\0Aconditions with mmap by racing truncates and writes to a\0Ashared writeable region.\0A\0AFILE\09a path to a file that will be created and truncated if it already exists.\0A-c\09sets the fs clustersize used by the test.\0A\09The default is to use a csize_bits of 12 (4096 bytes).\0A-s\09sets the number of seconds to run the test.\0A\09The default is to run for 300 seconds.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([468 x i8], [468 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [467 x i8] c"Usage: mmap_truncate [-c csize_bits] [-s seconds] FILE\0A\0AStress file system stability by testing end of file boundary\0Aconditions with mmap by racing truncates and writes to a\0Ashared writeable region.\0A\0AFILE\09a path to a file that will be created and truncated if it already exists.\0A-c\09sets the fs clustersize used by the test.\0A\09The default is to use a csize_bits of 12 (4096 bytes).\0A-s\09sets the number of seconds to run the test.\0A\09The default is to run for 300 seconds.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([467 x i8], [467 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void error(const char *message, int code) {
  fprintf(stderr, "%s\n", message);
  exit(code);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(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 i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %4
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @exit(i32 %1)
unreachable
}
int gcd(int n, int m) {
  if (n % m == 0)
    return (n < m) ? n : m;
  else
    return gcd(m, n % m);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1156 <gcd+0x46>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1145 <gcd+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114b <gcd+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116a <gcd+0x5a>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edx,%ecx
mov    %edi,%esi
mov    %edi,%eax
cltd
idiv   %ecx
mov    %ecx,%edi
test   %edx,%edx
jne    1110 <gcd+0x10>
cmp    %ecx,%esi
cmovl  %esi,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %5, %3 ]
%5 = phi i32 [ %1, %2 ], [ %6, %3 ]
%6 = srem i32 %4, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = icmp slt i32 %4, %5
%10 = select i1 %9, i32 %4, i32 %5
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ rw_css();
void rw_head() {
  printf("\t<head>\n");
  rw_css();
  printf("\t\t<title>Resources</title>\n");
  printf("\t</head>\n");
}


x86 assembly (clang, -O0):
<rw_head>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <rw_css@plt>
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rw_head>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <rw_css@plt>
lea    0xecd(%rip),%rdi
call   1040 <puts@plt>
lea    0xedc(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\09<head>\0A\00"
@.str.1 = [28 x i8] c"\09\09<title>Resources</title>\0A\00"
@.str.2 = [10 x i8] c"\09</head>\0A\00"
define void @rw_head() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @rw_css()
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"\09<head>\00"
@str.3 = [27 x i8] c"\09\09<title>Resources</title>\00"
@str.4 = [9 x i8] c"\09</head>\00"
define void @rw_head() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @rw_css()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.4, i64 0, i64 0))
ret void
}
void ARGBToRAWRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToRAWRow_NEON() {
ret void
}
/* Variables and functions */
unsigned int cdb_hashadd(unsigned int, int /*<<< orphan*/);
unsigned int cdb_hash(const char *buf, unsigned int len) {
  unsigned int h = 5381;
  while (len--)
    h = cdb_hashadd(h, *buf++);
  return h;
}


x86 assembly (clang, -O0):
<cdb_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1505,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     115c <cdb_hash+0x4c>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%esi
call   1030 <cdb_hashadd@plt>
mov    %eax,-0x10(%rbp)
jmp    1126 <cdb_hash+0x16>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdb_hash>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1147 <cdb_hash+0x37>
mov    %rdi,%r14
mov    %esi,%r15d
mov    $0x1505,%eax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%esi
mov    %eax,%edi
call   1030 <cdb_hashadd@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <cdb_hash+0x20>
jmp    114c <cdb_hash+0x3c>
mov    $0x1505,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @cdb_hash(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %12, %4 ], [ 5381, %2 ]
%6 = phi i32 [ %8, %4 ], [ %1, %2 ]
%7 = phi i8* [ %9, %4 ], [ %0, %2 ]
%8 = add i32 %6, -1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %7
%11 = sext i8 %10 to i32
%12 = tail call i32 @cdb_hashadd(i32 %5, i32 %11)
%13 = icmp eq i32 %8, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %2
%15 = phi i32 [ 5381, %2 ], [ %12, %4 ]
ret i32 %15
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char str[10] = "01:02:03";
  char *str1 = str + 3;
  int x = atoi(str1);
  printf("x = %d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xec7(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xe(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.str = [10 x i8] c"01:02:03\00\00"
@.str = [8 x i8] c"x = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [10 x i8]* %2 to i8*
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds i8, i8* %6, i64 3
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @atoi(i8* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [10 x i8] c"01:02:03\00\00"
@.str = [8 x i8] c"x = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @atoi(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__const.main.str, i64 0, i64 3))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uintmax_t;

/* Variables and functions */
int CHAR_BIT;
int UINTMAX_C(int);
unsigned int UINTMAX_MAX;
unsigned bit_mask2(unsigned bits) {
  if (bits >= CHAR_BIT * sizeof(uintmax_t))
    return UINTMAX_C(-1);
  else
    return ~(UINTMAX_MAX << bits);
}


x86 assembly (clang, -O0):
<bit_mask2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2eb3(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
cmp    %rcx,%rax
jb     1147 <bit_mask2+0x37>
mov    $0xffffffff,%edi
call   1030 <UINTMAX_C@plt>
mov    %eax,-0x4(%rbp)
jmp    115b <bit_mask2+0x4b>
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_mask2>:
mov    %edi,%eax
mov    0x2ebf(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
cmp    %rax,%rcx
jbe    1135 <bit_mask2+0x25>
mov    0x2ec4(%rip),%rax
mov    (%rax),%eax
mov    %edi,%ecx
shl    %cl,%eax
not    %eax
ret
mov    $0xffffffff,%edi
jmp    1030 <UINTMAX_C@plt>

LLVM IR (-O0):
@CHAR_BIT = global i32 0
@UINTMAX_MAX = global i32 0
define i32 @bit_mask2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = zext i32 %4 to i64
%6 = load i32, i32* @CHAR_BIT
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 4
%9 = icmp uge i64 %5, %8
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @UINTMAX_C(i32 -1)
store i32 %11, i32* %2
br label %17
12: ; preds = %1
%13 = load i32, i32* @UINTMAX_MAX
%14 = load i32, i32* %3
%15 = shl i32 %13, %14
%16 = xor i32 %15, -1
store i32 %16, i32* %2
br label %17
17: ; preds = %12, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
@UINTMAX_MAX = global i32 0
define i32 @bit_mask2(i32 %0) {
%2 = zext i32 %0 to i64
%3 = load i32, i32* @CHAR_BIT
%4 = sext i32 %3 to i64
%5 = shl nsw i64 %4, 2
%6 = icmp ugt i64 %5, %2
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @UINTMAX_C(i32 -1)
br label %13
9: ; preds = %1
%10 = load i32, i32* @UINTMAX_MAX
%11 = shl i32 %10, %0
%12 = xor i32 %11, -1
br label %13
13: ; preds = %9, %7
%14 = phi i32 [ %8, %7 ], [ %12, %9 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void printUsage(void) {
  puts("Usage:\n"
       "\tsimuBestop numSimulations processOrNot numProcess\n"
       "\teg. Simulate 1234 with 4 processes\n"
       "\tsimuBestop 1234 p 4\n"
       "\teg. Simulate 1234 sequentially (1 process)\n"
       "\tsimuBestop 1234 s");
}


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

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

LLVM IR (-O0):
@.str = [178 x i8] c"Usage:\0A\09simuBestop numSimulations processOrNot numProcess\0A\09eg. Simulate 1234 with 4 processes\0A\09simuBestop 1234 p 4\0A\09eg. Simulate 1234 sequentially (1 process)\0A\09simuBestop 1234 s\00"
define void @printUsage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [178 x i8] c"Usage:\0A\09simuBestop numSimulations processOrNot numProcess\0A\09eg. Simulate 1234 with 4 processes\0A\09simuBestop 1234 p 4\0A\09eg. Simulate 1234 sequentially (1 process)\0A\09simuBestop 1234 s\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double fabs(double);
double sqrt(double);
double distance(double x1, double y1, double x2, double y2) {
  double s;
  s = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  s = fabs(s);
  return s;
}


x86 assembly (clang, -O0):
<distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movaps 0xe8a(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance>:
push   %rax
subsd  %xmm2,%xmm0
subsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1135 <distance+0x25>
sqrtsd %xmm0,%xmm0
jmp    113a <distance+0x2a>
call   1030 <sqrt@plt>
andpd  0xebe(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @distance(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%10 = load double, double* %5
%11 = load double, double* %7
%12 = fsub double %10, %11
%13 = load double, double* %5
%14 = load double, double* %7
%15 = fsub double %13, %14
%16 = load double, double* %6
%17 = load double, double* %8
%18 = fsub double %16, %17
%19 = load double, double* %6
%20 = load double, double* %8
%21 = fsub double %19, %20
%22 = fmul double %18, %21
%23 = call double @llvm.fmuladd.f64(double %12, double %15, double %22)
%24 = call double @sqrt(double %23)
store double %24, double* %9
%25 = load double, double* %9
%26 = call double @llvm.fabs.f64(double %25)
store double %26, double* %9
%27 = load double, double* %9
ret double %27
}

LLVM IR (-O2):
define double @distance(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %2
%6 = fsub double %1, %3
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %7)
%9 = tail call double @sqrt(double %8)
%10 = tail call double @llvm.fabs.f64(double %9)
ret double %10
}
void test9(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ checkbit(int /*<<< orphan*/, int);
int /*<<< orphan*/ read_byte_data(int, int);
uint8_t io_get_interrupt_polarity() {
  return checkbit(read_byte_data(0x20, 0x0A), 1);
}


x86 assembly (clang, -O0):
<io_get_interrupt_polarity>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0xa,%esi
call   1030 <read_byte_data@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <checkbit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_get_interrupt_polarity>:
push   %rax
mov    $0x20,%edi
mov    $0xa,%esi
call   1030 <read_byte_data@plt>
mov    %eax,%edi
mov    $0x1,%esi
pop    %rax
jmp    1040 <checkbit@plt>

LLVM IR (-O0):
define i32 @io_get_interrupt_polarity() {
%1 = call i32 @read_byte_data(i32 32, i32 10)
%2 = call i32 @checkbit(i32 %1, i32 1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @io_get_interrupt_polarity() {
%1 = tail call i32 @read_byte_data(i32 32, i32 10)
%2 = tail call i32 @checkbit(i32 %1, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closeConnection(int sockfd) { close(sockfd); }


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

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

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

LLVM IR (-O2):
define void @closeConnection(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
void init_nodeinfo_ipv6addr(int forced) {
  do {
    ;
  } while (0);
  return;
}


x86 assembly (clang, -O0):
<init_nodeinfo_ipv6addr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    110c <init_nodeinfo_ipv6addr+0xc>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @init_nodeinfo_ipv6addr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
br label %4
4: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @init_nodeinfo_ipv6addr(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
int UINT64_C(int);
uint64_t vid_to_vdi_oid(uint32_t vid) {
  return (UINT64_C(1) << 63) | ((uint64_t)vid << 32);
}


x86 assembly (clang, -O0):
<vid_to_vdi_oid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <UINT64_C@plt>
mov    $0x3f,%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%rcx
mov    %ecx,%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vid_to_vdi_oid>:
mov    $0x1,%edi
jmp    1030 <UINT64_C@plt>

LLVM IR (-O0):
define i32 @vid_to_vdi_oid(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @UINT64_C(i32 1)
%4 = shl i32 %3, 63
%5 = load i64, i64* %2
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 32
%8 = or i32 %4, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @vid_to_vdi_oid(i64 %0) {
%2 = tail call i32 @UINT64_C(i32 1)
ret i32 poison
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void print4CharCode(uint32_t code) {
  uint8_t b1 = (code & 0xff000000) >> 24;
  uint8_t b2 = (code & 0x00ff0000) >> 16;
  uint8_t b3 = (code & 0x0000ff00) >> 8;
  uint8_t b4 = (code & 0x000000ff);
  printf("%c%c%c%c", b1, b2, b3, b4);
}


x86 assembly (clang, -O0):
<print4CharCode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff0000,%eax
sar    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print4CharCode>:
mov    %edi,%eax
mov    %edi,%edx
movzbl %ah,%ecx
movzbl %al,%r8d
shr    $0x18,%eax
shr    $0x10,%edx
movzbl %dl,%edx
lea    0xed5(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%c%c%c%c\00"
define void @print4CharCode(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* %2
%8 = and i32 %7, -16777216
%9 = lshr i32 %8, 24
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = ashr i32 %11, 16
store i32 %12, i32* %4
%13 = load i32, i32* %2
%14 = and i32 %13, 65280
%15 = ashr i32 %14, 8
store i32 %15, i32* %5
%16 = load i32, i32* %2
%17 = and i32 %16, 255
store i32 %17, i32* %6
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = load i32, i32* %6
%22 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %19, i32 %20, i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%c%c%c%c\00"
define void @print4CharCode(i32 %0) {
%2 = lshr i32 %0, 24
%3 = lshr i32 %0, 16
%4 = and i32 %3, 255
%5 = lshr i32 %0, 8
%6 = and i32 %5, 255
%7 = and i32 %0, 255
%8 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 %6, i32 %7)
ret void
}