xunge/DecIR huggingface dataset:
/* Variables and functions */
uintptr_t minuptr(uintptr_t a, uintptr_t b) { return ((a) < (b) ? (a) : (b)); }


x86 assembly (clang, -O0):
<minuptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <minuptr+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <minuptr+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minuptr>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @minuptr(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 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @minuptr(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void tests_delete_file(const char *file_name) {
  tests_test((unlink(file_name) != -1), __func__,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/carlos-wong/a380_kernel/refs/heads/"
             "master/OnlineUpgradeFilesystem/mtd-utils/mtd-utils-20080508/"
             "tests/fs-tests/lib/tests.c",
             550);
  tests_sync_directory(file_name);
}


x86 assembly (clang, -O0):
<tests_delete_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <unlink@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
lea    0xea7(%rip),%rsi
lea    0xeb2(%rip),%rdx
mov    $0x226,%ecx
mov    $0x0,%al
call   1050 <tests_test@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <tests_sync_directory@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tests_delete_file>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <unlink@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
setne  %dil
lea    0xeb5(%rip),%rsi
lea    0xec0(%rip),%rdx
mov    $0x226,%ecx
xor    %eax,%eax
call   1050 <tests_test@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <tests_sync_directory@plt>

LLVM IR (-O0):
@__func__.tests_delete_file = [18 x i8] c"tests_delete_file\00"
@.str = [212 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/carlos-wong/a380_kernel/refs/heads/master/OnlineUpgradeFilesystem/mtd-utils/mtd-utils-20080508/tests/fs-tests/lib/tests.c\00"
define void @tests_delete_file(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %3)
%5 = icmp ne i32 %4, -1
%6 = zext i1 %5 to i32
%7 = call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @tests_test to i32 (i32, i8*, i8*, i32, ...)*)(i32 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.tests_delete_file, i64 0, i64 0), i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i64 0, i64 0), i32 550)
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @tests_sync_directory to i32 (i8*, ...)*)(i8* %8)
ret void
}

LLVM IR (-O2):
@__func__.tests_delete_file = [18 x i8] c"tests_delete_file\00"
@.str = [212 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/carlos-wong/a380_kernel/refs/heads/master/OnlineUpgradeFilesystem/mtd-utils/mtd-utils-20080508/tests/fs-tests/lib/tests.c\00"
define void @tests_delete_file(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %0)
%3 = icmp ne i32 %2, -1
%4 = zext i1 %3 to i32
%5 = tail call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @tests_test to i32 (i32, i8*, i8*, i32, ...)*)(i32 %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.tests_delete_file, i64 0, i64 0), i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i64 0, i64 0), i32 550)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tests_sync_directory to i32 (i8*, ...)*)(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disp_ctl_fini();
void disp_fini(void) { disp_ctl_fini(); }


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

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

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

LLVM IR (-O2):
define void @disp_fini() {
%1 = tail call i32 (...) @disp_ctl_fini()
ret void
}
int gcd_modrec(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd_modrec(b, a % b);
}


x86 assembly (clang, -O0):
<gcd_modrec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1133 <gcd_modrec+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <gcd_modrec+0x37>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd_modrec@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd_modrec>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd_modrec+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd_modrec+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd_modrec(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* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
store i32 %9, i32* %3
br label %16
10: ; preds = %2
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = srem i32 %12, %13
%15 = call i32 @gcd_modrec(i32 %11, i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %10, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @gcd_modrec(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
/* Variables and functions */
int _is_node_ptr(uintptr_t p) { return p & 1; }


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

x86 assembly (clang, -O2):
<_is_node_ptr>:
mov    %rdi,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @_is_node_ptr(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 1
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @_is_node_ptr(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("!!!Hello Doug!!!");
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"!!!Hello Doug!!!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@.str = [17 x i8] c"!!!Hello Doug!!!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
int rand_gen_int(int min, int max) {
  int diff = 1 + max - min;
  int rnd = (int)((((double)rand() / ((double)RAND_MAX + 1)) * diff) + min);
  return rnd;
}


x86 assembly (clang, -O0):
<rand_gen_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eab(%rip),%rax
cvtsi2sdq (%rax),%xmm1
movsd  0xeb6(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm2
cvtsi2sdl -0x4(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_gen_int>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
sub    %edi,%ebx
add    $0x1,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eb9(%rip),%rax
cvtsi2sdq (%rax),%xmm1
addsd  0xec4(%rip),%xmm1
divsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
cvtsi2sd %ebp,%xmm2
mulsd  %xmm0,%xmm1
addsd  %xmm1,%xmm2
cvttsd2si %xmm2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define i32 @rand_gen_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = add nsw i32 1, %7
%9 = load i32, i32* %3
%10 = sub nsw i32 %8, %9
store i32 %10, i32* %5
%11 = call i64 (...) @rand()
%12 = sitofp i64 %11 to double
%13 = load i64, i64* @RAND_MAX
%14 = sitofp i64 %13 to double
%15 = fadd double %14, 1.000000e+00
%16 = fdiv double %12, %15
%17 = load i32, i32* %5
%18 = sitofp i32 %17 to double
%19 = load i32, i32* %3
%20 = sitofp i32 %19 to double
%21 = call double @llvm.fmuladd.f64(double %16, double %18, double %20)
%22 = fptosi double %21 to i32
store i32 %22, i32* %6
%23 = load i32, i32* %6
ret i32 %23
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define i32 @rand_gen_int(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = tail call i64 (...) @rand()
%6 = sitofp i64 %5 to double
%7 = load i64, i64* @RAND_MAX
%8 = sitofp i64 %7 to double
%9 = fadd double %8, 1.000000e+00
%10 = fdiv double %6, %9
%11 = sitofp i32 %4 to double
%12 = sitofp i32 %0 to double
%13 = tail call double @llvm.fmuladd.f64(double %10, double %11, double %12)
%14 = fptosi double %13 to i32
ret i32 %14
}
/* Type definitions */
struct cpufreq_available_frequencies {
  int dummy;
};

/* Variables and functions */
struct cpufreq_available_frequencies *
sysfs_get_available_frequencies(unsigned int cpu) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.cpufreq_available_frequencies = type { i32 }
define %struct.cpufreq_available_frequencies* @sysfs_get_available_frequencies(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret %struct.cpufreq_available_frequencies* null
}

LLVM IR (-O2):
%struct.cpufreq_available_frequencies = type { i32 }
define noalias %struct.cpufreq_available_frequencies* @sysfs_get_available_frequencies(i32 %0) {
ret %struct.cpufreq_available_frequencies* null
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct entry_list_link {
  int dummy;
};
struct entry_list {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_tail(struct genlist const *);
struct entry_list_link *entry_list_tail(const struct entry_list *tthis) {
  return (struct entry_list_link *)genlist_tail((const struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<entry_list_tail>:
jmp    1030 <genlist_tail@plt>

LLVM IR (-O0):
%struct.entry_list_link = type { i32 }
%struct.entry_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.entry_list_link* @entry_list_tail(%struct.entry_list* %0) {
%2 = alloca %struct.entry_list*
store %struct.entry_list* %0, %struct.entry_list** %2
%3 = load %struct.entry_list*, %struct.entry_list** %2
%4 = bitcast %struct.entry_list* %3 to %struct.genlist*
%5 = call i64 @genlist_tail(%struct.genlist* %4)
%6 = inttoptr i64 %5 to %struct.entry_list_link*
ret %struct.entry_list_link* %6
}

LLVM IR (-O2):
%struct.entry_list_link = type { i32 }
%struct.entry_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.entry_list_link* @entry_list_tail(%struct.entry_list* %0) {
%2 = bitcast %struct.entry_list* %0 to %struct.genlist*
%3 = tail call i64 @genlist_tail(%struct.genlist* %2)
%4 = inttoptr i64 %3 to %struct.entry_list_link*
ret %struct.entry_list_link* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void write_uint8(uint32_t offset, uint8_t value) {}


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

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

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

LLVM IR (-O2):
define void @write_uint8(i32 %0, i32 %1) {
ret void
}
execle(name, args) char *name, *args;
{
  register char **env = &args;
  while (*env++)
    ;
  execve(name, (char **)&args, (char **)*env);
}


x86 assembly (clang, -O0):
<execle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,(%rax)
je     1146 <execle+0x36>
jmp    1128 <execle+0x18>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <execve@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execle>:
push   %rax
mov    %rsi,(%rsp)
test   %rsi,%rsi
je     113f <execle+0x2f>
lea    0x10(%rsp),%rax
xor    %ecx,%ecx
test   %cl,%cl
je     1130 <execle+0x20>
mov    %rax,%rcx
jmp    1144 <execle+0x34>
nopw   0x0(%rax,%rax,1)
lea    0x8(%rax),%rcx
cmpq   $0x0,(%rax)
mov    %rcx,%rax
jne    1130 <execle+0x20>
jmp    1144 <execle+0x34>
lea    0x8(%rsp),%rcx
mov    (%rcx),%rdx
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <execve@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @execle(i8* %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
%4 = getelementptr inbounds i8*, i8** %3, i64 1
%5 = icmp eq i8* %1, null
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %3, i64 2
br i1 undef, label %13, label %8
8: ; preds = %6, %8
%9 = phi i8** [ %11, %8 ], [ %7, %6 ]
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8*, i8** %9, i64 1
%12 = icmp eq i8* %10, null
br i1 %12, label %13, label %8
13: ; preds = %8, %6, %2
%14 = phi i8** [ %4, %2 ], [ %7, %6 ], [ %11, %8 ]
%15 = bitcast i8** %14 to i8***
%16 = load i8**, i8*** %15
%17 = call i32 (i8*, i8**, i8**, ...) bitcast (i32 (...)* @execve to i32 (i8*, i8**, i8**, ...)*)(i8* %0, i8** %3, i8** %16)
ret i32 undef
}
int tamMB(unsigned int nbloques) {
  return ((nbloques / 8) % 1024) ? ((nbloques / 8) / 1024) + 1
                                 : ((nbloques / 8) / 1024);
}


x86 assembly (clang, -O0):
<tamMB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x3,%eax
and    $0x3ff,%eax
cmp    $0x0,%eax
je     112f <tamMB+0x2f>
mov    -0x4(%rbp),%eax
shr    $0x3,%eax
shr    $0xa,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <tamMB+0x3b>
mov    -0x4(%rbp),%eax
shr    $0x3,%eax
shr    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tamMB>:
mov    %edi,%eax
mov    %edi,%ecx
and    $0x1ff8,%ecx
shr    $0xd,%eax
cmp    $0x1,%ecx
sbb    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @tamMB(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = udiv i32 %3, 8
%5 = urem i32 %4, 1024
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* %2
%9 = udiv i32 %8, 8
%10 = udiv i32 %9, 1024
%11 = add i32 %10, 1
br label %16
12: ; preds = %1
%13 = load i32, i32* %2
%14 = udiv i32 %13, 8
%15 = udiv i32 %14, 1024
br label %16
16: ; preds = %12, %7
%17 = phi i32 [ %11, %7 ], [ %15, %12 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @tamMB(i32 %0) {
%2 = and i32 %0, 8184
%3 = icmp ne i32 %2, 0
%4 = lshr i32 %0, 13
%5 = zext i1 %3 to i32
%6 = add nuw nsw i32 %4, %5
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ _dumpBytes(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void dumpBytes(FILE *f, int length) { _dumpBytes(f, length, 0); }


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

x86 assembly (clang, -O2):
<dumpBytes>:
xor    %edx,%edx
jmp    1030 <_dumpBytes@plt>

LLVM IR (-O0):
define void @dumpBytes(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 @_dumpBytes(i32* %5, i32 %6, i32 0)
ret void
}

LLVM IR (-O2):
define void @dumpBytes(i32* %0, i32 %1) {
%3 = tail call i32 @_dumpBytes(i32* %0, i32 %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__41__IO__selectIOFunc();
void Msp430Adc12ImplP__Port61__selectIOFunc(void) {
  HplMsp430GeneralIOP__41__IO__selectIOFunc();
}


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

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

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

LLVM IR (-O2):
define void @Msp430Adc12ImplP__Port61__selectIOFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__41__IO__selectIOFunc()
ret void
}
/* Type definitions */
struct args_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ out_str(char *);
char do_hello(struct args_t *args) {
  out_str("Generated Hello World!");
  return 1;
}


x86 assembly (clang, -O0):
<do_hello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <out_str@plt>
mov    $0x1,%al
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_hello>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <out_str@plt>
mov    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
%struct.args_t = type { i32 }
@.str = [23 x i8] c"Generated Hello World!\00"
define signext i8 @do_hello(%struct.args_t* %0) {
%2 = alloca %struct.args_t*
store %struct.args_t* %0, %struct.args_t** %2
%3 = call i32 @out_str(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i8 1
}

LLVM IR (-O2):
%struct.args_t = type { i32 }
@.str = [23 x i8] c"Generated Hello World!\00"
define signext i8 @do_hello(%struct.args_t* nocapture readnone %0) {
%2 = tail call i32 @out_str(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i8 1
}
/* Variables and functions */
void *malloc(size_t);
void *numa_alloc_local(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<numa_alloc_local>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @numa_alloc_local(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ __no_gpio_code_for_this_architecture__();
int gpio_dir_af(int gpio, int output, int value, int afnum) {
  __no_gpio_code_for_this_architecture__();
  return 0;
}


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

x86 assembly (clang, -O2):
<gpio_dir_af>:
push   %rax
xor    %eax,%eax
call   1030 <__no_gpio_code_for_this_architecture__@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gpio_dir_af(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 (...) @__no_gpio_code_for_this_architecture__()
ret i32 0
}

LLVM IR (-O2):
define i32 @gpio_dir_af(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (...) @__no_gpio_code_for_this_architecture__()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *nm) {
  fprintf(stderr,
          "Usage: %s [-o objname] [-l listname] [-s srecord-file] srcname\n",
          nm);
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [64 x i8] c"Usage: %s [-o objname] [-l listname] [-s srecord-file] srcname\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [64 x i8] c"Usage: %s [-o objname] [-l listname] [-s srecord-file] srcname\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 2)
unreachable
}
/* Type definitions */
struct out {
  int dummy;
};
struct node {
  int dummy;
};
struct module {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_block(struct out *, struct module const *,
                               int /*<<< orphan*/);
int /*<<< orphan*/ subs_first_const(struct node const *);
void print_assert(struct out *out, const struct module *mod,
                  const struct node *node) {
  print_block(out, mod, subs_first_const(node));
}


x86 assembly (clang, -O0):
<print_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <subs_first_const@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1040 <print_block@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_assert>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rdi
call   1030 <subs_first_const@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <print_block@plt>

LLVM IR (-O0):
%struct.out = type { i32 }
%struct.module = type { i32 }
%struct.node = type { i32 }
define void @print_assert(%struct.out* %0, %struct.module* %1, %struct.node* %2) {
%4 = alloca %struct.out*
%5 = alloca %struct.module*
%6 = alloca %struct.node*
store %struct.out* %0, %struct.out** %4
store %struct.module* %1, %struct.module** %5
store %struct.node* %2, %struct.node** %6
%7 = load %struct.out*, %struct.out** %4
%8 = load %struct.module*, %struct.module** %5
%9 = load %struct.node*, %struct.node** %6
%10 = call i32 @subs_first_const(%struct.node* %9)
%11 = call i32 @print_block(%struct.out* %7, %struct.module* %8, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.out = type { i32 }
%struct.module = type { i32 }
%struct.node = type { i32 }
define void @print_assert(%struct.out* %0, %struct.module* %1, %struct.node* %2) {
%4 = tail call i32 @subs_first_const(%struct.node* %2)
%5 = tail call i32 @print_block(%struct.out* %0, %struct.module* %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vul(char *);
int main(int argc, char *argv[]) {
  vul(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <vul@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <vul@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @vul(i8* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @vul(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glb_free(char *);
void glb_free_vec(double *v, int nl, int nh) { glb_free((char *)(v)); }


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

x86 assembly (clang, -O2):
<glb_free_vec>:
jmp    1030 <glb_free@plt>

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

LLVM IR (-O2):
define void @glb_free_vec(double* %0, i32 %1, i32 %2) {
%4 = bitcast double* %0 to i8*
%5 = tail call i32 @glb_free(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ modifyArray(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char a[14] = "Hello, World!";
  printf("Original:\t%s\n", a);
  modifyArray(a);
  printf("Modified:\t%s\n", a);
  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,-0x12(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x12(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
lea    -0x12(%rbp),%rdi
call   1040 <modifyArray@plt>
lea    -0x12(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x21646c726f5720,%rax
mov    %rax,0x6(%rsp)
movabs $0x57202c6f6c6c6548,%rax
2c 20 57
mov    %rax,(%rsp)
lea    0xec5(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <modifyArray@plt>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [14 x i8] c"Hello, World!\00"
@.str = [14 x i8] c"Original:\09%s\0A\00"
@.str.1 = [14 x i8] c"Modified:\09%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
store i32 0, i32* %1
%3 = bitcast [14 x i8]* %2 to i8*
%4 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%7 = call i32 @modifyArray(i8* %6)
%8 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [14 x i8] c"Hello, World!\00"
@.str = [14 x i8] c"Original:\09%s\0A\00"
@.str.1 = [14 x i8] c"Modified:\09%s\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @modifyArray(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_head_licence_snmf();
int /*<<< orphan*/ print_head_snmf();
int /*<<< orphan*/ print_help_snmf();
int /*<<< orphan*/ print_licence_snmf();
int /*<<< orphan*/ print_options(int, char **);
int main(int argc, char *argv[]) {
  print_licence_snmf();
  print_head_licence_snmf();
  print_head_snmf();
  print_help_snmf();
  print_options(argc, argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <print_licence_snmf@plt>
mov    $0x0,%al
call   1050 <print_head_licence_snmf@plt>
mov    $0x0,%al
call   1060 <print_head_snmf@plt>
mov    $0x0,%al
call   1030 <print_help_snmf@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1070 <print_options@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <print_licence_snmf@plt>
xor    %eax,%eax
call   1050 <print_head_licence_snmf@plt>
xor    %eax,%eax
call   1060 <print_head_snmf@plt>
xor    %eax,%eax
call   1030 <print_help_snmf@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1070 <print_options@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @print_licence_snmf()
%7 = call i32 (...) @print_head_licence_snmf()
%8 = call i32 (...) @print_head_snmf()
%9 = call i32 (...) @print_help_snmf()
%10 = load i32, i32* %4
%11 = load i8**, i8*** %5
%12 = call i32 @print_options(i32 %10, i8** %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @print_licence_snmf()
%4 = tail call i32 (...) @print_head_licence_snmf()
%5 = tail call i32 (...) @print_head_snmf()
%6 = tail call i32 (...) @print_help_snmf()
%7 = tail call i32 @print_options(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xf4() {
  Assert_real((islower(244) == 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_islower.c",
              1225, ("islower should be 0 for 0xf4"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xf4>:
push   %rax
mov    $0xf4,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4c9,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xf4\00"
define void @t_islower_0xf4() {
%1 = call i64 @islower(i32 244)
%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 1225, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xf4\00"
define void @t_islower_0xf4() {
%1 = tail call i64 @islower(i32 244)
%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 1225, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pmu_reg_write(int, int);
void pmu_adc_enable() {
  pmu_reg_write(0x3B, ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) |
                       (1 << 5) | (1 << 6) | (1 << 7) | (1 << 8) | (1 << 9) |
                       (1 << 10) | (1 << 11) | (0 << 12) | (1 << 13) |
                       (1 << 14) | (1 << 15) | (1 << 16) | (1 << 17) |
                       (1 << 18) | (0 << 19) | (1 << 20)));
}


x86 assembly (clang, -O0):
<pmu_adc_enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3b,%edi
mov    $0x17efff,%esi
call   1030 <pmu_reg_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_adc_enable>:
mov    $0x3b,%edi
mov    $0x17efff,%esi
jmp    1030 <pmu_reg_write@plt>

LLVM IR (-O0):
define void @pmu_adc_enable() {
%1 = call i32 @pmu_reg_write(i32 59, i32 1568767)
ret void
}

LLVM IR (-O2):
define void @pmu_adc_enable() {
%1 = tail call i32 @pmu_reg_write(i32 59, i32 1568767)
ret void
}
int _isdigit(int c) {
  if (c >= '0' && c <= '9') {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1127 <_isdigit+0x27>
cmpl   $0x39,-0x8(%rbp)
jg     1127 <_isdigit+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <_isdigit+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @_isdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %11
10: ; preds = %6, %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello linux\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello linux\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void irq_wakeup_set(void) {}


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

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

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

LLVM IR (-O2):
define void @irq_wakeup_set() {
ret void
}
int compare_int(const void *i, const void *j) {
  if (*((int *)i) > *((int *)j))
    return 1;
  else if (*((int *)i) == *((int *)j))
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<compare_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    112a <compare_int+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    114f <compare_int+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    1148 <compare_int+0x48>
movl   $0x0,-0x4(%rbp)
jmp    114f <compare_int+0x4f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setne  %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int EXIT_SUCCESS;
int g2(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main(int argc, char **argv) {
  int a = 5;
  int b = 17;
  int c = g2(a - 1, b * 2);
  printf("main: a = %d, b = %d, c = %d\n", a, b, c);
  return EXIT_SUCCESS;
}


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   $0x5,-0x14(%rbp)
movl   $0x11,-0x18(%rbp)
mov    -0x14(%rbp),%edi
sub    $0x1,%edi
mov    -0x18(%rbp),%esi
shl    $0x1,%esi
call   1040 <g2@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x22,%esi
call   1040 <g2@plt>
lea    0xec9(%rip),%rdi
mov    $0x5,%esi
mov    $0x11,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"main: a = %d, b = %d, c = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 5, i32* %6
store i32 17, i32* %7
%9 = load i32, i32* %6
%10 = sub nsw i32 %9, 1
%11 = load i32, i32* %7
%12 = mul nsw i32 %11, 2
%13 = call i32 @g2(i32 %10, i32 %12)
store i32 %13, i32* %8
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i32 %16)
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}

LLVM IR (-O2):
@.str = [30 x i8] c"main: a = %d, b = %d, c = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @g2(i32 4, i32 34)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 5, i32 17, i32 %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Type definitions */
struct stack_impl {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void stack_impl_ops_free(struct stack_impl *stack_impl) {
  printf("stack_impl::free()\n");
}


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

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

LLVM IR (-O0):
%struct.stack_impl = type { i32 }
@.str = [20 x i8] c"stack_impl::free()\0A\00"
define void @stack_impl_ops_free(%struct.stack_impl* %0) {
%2 = alloca %struct.stack_impl*
store %struct.stack_impl* %0, %struct.stack_impl** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.stack_impl = type { i32 }
@str = [19 x i8] c"stack_impl::free()\00"
define void @stack_impl_ops_free(%struct.stack_impl* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *acc_create(unsigned char *, int const);
int /*<<< orphan*/ acc_delete(unsigned char *, int /*<<< orphan*/);
int /*<<< orphan*/ free(unsigned char *);
scalar_t__ malloc(int const);
int main(int argc, char **argv) {
  const int N = 256;
  unsigned char *h;
  void *d;
  h = (unsigned char *)malloc(N);
  d = acc_create(h, N);
  if (!d)
    abort();
  acc_delete(h, 0);
  free(h);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x100,-0x14(%rbp)
mov    $0x100,%edi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100,%esi
call   1050 <acc_create@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    119f <main+0x4f>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x20(%rbp),%rdi
xor    %esi,%esi
call   1070 <acc_delete@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x100,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x100,%esi
call   1050 <acc_create@plt>
test   %rax,%rax
je     1186 <main+0x36>
mov    %rbx,%rdi
xor    %esi,%esi
call   1070 <acc_delete@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 256, i32* %6
%9 = call i64 @malloc(i32 256)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = call i8* @acc_create(i8* %11, i32 256)
store i8* %12, i8** %8
%13 = load i8*, i8** %8
%14 = icmp ne i8* %13, null
br i1 %14, label %17, label %15
15: ; preds = %2
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %2
%18 = load i8*, i8** %7
%19 = call i32 @acc_delete(i8* %18, i32 0)
%20 = load i8*, i8** %7
%21 = call i32 @free(i8* %20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 256)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i8* @acc_create(i8* %4, i32 256)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
%10 = tail call i32 @acc_delete(i8* %4, i32 0)
%11 = tail call i32 @free(i8* %4)
ret i32 0
}
/* Variables and functions */
int binarySearch(char **, char *, int /*<<< orphan*/, int);
int search(char **array, char *word, int count) {
  if (count == 0) {
    return 0;
  } else {
    return binarySearch(array, word, 0, count - 1);
  }
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1139 <search+0x29>
movl   $0x0,-0x4(%rbp)
jmp    1151 <search+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
call   1030 <binarySearch@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
test   %edx,%edx
je     1120 <search+0x10>
mov    %edx,%ecx
add    $0xffffffff,%ecx
xor    %edx,%edx
jmp    1030 <binarySearch@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @search(i8** %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = add nsw i32 %2, -1
%7 = tail call i32 @binarySearch(i8** %0, i8* %1, i32 0, i32 %6)
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ %7, %5 ], [ 0, %3 ]
ret i32 %9
}