xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ AlarmToTimerC__0__Alarm__fired();
void Atm128AlarmAsyncP__0__Alarm__fired(void) {
  AlarmToTimerC__0__Alarm__fired();
}


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

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

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

LLVM IR (-O2):
define void @Atm128AlarmAsyncP__0__Alarm__fired() {
%1 = tail call i32 (...) @AlarmToTimerC__0__Alarm__fired()
ret void
}
int _vga_get_video_memory_offset(int row, int column) {
  if (row < 0 || column < 0 || row >= 25 || column >= 80) {
    return 0;
  }
  return (row * 80 + column) * 2;
}


x86 assembly (clang, -O0):
<_vga_get_video_memory_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1132 <_vga_get_video_memory_offset+0x32>
cmpl   $0x0,-0xc(%rbp)
jl     1132 <_vga_get_video_memory_offset+0x32>
cmpl   $0x19,-0x8(%rbp)
jge    1132 <_vga_get_video_memory_offset+0x32>
cmpl   $0x50,-0xc(%rbp)
jl     113e <_vga_get_video_memory_offset+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    114b <_vga_get_video_memory_offset+0x4b>
imul   $0x50,-0x8(%rbp),%eax
add    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_vga_get_video_memory_offset>:
lea    (%rdi,%rdi,4),%eax
shl    $0x4,%eax
add    %esi,%eax
add    %eax,%eax
xor    %ecx,%ecx
mov    %esi,%edx
or     %edi,%edx
cmovs  %ecx,%eax
cmp    $0x19,%edi
cmovge %ecx,%eax
cmp    $0x50,%esi
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @_vga_get_video_memory_offset(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp slt i32 %3, 0
%5 = icmp sgt i32 %0, 24
%6 = or i1 %5, %4
%7 = icmp sgt i32 %1, 79
%8 = or i1 %7, %6
%9 = mul nsw i32 %0, 80
%10 = add nsw i32 %9, %1
%11 = shl nsw i32 %10, 1
%12 = select i1 %8, i32 0, i32 %11
ret i32 %12
}
long int parentIndex(long int index) { return (index >> 1); }


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

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

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

LLVM IR (-O2):
define i64 @parentIndex(i64 %0) {
%2 = ashr i64 %0, 1
ret i64 %2
}
/* Variables and functions */
scalar_t__ isalpha(int);
scalar_t__ isdigit(int);
int isalnum(int c) { return (isdigit(c) || isalpha(c)); }


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <isalnum+0x37>
mov    -0x4(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isalnum+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isalnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @isalpha(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isalpha(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
struct genlist_link {
  int dummy;
};
struct genlist {
  int dummy;
};
struct entry_list_link {
  int dummy;
};
struct entry_list {
  int dummy;
};
struct entry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_insert_before(struct genlist *, struct entry *,
                                         struct genlist_link *);
void entry_list_insert_before(struct entry_list *tthis, struct entry *pfoo,
                              struct entry_list_link *plink) {
  genlist_insert_before((struct genlist *)tthis, pfoo,
                        (struct genlist_link *)plink);
}


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

x86 assembly (clang, -O2):
<entry_list_insert_before>:
jmp    1030 <genlist_insert_before@plt>

LLVM IR (-O0):
%struct.entry_list = type { i32 }
%struct.entry = type { i32 }
%struct.entry_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @entry_list_insert_before(%struct.entry_list* %0, %struct.entry* %1, %struct.entry_list_link* %2) {
%4 = alloca %struct.entry_list*
%5 = alloca %struct.entry*
%6 = alloca %struct.entry_list_link*
store %struct.entry_list* %0, %struct.entry_list** %4
store %struct.entry* %1, %struct.entry** %5
store %struct.entry_list_link* %2, %struct.entry_list_link** %6
%7 = load %struct.entry_list*, %struct.entry_list** %4
%8 = bitcast %struct.entry_list* %7 to %struct.genlist*
%9 = load %struct.entry*, %struct.entry** %5
%10 = load %struct.entry_list_link*, %struct.entry_list_link** %6
%11 = bitcast %struct.entry_list_link* %10 to %struct.genlist_link*
%12 = call i32 @genlist_insert_before(%struct.genlist* %8, %struct.entry* %9, %struct.genlist_link* %11)
ret void
}

LLVM IR (-O2):
%struct.entry_list = type { i32 }
%struct.entry = type { i32 }
%struct.entry_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @entry_list_insert_before(%struct.entry_list* %0, %struct.entry* %1, %struct.entry_list_link* %2) {
%4 = bitcast %struct.entry_list* %0 to %struct.genlist*
%5 = bitcast %struct.entry_list_link* %2 to %struct.genlist_link*
%6 = tail call i32 @genlist_insert_before(%struct.genlist* %4, %struct.entry* %1, %struct.genlist_link* %5)
ret void
}
/* Variables and functions */
unsigned long long swap_long_long(unsigned long long);
unsigned long long network_long_long_to_host(unsigned long long x) {
  return swap_long_long(x);
}


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

x86 assembly (clang, -O2):
<network_long_long_to_host>:
jmp    1030 <swap_long_long@plt>

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

LLVM IR (-O2):
define i64 @network_long_long_to_host(i64 %0) {
%2 = tail call i64 @swap_long_long(i64 %0)
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ X509;

/* Variables and functions */
int /*<<< orphan*/ X509_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *d2i_X509(int /*<<< orphan*/ *, int /*<<< orphan*/ const **,
                             int /*<<< orphan*/ const);
int is_valid_cert(const uint8_t *cert, const uint32_t cert_size) {
  X509 *X509cert;
  if (cert == NULL)
    return 0;
  X509cert = d2i_X509(NULL, &cert, cert_size);
  if (X509cert == NULL)
    return 0;
  X509_free(X509cert);
  return 1;
}


x86 assembly (clang, -O0):
<is_valid_cert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1146 <is_valid_cert+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1181 <is_valid_cert+0x61>
mov    -0x14(%rbp),%edx
xor    %eax,%eax
mov    %eax,%edi
lea    -0x10(%rbp),%rsi
call   1040 <d2i_X509@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1171 <is_valid_cert+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1181 <is_valid_cert+0x61>
mov    -0x20(%rbp),%rdi
call   1030 <X509_free@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_cert>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,0x8(%rsp)
test   %rdi,%rdi
je     1153 <is_valid_cert+0x33>
mov    %esi,%edx
xor    %ebx,%ebx
lea    0x8(%rsp),%rsi
xor    %edi,%edi
call   1040 <d2i_X509@plt>
test   %rax,%rax
je     1155 <is_valid_cert+0x35>
mov    %rax,%rdi
call   1030 <X509_free@plt>
mov    $0x1,%ebx
jmp    1155 <is_valid_cert+0x35>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_valid_cert(i32* %0, i32 %1) {
%3 = alloca i32*
store i32* %0, i32** %3
%4 = icmp eq i32* %0, null
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = call i32* @d2i_X509(i32* null, i32** %3, i32 %1)
%7 = icmp eq i32* %6, null
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = call i32 @X509_free(i32* %6)
br label %10
10: ; preds = %5, %2, %8
%11 = phi i32 [ 1, %8 ], [ 0, %2 ], [ 0, %5 ]
ret i32 %11
}
int LZ4_versionNumber(void) { return (1 * 100 * 100 + 7 * 100 + 2); }


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

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

LLVM IR (-O0):
define i32 @LZ4_versionNumber() {
ret i32 10702
}

LLVM IR (-O2):
define i32 @LZ4_versionNumber() {
ret i32 10702
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int pthread_condattr_init(pthread_condattr_t *a) { assert(0); }


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

x86 assembly (clang, -O2):
<pthread_condattr_init>:
xor    %edi,%edi
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define i32 @pthread_condattr_init(i32* nocapture readnone %0) {
%2 = tail call i32 @assert(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ mem_chk(char *);
char *realloc(char *, int);
char *check_alloc(char *items, int c_size, int *max_size) {
  if (c_size + 1 == *max_size) {
    *max_size *= 2;
    items = realloc(items, *max_size * sizeof(*items));
    mem_chk(items);
  }
  return items;
}


x86 assembly (clang, -O0):
<check_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    1173 <check_alloc+0x53>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
shl    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq (%rax),%rax
shl    $0x0,%rax
mov    %eax,%esi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mem_chk@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_alloc>:
push   %rbx
mov    %rdi,%rbx
add    $0x1,%esi
cmp    (%rdx),%esi
jne    1142 <check_alloc+0x22>
add    %esi,%esi
mov    %esi,(%rdx)
mov    %rbx,%rdi
call   1040 <realloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <mem_chk@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @check_alloc(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* %5
%8 = add nsw i32 %7, 1
%9 = load i32*, i32** %6
%10 = load i32, i32* %9
%11 = icmp eq i32 %8, %10
br i1 %11, label %12, label %25
12: ; preds = %3
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = mul nsw i32 %14, 2
store i32 %15, i32* %13
%16 = load i8*, i8** %4
%17 = load i32*, i32** %6
%18 = load i32, i32* %17
%19 = sext i32 %18 to i64
%20 = mul i64 %19, 1
%21 = trunc i64 %20 to i32
%22 = call i8* @realloc(i8* %16, i32 %21)
store i8* %22, i8** %4
%23 = load i8*, i8** %4
%24 = call i32 @mem_chk(i8* %23)
br label %25
25: ; preds = %12, %3
%26 = load i8*, i8** %4
ret i8* %26
}

LLVM IR (-O2):
define i8* @check_alloc(i8* %0, i32 %1, i32* nocapture %2) {
%4 = add nsw i32 %1, 1
%5 = load i32, i32* %2
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = shl nsw i32 %4, 1
store i32 %8, i32* %2
%9 = tail call i8* @realloc(i8* %0, i32 %8)
%10 = tail call i32 @mem_chk(i8* %9)
br label %11
11: ; preds = %7, %3
%12 = phi i8* [ %9, %7 ], [ %0, %3 ]
ret i8* %12
}
void BN_init(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_init() {
ret void
}
void Clear_config(void) { struct line_list **l; }


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

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

LLVM IR (-O0):
%struct.line_list = type opaque
define void @Clear_config() {
%1 = alloca %struct.line_list**
ret void
}

LLVM IR (-O2):
%struct.line_list = type opaque
define void @Clear_config() {
ret void
}
int strcoll(const char *s1, const char *s2) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x5c() {
  Assert_real((isdigit(92) == 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_isdigit.c",
              465, ("isdigit should be 0 for 0x5c"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x5c>:
push   %rax
mov    $0x5c,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1d1,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x5c\00"
define void @t_isdigit_0x5c() {
%1 = call i64 @isdigit(i32 92)
%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 465, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x5c\00"
define void @t_isdigit_0x5c() {
%1 = tail call i64 @isdigit(i32 92)
%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 465, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ u;

/* Variables and functions */
int /*<<< orphan*/ random_bytes(int /*<<< orphan*/ *, int);
uint32_t random_u32(void) {
  uint32_t u;
  random_bytes(&u, sizeof(u));
  return u;
}


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

x86 assembly (clang, -O2):
<random_u32>:
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <random_bytes@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @random_u32() {
%1 = alloca i32
%2 = call i32 @random_bytes(i32* %1, i32 4)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @random_u32() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @random_bytes(i32* %1, i32 4)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
char *mpfr_get_version();
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  const char *version = mpfr_get_version();
  char subversion[6];
  memcpy(subversion, version, 5);
  subversion[5] = '\0';
  if (strcmp(subversion, "4.1.0") == 0)
    return 0;
  return 1;
}


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)
mov    $0x0,%al
call   1050 <mpfr_get_version@plt>
mov    %rax,-0x18(%rbp)
lea    -0x1e(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x5,%edx
call   1040 <memcpy@plt>
movb   $0x0,-0x19(%rbp)
lea    -0x1e(%rbp),%rdi
lea    0xe8e(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    118d <main+0x5d>
movl   $0x0,-0x4(%rbp)
jmp    1194 <main+0x64>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1050 <mpfr_get_version@plt>
lea    0xa(%rsp),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0x5,%edx
call   1040 <memcpy@plt>
movb   $0x0,0xf(%rsp)
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"4.1.0\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [6 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i8* (...) @mpfr_get_version()
store i8* %8, i8** %6
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %6
%11 = call i32 @memcpy(i8* %9, i8* %10, i32 5)
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 5
store i8 0, i8* %12
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 0, i32* %3
br label %18
17: ; preds = %2
store i32 1, i32* %3
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [6 x i8] c"4.1.0\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = tail call i8* (...) @mpfr_get_version()
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%6 = call i32 @memcpy(i8* %5, i8* %4, i32 5)
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 5
store i8 0, i8* %7
%8 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
int main(void) {
  volatile int j;
  int i = 5;
  asm volatile("" : "=r"(i) : "0"(i));
  j = f1(i);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
xor    %eax,%eax
call   1030 <f1@plt>
mov    %eax,0x4(%rsp)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %3
%4 = load i32, i32* %3
%5 = call i32 asm sideeffect "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 (i32, ...) bitcast (i32 (...)* @f1 to i32 (i32, ...)*)(i32 %6)
store volatile i32 %7, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 asm sideeffect "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 5)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @f1 to i32 (i32, ...)*)(i32 %3)
store volatile i32 %4, i32* %1
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ getpid();
int32_t OS_getpid() { return (getpid()); }


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

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

LLVM IR (-O0):
define i32 @OS_getpid() {
%1 = call i32 (...) @getpid()
ret i32 %1
}

LLVM IR (-O2):
define i32 @OS_getpid() {
%1 = tail call i32 (...) @getpid()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ server_type(int /*<<< orphan*/, int /*<<< orphan*/, char *);
void testTortureExecute(void) {
  server_type(0, 0, "standalone");
  return;
}


x86 assembly (clang, -O0):
<testTortureExecute>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
lea    0xee3(%rip),%rdx
mov    %esi,%edi
call   1030 <server_type@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTortureExecute>:
lea    0xee9(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <server_type@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"standalone\00"
define void @testTortureExecute() {
%1 = call i32 @server_type(i32 0, i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"standalone\00"
define void @testTortureExecute() {
%1 = tail call i32 @server_type(i32 0, i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *cmdname) {
  printf("Usage: %s [OPTION...] COMMAND filename\n\n"
         "OPTION:\n"
         " -h --help      This usage summary\n"
         " -p --partial   Allow ROM and file sizes to differ\n\n"
         "COMMAND:\n"
         " -r --read      Read ROM conents out to file\n"
         " -v --verify    Compare ROM contents to file\n"
         " -w --write     Rewrite ROM contents from file\n",
         cmdname);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [282 x i8] c"Usage: %s [OPTION...] COMMAND filename\0A\0AOPTION:\0A -h --help This usage summary\0A -p --partial Allow ROM and file sizes to differ\0A\0ACOMMAND:\0A -r --read Read ROM conents out to file\0A -v --verify Compare ROM contents to file\0A -w --write Rewrite ROM contents from file\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([282 x i8], [282 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [282 x i8] c"Usage: %s [OPTION...] COMMAND filename\0A\0AOPTION:\0A -h --help This usage summary\0A -p --partial Allow ROM and file sizes to differ\0A\0ACOMMAND:\0A -r --read Read ROM conents out to file\0A -v --verify Compare ROM contents to file\0A -w --write Rewrite ROM contents from file\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([282 x i8], [282 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char const *getenv(char *);
const char *get_log_path() { return getenv("AUTOAWAY_LOGFILE"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"AUTOAWAY_LOGFILE\00"
define i8* @get_log_path() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [17 x i8] c"AUTOAWAY_LOGFILE\00"
define i8* @get_log_path() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
void resist_config_init_json(struct resist_config_t **cfg) {}


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

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

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

LLVM IR (-O2):
%struct.resist_config_t = type opaque
define void @resist_config_init_json(%struct.resist_config_t** nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void printUsage(char *programName) {
  printf("\n Usage: %s [String: Name of the file] [Integer: 0 < Sleep Time] "
         "[Integer: 0 < # of times to retry accessing the file] \n\n",
         programName);
  exit(1);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [122 x i8] c"\0A Usage: %s [String: Name of the file] [Integer: 0 < Sleep Time] [Integer: 0 < # of times to retry accessing the file] \0A\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [122 x i8] c"\0A Usage: %s [String: Name of the file] [Integer: 0 < Sleep Time] [Integer: 0 < # of times to retry accessing the file] \0A\0A\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double M_PI;
double cos(double);
double dw_dy(double L, double a_wy, double w_y, double y) {
  return M_PI * a_wy * w_y * cos(M_PI * a_wy * y / L) / L;
}


x86 assembly (clang, -O0):
<dw_dy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    0x2eb5(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    0x2e9b(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dw_dy>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mulsd  (%rax),%xmm1
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
mulsd  %xmm3,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @dw_dy(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* @M_PI
%10 = load double, double* %6
%11 = fmul double %9, %10
%12 = load double, double* %7
%13 = fmul double %11, %12
%14 = load double, double* @M_PI
%15 = load double, double* %6
%16 = fmul double %14, %15
%17 = load double, double* %8
%18 = fmul double %16, %17
%19 = load double, double* %5
%20 = fdiv double %18, %19
%21 = call double @cos(double %20)
%22 = fmul double %13, %21
%23 = load double, double* %5
%24 = fdiv double %22, %23
ret double %24
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @dw_dy(double %0, double %1, double %2, double %3) {
%5 = load double, double* @M_PI
%6 = fmul double %5, %1
%7 = fmul double %6, %2
%8 = fmul double %6, %3
%9 = fdiv double %8, %0
%10 = tail call double @cos(double %9)
%11 = fmul double %10, %7
%12 = fdiv double %11, %0
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *name) {
  printf("usage: %s [-n process-name] [-p pid] [library-to-inject]\n", name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"usage: %s [-n process-name] [-p pid] [library-to-inject]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [58 x i8] c"usage: %s [-n process-name] [-p pid] [library-to-inject]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int *p, a[5] = {1, 2, 3, 4, 5};
  printf("%lu\n", sizeof(a));
  p = a;
  printf("0x%p\n", p);
  printf("%lu\n", sizeof p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x14,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea9(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xef5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xee3(%rip),%rbx
mov    $0x14,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x8,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.a = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@.str = [5 x i8] c"%lu\0A\00"
@.str.1 = [6 x i8] c"0x%p\0A\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 20)
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glOrtho(double, double, double, double, double, double);
void setMatrix(void) {
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(-15.0, 15.0, -15.0, 15.0, -10.0, 10.0);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
}


x86 assembly (clang, -O0):
<setMatrix>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1050 <glLoadIdentity@plt>
movsd  0xeaf(%rip),%xmm2
movsd  0xeaf(%rip),%xmm3
movsd  0xeaf(%rip),%xmm4
movsd  0xeaf(%rip),%xmm5
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
call   1040 <glOrtho@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1050 <glLoadIdentity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setMatrix>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1050 <glLoadIdentity@plt>
movsd  0xeb2(%rip),%xmm0
movsd  0xeb2(%rip),%xmm1
movsd  0xeb2(%rip),%xmm4
movsd  0xeb2(%rip),%xmm5
movaps %xmm0,%xmm2
movaps %xmm1,%xmm3
call   1040 <glOrtho@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glLoadIdentity@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @setMatrix() {
%1 = load i32, i32* @GL_PROJECTION
%2 = call i32 @glMatrixMode(i32 %1)
%3 = call i32 (...) @glLoadIdentity()
%4 = call i32 @glOrtho(double -1.500000e+01, double 1.500000e+01, double -1.500000e+01, double 1.500000e+01, double -1.000000e+01, double 1.000000e+01)
%5 = load i32, i32* @GL_MODELVIEW
%6 = call i32 @glMatrixMode(i32 %5)
%7 = call i32 (...) @glLoadIdentity()
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @setMatrix() {
%1 = load i32, i32* @GL_PROJECTION
%2 = tail call i32 @glMatrixMode(i32 %1)
%3 = tail call i32 (...) @glLoadIdentity()
%4 = tail call i32 @glOrtho(double -1.500000e+01, double 1.500000e+01, double -1.500000e+01, double 1.500000e+01, double -1.000000e+01, double 1.000000e+01)
%5 = load i32, i32* @GL_MODELVIEW
%6 = tail call i32 @glMatrixMode(i32 %5)
%7 = tail call i32 (...) @glLoadIdentity()
ret void
}
int mark2index(const char mark) {
  if ((int)mark > 96)
    return (int)mark - 61;
  else if ((int)mark < 65)
    return (int)mark - 48;
  else
    return (int)mark - 55;
}


x86 assembly (clang, -O0):
<mark2index>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x60,%eax
jle    1126 <mark2index+0x26>
movsbl -0x5(%rbp),%eax
sub    $0x3d,%eax
mov    %eax,-0x4(%rbp)
jmp    114c <mark2index+0x4c>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jge    1142 <mark2index+0x42>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    114c <mark2index+0x4c>
movsbl -0x5(%rbp),%eax
sub    $0x37,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mark2index>:
cmp    $0x41,%dil
mov    $0xffffffd0,%eax
mov    $0xffffffc9,%ecx
cmovl  %eax,%ecx
cmp    $0x61,%dil
mov    $0xffffffc3,%eax
cmovl  %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @mark2index(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, 96
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 61
store i32 %10, i32* %2
br label %23
11: ; preds = %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp slt i32 %13, 65
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 48
store i32 %18, i32* %2
br label %23
19: ; preds = %11
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 55
store i32 %22, i32* %2
br label %23
23: ; preds = %19, %15, %7
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @mark2index(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = icmp sgt i8 %0, 96
%4 = icmp slt i8 %0, 65
%5 = select i1 %4, i32 -48, i32 -55
%6 = select i1 %3, i32 -61, i32 %5
%7 = add nsw i32 %6, %2
ret i32 %7
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/"
        "genfiles/low_treeshake.c",
        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/low_treeshake.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/low_treeshake.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ sqlite3_open(char *, int /*<<< orphan*/ **);
void resourceLeak_sqlite3_open() {
  sqlite3 *db;
  sqlite3_open("/db", &db);
}


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

x86 assembly (clang, -O2):
<resourceLeak_sqlite3_open>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1030 <sqlite3_open@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"/db\00"
define void @resourceLeak_sqlite3_open() {
%1 = alloca i32*
%2 = call i32 @sqlite3_open(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32** %1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"/db\00"
define void @resourceLeak_sqlite3_open() {
%1 = alloca i32*
%2 = bitcast i32** %1 to i8*
%3 = call i32 @sqlite3_open(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32** %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void lonely(void) { printf("Better secret!!\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Better secret!!\0A\00"
define void @lonely() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"Better secret!!\00"
define void @lonely() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ warning(char *, ...);
void nrerror(char error_text[]) {
  warning("Numerical Recipes 2 run-time error...");
  warning("%s", error_text);
  error("...now exiting to system...");
}


x86 assembly (clang, -O0):
<nrerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <warning@plt>
mov    -0x8(%rbp),%rsi
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <warning@plt>
lea    0xed6(%rip),%rdi
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrerror>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <warning@plt>
lea    0xeed(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <warning@plt>
lea    0xedf(%rip),%rdi
pop    %rbx
jmp    1040 <error@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Numerical Recipes 2 run-time error...\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [28 x i8] c"...now exiting to system...\00"
define void @nrerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @warning(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @warning(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Numerical Recipes 2 run-time error...\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [28 x i8] c"...now exiting to system...\00"
define void @nrerror(i8* %0) {
%2 = tail call i32 (i8*, ...) @warning(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @warning(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct rb_table {
  int dummy;
};

/* Variables and functions */
void **rb_probe(struct rb_table *, void *);
void *rb_insert(struct rb_table *table, void *item) {
  void **p = rb_probe(table, item);
  return p == NULL || *p == item ? NULL : *p;
}


x86 assembly (clang, -O0):
<rb_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <rb_probe@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114d <rb_insert+0x3d>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
jne    1158 <rb_insert+0x48>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    1163 <rb_insert+0x53>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb_insert>:
push   %rbx
mov    %rsi,%rbx
call   1030 <rb_probe@plt>
test   %rax,%rax
je     112c <rb_insert+0x1c>
mov    (%rax),%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
cmovne %rcx,%rax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.rb_table = type { i32 }
define i8* @rb_insert(%struct.rb_table* %0, i8* %1) {
%3 = alloca %struct.rb_table*
%4 = alloca i8*
%5 = alloca i8**
store %struct.rb_table* %0, %struct.rb_table** %3
store i8* %1, i8** %4
%6 = load %struct.rb_table*, %struct.rb_table** %3
%7 = load i8*, i8** %4
%8 = call i8** @rb_probe(%struct.rb_table* %6, i8* %7)
store i8** %8, i8*** %5
%9 = load i8**, i8*** %5
%10 = icmp eq i8** %9, null
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i8*, i8** %4
%15 = icmp eq i8* %13, %14
br i1 %15, label %16, label %17
16: ; preds = %11, %2
br label %20
17: ; preds = %11
%18 = load i8**, i8*** %5
%19 = load i8*, i8** %18
br label %20
20: ; preds = %17, %16
%21 = phi i8* [ null, %16 ], [ %19, %17 ]
ret i8* %21
}

LLVM IR (-O2):
%struct.rb_table = type { i32 }
define i8* @rb_insert(%struct.rb_table* %0, i8* %1) {
%3 = tail call i8** @rb_probe(%struct.rb_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
%8 = select i1 %7, i8* null, i8* %6
br label %9
9: ; preds = %5, %2
%10 = phi i8* [ null, %2 ], [ %8, %5 ]
ret i8* %10
}