xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x12() {
  Assert_real((isodigit(18) == 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",
              95, ("isodigit should be 0 for 0x12"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x12>:
push   %rax
mov    $0x12,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x5f,%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 = [30 x i8] c"isodigit should be 0 for 0x12\00"
define void @t_isodigit_0x12() {
%1 = call i64 @isodigit(i32 18)
%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 95, i8* getelementptr inbounds ([30 x i8], [30 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 = [30 x i8] c"isodigit should be 0 for 0x12\00"
define void @t_isodigit_0x12() {
%1 = tail call i64 @isodigit(i32 18)
%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 95, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
char **calloc(int /*<<< orphan*/, int);
int /*<<< orphan*/ free_array_and_exit(char **, int /*<<< orphan*/);
char **array_calloc(uint32_t size) {
  char **ptr = calloc(size, sizeof(char *));
  if (ptr == NULL) {
    free_array_and_exit(ptr, 0);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<array_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1152 <array_calloc+0x32>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <free_array_and_exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_calloc>:
push   %rbx
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <array_calloc+0x1c>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <free_array_and_exit@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8** @array_calloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8**
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8** @calloc(i32 %4, i32 8)
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = icmp eq i8** %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8**, i8*** %3
%10 = call i32 @free_array_and_exit(i8** %9, i32 0)
br label %11
11: ; preds = %8, %1
%12 = load i8**, i8*** %3
ret i8** %12
}

LLVM IR (-O2):
define noalias i8** @array_calloc(i32 %0) {
%2 = tail call i8** @calloc(i32 %0, i32 8)
%3 = icmp eq i8** %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @free_array_and_exit(i8** null, i32 0)
br label %6
6: ; preds = %4, %1
ret i8** %2
}
void ocl_hw_atomic16_conf(int index, int sat, int satmode, int notif) {}


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

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

LLVM IR (-O0):
define void @ocl_hw_atomic16_conf(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
ret void
}

LLVM IR (-O2):
define void @ocl_hw_atomic16_conf(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int PAPI_unlock(int);
void PAPIF_unlock(int *lock, int *check) { *check = PAPI_unlock(*lock); }


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

x86 assembly (clang, -O2):
<PAPIF_unlock>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_unlock@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PAPIF_unlock(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* %5
%7 = call i32 @PAPI_unlock(i32 %6)
%8 = load i32*, i32** %4
store i32 %7, i32* %8
ret void
}

LLVM IR (-O2):
define void @PAPIF_unlock(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @PAPI_unlock(i32 %3)
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int main(int argc, char **argv) {
  void fig11_10();
  fig11_10();
  void fig11_15();
  fig11_15();
  return (EXIT_SUCCESS);
}


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   1030 <fig11_10@plt>
mov    $0x0,%al
call   1040 <fig11_15@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <fig11_10@plt>
xor    %eax,%eax
call   1040 <fig11_15@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 i32, i32* @EXIT_SUCCESS
ret i32 %6
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
tail call void (...) @fig11_10()
tail call void (...) @fig11_15()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Variables and functions */
int find_largest_faster(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int len = 8;
  int arr[8] = {2, 3, -8, -1, 2, 4, -2, 3};
  int cont;
  cont = find_largest_faster(arr, len);
  printf("%d\n", cont);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <find_largest_faster@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
call   1040 <find_largest_faster@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
@__const.main.arr = [8 x i32] [i32 2, i32 3, i32 -8, i32 -1, i32 2, i32 4, i32 -2, i32 3]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = call i32 @find_largest_faster(i32* %3, i32 8)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
struct fintypset {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fintypset_init(struct fintypset *, int /*<<< orphan*/);
int /*<<< orphan*/ fintypset_set_delete_val(struct fintypset *, int);
void fintypset_fullinit(struct fintypset *set) {
  fintypset_init(set, 0);
  fintypset_set_delete_val(set, -1);
}


x86 assembly (clang, -O0):
<fintypset_fullinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <fintypset_init@plt>
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%esi
call   1030 <fintypset_set_delete_val@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fintypset_fullinit>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <fintypset_init@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
pop    %rbx
jmp    1030 <fintypset_set_delete_val@plt>

LLVM IR (-O0):
%struct.fintypset = type { i32 }
define void @fintypset_fullinit(%struct.fintypset* %0) {
%2 = alloca %struct.fintypset*
store %struct.fintypset* %0, %struct.fintypset** %2
%3 = load %struct.fintypset*, %struct.fintypset** %2
%4 = call i32 @fintypset_init(%struct.fintypset* %3, i32 0)
%5 = load %struct.fintypset*, %struct.fintypset** %2
%6 = call i32 @fintypset_set_delete_val(%struct.fintypset* %5, i32 -1)
ret void
}

LLVM IR (-O2):
%struct.fintypset = type { i32 }
define void @fintypset_fullinit(%struct.fintypset* %0) {
%2 = tail call i32 @fintypset_init(%struct.fintypset* %0, i32 0)
%3 = tail call i32 @fintypset_set_delete_val(%struct.fintypset* %0, i32 -1)
ret void
}
/* Variables and functions */
int getKey();
int set_player_number() {
  int value;
  while (1) {
    value = getKey();
    if (value == 0x29)
      return 1;
    else if (value == 0x76)
      return 2;
  }
  return -1;
}


x86 assembly (clang, -O0):
<set_player_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getKey@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x29,-0x8(%rbp)
jne    1138 <set_player_number+0x28>
movl   $0x1,-0x4(%rbp)
jmp    1158 <set_player_number+0x48>
cmpl   $0x76,-0x8(%rbp)
jne    114e <set_player_number+0x3e>
movl   $0x2,-0x4(%rbp)
jmp    1158 <set_player_number+0x48>
jmp    1153 <set_player_number+0x43>
jmp    1118 <set_player_number+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_player_number>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getKey@plt>
cmp    $0x76,%eax
je     1138 <set_player_number+0x28>
cmp    $0x29,%eax
jne    1120 <set_player_number+0x10>
mov    $0x1,%eax
pop    %rcx
ret
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @set_player_number() {
%1 = alloca i32
%2 = alloca i32
br label %3
3: ; preds = %0, %13
%4 = call i32 (...) @getKey()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 41
br i1 %6, label %7, label %8
7: ; preds = %3
store i32 1, i32* %1
br label %14
8: ; preds = %3
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 118
br i1 %10, label %11, label %12
11: ; preds = %8
store i32 2, i32* %1
br label %14
12: ; preds = %8
br label %13
13: ; preds = %12
br label %3
14: ; preds = %11, %7
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @set_player_number() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getKey()
switch i32 %2, label %1 [
i32 41, label %3
i32 118, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %3
%5 = phi i32 [ 1, %3 ], [ 2, %1 ]
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ func_10(int, char *, unsigned long);
void func_9(int a, char *b, unsigned long c) { func_10(a, b, c); }


x86 assembly (clang, -O0):
<func_9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <func_10@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_9>:
jmp    1030 <func_10@plt>

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

LLVM IR (-O2):
define void @func_9(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @func_10(i32 %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CPLHaveRuntimeAVX();
int /*<<< orphan*/ __cpuid_count(int, int /*<<< orphan*/, int, int, int, int);
int CPLHaveRuntimeAVX2() {
  int cpuinfo[4] = {0, 0, 0, 0};
  if (!CPLHaveRuntimeAVX()) {
    return 0;
  }
  __cpuid_count(7, 0, cpuinfo[0], cpuinfo[1], cpuinfo[2], cpuinfo[3]);
  if ((cpuinfo[1] & (1 << 5)) == 0) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<CPLHaveRuntimeAVX2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    $0x0,%al
call   1030 <CPLHaveRuntimeAVX@plt>
cmp    $0x0,%eax
jne    1164 <CPLHaveRuntimeAVX2+0x34>
movl   $0x0,-0x4(%rbp)
jmp    11a0 <CPLHaveRuntimeAVX2+0x70>
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    $0x7,%edi
xor    %esi,%esi
call   1050 <__cpuid_count@plt>
mov    -0x1c(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
jne    1199 <CPLHaveRuntimeAVX2+0x69>
movl   $0x0,-0x4(%rbp)
jmp    11a0 <CPLHaveRuntimeAVX2+0x70>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CPLHaveRuntimeAVX2>:
push   %rax
xor    %eax,%eax
call   1030 <CPLHaveRuntimeAVX@plt>
test   %eax,%eax
je     1142 <CPLHaveRuntimeAVX2+0x22>
mov    $0x7,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <__cpuid_count@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CPLHaveRuntimeAVX2() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = bitcast [4 x i32]* %2 to i8*
%4 = call i32 (...) @CPLHaveRuntimeAVX()
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %0
store i32 0, i32* %1
br label %23
7: ; preds = %0
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 1
%11 = load i32, i32* %10
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 2
%13 = load i32, i32* %12
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 3
%15 = load i32, i32* %14
%16 = call i32 @__cpuid_count(i32 7, i32 0, i32 %9, i32 %11, i32 %13, i32 %15)
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 1
%18 = load i32, i32* %17
%19 = and i32 %18, 32
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %7
store i32 0, i32* %1
br label %23
22: ; preds = %7
store i32 1, i32* %1
br label %23
23: ; preds = %22, %21, %6
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
define i32 @CPLHaveRuntimeAVX2() {
%1 = tail call i32 (...) @CPLHaveRuntimeAVX()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @__cpuid_count(i32 7, i32 0, i32 0, i32 0, i32 0, i32 0)
br label %5
5: ; preds = %0, %3
ret i32 0
}
int h2i(char c) {
  if (c > '0' && c <= '9')
    return 9 - ('9' - c);
  if (c >= 'a' && c <= 'f')
    return 15 - ('f' - c);
  return 0;
}


x86 assembly (clang, -O0):
<h2i>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jle    113e <h2i+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     113e <h2i+0x3e>
movsbl -0x5(%rbp),%eax
mov    $0x39,%ecx
sub    %eax,%ecx
mov    $0x9,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <h2i+0x79>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1172 <h2i+0x72>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jg     1172 <h2i+0x72>
movsbl -0x5(%rbp),%eax
mov    $0x66,%ecx
sub    %eax,%ecx
mov    $0xf,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <h2i+0x79>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2i>:
mov    %edi,%eax
lea    -0x31(%rax),%ecx
cmp    $0x8,%cl
ja     110e <h2i+0xe>
add    $0xffffffd0,%eax
ret
lea    -0x61(%rax),%ecx
add    $0xffffffa9,%eax
xor    %edx,%edx
cmp    $0x6,%cl
cmovb  %eax,%edx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @h2i(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sgt i32 %5, 48
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 57, %13
%15 = sub nsw i32 9, %14
store i32 %15, i32* %2
br label %30
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 97
br i1 %19, label %20, label %29
20: ; preds = %16
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %22, 102
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = sub nsw i32 102, %26
%28 = sub nsw i32 15, %27
store i32 %28, i32* %2
br label %30
29: ; preds = %20, %16
store i32 0, i32* %2
br label %30
30: ; preds = %29, %24, %11
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @h2i(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -49
%4 = icmp ult i8 %3, 9
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nsw i32 %2, -48
br label %12
7: ; preds = %1
%8 = add i8 %0, -97
%9 = icmp ult i8 %8, 6
%10 = add nsw i32 %2, -87
%11 = select i1 %9, i32 %10, i32 0
br label %12
12: ; preds = %7, %5
%13 = phi i32 [ %6, %5 ], [ %11, %7 ]
ret i32 %13
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t get_label_len(const uint8_t *label) { return ((*label) & (~0xC0)); }


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

x86 assembly (clang, -O2):
<get_label_len>:
mov    $0xffffff3f,%eax
and    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_label_len(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, -193
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_label_len(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, -193
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ lflush();
int /*<<< orphan*/ lprcat(char *);
int /*<<< orphan*/ nap(int);
void handsfull(void) {
  lprcat("\nYou can't carry anything more!");
  lflush();
  nap(2200);
}


x86 assembly (clang, -O0):
<handsfull>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1050 <lprcat@plt>
mov    $0x0,%al
call   1040 <lflush@plt>
mov    $0x898,%edi
call   1030 <nap@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<handsfull>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <lprcat@plt>
xor    %eax,%eax
call   1040 <lflush@plt>
mov    $0x898,%edi
pop    %rax
jmp    1030 <nap@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"\0AYou can't carry anything more!\00"
define void @handsfull() {
%1 = call i32 @lprcat(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @lflush()
%3 = call i32 @nap(i32 2200)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"\0AYou can't carry anything more!\00"
define void @handsfull() {
%1 = tail call i32 @lprcat(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @lflush()
%3 = tail call i32 @nap(i32 2200)
ret void
}
/* Variables and functions */
scalar_t__ LogX(int, int);
scalar_t__ pow(int, int);
int ToLowerPowerOf2(int arg) { return (int)pow(2, (int)(LogX(arg, 2))); }


x86 assembly (clang, -O0):
<ToLowerPowerOf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <LogX@plt>
mov    %eax,%esi
mov    $0x2,%edi
call   1040 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToLowerPowerOf2>:
push   %rax
mov    $0x2,%esi
call   1030 <LogX@plt>
mov    $0x2,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <pow@plt>

LLVM IR (-O0):
define i32 @ToLowerPowerOf2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @LogX(i32 %3, i32 2)
%5 = trunc i64 %4 to i32
%6 = call i64 @pow(i32 2, i32 %5)
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @ToLowerPowerOf2(i32 %0) {
%2 = tail call i64 @LogX(i32 %0, i32 2)
%3 = trunc i64 %2 to i32
%4 = tail call i64 @pow(i32 2, i32 %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}
int test_imm_D9uint32_mem(unsigned int *val) {
  return ((*val) & (0xD9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D9uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xd9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_D9uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 217
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mem_write_raml(int, int, void *);
void ps2_write_shadow_raml(uint32_t addr, uint32_t val, void *priv) {
  addr = (addr & 0x1ffff) + 0xe0000;
  mem_write_raml(addr, val, priv);
}


x86 assembly (clang, -O0):
<ps2_write_shadow_raml>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1ffff,%eax
add    $0xe0000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <mem_write_raml@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps2_write_shadow_raml>:
and    $0x1ffff,%edi
or     $0xe0000,%edi
jmp    1030 <mem_write_raml@plt>

LLVM IR (-O0):
define void @ps2_write_shadow_raml(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = and i32 %7, 131071
%9 = add nsw i32 %8, 917504
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i8*, i8** %6
%13 = call i32 @mem_write_raml(i32 %10, i32 %11, i8* %12)
ret void
}

LLVM IR (-O2):
define void @ps2_write_shadow_raml(i32 %0, i32 %1, i8* %2) {
%4 = and i32 %0, 131071
%5 = or i32 %4, 917504
%6 = tail call i32 @mem_write_raml(i32 %5, i32 %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HwSettingsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void HwSettingsLogging() { UAVObjLogging(HwSettingsHandle()); }


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

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

LLVM IR (-O0):
define void @HwSettingsLogging() {
%1 = call i32 (...) @HwSettingsHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HwSettingsLogging() {
%1 = tail call i32 (...) @HwSettingsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
void gtk_file_filter_add_mime_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_filter_add_mime_type() {
ret void
}
/* Variables and functions */
unsigned long find_next_zero_bit(unsigned long const *, unsigned long,
                                 int /*<<< orphan*/);
unsigned long find_first_zero_bit(const unsigned long *addr,
                                  unsigned long size) {
  return find_next_zero_bit(addr, size, 0);
}


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

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

LLVM IR (-O0):
define i64 @find_first_zero_bit(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 = call i64 @find_next_zero_bit(i64* %5, i64 %6, i32 0)
ret i64 %7
}

LLVM IR (-O2):
define i64 @find_first_zero_bit(i64* %0, i64 %1) {
%3 = tail call i64 @find_next_zero_bit(i64* %0, i64 %1, i32 0)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int random();
int /*<<< orphan*/ sleep(int);
void Comer(int i) {
  int s;
  s = random() % 10;
  printf("Filosofo %d comiendo %d segundos\n", i, s);
  sleep(s);
}


x86 assembly (clang, -O0):
<Comer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <random@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Comer>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <random@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
lea    0xe9f(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <sleep@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Filosofo %d comiendo %d segundos\0A\00"
define void @Comer(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @random()
%5 = srem i32 %4, 10
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %3
%10 = call i32 @sleep(i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Filosofo %d comiendo %d segundos\0A\00"
define void @Comer(i32 %0) {
%2 = tail call i32 (...) @random()
%3 = srem i32 %2, 10
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %3)
%5 = tail call i32 @sleep(i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ memory_free(void *, char *, int);
int /*<<< orphan*/ table_clear(void *);
void table_release(void **T) {
  table_clear(*T);
  ((void)(memory_free((void *)(*T),
                      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                      "outputs/2022-01-22/02-19-57/repos/ASMlover/libc/refs/"
                      "heads/master/src/table.c",
                      116),
          (*T) = 0));
}


x86 assembly (clang, -O0):
<table_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <table_clear@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xeba(%rip),%rsi
mov    $0x74,%edx
call   1030 <memory_free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<table_release>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1040 <table_clear@plt>
mov    (%rbx),%rdi
lea    0xeca(%rip),%rsi
mov    $0x74,%edx
call   1030 <memory_free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ASMlover/libc/refs/heads/master/src/table.c\00"
define void @table_release(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = call i32 @table_clear(i8* %4)
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = call i64 @memory_free(i8* %7, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 116)
%9 = load i8**, i8*** %2
store i8* null, i8** %9
ret void
}

LLVM IR (-O2):
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ASMlover/libc/refs/heads/master/src/table.c\00"
define void @table_release(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @table_clear(i8* %2)
%4 = load i8*, i8** %0
%5 = tail call i64 @memory_free(i8* %4, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 116)
store i8* null, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ ec_double();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ mul_and_mod();
int main(int argc, char *argv[]) {
  mul_and_mod();
  ec_double();
  exit(EXIT_SUCCESS);
}


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 <mul_and_mod@plt>
mov    $0x0,%al
call   1030 <ec_double@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <mul_and_mod@plt>
xor    %eax,%eax
call   1030 <ec_double@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 (...) @mul_and_mod()
%7 = call i32 (...) @ec_double()
%8 = load i32, i32* @EXIT_SUCCESS
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @mul_and_mod()
%4 = tail call i32 (...) @ec_double()
%5 = load i32, i32* @EXIT_SUCCESS
%6 = tail call i32 @exit(i32 %5)
unreachable
}
int get_int_len(int value) {
  int l = 1;
  while (value > 9) {
    l++;
    value /= 10;
  }
  return l;
}


x86 assembly (clang, -O0):
<get_int_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x9,-0x4(%rbp)
jle    1134 <get_int_len+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <get_int_len+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int_len>:
mov    $0x1,%eax
cmp    $0xa,%edi
jl     1134 <get_int_len+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <get_int_len+0x20>
ret

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

LLVM IR (-O2):
define i32 @get_int_len(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = udiv i32 %5, 10
%8 = icmp ugt i32 %5, 99
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %10
}
int get_minimal_size_for_numeric_input(int minmax_value) {
  int min_size = 1;
  int i;
  for (i = 10; i <= ((minmax_value) < 0 ? -(minmax_value) : (minmax_value));
       i *= 10)
    min_size++;
  if (minmax_value < 0)
    min_size++;
  return min_size;
}


x86 assembly (clang, -O0):
<get_minimal_size_for_numeric_input>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1132 <get_minimal_size_for_numeric_input+0x32>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1138 <get_minimal_size_for_numeric_input+0x38>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
cmp    %ecx,%eax
jg     115b <get_minimal_size_for_numeric_input+0x5b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <get_minimal_size_for_numeric_input+0x15>
cmpl   $0x0,-0x4(%rbp)
jge    116e <get_minimal_size_for_numeric_input+0x6e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_minimal_size_for_numeric_input>:
mov    %edi,%eax
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
mov    $0x1,%edx
cmp    $0xa,%ecx
jb     112c <get_minimal_size_for_numeric_input+0x2c>
mov    $0x1,%edx
mov    $0xa,%esi
nopl   (%rax)
add    $0x1,%edx
add    %esi,%esi
lea    (%rsi,%rsi,4),%esi
cmp    %ecx,%esi
jbe    1120 <get_minimal_size_for_numeric_input+0x20>
shr    $0x1f,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_minimal_size_for_numeric_input(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%3 = icmp ult i32 %2, 10
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 10, %1 ]
%6 = phi i32 [ %7, %4 ], [ 1, %1 ]
%7 = add nuw nsw i32 %6, 1
%8 = mul nsw i32 %5, 10
%9 = icmp ugt i32 %8, %2
br i1 %9, label %10, label %4
10: ; preds = %4, %1
%11 = phi i32 [ 1, %1 ], [ %7, %4 ]
%12 = lshr i32 %0, 31
%13 = add nuw nsw i32 %11, %12
ret i32 %13
}
/* Type definitions */
struct mempool {
  int dummy;
};

/* Variables and functions */
void *mempool_ReAlloc_internal(struct mempool *, struct mempool *,
                               unsigned char *, size_t, size_t);
void *mempool_ReAlloc(struct mempool *pool, void *ptr, size_t oldSize,
                      size_t newSize) {
  return mempool_ReAlloc_internal(pool, pool, (unsigned char *)ptr, oldSize,
                                  newSize);
}


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

x86 assembly (clang, -O2):
<mempool_ReAlloc>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
jmp    1030 <mempool_ReAlloc_internal@plt>

LLVM IR (-O0):
%struct.mempool = type { i32 }
define i8* @mempool_ReAlloc(%struct.mempool* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca %struct.mempool*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store %struct.mempool* %0, %struct.mempool** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load %struct.mempool*, %struct.mempool** %5
%10 = load %struct.mempool*, %struct.mempool** %5
%11 = load i8*, i8** %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = call i8* @mempool_ReAlloc_internal(%struct.mempool* %9, %struct.mempool* %10, i8* %11, i64 %12, i64 %13)
ret i8* %14
}

LLVM IR (-O2):
%struct.mempool = type { i32 }
define i8* @mempool_ReAlloc(%struct.mempool* %0, i8* %1, i64 %2, i64 %3) {
%5 = tail call i8* @mempool_ReAlloc_internal(%struct.mempool* %0, %struct.mempool* %0, i8* %1, i64 %2, i64 %3)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ AccessoryDesiredHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void AccessoryDesiredRequestUpdate() {
  UAVObjRequestUpdate(AccessoryDesiredHandle());
}


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

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

LLVM IR (-O0):
define void @AccessoryDesiredRequestUpdate() {
%1 = call i32 (...) @AccessoryDesiredHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AccessoryDesiredRequestUpdate() {
%1 = tail call i32 (...) @AccessoryDesiredHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void wtype_delete(void **wtypePtr) {
  free(*wtypePtr);
  *wtypePtr = NULL;
}


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

x86 assembly (clang, -O2):
<wtype_delete>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @wtype_delete(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
ret void
}
/* Variables and functions */
int greatest_digit(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  printf("Greatest digit is %d :\n", greatest_digit(n));
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <greatest_digit@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [24 x i8] c"Greatest digit is %d :\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @greatest_digit(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [24 x i8] c"Greatest digit is %d :\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @greatest_digit(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int pow(float, int);
float surface(float r) { return 4 * 3.141596 * pow(r, 2); }


x86 assembly (clang, -O0):
<surface>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
cvtsi2sd %eax,%xmm1
movsd  0xec8(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<surface>:
push   %rax
mov    $0x2,%edi
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xed6(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @surface(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @pow(float %3, i32 2)
%5 = sitofp i32 %4 to double
%6 = fmul double 0x402921FD1569F490, %5
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @surface(float %0) {
%2 = tail call i32 @pow(float %0, i32 2)
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x402921FD1569F490
%5 = fptrunc double %4 to float
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ CLIENT;

/* Variables and functions */
void clntraw_destroy(CLIENT *cl) {}


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

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

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

LLVM IR (-O2):
define void @clntraw_destroy(i32* nocapture %0) {
ret void
}
int g(void) { return -5; }


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

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

LLVM IR (-O0):
define i32 @g() {
ret i32 -5
}

LLVM IR (-O2):
define i32 @g() {
ret i32 -5
}
void foo() { __builtin_strcat(0, 0); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1030 <strcat@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <strcat@plt>

LLVM IR (-O0):
define void @foo() {
%1 = call i8* @strcat(i8* null, i8* null)
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i8* @strcat(i8* dereferenceable(1) null, i8* dereferenceable(1) null)
ret void
}
getzonenamebyid() { printf("%s\n", __func__); }


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

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

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

LLVM IR (-O2):
@__func__.getzonenamebyid = [16 x i8] c"getzonenamebyid\00"
define i32 @getzonenamebyid() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.getzonenamebyid, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ TriDesDecrypt(unsigned char *, int, unsigned char *,
                                 unsigned char, unsigned char *);
int UnTarck2(unsigned char *MagData, unsigned char MagDataLen,
             unsigned char *Out, unsigned char *TheKey) {
  unsigned char inlen;
  inlen = ((MagData[0] >> 4) * 10) + (MagData[0] & 0x0f);
  TriDesDecrypt(TheKey, 16, MagData + 1, inlen, Out);
  return 0;
}


x86 assembly (clang, -O0):
<UnTarck2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
sar    $0x4,%eax
imul   $0xa,%eax,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
and    $0xf,%ecx
add    %ecx,%eax
mov    %al,-0x21(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rdx
add    $0x1,%rdx
mov    -0x21(%rbp),%al
mov    -0x18(%rbp),%r8
mov    $0x10,%esi
movzbl %al,%ecx
call   1030 <TriDesDecrypt@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UnTarck2>:
push   %rax
mov    %rdx,%r8
mov    (%rdi),%al
mov    %eax,%edx
shr    $0x4,%dl
movzbl %dl,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
and    $0xf,%al
add    %dl,%al
lea    0x1(%rdi),%rdx
movzbl %al,%eax
mov    %rcx,%rdi
mov    $0x10,%esi
mov    %eax,%ecx
call   1030 <TriDesDecrypt@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @UnTarck2(i8* %0, i8 zeroext %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8
store i8* %0, i8** %5
store i8 %1, i8* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = ashr i32 %13, 4
%15 = mul nsw i32 %14, 10
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = and i32 %19, 15
%21 = add nsw i32 %15, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %9
%23 = load i8*, i8** %8
%24 = load i8*, i8** %5
%25 = getelementptr inbounds i8, i8* %24, i64 1
%26 = load i8, i8* %9
%27 = load i8*, i8** %7
%28 = call i32 @TriDesDecrypt(i8* %23, i32 16, i8* %25, i8 zeroext %26, i8* %27)
ret i32 0
}

LLVM IR (-O2):
define i32 @UnTarck2(i8* %0, i8 zeroext %1, i8* %2, i8* %3) {
%5 = load i8, i8* %0
%6 = lshr i8 %5, 4
%7 = mul nuw i8 %6, 10
%8 = and i8 %5, 15
%9 = add nuw i8 %7, %8
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = tail call i32 @TriDesDecrypt(i8* %3, i32 16, i8* %10, i8 zeroext %9, i8* %2)
ret i32 0
}