xunge/DecIR huggingface dataset:
int g_DUMMY_scrollbar_reconnect(int win_id, int vp_id, float wx1, float wy1,
                                float wx2, float wy2) {
  win_id = win_id;
  vp_id = vp_id;
  wx1 = wx1;
  wy1 = wy1;
  wx2 = wx2;
  wy2 = wy2;
  return 0;
}


x86 assembly (clang, -O0):
<g_DUMMY_scrollbar_reconnect>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @g_DUMMY_scrollbar_reconnect(i32 %0, i32 %1, float %2, float %3, float %4, float %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store i32 %0, i32* %7
store i32 %1, i32* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load i32, i32* %7
store i32 %13, i32* %7
%14 = load i32, i32* %8
store i32 %14, i32* %8
%15 = load float, float* %9
store float %15, float* %9
%16 = load float, float* %10
store float %16, float* %10
%17 = load float, float* %11
store float %17, float* %11
%18 = load float, float* %12
store float %18, float* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @g_DUMMY_scrollbar_reconnect(i32 %0, i32 %1, float %2, float %3, float %4, float %5) {
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  while (x > 0 && x < y) {
    x = 2 * x;
    y++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jle    114e <main+0x3e>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115e <main+0x4e>
jmp    1175 <main+0x65>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
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
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br label %13
13: ; preds = %9, %6
%14 = phi i1 [ false, %6 ], [ %12, %9 ]
br i1 %14, label %15, label %20
15: ; preds = %13
%16 = load i32, i32* %2
%17 = mul nsw i32 2, %16
store i32 %17, i32* %2
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %6
20: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= "
         "REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Sat Sep 21 "
         "23:12:47 CEST 2013 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 "
         "USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 "
         "KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y";
}


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 = [428 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Sat Sep 21 23:12:47 CEST 2013 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([428 x i8], [428 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [428 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Sat Sep 21 23:12:47 CEST 2013 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([428 x i8], [428 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("getopt [-d?] [-c count] [-s size]\n");
  errno = 0;
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"getopt [-d?] [-c count] [-s size]\0A\00"
@errno = global i64 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* @errno
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@str = [34 x i8] c"getopt [-d?] [-c count] [-s size]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
store i64 0, i64* @errno
ret void
}
/* Variables and functions */
unsigned long big2littleul(unsigned long);
scalar_t__ isLittleEndian();
unsigned long big2hostul(unsigned long num) {
  if (isLittleEndian())
    return big2littleul(num);
  return num;
}


x86 assembly (clang, -O0):
<big2hostul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <isLittleEndian@plt>
cmp    $0x0,%rax
je     114f <big2hostul+0x2f>
mov    -0x10(%rbp),%rdi
call   1030 <big2littleul@plt>
mov    %rax,-0x8(%rbp)
jmp    1157 <big2hostul+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<big2hostul>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <isLittleEndian@plt>
test   %rax,%rax
je     1139 <big2hostul+0x19>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <big2littleul@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @big2hostul(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = call i64 (...) @isLittleEndian()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %3
%8 = call i64 @big2littleul(i64 %7)
store i64 %8, i64* %2
br label %11
9: ; preds = %1
%10 = load i64, i64* %3
store i64 %10, i64* %2
br label %11
11: ; preds = %9, %6
%12 = load i64, i64* %2
ret i64 %12
}

LLVM IR (-O2):
define i64 @big2hostul(i64 %0) {
%2 = tail call i64 (...) @isLittleEndian()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i64 @big2littleul(i64 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i64 [ %5, %4 ], [ %0, %1 ]
ret i64 %7
}
void audiohw_init(void) {
  (*(volatile unsigned short *)(0x38)) = (0x00),
                             (*(volatile unsigned short *)(0x39)) = 0;
  (*(volatile unsigned short *)(0x38)) = (0x01),
                             (*(volatile unsigned short *)(0x39)) = 3 << 4;
  (*(volatile unsigned short *)(0x38)) = (0x0e),
                             (*(volatile unsigned short *)(0x39)) = 1 << 1;
  (*(volatile unsigned short *)(0x38)) = (0x04),
                             (*(volatile unsigned short *)(0x39)) = 0x00a0;
  (*(volatile unsigned short *)(0x38)) = (0x05),
                             (*(volatile unsigned short *)(0x39)) = 0;
}


x86 assembly (clang, -O0):
<audiohw_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x38,%eax
movw   $0x0,(%rax)
mov    $0x39,%eax
movw   $0x0,(%rax)
mov    $0x38,%eax
movw   $0x1,(%rax)
mov    $0x39,%eax
movw   $0x30,(%rax)
mov    $0x38,%eax
movw   $0xe,(%rax)
mov    $0x39,%eax
movw   $0x2,(%rax)
mov    $0x38,%eax
movw   $0x4,(%rax)
mov    $0x39,%eax
movw   $0xa0,(%rax)
mov    $0x38,%eax
movw   $0x5,(%rax)
mov    $0x39,%eax
movw   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<audiohw_init>:
movw   $0x0,0x38
movw   $0x0,0x39
movw   $0x1,0x38
movw   $0x30,0x39
movw   $0xe,0x38
movw   $0x2,0x39
movw   $0x4,0x38
movw   $0xa0,0x39
movw   $0x5,0x38
movw   $0x0,0x39
ret

LLVM IR (-O0):
define void @audiohw_init() {
store volatile i16 0, i16* inttoptr (i64 56 to i16*)
store volatile i16 0, i16* inttoptr (i64 57 to i16*)
store volatile i16 1, i16* inttoptr (i64 56 to i16*)
store volatile i16 48, i16* inttoptr (i64 57 to i16*)
store volatile i16 14, i16* inttoptr (i64 56 to i16*)
store volatile i16 2, i16* inttoptr (i64 57 to i16*)
store volatile i16 4, i16* inttoptr (i64 56 to i16*)
store volatile i16 160, i16* inttoptr (i64 57 to i16*)
store volatile i16 5, i16* inttoptr (i64 56 to i16*)
store volatile i16 0, i16* inttoptr (i64 57 to i16*)
ret void
}

LLVM IR (-O2):
define void @audiohw_init() {
store volatile i16 0, i16* inttoptr (i64 56 to i16*)
store volatile i16 0, i16* inttoptr (i64 57 to i16*)
store volatile i16 1, i16* inttoptr (i64 56 to i16*)
store volatile i16 48, i16* inttoptr (i64 57 to i16*)
store volatile i16 14, i16* inttoptr (i64 56 to i16*)
store volatile i16 2, i16* inttoptr (i64 57 to i16*)
store volatile i16 4, i16* inttoptr (i64 56 to i16*)
store volatile i16 160, i16* inttoptr (i64 57 to i16*)
store volatile i16 5, i16* inttoptr (i64 56 to i16*)
store volatile i16 0, i16* inttoptr (i64 57 to i16*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void __wdie(const char *text) {
  fputs(text, stderr);
  abort();
}


x86 assembly (clang, -O0):
<__wdie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__wdie>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @__wdie(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @__wdie(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int clock_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
clock_t times(struct tms *buf) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<times>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<times>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.tms = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @times(%struct.tms* %0) {
%2 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.tms = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @times(%struct.tms* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
int _my_log2_(int i) {
  register int tmp, index;
  tmp = i;
  index = 0;
  while (tmp != 1) {
    tmp /= 2;
    index++;
  }
  return index;
}


x86 assembly (clang, -O0):
<_my_log2_>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     113a <_my_log2_+0x3a>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <_my_log2_+0x14>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_my_log2_>:
xor    %eax,%eax
cmp    $0x1,%edi
je     1124 <_my_log2_+0x24>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    $0x1f,%ecx
add    %edi,%ecx
sar    %ecx
add    $0x1,%eax
and    $0xfffffffe,%edi
cmp    $0x2,%edi
mov    %ecx,%edi
jne    1110 <_my_log2_+0x10>
ret

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

LLVM IR (-O2):
define i32 @_my_log2_(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 2
%7 = add nuw nsw i32 %4, 1
%8 = and i32 %5, -2
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void msg_log(const char *label, const char *msg) {
  printf("[%-15s]", label, msg);
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"[%-15s]\00"
define void @msg_log(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 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"[%-15s]\00"
define void @msg_log(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRD9_set(void) { return U_WMRCORENONE_set("U_WMRD9"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRD9\00"
define i8* @U_WMRD9_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int strlen(char *);
void str_cpy(char *dest, char src[9000]) {
  char a = 'a';
  int size = strlen(src), index = 0;
  for (index = 0; index < size; index++) {
    dest[index] = 'a';
  }
  dest[index] = '\0';
}


x86 assembly (clang, -O0):
<str_cpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x61,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1164 <str_cpy+0x54>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x61,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113e <str_cpy+0x2e>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_cpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    1147 <str_cpy+0x27>
mov    %eax,%ebx
mov    %r14,%rdi
mov    $0x61,%esi
mov    %rbx,%rdx
call   1040 <memset@plt>
jmp    1149 <str_cpy+0x29>
xor    %ebx,%ebx
movb   $0x0,(%r14,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @str_cpy(i8* nocapture writeonly %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = zext i32 %3 to i64
%7 = zext i32 %3 to i64
br label %8
8: ; preds = %5, %2
%9 = phi i64 [ 0, %2 ], [ %7, %5 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 0, i8* %10
ret void
}
int DskGetSectorSize(int N) {
  if (N < 8)
    return (1 << N) << 7;
  else
    return 0x0200;
}


x86 assembly (clang, -O0):
<DskGetSectorSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1126 <DskGetSectorSize+0x26>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
shl    $0x7,%eax
mov    %eax,-0x4(%rbp)
jmp    112d <DskGetSectorSize+0x2d>
movl   $0x200,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DskGetSectorSize>:
mov    %edi,%ecx
mov    $0x80,%edx
shl    %cl,%edx
cmp    $0x8,%edi
mov    $0x200,%eax
cmovl  %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @DskGetSectorSize(i32 %0) {
%2 = icmp slt i32 %0, 8
%3 = shl i32 128, %0
%4 = select i1 %2, i32 %3, i32 512
ret i32 %4
}
__typeof__(isxdigit((void *)1)) test_isxdigit_69(void) {
  return isxdigit((void *)1);
}


x86 assembly (clang, -O0):
<test_isxdigit_69>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
mov    %eax,%edi
call   1030 <isxdigit@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_isxdigit_69() {
%1 = call i32 @isxdigit(i32 ptrtoint (i8* inttoptr (i64 1 to i8*) to i32))
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_isxdigit_69() {
%1 = tail call i32 @isxdigit(i32 1)
ret i32 %1
}
void foo420() {}


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

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

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

LLVM IR (-O2):
define void @foo420() {
ret void
}
/* Variables and functions */
unsigned int atoi(char *);
scalar_t__ gpio_read(unsigned int, char *, char *, unsigned int const);
int gpio_get_value(unsigned int gpio, unsigned int *value) {
  const unsigned int length = 2;
  char buffer[length];
  if (gpio_read(gpio, "value", buffer, length) < 0)
    return -1;
  *value = atoi(buffer);
  return 0;
}


x86 assembly (clang, -O0):
<gpio_get_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
mov    %rsp,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%edi
lea    0xeb9(%rip),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x2,%ecx
call   1030 <gpio_read@plt>
cmp    $0x0,%rax
jge    1172 <gpio_get_value+0x52>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x24(%rbp)
jmp    1191 <gpio_get_value+0x71>
lea    -0x30(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_get_value>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0xed1(%rip),%rsi
mov    %rsp,%rdx
mov    $0x2,%ecx
call   1030 <gpio_read@plt>
test   %rax,%rax
js     114f <gpio_get_value+0x2f>
mov    %rsp,%rdi
call   1040 <atoi@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
jmp    1154 <gpio_get_value+0x34>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"value\00"
define i32 @gpio_get_value(i32 %0, i32* nocapture writeonly %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = call i64 @gpio_read(i32 %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4, i32 2)
%6 = icmp slt i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @atoi(i8* %4)
store i32 %8, i32* %1
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ 0, %7 ], [ -1, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ start_timer(unsigned long, int /*<<< orphan*/);
void start_wallclock_timer(unsigned long int maxtimer) {
  start_timer(maxtimer, CLOCK_REALTIME);
}


x86 assembly (clang, -O0):
<start_wallclock_timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <start_timer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_wallclock_timer>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <start_timer@plt>

LLVM IR (-O0):
@CLOCK_REALTIME = global i32 0
define void @start_wallclock_timer(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i32, i32* @CLOCK_REALTIME
%5 = call i32 @start_timer(i64 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@CLOCK_REALTIME = global i32 0
define void @start_wallclock_timer(i64 %0) {
%2 = load i32, i32* @CLOCK_REALTIME
%3 = tail call i32 @start_timer(i64 %0, i32 %2)
ret void
}
unsigned long increment(unsigned long x, int field) {
  int f2 = field + field;
  static unsigned char transxor[4] = {1, 2, 2, 1};
  unsigned long g = x >> f2;
  unsigned long h = transxor[g & 3];
  return x ^ (h << f2);
}


x86 assembly (clang, -O0):
<increment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
shr    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
and    $0x3,%rcx
lea    0x2eef(%rip),%rax
movzbl (%rax,%rcx,1),%eax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%ecx
shl    %cl,%rdx
mov    %rdx,%rcx
xor    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<increment>:
lea    (%rsi,%rsi,1),%ecx
mov    %rdi,%rax
shr    %cl,%rax
and    $0x3,%eax
lea    0xeed(%rip),%rdx
movzbl (%rax,%rdx,1),%eax
shl    %cl,%rax
xor    %rdi,%rax
ret

LLVM IR (-O0):
@increment.transxor = internal global [4 x i8] c"\01\02\02\01"
define i64 @increment(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
store i32 %10, i32* %5
%11 = load i64, i64* %3
%12 = load i32, i32* %5
%13 = zext i32 %12 to i64
%14 = lshr i64 %11, %13
store i64 %14, i64* %6
%15 = load i64, i64* %6
%16 = and i64 %15, 3
%17 = getelementptr inbounds [4 x i8], [4 x i8]* @increment.transxor, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i64
store i64 %19, i64* %7
%20 = load i64, i64* %3
%21 = load i64, i64* %7
%22 = load i32, i32* %5
%23 = zext i32 %22 to i64
%24 = shl i64 %21, %23
%25 = xor i64 %20, %24
ret i64 %25
}

LLVM IR (-O2):
@increment.transxor = internal unnamed_addr constant [4 x i8] c"\01\02\02\01"
define i64 @increment(i64 %0, i32 %1) {
%3 = shl nsw i32 %1, 1
%4 = zext i32 %3 to i64
%5 = lshr i64 %0, %4
%6 = and i64 %5, 3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* @increment.transxor, i64 0, i64 %6
%8 = load i8, i8* %7
%9 = zext i8 %8 to i64
%10 = shl i64 %9, %4
%11 = xor i64 %10, %0
ret i64 %11
}
int y(double i) { return (i + 2.0) < i; }


x86 assembly (clang, -O0):
<y>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm1
addsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<y>:
movsd  0xef8(%rip),%xmm1
addsd  %xmm0,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @y(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 2.000000e+00
%5 = load double, double* %2
%6 = fcmp olt double %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @y(double %0) {
%2 = fadd double %0, 2.000000e+00
%3 = fcmp olt double %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpunord_ss(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 f1(__m128 x, __m128 y) { return _mm_cmpunord_ss(x, y); }


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

x86 assembly (clang, -O2):
<f1>:
jmp    1030 <_mm_cmpunord_ss@plt>

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

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpunord_ss(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ TOSH_CLR_GIO1_PIN();
int /*<<< orphan*/ TOSH_MAKE_GIO1_INPUT();
int /*<<< orphan*/ TOSH_MAKE_GIO1_OUTPUT();
int TOSH_READ_GIO1_PIN();
int /*<<< orphan*/ TOSH_uwait(int);
int readBit() {
  int result;
  TOSH_MAKE_GIO1_OUTPUT();
  TOSH_CLR_GIO1_PIN();
  TOSH_uwait(1);
  TOSH_MAKE_GIO1_INPUT();
  TOSH_uwait(7);
  result = TOSH_READ_GIO1_PIN();
  TOSH_uwait(50);
  return result;
}


x86 assembly (clang, -O0):
<readBit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <TOSH_MAKE_GIO1_OUTPUT@plt>
mov    $0x0,%al
call   1060 <TOSH_CLR_GIO1_PIN@plt>
mov    $0x1,%edi
call   1070 <TOSH_uwait@plt>
mov    $0x0,%al
call   1050 <TOSH_MAKE_GIO1_INPUT@plt>
mov    $0x7,%edi
call   1070 <TOSH_uwait@plt>
mov    $0x0,%al
call   1040 <TOSH_READ_GIO1_PIN@plt>
mov    %eax,-0x4(%rbp)
mov    $0x32,%edi
call   1070 <TOSH_uwait@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readBit>:
push   %rbx
xor    %eax,%eax
call   1030 <TOSH_MAKE_GIO1_OUTPUT@plt>
xor    %eax,%eax
call   1060 <TOSH_CLR_GIO1_PIN@plt>
mov    $0x1,%edi
call   1070 <TOSH_uwait@plt>
xor    %eax,%eax
call   1050 <TOSH_MAKE_GIO1_INPUT@plt>
mov    $0x7,%edi
call   1070 <TOSH_uwait@plt>
xor    %eax,%eax
call   1040 <TOSH_READ_GIO1_PIN@plt>
mov    %eax,%ebx
mov    $0x32,%edi
call   1070 <TOSH_uwait@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @readBit() {
%1 = alloca i32
%2 = call i32 (...) @TOSH_MAKE_GIO1_OUTPUT()
%3 = call i32 (...) @TOSH_CLR_GIO1_PIN()
%4 = call i32 @TOSH_uwait(i32 1)
%5 = call i32 (...) @TOSH_MAKE_GIO1_INPUT()
%6 = call i32 @TOSH_uwait(i32 7)
%7 = call i32 (...) @TOSH_READ_GIO1_PIN()
store i32 %7, i32* %1
%8 = call i32 @TOSH_uwait(i32 50)
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @readBit() {
%1 = tail call i32 (...) @TOSH_MAKE_GIO1_OUTPUT()
%2 = tail call i32 (...) @TOSH_CLR_GIO1_PIN()
%3 = tail call i32 @TOSH_uwait(i32 1)
%4 = tail call i32 (...) @TOSH_MAKE_GIO1_INPUT()
%5 = tail call i32 @TOSH_uwait(i32 7)
%6 = tail call i32 (...) @TOSH_READ_GIO1_PIN()
%7 = tail call i32 @TOSH_uwait(i32 50)
ret i32 %6
}
void default_int_handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<default_int_handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <default_int_handler+0x9>
jmp    1109 <default_int_handler+0x9>

x86 assembly (clang, -O2):
<default_int_handler>:
jmp    1100 <default_int_handler>

LLVM IR (-O0):
define void @default_int_handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @default_int_handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xd2() {
  Assert_real((isbdigit(210) == 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_isbdigit.c",
              1055, ("isbdigit should be 0 for 0xd2"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xd2\00"
define void @t_isbdigit_0xd2() {
%1 = call i64 @isbdigit(i32 210)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1055, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xd2\00"
define void @t_isbdigit_0xd2() {
%1 = tail call i64 @isbdigit(i32 210)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1055, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void svd_free_double2(double **a) {
  free(a[0]);
  free(a);
}


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

x86 assembly (clang, -O2):
<svd_free_double2>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @svd_free_double2(double** %0) {
%2 = alloca double**
store double** %0, double*** %2
%3 = load double**, double*** %2
%4 = getelementptr inbounds double*, double** %3, i64 0
%5 = load double*, double** %4
%6 = bitcast double* %5 to i8*
%7 = load double**, double*** %2
%8 = bitcast double** %7 to i8*
ret void
}

LLVM IR (-O2):
define void @svd_free_double2(double** nocapture %0) {
%2 = bitcast double** %0 to i8**
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast double** %0 to i8*
tail call void @free(i8* %4)
ret void
}
/* Variables and functions */
float __ocml_log_f32(float);
float __logf(float x) { return __ocml_log_f32(x); }


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

x86 assembly (clang, -O2):
<__logf>:
jmp    1030 <__ocml_log_f32@plt>

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

LLVM IR (-O2):
define float @__logf(float %0) {
%2 = tail call float @__ocml_log_f32(float %0)
ret float %2
}
int main(int argc, char **argv) {
  asm volatile("movw $0x28,%ax; movw %ax,%ds");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x28,%ax
mov    %eax,%ds
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x28,%ax
mov    %eax,%ds
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
tail call void asm sideeffect "movw $$0x28,%ax; movw %ax,%ds", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
int digits_sum(long n) {
  if (n < 0)
    n = -n;
  int sum = 0;
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}


x86 assembly (clang, -O0):
<digits_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    111d <digits_sum+0x1d>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    115e <digits_sum+0x5e>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
movslq -0xc(%rbp),%rax
add    %rdx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
jmp    1124 <digits_sum+0x24>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digits_sum>:
test   %rdi,%rdi
je     1142 <digits_sum+0x42>
mov    %rdi,%rsi
neg    %rsi
cmovs  %rdi,%rsi
xor    %ecx,%ecx
movabs $0xcccccccccccccccd,%r8
cc cc cc
nopl   0x0(%rax,%rax,1)
mov    %rsi,%rax
mul    %r8
shr    $0x3,%rdx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%eax
mov    %esi,%edi
sub    %eax,%edi
add    %edi,%ecx
cmp    $0x9,%rsi
mov    %rdx,%rsi
ja     1120 <digits_sum+0x20>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @digits_sum(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = sub nsw i64 0, %7
store i64 %8, i64* %2
br label %9
9: ; preds = %6, %1
store i32 0, i32* %3
br label %10
10: ; preds = %13, %9
%11 = load i64, i64* %2
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = load i64, i64* %2
%15 = srem i64 %14, 10
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = add nsw i64 %17, %15
%19 = trunc i64 %18 to i32
store i32 %19, i32* %3
%20 = load i64, i64* %2
%21 = sdiv i64 %20, 10
store i64 %21, i64* %2
br label %10
22: ; preds = %10
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @digits_sum(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ 0, %3 ]
%7 = phi i64 [ %11, %5 ], [ %4, %3 ]
%8 = urem i64 %7, 10
%9 = trunc i64 %8 to i32
%10 = add i32 %6, %9
%11 = udiv i64 %7, 10
%12 = icmp ult i64 %7, 10
br i1 %12, label %13, label %5
13: ; preds = %5, %1
%14 = phi i32 [ 0, %1 ], [ %10, %5 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ wm_debug(char *);
void toggle_fullscreen() { wm_debug("Fullscreen"); }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Fullscreen\00"
define void @toggle_fullscreen() {
%1 = tail call i32 @wm_debug(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
insspace(f, n) int f, n;
{
  linsert(n, ' ');
  backchar(f, n);
}


x86 assembly (clang, -O0):
<insspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x20,%esi
mov    $0x0,%al
call   1030 <linsert@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1040 <backchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<insspace>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <linsert@plt>
mov    %ebp,%edi
mov    %ebx,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <backchar@plt>

LLVM IR (-O0):
define i32 @insspace(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @linsert to i32 (i32, i32, ...)*)(i32 %6, i32 32)
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call i32 (i32, i32, ...) bitcast (i32 (...)* @backchar to i32 (i32, i32, ...)*)(i32 %8, i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @insspace(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @linsert to i32 (i32, i32, ...)*)(i32 %1, i32 32)
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @backchar to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
ret i32 undef
}
void WebPInitSamplersSSE41(void) {}


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

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

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

LLVM IR (-O2):
define void @WebPInitSamplersSSE41() {
ret void
}
/* Type definitions */
struct cramfs_inode {
  int dummy;
};

/* Variables and functions */
struct cramfs_inode *malloc(int);
struct cramfs_inode *cramfs_iget(struct cramfs_inode *i) {
  struct cramfs_inode *inode = malloc(sizeof(struct cramfs_inode));
  *inode = *i;
  return inode;
}


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

x86 assembly (clang, -O2):
<cramfs_iget>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    (%rbx),%ecx
mov    %ecx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
%struct.cramfs_inode = type { i32 }
define %struct.cramfs_inode* @cramfs_iget(%struct.cramfs_inode* %0) {
%2 = alloca %struct.cramfs_inode*
%3 = alloca %struct.cramfs_inode*
store %struct.cramfs_inode* %0, %struct.cramfs_inode** %2
%4 = call %struct.cramfs_inode* @malloc(i32 4)
store %struct.cramfs_inode* %4, %struct.cramfs_inode** %3
%5 = load %struct.cramfs_inode*, %struct.cramfs_inode** %3
%6 = load %struct.cramfs_inode*, %struct.cramfs_inode** %2
%7 = bitcast %struct.cramfs_inode* %5 to i8*
%8 = bitcast %struct.cramfs_inode* %6 to i8*
%9 = load %struct.cramfs_inode*, %struct.cramfs_inode** %3
ret %struct.cramfs_inode* %9
}

LLVM IR (-O2):
%struct.cramfs_inode = type { i32 }
define noalias %struct.cramfs_inode* @cramfs_iget(%struct.cramfs_inode* nocapture %0) {
%2 = tail call %struct.cramfs_inode* @malloc(i32 4)
%3 = getelementptr %struct.cramfs_inode, %struct.cramfs_inode* %0, i64 0, i32 0
%4 = getelementptr %struct.cramfs_inode, %struct.cramfs_inode* %2, i64 0, i32 0
%5 = load i32, i32* %3
store i32 %5, i32* %4
ret %struct.cramfs_inode* %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x44_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x44_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x44_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x44_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x44_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
int MAIN() {
  int i = 8;
  int *p = &i;
  *p <<= 2;
  print("i ", *p);
  print(i);
  return 0;
}


x86 assembly (clang, -O0):
<MAIN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x8,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
shl    $0x2,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAIN>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <print@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"i \00"
define i32 @MAIN() {
%1 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @print to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 32)
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @print to i32 (i32, ...)*)(i32 32)
ret i32 0
}
void dbg_remove_files(struct ci_hdrc *ci) {}


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

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

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

LLVM IR (-O2):
%struct.ci_hdrc = type opaque
define void @dbg_remove_files(%struct.ci_hdrc* nocapture %0) {
ret void
}