xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void __attribute__((regparm(3))) memcpy_28(void *dest, void *src) {
  memcpy(dest, src, 28);
}


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

x86 assembly (clang, -O2):
<memcpy_28>:
mov    $0x1c,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @memcpy_28(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 28)
ret void
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void haste(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 180)) {
    add_status(target, 21);
  }
}


x86 assembly (clang, -O0):
<haste>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xb4,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <haste+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x15,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<haste>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0xb4,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <haste+0x41>
mov    %r14,%rdi
mov    $0x15,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @haste(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 180)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 21)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @haste(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 180)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 21)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core1_swap(char *, int);
void U_EMRPOLYBEZIERTO_swap(char *record, int torev) {
  core1_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_EMRPOLYBEZIERTO_swap>:
jmp    1030 <core1_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRPOLYBEZIERTO_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core1_swap(i8* %0, i32 %1)
ret void
}
char STORAGE_GetMaxLun(void) { return (1 - 1); }


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

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

LLVM IR (-O0):
define signext i8 @STORAGE_GetMaxLun() {
ret i8 0
}

LLVM IR (-O2):
define signext i8 @STORAGE_GetMaxLun() {
ret i8 0
}
/* Type definitions */
typedef size_t uint64_t;

/* Variables and functions */
uint64_t _txFee(uint64_t feePerKb, size_t size) {
  uint64_t standardFee = ((size + 999) / 1000) * 1000ULL,
           fee = (((size * feePerKb / 1000) + 99) / 100) * 100;
  return (fee > standardFee) ? fee : standardFee;
}


x86 assembly (clang, -O0):
<_txFee>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x3e7,%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
imul   $0x3e8,%rax,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
add    $0x63,%rax
mov    $0x64,%ecx
xor    %edx,%edx
div    %rcx
imul   $0x64,%rax,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    116f <_txFee+0x6f>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1177 <_txFee+0x77>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_txFee>:
lea    0x3e7(%rsi),%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%r8
9b c4 20
mul    %r8
shr    $0x4,%rdx
imul   $0x3e8,%rdx,%rcx
imul   %rsi,%rdi
shr    $0x3,%rdi
mov    %rdi,%rax
mul    %r8
shr    $0x4,%rdx
lea    0x63(%rdx),%rax
shr    $0x2,%rax
movabs $0x28f5c28f5c28f5c3,%rdx
c2 f5 28
mul    %rdx
shr    $0x2,%rdx
imul   $0x64,%rdx,%rax
cmp    %rcx,%rax
cmova  %rax,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @_txFee(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = add i64 %7, 999
%9 = udiv i64 %8, 1000
%10 = mul i64 %9, 1000
store i64 %10, i64* %5
%11 = load i64, i64* %4
%12 = load i64, i64* %3
%13 = mul i64 %11, %12
%14 = udiv i64 %13, 1000
%15 = add i64 %14, 99
%16 = udiv i64 %15, 100
%17 = mul i64 %16, 100
store i64 %17, i64* %6
%18 = load i64, i64* %6
%19 = load i64, i64* %5
%20 = icmp ugt i64 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %2
%22 = load i64, i64* %6
br label %25
23: ; preds = %2
%24 = load i64, i64* %5
br label %25
25: ; preds = %23, %21
%26 = phi i64 [ %22, %21 ], [ %24, %23 ]
ret i64 %26
}

LLVM IR (-O2):
define i64 @_txFee(i64 %0, i64 %1) {
%3 = add i64 %1, 999
%4 = urem i64 %3, 1000
%5 = sub i64 %3, %4
%6 = mul i64 %1, %0
%7 = udiv i64 %6, 1000
%8 = add nuw nsw i64 %7, 99
%9 = urem i64 %8, 100
%10 = sub nuw nsw i64 %8, %9
%11 = icmp ugt i64 %10, %5
%12 = select i1 %11, i64 %10, i64 %5
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ put_low_nibble_hex(int);
void IO_put_low_byte_hex(int v) {
  put_low_nibble_hex(v >> 4);
  put_low_nibble_hex(v);
}


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

x86 assembly (clang, -O2):
<IO_put_low_byte_hex>:
push   %rbx
mov    %edi,%ebx
sar    $0x4,%edi
call   1030 <put_low_nibble_hex@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put_low_nibble_hex@plt>

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

LLVM IR (-O2):
define void @IO_put_low_byte_hex(i32 %0) {
%2 = ashr i32 %0, 4
%3 = tail call i32 @put_low_nibble_hex(i32 %2)
%4 = tail call i32 @put_low_nibble_hex(i32 %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int htonl(int);
int /*<<< orphan*/ printf(char *, int, int, int, int);
void print_ip4(uint32_t i) {
  i = htonl(i);
  printf("%i.%i.%i.%i", (i >> 24) & 0xFF, (i >> 16) & 0xFF, (i >> 8) & 0xFF,
         i & 0xFF);
}


x86 assembly (clang, -O0):
<print_ip4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <htonl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
sar    $0x18,%esi
and    $0xff,%esi
mov    -0x4(%rbp),%edx
sar    $0x10,%edx
and    $0xff,%edx
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x4(%rbp),%r8d
and    $0xff,%r8d
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ip4>:
push   %rax
call   1040 <htonl@plt>
mov    %eax,%edx
movzbl %ah,%ecx
movzbl %al,%r8d
shr    $0x18,%eax
shr    $0x10,%edx
movzbl %dl,%edx
lea    0xec1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

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


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

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

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

LLVM IR (-O2):
%struct.tty_struct = type opaque
define void @devpts_pty_kill(%struct.tty_struct* nocapture %0) {
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int __api(int, unsigned long);
int rt_set_period(struct timeval *tv) {
  unsigned long ms = tv->tv_sec * 1000 + tv->tv_usec / 1000;
  return (__api(5, ms) == 1) ? 0 : 1;
}


x86 assembly (clang, -O0):
<rt_set_period>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3e8,(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x5,%edi
call   1030 <__api@plt>
mov    %eax,%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rt_set_period>:
push   %rax
movslq (%rdi),%rax
imul   $0x3e8,%rax,%rax
movslq 0x4(%rdi),%rcx
imul   $0x10624dd3,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
movslq %ecx,%rsi
add    %rax,%rsi
mov    $0x5,%edi
call   1030 <__api@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @rt_set_period(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
%3 = alloca i64
store %struct.timeval* %0, %struct.timeval** %2
%4 = load %struct.timeval*, %struct.timeval** %2
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000
%8 = load %struct.timeval*, %struct.timeval** %2
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%10 = load i32, i32* %9
%11 = sdiv i32 %10, 1000
%12 = add nsw i32 %7, %11
%13 = sext i32 %12 to i64
store i64 %13, i64* %3
%14 = load i64, i64* %3
%15 = call i32 @__api(i32 5, i64 %14)
%16 = icmp eq i32 %15, 1
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 0, i32 1
ret i32 %18
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @rt_set_period(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%6 = load i32, i32* %5
%7 = sdiv i32 %6, 1000
%8 = add nsw i32 %7, %4
%9 = sext i32 %8 to i64
%10 = tail call i32 @__api(i32 5, i64 %9)
%11 = icmp ne i32 %10, 1
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
scalar_t__ strlen(char const *);
char *my_strdup(const char *str) {
  int len = (int)strlen(str);
  char *s1 = (char *)malloc(len + 1);
  memcpy(s1, str, len + 1);
  return s1;
}


x86 assembly (clang, -O0):
<my_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
add    $0x1,%edx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strdup>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x1(%rax),%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @my_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = trunc i64 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
%16 = call i32 @memcpy(i8* %12, i8* %13, i32 %15)
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
define i8* @my_strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add nsw i32 %3, 1
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @memcpy(i8* %6, i8* %0, i32 %4)
ret i8* %6
}
int str_to_int(char str[]) {
  int i = 0;
  int num = 0;
  while (str[i]) {
    num = (10 * num) + str[i] - '0';
    i++;
  }
  return num;
}


x86 assembly (clang, -O0):
<str_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     114e <str_to_int+0x4e>
imul   $0xa,-0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <str_to_int+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_to_int>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <str_to_int+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
lea    (%rax,%rax,4),%eax
movsbl %cl,%ecx
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <str_to_int+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @str_to_int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %12, %4 ], [ 0, %1 ]
%6 = phi i8 [ %14, %4 ], [ %2, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = mul nsw i32 %7, 10
%9 = sext i8 %6 to i32
%10 = add i32 %8, -48
%11 = add i32 %10, %9
%12 = add nuw nsw i64 %5, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %17
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  struct TYPE_4__ *fts_link;
};
typedef TYPE_1__ FTSENT;

/* Variables and functions */
int /*<<< orphan*/ free(TYPE_1__ *);
void fts_lfree(FTSENT *head) {
  FTSENT *p;
  while ((p = head) != NULL) {
    head = head->fts_link;
    free(p);
  }
}


x86 assembly (clang, -O0):
<fts_lfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1147 <fts_lfree+0x37>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    111c <fts_lfree+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fts_lfree>:
push   %rbx
test   %rdi,%rdi
je     1130 <fts_lfree+0x20>
cs nopw 0x0(%rax,%rax,1)
mov    (%rdi),%rbx
call   1030 <free@plt>
mov    %rbx,%rdi
test   %rbx,%rbx
jne    1120 <fts_lfree+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_4__* }
define void @fts_lfree(%struct.TYPE_4__* %0) {
%2 = alloca %struct.TYPE_4__*
%3 = alloca %struct.TYPE_4__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %2
br label %4
4: ; preds = %7, %1
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
store %struct.TYPE_4__* %5, %struct.TYPE_4__** %3
%6 = icmp ne %struct.TYPE_4__* %5, null
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load %struct.TYPE_4__*, %struct.TYPE_4__** %9
store %struct.TYPE_4__* %10, %struct.TYPE_4__** %2
%11 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%12 = call i32 @free(%struct.TYPE_4__* %11)
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { %struct.TYPE_4__* }
define void @fts_lfree(%struct.TYPE_4__* %0) {
%2 = icmp eq %struct.TYPE_4__* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi %struct.TYPE_4__* [ %6, %3 ], [ %0, %1 ]
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i64 0, i32 0
%6 = load %struct.TYPE_4__*, %struct.TYPE_4__** %5
%7 = tail call i32 @free(%struct.TYPE_4__* %4)
%8 = icmp eq %struct.TYPE_4__* %6, null
br i1 %8, label %9, label %3
9: ; preds = %3, %1
ret void
}
void I420Blend() {}


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

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

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

LLVM IR (-O2):
define void @I420Blend() {
ret void
}
void HSMMCSDPinMuxSetup(void) {
  (*((volatile unsigned int *)((0x44E10000) + (0x8f0)))) =
      (0 << (0x00000000u)) | (0 << (0x00000003u)) | (1 << (0x00000004u)) |
      (1 << (0x00000005u));
  (*((volatile unsigned int *)((0x44E10000) + (0x8f4)))) =
      (0 << (0x00000000u)) | (0 << (0x00000003u)) | (1 << (0x00000004u)) |
      (1 << (0x00000005u));
  (*((volatile unsigned int *)((0x44E10000) + (0x8f8)))) =
      (0 << (0x00000000u)) | (0 << (0x00000003u)) | (1 << (0x00000004u)) |
      (1 << (0x00000005u));
  (*((volatile unsigned int *)((0x44E10000) + (0x8fc)))) =
      (0 << (0x00000000u)) | (0 << (0x00000003u)) | (1 << (0x00000004u)) |
      (1 << (0x00000005u));
  (*((volatile unsigned int *)((0x44E10000) + (0x900)))) =
      (0 << (0x00000000u)) | (0 << (0x00000003u)) | (1 << (0x00000004u)) |
      (1 << (0x00000005u));
  (*((volatile unsigned int *)((0x44E10000) + (0x904)))) =
      (0 << (0x00000000u)) | (0 << (0x00000003u)) | (1 << (0x00000004u)) |
      (1 << (0x00000005u));
  (*((volatile unsigned int *)((0x44E10000) + (0x960)))) =
      (5 << (0x00000000u)) | (0 << (0x00000003u)) | (1 << (0x00000004u)) |
      (1 << (0x00000005u));
}


x86 assembly (clang, -O0):
<HSMMCSDPinMuxSetup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44e108f0,%eax
movl   $0x30,(%rax)
mov    $0x44e108f4,%eax
movl   $0x30,(%rax)
mov    $0x44e108f8,%eax
movl   $0x30,(%rax)
mov    $0x44e108fc,%eax
movl   $0x30,(%rax)
mov    $0x44e10900,%eax
movl   $0x30,(%rax)
mov    $0x44e10904,%eax
movl   $0x30,(%rax)
mov    $0x44e10960,%eax
movl   $0x35,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<HSMMCSDPinMuxSetup>:
movl   $0x30,0x44e108f0
movl   $0x30,0x44e108f4
movl   $0x30,0x44e108f8
movl   $0x30,0x44e108fc
movl   $0x30,0x44e10900
movl   $0x30,0x44e10904
movl   $0x35,0x44e10960
ret

LLVM IR (-O0):
define void @HSMMCSDPinMuxSetup() {
store volatile i32 48, i32* inttoptr (i64 1155598576 to i32*)
store volatile i32 48, i32* inttoptr (i64 1155598580 to i32*)
store volatile i32 48, i32* inttoptr (i64 1155598584 to i32*)
store volatile i32 48, i32* inttoptr (i64 1155598588 to i32*)
store volatile i32 48, i32* inttoptr (i64 1155598592 to i32*)
store volatile i32 48, i32* inttoptr (i64 1155598596 to i32*)
store volatile i32 53, i32* inttoptr (i64 1155598688 to i32*)
ret void
}

LLVM IR (-O2):
define void @HSMMCSDPinMuxSetup() {
store volatile i32 48, i32* inttoptr (i64 1155598576 to i32*)
store volatile i32 48, i32* inttoptr (i64 1155598580 to i32*)
store volatile i32 48, i32* inttoptr (i64 1155598584 to i32*)
store volatile i32 48, i32* inttoptr (i64 1155598588 to i32*)
store volatile i32 48, i32* inttoptr (i64 1155598592 to i32*)
store volatile i32 48, i32* inttoptr (i64 1155598596 to i32*)
store volatile i32 53, i32* inttoptr (i64 1155598688 to i32*)
ret void
}
/* Variables and functions */
double *malloc(int);
void aloc1Dmatrix(double **a, int size) {
  int n = (size * size) + 4;
  (*a) = malloc(n * sizeof **a);
  for (int i = 0; i < n; i++) {
    (*a)[i] = 0;
  }
}


x86 assembly (clang, -O0):
<aloc1Dmatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1179 <aloc1Dmatrix+0x69>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x14(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114c <aloc1Dmatrix+0x3c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aloc1Dmatrix>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
imul   %ebx,%ebx
lea    0x20(,%rbx,8),%edi
call   1040 <malloc@plt>
mov    %rax,(%r14)
lea    0x20(,%rbx,8),%rdx
mov    %rax,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @aloc1Dmatrix(double** %0, i32 %1) {
%3 = alloca double**
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store double** %0, double*** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %4
%9 = mul nsw i32 %7, %8
%10 = add nsw i32 %9, 4
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = mul i64 %12, 8
%14 = trunc i64 %13 to i32
%15 = call double* @malloc(i32 %14)
%16 = load double**, double*** %3
store double* %15, double** %16
store i32 0, i32* %6
br label %17
17: ; preds = %27, %2
%18 = load i32, i32* %6
%19 = load i32, i32* %5
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load double**, double*** %3
%23 = load double*, double** %22
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %23, i64 %25
store double 0.000000e+00, double* %26
br label %27
27: ; preds = %21
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %17
30: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @aloc1Dmatrix(double** nocapture %0, i32 %1) {
%3 = mul nsw i32 %1, %1
%4 = shl i32 %3, 3
%5 = add i32 %4, 32
%6 = tail call double* @malloc(i32 %5)
%7 = bitcast double* %6 to i8*
store double* %6, double** %0
%8 = zext i32 %3 to i64
%9 = shl nuw nsw i64 %8, 3
%10 = add nuw nsw i64 %9, 32
ret void
}
unsigned int ar2315_cpu_frequency(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ar2315_cpu_frequency() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, size_t, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void get_current_day(char *buf, size_t s) {
  time_t now = time(0);
  struct tm t;
  t = *localtime(&now);
  strftime(buf, s, "%F", &t);
}


x86 assembly (clang, -O0):
<get_current_day>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe99(%rip),%rdx
lea    -0x18(%rbp),%rcx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_day>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
mov    %eax,(%rsp)
lea    0xea5(%rip),%rdx
mov    %rsp,%rcx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [3 x i8] c"%F\00"
define void @get_current_day(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca %struct.tm
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = call i32 @time(i32 0)
store i32 %7, i32* %5
%8 = call %struct.tm* @localtime(i32* %5)
%9 = bitcast %struct.tm* %6 to i8*
%10 = bitcast %struct.tm* %8 to i8*
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = call i32 @strftime(i8* %11, i64 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [3 x i8] c"%F\00"
define void @get_current_day(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca %struct.tm
%5 = bitcast i32* %3 to i8*
%6 = tail call i32 @time(i32 0)
store i32 %6, i32* %3
%7 = bitcast %struct.tm* %4 to i8*
%8 = call %struct.tm* @localtime(i32* %3)
%9 = getelementptr %struct.tm, %struct.tm* %8, i64 0, i32 0
%10 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%11 = load i32, i32* %9
store i32 %11, i32* %10
%12 = call i32 @strftime(i8* %0, i64 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ generate_data();
int /*<<< orphan*/ omp_get_max_threads();
int /*<<< orphan*/ omp_set_num_threads(int /*<<< orphan*/);
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int main(void) {
  omp_set_num_threads(omp_get_max_threads());
  srand((unsigned int)time(NULL));
  generate_data();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <omp_get_max_threads@plt>
mov    %eax,%edi
call   1060 <omp_set_num_threads@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1040 <generate_data@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <omp_get_max_threads@plt>
mov    %eax,%edi
call   1060 <omp_set_num_threads@plt>
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1040 <generate_data@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @omp_get_max_threads()
%3 = call i32 @omp_set_num_threads(i32 %2)
%4 = call i64 @time(i32* null)
%5 = trunc i64 %4 to i32
%6 = call i32 @srand(i32 %5)
%7 = call i32 (...) @generate_data()
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @omp_get_max_threads()
%2 = tail call i32 @omp_set_num_threads(i32 %1)
%3 = tail call i64 @time(i32* null)
%4 = trunc i64 %3 to i32
%5 = tail call i32 @srand(i32 %4)
%6 = tail call i32 (...) @generate_data()
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
char *get_bts_password() { return "pass\0"; }


x86 assembly (clang, -O0):
<get_bts_password>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bts_password>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"pass\00\00"
define i8* @get_bts_password() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"pass\00\00"
define i8* @get_bts_password() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ checker2(int *);
int /*<<< orphan*/ printf(char *, int);
void calleeChecks2() {
  int *p = NULL;
  checker2(p);
  printf("%d\n", *p);
}


x86 assembly (clang, -O0):
<calleeChecks2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <checker2@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calleeChecks2>:
push   %rax
xor    %edi,%edi
call   1040 <checker2@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @calleeChecks2() {
%1 = tail call i32 @checker2(i32* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
ret void
}
void *func_a_ptr(void *const x) { return x; }


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

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

LLVM IR (-O0):
define i8* @func_a_ptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret i8* %3
}

LLVM IR (-O2):
define i8* @func_a_ptr(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xbe() {
  Assert_real((isalnum(190) == 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_isalnum.c",
              955, ("isalnum should be 0 for 0xbe"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xbe>:
push   %rax
mov    $0xbe,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3bb,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xbe\00"
define void @t_isalnum_0xbe() {
%1 = call i64 @isalnum(i32 190)
%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 955, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xbe\00"
define void @t_isalnum_0xbe() {
%1 = tail call i64 @isalnum(i32 190)
%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 955, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void MotorDrive(char dir, char speed) { ; }


x86 assembly (clang, -O0):
<MotorDrive>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @MotorDrive(i8 signext %0, i8 signext %1) {
ret void
}
float addsf3(float a, float b) { return a + b; }


x86 assembly (clang, -O0):
<addsf3>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<addsf3>:
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @addsf3(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
void dv2o_sub(double *output, double *a, double *b) {
  output[0] = a[0] - b[0];
  output[1] = a[1] - b[1];
}


x86 assembly (clang, -O0):
<dv2o_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dv2o_sub>:
movsd  (%rsi),%xmm0
subsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
subsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @dv2o_sub(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fsub double %9, %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fsub double %18, %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
ret void
}

LLVM IR (-O2):
define void @dv2o_sub(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fsub double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
ret void
}
int test_fun(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @test_fun() {
ret i32 42
}

LLVM IR (-O2):
define i32 @test_fun() {
ret i32 42
}
void __attribute((destructor)) mdbg_cleanup_mem_alloc(void) {}


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

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

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @mdbg_cleanup_mem_alloc, i8* null }]
define void @mdbg_cleanup_mem_alloc() {
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @mdbg_cleanup_mem_alloc, i8* null }]
define void @mdbg_cleanup_mem_alloc() {
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=20 REPO_URL= REVISION= CHANGED_REVISION= "
         "CHANGE_DATE= BUILD_DATE=Sun Jul  7 17:17:50 EDT 2013 BUILD=debug "
         "TARGET_PLATFORM=rk30 MALI_PLATFORM=rk30 "
         "KDIR=/home/thesawolf/android/system/kernel/rockchip/rk3188/drivers/"
         "gpu/mali/rk3x OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y "
         "USING_PROFILING=y USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 "
         "MALI_UPPER_HALF_SCHEDULING=1";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__malidrv_build_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [397 x i8] c"malidrv: API_VERSION=20 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Sun Jul 7 17:17:50 EDT 2013 BUILD=debug TARGET_PLATFORM=rk30 MALI_PLATFORM=rk30 KDIR=/home/thesawolf/android/system/kernel/rockchip/rk3188/drivers/gpu/mali/rk3x OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([397 x i8], [397 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [397 x i8] c"malidrv: API_VERSION=20 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Sun Jul 7 17:17:50 EDT 2013 BUILD=debug TARGET_PLATFORM=rk30 MALI_PLATFORM=rk30 KDIR=/home/thesawolf/android/system/kernel/rockchip/rk3188/drivers/gpu/mali/rk3x OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([397 x i8], [397 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ print_array(int, int *);
int main(void) {
  int arr[20] = {[10] = 1};
  print_array(20, arr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
movl   $0x1,-0x38(%rbp)
lea    -0x60(%rbp),%rsi
mov    $0x14,%edi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x1,0x28(%rsp)
mov    %rsp,%rsi
mov    $0x14,%edi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i32]
store i32 0, i32* %1
%3 = bitcast [20 x i32]* %2 to i8*
%4 = bitcast i8* %3 to <{ [11 x i32], [9 x i32] }>*
%5 = getelementptr inbounds <{ [11 x i32], [9 x i32] }>, <{ [11 x i32], [9 x i32] }>* %4, i32 0, i32 0
%6 = getelementptr inbounds [11 x i32], [11 x i32]* %5, i32 0, i32 10
store i32 1, i32* %6
%7 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%8 = call i32 @print_array(i32 20, i32* %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 10
store i32 1, i32* %3
%4 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%5 = call i32 @print_array(i32 20, i32* %4)
ret i32 0
}
void fuck() {}


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

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

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

LLVM IR (-O2):
define void @fuck() {
ret void
}
int foo_1() { return 1034; }


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

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

LLVM IR (-O0):
define i32 @foo_1() {
ret i32 1034
}

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

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int inet_pton(int /*<<< orphan*/, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *strstr(char *, char *);
int ipv4_str_to_buf(char *str, uint8_t *buf) {
  if (strstr(str, ".") == NULL) {
    return 0;
  }
  return inet_pton(AF_INET, str, buf) == 1;
}


x86 assembly (clang, -O0):
<ipv4_str_to_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
jne    1156 <ipv4_str_to_buf+0x36>
movl   $0x0,-0x4(%rbp)
jmp    117a <ipv4_str_to_buf+0x5a>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <inet_pton@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_str_to_buf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1159 <ipv4_str_to_buf+0x39>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <inet_pton@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
jmp    115b <ipv4_str_to_buf+0x3b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@AF_INET = global i32 0
define i32 @ipv4_str_to_buf(i8* %0, i32* %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 46)
%4 = icmp eq i8* %3, null
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = load i32, i32* @AF_INET
%7 = tail call i32 @inet_pton(i32 %6, i8* %0, i32* %1)
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ %9, %5 ], [ 0, %2 ]
ret i32 %11
}
void vink_epp_state_free(struct vink_epp_state *state) {}


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

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

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

LLVM IR (-O2):
%struct.vink_epp_state = type opaque
define void @vink_epp_state_free(%struct.vink_epp_state* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello world\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct property {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ delete_prop_from_dl(struct property *);
void ofdt_property_put(struct property *to_delete) {
  delete_prop_from_dl(to_delete);
}


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

x86 assembly (clang, -O2):
<ofdt_property_put>:
jmp    1030 <delete_prop_from_dl@plt>

LLVM IR (-O0):
%struct.property = type { i32 }
define void @ofdt_property_put(%struct.property* %0) {
%2 = alloca %struct.property*
store %struct.property* %0, %struct.property** %2
%3 = load %struct.property*, %struct.property** %2
%4 = call i32 @delete_prop_from_dl(%struct.property* %3)
ret void
}

LLVM IR (-O2):
%struct.property = type { i32 }
define void @ofdt_property_put(%struct.property* %0) {
%2 = tail call i32 @delete_prop_from_dl(%struct.property* %0)
ret void
}