xunge/DecIR huggingface dataset:
/* Variables and functions */
long __udivsi3(long, long);
long int __attribute__((optimize("Os"))) __divsi3(long int a, long int b) {
  long s_a = (a >> (sizeof(long int) * 9 - 1));
  long s_b = (b >> (sizeof(long int) * 9 - 1));
  a = (a ^ s_a) - s_a;
  b = (b ^ s_b) - s_b;
  s_a ^= s_b;
  return (__udivsi3(a, b) ^ s_a) - s_a;
}


x86 assembly (clang, -O0):
<__divsi3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x47,%ecx
sar    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x47,%ecx
sar    %cl,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
xor    -0x18(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
xor    -0x20(%rbp),%rax
sub    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__udivsi3@plt>
xor    -0x18(%rbp),%rax
sub    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__divsi3>:
jmp    1030 <__udivsi3@plt>

LLVM IR (-O0):
define i64 @__divsi3(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* %3
%8 = ashr i64 %7, 71
store i64 %8, i64* %5
%9 = load i64, i64* %4
%10 = ashr i64 %9, 71
store i64 %10, i64* %6
%11 = load i64, i64* %3
%12 = load i64, i64* %5
%13 = xor i64 %11, %12
%14 = load i64, i64* %5
%15 = sub nsw i64 %13, %14
store i64 %15, i64* %3
%16 = load i64, i64* %4
%17 = load i64, i64* %6
%18 = xor i64 %16, %17
%19 = load i64, i64* %6
%20 = sub nsw i64 %18, %19
store i64 %20, i64* %4
%21 = load i64, i64* %6
%22 = load i64, i64* %5
%23 = xor i64 %22, %21
store i64 %23, i64* %5
%24 = load i64, i64* %3
%25 = load i64, i64* %4
%26 = call i64 @__udivsi3(i64 %24, i64 %25)
%27 = load i64, i64* %5
%28 = xor i64 %26, %27
%29 = load i64, i64* %5
%30 = sub nsw i64 %28, %29
ret i64 %30
}

LLVM IR (-O2):
define i64 @__divsi3(i64 %0, i64 %1) {
%3 = tail call i64 @__udivsi3(i64 poison, i64 poison)
ret i64 poison
}
char addimmqi3(char a) { return a + 50; }


x86 assembly (clang, -O0):
<addimmqi3>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x32,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addimmqi3>:
lea    0x32(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @addimmqi3(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, 50
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @addimmqi3(i8 signext %0) {
%2 = add i8 %0, 50
ret i8 %2
}
int light_model_init(void) { return 0; }


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

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

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

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

/* Variables and functions */
int ax25_fcs(int, int /*<<< orphan*/ *, int);
uint16_t ax25_compute_crc(uint8_t *buf, uint16_t len) {
  uint16_t fcs = 0xffff;
  fcs = ax25_fcs(fcs, buf, len);
  fcs ^= 0xffff;
  return fcs;
}


x86 assembly (clang, -O0):
<ax25_compute_crc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffff,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <ax25_fcs@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ax25_compute_crc>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xffff,%edi
call   1030 <ax25_fcs@plt>
xor    $0xffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ax25_compute_crc(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 65535, i32* %5
%6 = load i32, i32* %5
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = call i32 @ax25_fcs(i32 %6, i32* %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = xor i32 %10, 65535
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @ax25_compute_crc(i32* %0, i32 %1) {
%3 = tail call i32 @ax25_fcs(i32 65535, i32* %0, i32 %1)
%4 = xor i32 %3, 65535
ret i32 %4
}
long absOf(long a) { return (a < 0) ? (-1) * a : a; }


x86 assembly (clang, -O0):
<absOf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1121 <absOf+0x21>
imul   $0xffffffffffffffff,-0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1129 <absOf+0x29>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @absOf(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = mul nsw i64 -1, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @absOf(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
void chaz_ConfWriterPython_add_typedef(const char *type, const char *alias) {
  (void)type;
  (void)alias;
}


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

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

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

LLVM IR (-O2):
define void @chaz_ConfWriterPython_add_typedef(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void sched_autogroup_move_task(struct task_struct *p) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @sched_autogroup_move_task(%struct.task_struct* nocapture %0) {
ret void
}
int ft_isprint(int c) {
  if (c >= 32 && c < 127)
    return (1);
  return (0);
}


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

x86 assembly (clang, -O2):
<ft_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int EAGAIN;
int EINTR;
int EWOULDBLOCK;
bool Util_IsResumableIOError(int errno_) {
  return errno_ == EAGAIN || errno_ == EINTR || errno_ == EWOULDBLOCK;
}


x86 assembly (clang, -O0):
<Util_IsResumableIOError>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2eb5(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     1147 <Util_IsResumableIOError+0x47>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2eae(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     1147 <Util_IsResumableIOError+0x47>
mov    -0x4(%rbp),%eax
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Util_IsResumableIOError>:
mov    0x2ec1(%rip),%rax
cmp    %edi,(%rax)
sete   %al
mov    0x2ec5(%rip),%rcx
cmp    %edi,(%rcx)
sete   %cl
or     %al,%cl
mov    0x2ebf(%rip),%rax
cmp    %edi,(%rax)
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
@EAGAIN = global i32 0
@EINTR = global i32 0
@EWOULDBLOCK = global i32 0
define i32 @Util_IsResumableIOError(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @EAGAIN
%5 = icmp eq i32 %3, %4
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @EINTR
%9 = icmp eq i32 %7, %8
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = load i32, i32* @EWOULDBLOCK
%13 = icmp eq i32 %11, %12
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
@EAGAIN = global i32 0
@EINTR = global i32 0
@EWOULDBLOCK = global i32 0
define i32 @Util_IsResumableIOError(i32 %0) {
%2 = load i32, i32* @EAGAIN
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @EINTR
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = load i32, i32* @EWOULDBLOCK
%8 = icmp eq i32 %7, %0
%9 = select i1 %6, i1 true, i1 %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ inner();
void outer(void) { inner(); }


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

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

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

LLVM IR (-O2):
define void @outer() {
%1 = tail call i32 (...) @inner()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t dummy(const unsigned char *addr, int count) {
  (void)addr;
  (void)count;
  return 0;
}


x86 assembly (clang, -O0):
<dummy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @dummy(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
ret i32 0
}

LLVM IR (-O2):
define i32 @dummy(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_failure(char *text) { printf("Test FAILED: %s\n", text); }


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"Test FAILED: %s\0A\00"
define void @print_failure(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int bar() { return 4; }


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

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

LLVM IR (-O0):
define i32 @bar() {
ret i32 4
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 4
}
void DMA1_Stream2_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @DMA1_Stream2_IRQHandler() {
ret void
}
void rtc_nvmem_register(struct rtc_device *rtc) {}


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

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

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

LLVM IR (-O2):
%struct.rtc_device = type opaque
define void @rtc_nvmem_register(%struct.rtc_device* nocapture %0) {
ret void
}
/* Variables and functions */
double fabs(float);
int fltcmp(float v1, float v2) {
  if (fabs(v1 - v2) <= 0.00001) {
    return 0;
  } else if (v1 > v2) {
    return 1;
  } else if (v1 < v2) {
    return -1;
  }
  return -2;
}


x86 assembly (clang, -O0):
<fltcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xec4(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1152 <fltcmp+0x42>
movl   $0x0,-0x4(%rbp)
jmp    119d <fltcmp+0x8d>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    116d <fltcmp+0x5d>
movl   $0x1,-0x4(%rbp)
jmp    119d <fltcmp+0x8d>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    118c <fltcmp+0x7c>
movl   $0xffffffff,-0x4(%rbp)
jmp    119d <fltcmp+0x8d>
jmp    1191 <fltcmp+0x81>
jmp    1196 <fltcmp+0x86>
movl   $0xfffffffe,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fltcmp>:
push   %rax
movss  %xmm0,(%rsp)
movss  %xmm1,0x4(%rsp)
subss  %xmm1,%xmm0
call   1030 <fabs@plt>
xor    %eax,%eax
movsd  0xed1(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1158 <fltcmp+0x48>
mov    $0x1,%eax
movss  (%rsp),%xmm0
ucomiss 0x4(%rsp),%xmm0
ja     1158 <fltcmp+0x48>
xor    %eax,%eax
movss  0x4(%rsp),%xmm0
ucomiss (%rsp),%xmm0
seta   %al
or     $0xfffffffe,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fltcmp(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fsub float %6, %7
%9 = call double @fabs(float %8)
%10 = fcmp ole double %9, 1.000000e-05
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %3
br label %25
12: ; preds = %2
%13 = load float, float* %4
%14 = load float, float* %5
%15 = fcmp ogt float %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %3
br label %25
17: ; preds = %12
%18 = load float, float* %4
%19 = load float, float* %5
%20 = fcmp olt float %18, %19
br i1 %20, label %21, label %22
21: ; preds = %17
store i32 -1, i32* %3
br label %25
22: ; preds = %17
br label %23
23: ; preds = %22
br label %24
24: ; preds = %23
store i32 -2, i32* %3
br label %25
25: ; preds = %24, %21, %16, %11
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @fltcmp(float %0, float %1) {
%3 = fsub float %0, %1
%4 = tail call double @fabs(float %3)
%5 = fcmp ugt double %4, 1.000000e-05
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = fcmp ogt float %0, %1
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = fcmp olt float %0, %1
%10 = select i1 %9, i32 -1, i32 -2
br label %11
11: ; preds = %8, %6, %2
%12 = phi i32 [ 0, %2 ], [ 1, %6 ], [ %10, %8 ]
ret i32 %12
}
/* Variables and functions */
double sin(double);
double Delta_ET(double year) {
  double delta_et;
  delta_et = 26.465 + 0.747622 * (year - 1950) +
             1.886913 * sin(6.2831853071796 * (year - 1975) / 33);
  return (delta_et);
}


x86 assembly (clang, -O0):
<Delta_ET>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf06(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeea(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xec0(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeac(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe98(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sin@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xe7a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Delta_ET>:
push   %rax
movsd  0xee7(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  0xee3(%rip),%xmm1
addsd  0xee3(%rip),%xmm1
movsd  %xmm1,(%rsp)
addsd  0xede(%rip),%xmm0
mulsd  0xede(%rip),%xmm0
divsd  0xede(%rip),%xmm0
call   1030 <sin@plt>
mulsd  0xed9(%rip),%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Delta_ET(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 1.950000e+03
%6 = call double @llvm.fmuladd.f64(double 7.476220e-01, double %5, double 2.646500e+01)
%7 = load double, double* %2
%8 = fsub double %7, 1.975000e+03
%9 = fmul double 0x401921FB54442D28, %8
%10 = fdiv double %9, 3.300000e+01
%11 = call double @sin(double %10)
%12 = call double @llvm.fmuladd.f64(double 0x3FFE30CBAF965B21, double %11, double %6)
store double %12, double* %3
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @Delta_ET(double %0) {
%2 = fadd double %0, -1.950000e+03
%3 = tail call double @llvm.fmuladd.f64(double %2, double 7.476220e-01, double 2.646500e+01)
%4 = fadd double %0, -1.975000e+03
%5 = fmul double %4, 0x401921FB54442D28
%6 = fdiv double %5, 3.300000e+01
%7 = tail call double @sin(double %6)
%8 = tail call double @llvm.fmuladd.f64(double %7, double 0x3FFE30CBAF965B21, double %3)
ret double %8
}
int kbd_pending(void) {}


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

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

LLVM IR (-O0):
define i32 @kbd_pending() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @kbd_pending() {
ret i32 undef
}
void gtk_progress_bar_get_fraction() {}


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

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

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

LLVM IR (-O2):
define void @gtk_progress_bar_get_fraction() {
ret void
}
int add_sentinel(struct event_filler_arguments *args) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.event_filler_arguments = type opaque
define i32 @add_sentinel(%struct.event_filler_arguments* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int Command_IsCd(char *command) { return strcmp(command, "cd") == 0; }


x86 assembly (clang, -O0):
<Command_IsCd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Command_IsCd>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"cd\00"
define i32 @Command_IsCd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"cd\00"
define i32 @Command_IsCd(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x87() {
  Assert_real((isupper(135) == 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_isupper.c",
              680, ("isupper should be 0 for 0x87"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x87>:
push   %rax
mov    $0x87,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2a8,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x87\00"
define void @t_isupper_0x87() {
%1 = call i64 @isupper(i32 135)
%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 680, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x87\00"
define void @t_isupper_0x87() {
%1 = tail call i64 @isupper(i32 135)
%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 680, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
float mysqrt(x)
float x;
{
  int i = *(int *)&x;
  i = 0x1fbd1df5 + (i >> 1);
  x = *(float *)&i;
  return x;
}


x86 assembly (clang, -O0):
<mysqrt>:
push   %rbp
mov    %rsp,%rbp
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
add    $0x1fbd1df5,%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mysqrt>:
cvtsd2ss %xmm0,%xmm0
movd   %xmm0,%eax
sar    %eax
add    $0x1fbd1df5,%eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
define float @mysqrt(double %0) {
%2 = alloca float
%3 = alloca i32
%4 = fptrunc double %0 to float
store float %4, float* %2
%5 = bitcast float* %2 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = ashr i32 %7, 1
%9 = add nsw i32 532487669, %8
store i32 %9, i32* %3
%10 = bitcast i32* %3 to float*
%11 = load float, float* %10
store float %11, float* %2
%12 = load float, float* %2
ret float %12
}

LLVM IR (-O2):
define float @mysqrt(double %0) {
%2 = fptrunc double %0 to float
%3 = bitcast float %2 to i32
%4 = ashr i32 %3, 1
%5 = add nsw i32 %4, 532487669
%6 = bitcast i32 %5 to float
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void sio_config_write(uint16_t addr, uint8_t val, void *priv) {}


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

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

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

LLVM IR (-O2):
define void @sio_config_write(i32 %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fig05_19();
int main(void) {
  fig05_19();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @fig05_19()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fig05_19()
ret i32 0
}
/* Variables and functions */
scalar_t__ isfinite(double);
double round_internal(double);
double round(double x) { return isfinite(x) ? round_internal(x) : x; }


x86 assembly (clang, -O0):
<round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <isfinite@plt>
cmp    $0x0,%rax
je     1155 <round+0x35>
movsd  -0x8(%rbp),%xmm0
call   1030 <round_internal@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    115f <round+0x3f>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <isfinite@plt>
test   %rax,%rax
je     113b <round+0x1b>
movsd  (%rsp),%xmm0
pop    %rax
jmp    1030 <round_internal@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @round(double %0) {
%2 = tail call i64 @isfinite(double %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call double @round_internal(double %0)
br label %6
6: ; preds = %1, %4
%7 = phi double [ %5, %4 ], [ %0, %1 ]
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long long);
int scanf(char *, unsigned long long *);
main() {
  unsigned long long a;
  while (scanf("%llu", &a) == 1) {
    printf("%llu\n", ((a + 1) / 2 * (a + 1) - 3) * 3);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1179 <main+0x59>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
shr    $0x1,%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
imul   %rcx,%rax
sub    $0x3,%rax
imul   $0x3,%rax,%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1193 <main+0x73>
lea    0xebf(%rip),%r14
lea    0xeb3(%rip),%r15
lea    0x8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%rsp),%rax
add    $0x1,%rax
mov    %rax,%rcx
shr    %rcx
imul   %rax,%rcx
lea    (%rcx,%rcx,2),%rsi
add    $0xfffffffffffffff7,%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [6 x i8] c"%llu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i64, i64* %2
%8 = add i64 %7, 1
%9 = udiv i64 %8, 2
%10 = load i64, i64* %2
%11 = add i64 %10, 1
%12 = mul i64 %9, %11
%13 = sub i64 %12, 3
%14 = mul i64 %13, 3
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %14)
br label %3
16: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [6 x i8] c"%llu\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %15
5: ; preds = %0, %5
%6 = load i64, i64* %1
%7 = add i64 %6, 1
%8 = lshr i64 %7, 1
%9 = mul i64 %7, 3
%10 = mul i64 %9, %8
%11 = add i64 %10, -9
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %11)
%13 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%14 = icmp eq i32 %13, 1
br i1 %14, label %5, label %15
15: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
long f(int, int);
main() {
  if (f(-32768, -1) != 32768L)
    abort();
  else
    exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffff8000,%edi
mov    $0xffffffff,%esi
call   1040 <f@plt>
cmp    $0x8000,%rax
je     1161 <main+0x31>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffff8000,%edi
mov    $0xffffffff,%esi
call   1040 <f@plt>
cmp    $0x8000,%rax
jne    114f <main+0x1f>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @f(i32 -32768, i32 -1)
%3 = icmp ne i64 %2, 32768
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @f(i32 -32768, i32 -1)
%2 = icmp eq i64 %1, 32768
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
int foo(int *a, int r, short *b) {
  int ret = 0;
  *a = 1;
  switch (r) {
  case 3:
    *a = 5;
    break;
  case 4:
  case 5:
    *a = 9;
    ret = r + 25;
    break;
  default:
    ret = r + 20;
  }
  *b = 9;
  return ret;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
sub    $0x3,%eax
je     1148 <foo+0x48>
jmp    1134 <foo+0x34>
mov    -0x20(%rbp),%eax
add    $0xfffffffc,%eax
sub    $0x2,%eax
jb     1157 <foo+0x57>
jmp    116f <foo+0x6f>
mov    -0x8(%rbp),%rax
movl   $0x5,(%rax)
jmp    1178 <foo+0x78>
mov    -0x8(%rbp),%rax
movl   $0x9,(%rax)
mov    -0xc(%rbp),%eax
add    $0x19,%eax
mov    %eax,-0x1c(%rbp)
jmp    1178 <foo+0x78>
mov    -0xc(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movw   $0x9,(%rax)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %esi,%eax
movl   $0x1,(%rdi)
lea    -0x4(%rax),%ecx
cmp    $0x2,%ecx
jae    111f <foo+0x1f>
movl   $0x9,(%rdi)
add    $0x19,%eax
movw   $0x9,(%rdx)
ret
cmp    $0x3,%eax
jne    1132 <foo+0x32>
movl   $0x5,(%rdi)
xor    %eax,%eax
movw   $0x9,(%rdx)
ret
add    $0x14,%eax
movw   $0x9,(%rdx)
ret

LLVM IR (-O0):
define i32 @foo(i32* %0, i32 %1, i16* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i16*
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i16* %2, i16** %6
store i32 0, i32* %7
%8 = load i32*, i32** %4
store i32 1, i32* %8
%9 = load i32, i32* %5
switch i32 %9, label %16 [
i32 3, label %10
i32 4, label %12
i32 5, label %12
]
10: ; preds = %3
%11 = load i32*, i32** %4
store i32 5, i32* %11
br label %19
12: ; preds = %3, %3
%13 = load i32*, i32** %4
store i32 9, i32* %13
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 25
store i32 %15, i32* %7
br label %19
16: ; preds = %3
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 20
store i32 %18, i32* %7
br label %19
19: ; preds = %16, %12, %10
%20 = load i16*, i16** %6
store i16 9, i16* %20
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @foo(i32* nocapture writeonly %0, i32 %1, i16* nocapture writeonly %2) {
store i32 1, i32* %0
switch i32 %1, label %7 [
i32 3, label %4
i32 4, label %5
i32 5, label %5
]
4: ; preds = %3
store i32 5, i32* %0
br label %9
5: ; preds = %3, %3
store i32 9, i32* %0
%6 = add nuw nsw i32 %1, 25
br label %9
7: ; preds = %3
%8 = add nsw i32 %1, 20
br label %9
9: ; preds = %7, %5, %4
%10 = phi i32 [ %8, %7 ], [ %6, %5 ], [ 0, %4 ]
store i16 9, i16* %2
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xa9() {
  Assert_real((isprint(169) == 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_isprint.c",
              850, ("isprint should be 0 for 0xa9"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xa9>:
push   %rax
mov    $0xa9,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x352,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xa9\00"
define void @t_isprint_0xa9() {
%1 = call i64 @isprint(i32 169)
%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 850, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xa9\00"
define void @t_isprint_0xa9() {
%1 = tail call i64 @isprint(i32 169)
%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 850, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ptr_region {
  int dummy;
};

/* Variables and functions */
int PROT_READ;
int PROT_WRITE;
int /*<<< orphan*/ _exit(int);
int mprotect(struct ptr_region *, int /*<<< orphan*/, int);
int /*<<< orphan*/ region_size(struct ptr_region *);
void unlock(struct ptr_region *region) {
  if (mprotect(region, region_size(region), PROT_READ | PROT_WRITE) == -1) {
    _exit(72);
  }
}


x86 assembly (clang, -O0):
<unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <region_size@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    0x2e75(%rip),%rax
or     (%rax),%edx
call   1050 <mprotect@plt>
cmp    $0xffffffff,%eax
jne    117d <unlock+0x4d>
mov    $0x48,%edi
call   1030 <_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlock>:
push   %rbx
mov    %rdi,%rbx
call   1040 <region_size@plt>
mov    0x2eb8(%rip),%rcx
mov    0x2e91(%rip),%rdx
mov    (%rdx),%edx
or     (%rcx),%edx
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <mprotect@plt>
cmp    $0xffffffff,%eax
je     115c <unlock+0x2c>
pop    %rbx
ret
mov    $0x48,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
%struct.ptr_region = type { i32 }
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
define void @unlock(%struct.ptr_region* %0) {
%2 = alloca %struct.ptr_region*
store %struct.ptr_region* %0, %struct.ptr_region** %2
%3 = load %struct.ptr_region*, %struct.ptr_region** %2
%4 = load %struct.ptr_region*, %struct.ptr_region** %2
%5 = call i32 @region_size(%struct.ptr_region* %4)
%6 = load i32, i32* @PROT_READ
%7 = load i32, i32* @PROT_WRITE
%8 = or i32 %6, %7
%9 = call i32 @mprotect(%struct.ptr_region* %3, i32 %5, i32 %8)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 @_exit(i32 72)
unreachable
13: ; preds = %1
ret void
}

LLVM IR (-O2):
%struct.ptr_region = type { i32 }
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
define void @unlock(%struct.ptr_region* %0) {
%2 = tail call i32 @region_size(%struct.ptr_region* %0)
%3 = load i32, i32* @PROT_READ
%4 = load i32, i32* @PROT_WRITE
%5 = or i32 %4, %3
%6 = tail call i32 @mprotect(%struct.ptr_region* %0, i32 %2, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = tail call i32 @_exit(i32 72)
unreachable
10: ; preds = %1
ret void
}
/* Type definitions */
struct timeval {
  int tv_usec;
  int tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
double now(void) {
  struct timeval tv;
  double now;
  gettimeofday(&tv, 0);
  now = 1e-6 * tv.tv_usec + tv.tv_sec;
  return now;
}


x86 assembly (clang, -O0):
<now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xecb(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl (%rsp),%xmm0
cvtsi2sdl 0x4(%rsp),%xmm1
mulsd  0xed2(%rip),%xmm0
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define double @now() {
%1 = alloca %struct.timeval
%2 = alloca double
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to double
%10 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %6, double %9)
store double %10, double* %2
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define double @now() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to double
%10 = call double @llvm.fmuladd.f64(double %6, double 0x3EB0C6F7A0B5ED8D, double %9)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
int GprsIsConnectNormal(const unsigned char *rcvbuf) {
  if (strstr((char *)rcvbuf, "$MYURCCLOSE:") != NULL) {
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<GprsIsConnectNormal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     1142 <GprsIsConnectNormal+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1149 <GprsIsConnectNormal+0x39>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GprsIsConnectNormal>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"$MYURCCLOSE:\00"
define i32 @GprsIsConnectNormal(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32* @strstr(i8* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %9
8: ; preds = %1
store i32 1, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [13 x i8] c"$MYURCCLOSE:\00"
define i32 @GprsIsConnectNormal(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ udelay(int);
void __aos_udelay(int usecs) { udelay(usecs); }


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

x86 assembly (clang, -O2):
<__aos_udelay>:
jmp    1030 <udelay@plt>

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

LLVM IR (-O2):
define void @__aos_udelay(i32 %0) {
%2 = tail call i32 @udelay(i32 %0)
ret void
}
/* Variables and functions */
void memcpy(char *, char *, int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  char str[] = "let's test memcpy!";
  char buf[19];
  memcpy(buf, str, 19);
  void (*dumbassgcc)() = memcpy;
  dumbassgcc(buf, str, 19);
  puts(buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed4(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xecc(%rip),%al
mov    %al,-0xe(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x13,%edx
call   1040 <memcpy@plt>
mov    0x2e86(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rcx
lea    -0x40(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x13,%edx
mov    $0x0,%al
call   *%rcx
lea    -0x40(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movaps 0xed2(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x217970,0xf(%rsp)
lea    0x20(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x13,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x13,%edx
xor    %eax,%eax
call   1040 <memcpy@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.str = [19 x i8] c"let's test memcpy!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [19 x i8]
%3 = alloca [19 x i8]
%4 = alloca void (...)*
store i32 0, i32* %1
%5 = bitcast [19 x i8]* %2 to i8*
%6 = getelementptr inbounds [19 x i8], [19 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 0
store void (...)* bitcast (void (i8*, i8*, i32)* @memcpy to void (...)*), void (...)** %4
%8 = load void (...)*, void (...)** %4
%9 = getelementptr inbounds [19 x i8], [19 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 0
%11 = bitcast void (...)* %8 to void (i8*, i8*, i32, ...)*
%12 = getelementptr inbounds [19 x i8], [19 x i8]* %3, i64 0, i64 0
%13 = call i32 @puts(i8* %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [19 x i8] c"let's test memcpy!\00"
define i32 @main() {
%1 = alloca [19 x i8]
%2 = alloca [19 x i8]
%3 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 0
%5 = call i32 @puts(i8* %4)
ret i32 0
}
int add(int arg) {
  const int i = 1;
  return (arg + i);
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @add(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
double sin(double);
double calc_fa(double a) {
  double fa;
  fa = -0.2 * sin(a) + a - 0.5;
  return fa;
}


x86 assembly (clang, -O0):
<calc_fa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x8(%rbp),%xmm1
movsd  0xed4(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xebc(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_fa>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <sin@plt>
mulsd  0xedd(%rip),%xmm0
addsd  (%rsp),%xmm0
addsd  0xed8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @calc_fa(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @sin(double %4)
%6 = load double, double* %2
%7 = call double @llvm.fmuladd.f64(double -2.000000e-01, double %5, double %6)
%8 = fsub double %7, 5.000000e-01
store double %8, double* %3
%9 = load double, double* %3
ret double %9
}

LLVM IR (-O2):
define double @calc_fa(double %0) {
%2 = tail call double @sin(double %0)
%3 = tail call double @llvm.fmuladd.f64(double %2, double -2.000000e-01, double %0)
%4 = fadd double %3, -5.000000e-01
ret double %4
}
int LZ4_versionNumber(void) { return (1 * 100 * 100 + 7 * 100 + 5); }


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

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

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

LLVM IR (-O2):
define i32 @LZ4_versionNumber() {
ret i32 10705
}
int ether_hostton(const char *str, struct ether_addr *ea) { return 1; }


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

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

LLVM IR (-O0):
%struct.ether_addr = type opaque
define i32 @ether_hostton(i8* %0, %struct.ether_addr* %1) {
%3 = alloca i8*
%4 = alloca %struct.ether_addr*
store i8* %0, i8** %3
store %struct.ether_addr* %1, %struct.ether_addr** %4
ret i32 1
}

LLVM IR (-O2):
%struct.ether_addr = type opaque
define i32 @ether_hostton(i8* nocapture readnone %0, %struct.ether_addr* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help_msg() {
  printf("Usage:./RandomAccess TotalMemSize(MB) [numThreads] "
         "[outFileName=gupsout]\n");
}


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

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

LLVM IR (-O0):
@.str = [74 x i8] c"Usage:./RandomAccess TotalMemSize(MB) [numThreads] [outFileName=gupsout]\0A\00"
define void @print_help_msg() {
%1 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [73 x i8] c"Usage:./RandomAccess TotalMemSize(MB) [numThreads] [outFileName=gupsout]\00"
define void @print_help_msg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str, i64 0, i64 0))
ret void
}