xunge/DecIR huggingface dataset:
/* Variables and functions */
int raw_gettoken();
int gettoken() {
  int c = raw_gettoken();
  while (c == ' ' || c == 0x10b || c == '\n')
    c = raw_gettoken();
  return c;
}


x86 assembly (clang, -O0):
<gettoken>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <raw_gettoken@plt>
mov    %eax,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <gettoken+0x3d>
mov    $0x1,%al
cmpl   $0x10b,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <gettoken+0x3d>
cmpl   $0xa,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    115d <gettoken+0x4d>
jmp    116c <gettoken+0x5c>
mov    $0x0,%al
call   1030 <raw_gettoken@plt>
mov    %eax,-0x4(%rbp)
jmp    1122 <gettoken+0x12>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettoken>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <raw_gettoken@plt>
cmp    $0xa,%eax
je     1120 <gettoken+0x10>
cmp    $0x20,%eax
je     1120 <gettoken+0x10>
cmp    $0x10b,%eax
je     1120 <gettoken+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gettoken() {
%1 = alloca i32
%2 = call i32 (...) @raw_gettoken()
store i32 %2, i32* %1
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 32
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 267
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 10
br label %12
12: ; preds = %9, %6, %3
%13 = phi i1 [ true, %6 ], [ true, %3 ], [ %11, %9 ]
br i1 %13, label %14, label %16
14: ; preds = %12
%15 = call i32 (...) @raw_gettoken()
store i32 %15, i32* %1
br label %3
16: ; preds = %12
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @gettoken() {
br label %1
1: ; preds = %3, %0
%2 = tail call i32 (...) @raw_gettoken()
switch i32 %2, label %4 [
i32 267, label %3
i32 32, label %3
i32 10, label %3
]
3: ; preds = %1, %1, %1
br label %1
4: ; preds = %1
ret i32 %2
}
float SHT2x_CalcRH(unsigned short u16sRH) {
  float humidityRH = 0;
  u16sRH &= ~0x0003;
  humidityRH = ((float)u16sRH * 0.00190735) - 6;
  return humidityRH;
}


x86 assembly (clang, -O0):
<SHT2x_CalcRH>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x2(%rbp),%al
and    $0xfc,%al
mov    %al,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xece(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHT2x_CalcRH>:
and    $0xfffffffc,%edi
cvtsi2sd %edi,%xmm0
mulsd  0xef1(%rip),%xmm0
addsd  0xef1(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @SHT2x_CalcRH(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca float
store i16 %0, i16* %2
store float 0.000000e+00, float* %3
%4 = load i16, i16* %2
%5 = zext i16 %4 to i32
%6 = and i32 %5, -4
%7 = trunc i32 %6 to i16
store i16 %7, i16* %2
%8 = load i16, i16* %2
%9 = uitofp i16 %8 to float
%10 = fpext float %9 to double
%11 = call double @llvm.fmuladd.f64(double %10, double 1.907350e-03, double -6.000000e+00)
%12 = fptrunc double %11 to float
store float %12, float* %3
%13 = load float, float* %3
ret float %13
}

LLVM IR (-O2):
define float @SHT2x_CalcRH(i16 zeroext %0) {
%2 = and i16 %0, -4
%3 = uitofp i16 %2 to double
%4 = tail call double @llvm.fmuladd.f64(double %3, double 1.907350e-03, double -6.000000e+00)
%5 = fptrunc double %4 to float
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void printvalue_html(void *udata, const char *value) { printf("%s", value); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @printvalue_html(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
double log(int /*<<< orphan*/);
int /*<<< orphan*/ uniformRandom();
double rexp(double lambda) { return (-log(uniformRandom()) / lambda); }


x86 assembly (clang, -O0):
<rexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <uniformRandom@plt>
mov    %eax,%edi
call   1030 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rexp>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <uniformRandom@plt>
mov    %eax,%edi
call   1030 <log@plt>
xorpd  0xec4(%rip),%xmm0
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rexp(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (...) @uniformRandom()
%4 = call double @log(i32 %3)
%5 = fneg double %4
%6 = load double, double* %2
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @rexp(double %0) {
%2 = tail call i32 (...) @uniformRandom()
%3 = tail call double @log(i32 %2)
%4 = fneg double %3
%5 = fdiv double %4, %0
ret double %5
}
void test94_Mod1_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test94_Mod1_targetInit__I() {
ret void
}
int test_imm_03uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x03 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_03uint64_lowword_reg>:
test   $0x3,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_03uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 3
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char const *,
                          int /*<<< orphan*/);
void record_errno_error(const char *errmsg) {
  syslog(LOG_ERR, "%s: %s", errmsg, strerror(errno));
}


x86 assembly (clang, -O0):
<record_errno_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %eax,%ecx
lea    0xea2(%rip),%rsi
call   1030 <syslog@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<record_errno_error>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xebc(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <syslog@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [7 x i8] c"%s: %s\00"
@errno = global i32 0
define void @record_errno_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LOG_ERR
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i32 @strerror(i32 %5)
%7 = call i32 @syslog(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6)
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [7 x i8] c"%s: %s\00"
@errno = global i32 0
define void @record_errno_error(i8* %0) {
%2 = load i32, i32* @LOG_ERR
%3 = load i32, i32* @errno
%4 = tail call i32 @strerror(i32 %3)
%5 = tail call i32 @syslog(i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age = 10;
  int height = 120;
  printf("I am %d years old.\n", age);
  printf("I am %d inches tall.\n", height);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x78,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 120, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 120)
ret i32 0
}
/* Variables and functions */
int doTheHokeyPokey();
int main() { return doTheHokeyPokey(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @doTheHokeyPokey()
ret i32 %1
}
int binary_search_ints_helper(int v, int a[], int lb, int ub) { return -1; }


x86 assembly (clang, -O0):
<binary_search_ints_helper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @binary_search_ints_helper(i32 %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @binary_search_ints_helper(i32 %0, i32* nocapture readnone %1, i32 %2, i32 %3) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_HLT();
void do0x76() { _I8080_HLT(); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ oled_SendCommand(unsigned char *, int);
void SetBankColorB(char a, char b, char c, char e) {
  unsigned char d[] = {0x93, a, b, c, e};
  oled_SendCommand(d, sizeof(d));
}


x86 assembly (clang, -O0):
<SetBankColorB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movb   $0x93,-0x9(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x8(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%al
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rdi
mov    $0x5,%esi
call   1030 <oled_SendCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetBankColorB>:
push   %rax
movb   $0x93,0x3(%rsp)
mov    %dil,0x4(%rsp)
mov    %sil,0x5(%rsp)
mov    %dl,0x6(%rsp)
mov    %cl,0x7(%rsp)
lea    0x3(%rsp),%rdi
mov    $0x5,%esi
call   1030 <oled_SendCommand@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @SetBankColorB(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca [5 x i8]
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
store i8 -109, i8* %10
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %5
store i8 %12, i8* %11
%13 = getelementptr inbounds i8, i8* %11, i64 1
%14 = load i8, i8* %6
store i8 %14, i8* %13
%15 = getelementptr inbounds i8, i8* %13, i64 1
%16 = load i8, i8* %7
store i8 %16, i8* %15
%17 = getelementptr inbounds i8, i8* %15, i64 1
%18 = load i8, i8* %8
store i8 %18, i8* %17
%19 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%20 = call i32 @oled_SendCommand(i8* %19, i32 5)
ret void
}

LLVM IR (-O2):
define void @SetBankColorB(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = alloca [5 x i8]
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
store i8 -109, i8* %6
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 1
store i8 %0, i8* %7
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 2
store i8 %1, i8* %8
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 3
store i8 %2, i8* %9
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 4
store i8 %3, i8* %10
%11 = call i32 @oled_SendCommand(i8* %6, i32 5)
ret void
}
/* Variables and functions */
int f474(int *);
int f475(int *p) { return f474(p); }


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

x86 assembly (clang, -O2):
<f475>:
jmp    1030 <f474@plt>

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

LLVM IR (-O2):
define i32 @f475(i32* %0) {
%2 = tail call i32 @f474(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ input_close();
void cleanup() { input_close(); }


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

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

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

LLVM IR (-O2):
define void @cleanup() {
%1 = tail call i32 (...) @input_close()
ret void
}
/* Variables and functions */
double cos(int);
double cosValey(double x, double y) {
  double f = (cos(4 * x) - y);
  return (0.2 * f * f + x * x * 0.05) * 0.2;
}


x86 assembly (clang, -O0):
<cosValey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xee6(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb6(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xea2(%rip),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe86(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosValey>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  0xed8(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1030 <cos@plt>
subsd  0x10(%rsp),%xmm0
movsd  0xec5(%rip),%xmm1
movapd %xmm0,%xmm2
movsd  0x8(%rsp),%xmm3
mulsd  %xmm3,%xmm3
mulsd  0xeb7(%rip),%xmm3
mulsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @cosValey(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = fmul double 4.000000e+00, %6
%8 = fptosi double %7 to i32
%9 = call double @cos(i32 %8)
%10 = load double, double* %4
%11 = fsub double %9, %10
store double %11, double* %5
%12 = load double, double* %5
%13 = fmul double 2.000000e-01, %12
%14 = load double, double* %5
%15 = load double, double* %3
%16 = load double, double* %3
%17 = fmul double %15, %16
%18 = fmul double %17, 5.000000e-02
%19 = call double @llvm.fmuladd.f64(double %13, double %14, double %18)
%20 = fmul double %19, 2.000000e-01
ret double %20
}

LLVM IR (-O2):
define double @cosValey(double %0, double %1) {
%3 = fmul double %0, 4.000000e+00
%4 = fptosi double %3 to i32
%5 = tail call double @cos(i32 %4)
%6 = fsub double %5, %1
%7 = fmul double %6, 2.000000e-01
%8 = fmul double %0, %0
%9 = fmul double %8, 5.000000e-02
%10 = tail call double @llvm.fmuladd.f64(double %7, double %6, double %9)
%11 = fmul double %10, 2.000000e-01
ret double %11
}
void gdk_device_set_key() {}


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

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

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

LLVM IR (-O2):
define void @gdk_device_set_key() {
ret void
}
void RTThreadUserWaitNoResume(void) {}


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

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

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

LLVM IR (-O2):
define void @RTThreadUserWaitNoResume() {
ret void
}
/* Variables and functions */
int factorial(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  printf("Introduzca un numero entero positivo ");
  scanf(" %d", &num);
  printf("\nEl factorial de %d es %d\n", num, factorial(num));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1030 <factorial@plt>
lea    0xec4(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Introduzca un numero entero positivo \00"
@.str.1 = [4 x i8] c" %d\00"
@.str.2 = [27 x i8] c"\0AEl factorial de %d es %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @factorial(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"Introduzca un numero entero positivo \00"
@.str.1 = [4 x i8] c" %d\00"
@.str.2 = [27 x i8] c"\0AEl factorial de %d es %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @factorial(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pula(int);
int /*<<< orphan*/ pula_2();
int main(void) {
  int x = 2;
  x++;
  printf("%d\n", x);
  pula(23);
  pula_2();
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
mov    $0x17,%edi
call   1060 <pula@plt>
mov    $0x0,%al
call   1030 <pula_2@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    $0x17,%edi
call   1060 <pula@plt>
xor    %eax,%eax
call   1030 <pula_2@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = tail call i32 @pula(i32 23)
%3 = tail call i32 (...) @pula_2()
%4 = tail call i32 (...) @getchar()
ret i32 0
}
int test_read(char *cmd, int cmd_len) {
  char *param;
  int ret = 0;
  char *intf, *tmp;
  cmd[cmd_len] = '\0';
  intf = cmd;
  printf("%s:%d cmd = %s, cmd_len: %d\n", __FUNCTION__, 70, cmd, cmd_len);
  memcpy(intf, "hello world\n", strlen("hello world\n"));
  return strlen("hello world\n");
}


x86 assembly (clang, -O0):
<test_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
lea    0xeb7(%rip),%rdi
lea    0xecd(%rip),%rsi
mov    $0x46,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
mov    0xec0(%rip),%rcx
mov    %rcx,(%rax)
mov    0xebf(%rip),%ecx
mov    %ecx,0x8(%rax)
mov    $0xc,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_read>:
push   %rbx
mov    %rdi,%rbx
movslq %esi,%r8
movb   $0x0,(%rdi,%r8,1)
lea    0xedd(%rip),%rdi
lea    0xef3(%rip),%rsi
mov    $0x46,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
movabs $0x6f77206f6c6c6568,%rax
20 77 6f
mov    %rax,(%rbx)
movl   $0xa646c72,0x8(%rbx)
mov    $0xc,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"%s:%d cmd = %s, cmd_len: %d\0A\00"
@__FUNCTION__.test_read = [10 x i8] c"test_read\00"
@.str.1 = [13 x i8] c"hello world\0A\00"
define i32 @test_read(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %6
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
store i8 0, i8* %12
%13 = load i8*, i8** %3
store i8* %13, i8** %7
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.test_read, i64 0, i64 0), i32 70, i8* %14, i32 %15)
%17 = load i8*, i8** %7
ret i32 12
}

LLVM IR (-O2):
@.str = [29 x i8] c"%s:%d cmd = %s, cmd_len: %d\0A\00"
@__FUNCTION__.test_read = [10 x i8] c"test_read\00"
@.str.1 = [13 x i8] c"hello world\0A\00"
define i32 @test_read(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
store i8 0, i8* %4
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.test_read, i64 0, i64 0), i32 70, i8* %0, i32 %1)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(12) %0, i8* align 1 dereferenceable(12) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i64 12, i1 false)
ret i32 12
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  char cards[] = "JQK";
  char a_card = cards[2];
  cards[2] = cards[1];
  cards[1] = cards[0];
  cards[0] = cards[2];
  cards[2] = cards[1];
  cards[1] = a_card;
  puts(cards);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x8(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x8(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x7(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.cards = [4 x i8] c"JQK\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca i8
store i32 0, i32* %1
%4 = bitcast [4 x i8]* %2 to i8*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
%8 = load i8, i8* %7
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 %8, i8* %9
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%11 = load i8, i8* %10
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 %11, i8* %12
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
%14 = load i8, i8* %13
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
store i8 %14, i8* %15
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
%17 = load i8, i8* %16
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 %17, i8* %18
%19 = load i8, i8* %3
%20 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 %19, i8* %20
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%22 = call i32 @puts(i8* %21)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 4868945, i32* %1
%3 = call i32 @puts(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
char *malloc(size_t);
int /*<<< orphan*/ memset(char *, int, size_t);
void create_and_memset(int init_as, size_t size, char **ptr_outval) {
  char *area = malloc(size);
  assert(area);
  memset(area, init_as, size);
  *ptr_outval = area;
}


x86 assembly (clang, -O0):
<create_and_memset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <memset@plt>
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_and_memset>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%r15d
mov    %rsi,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
call   1040 <assert@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %rbp,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @create_and_memset(i32 %0, i64 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i8**
%7 = alloca i8*
store i32 %0, i32* %4
store i64 %1, i64* %5
store i8** %2, i8*** %6
%8 = load i64, i64* %5
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = call i32 @assert(i8* %10)
%12 = load i8*, i8** %7
%13 = load i32, i32* %4
%14 = load i64, i64* %5
%15 = call i32 @memset(i8* %12, i32 %13, i64 %14)
%16 = load i8*, i8** %7
%17 = load i8**, i8*** %6
store i8* %16, i8** %17
ret void
}

LLVM IR (-O2):
define void @create_and_memset(i32 %0, i64 %1, i8** nocapture writeonly %2) {
%4 = tail call i8* @malloc(i64 %1)
%5 = tail call i32 @assert(i8* %4)
%6 = tail call i32 @memset(i8* %4, i32 %0, i64 %1)
store i8* %4, i8** %2
ret void
}
int _isupper(int c) {
  if (c >= 'A' && c <= 'Z') {
    return (1);
  } else
    return (0);
}


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

x86 assembly (clang, -O2):
<_isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @_isupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
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 @_isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x52() {
  Assert_real((isodigit(82) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              415, ("isodigit should be 0 for R"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for R\00"
define void @t_isodigit_0x52() {
%1 = call i64 @isodigit(i32 82)
%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 415, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for R\00"
define void @t_isodigit_0x52() {
%1 = tail call i64 @isodigit(i32 82)
%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 415, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void window_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @window_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FUTEX_WAIT;
int /*<<< orphan*/ SYS_futex;
int syscall(int /*<<< orphan*/, void *, int /*<<< orphan*/, int,
            int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int futex_wait(void *addr, int val1) {
  return syscall(SYS_futex, addr, FUTEX_WAIT, val1, NULL, NULL, 0);
}


x86 assembly (clang, -O0):
<futex_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
mov    %r9,%r8
movl   $0x0,(%rsp)
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<futex_wait>:
push   %rax
mov    %esi,%ecx
mov    %rdi,%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
mov    0x2ec2(%rip),%rax
mov    (%rax),%edx
movl   $0x0,(%rsp)
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
@SYS_futex = global i32 0
@FUTEX_WAIT = global i32 0
define i32 @futex_wait(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @SYS_futex
%6 = load i8*, i8** %3
%7 = load i32, i32* @FUTEX_WAIT
%8 = load i32, i32* %4
%9 = call i32 @syscall(i32 %5, i8* %6, i32 %7, i32 %8, i32* null, i32* null, i32 0)
ret i32 %9
}

LLVM IR (-O2):
@SYS_futex = global i32 0
@FUTEX_WAIT = global i32 0
define i32 @futex_wait(i8* %0, i32 %1) {
%3 = load i32, i32* @SYS_futex
%4 = load i32, i32* @FUTEX_WAIT
%5 = tail call i32 @syscall(i32 %3, i8* %0, i32 %4, i32 %1, i32* null, i32* null, i32 0)
ret i32 %5
}
int cp_hash_compare_addr(void *a1, void *a2) { return (long)a1 - (long)a2; }


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

x86 assembly (clang, -O2):
<cp_hash_compare_addr>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @cp_hash_compare_addr(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 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = sub nsw i64 %6, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @cp_hash_compare_addr(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub nsw i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: "
        "sleep"
        " time\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Usage: sleep time\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [19 x i8] c"Usage: sleep time\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Variables and functions */
int fn_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102(
    char const *);
int fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102>:
jmp    1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102(i8* %0) {
%2 = tail call i32 @fn_sq_ch_68_ch_97_ch_116_ch_97_ch_85_ch_110_ch_105_ch_111_ch_110_ch_79_ch_102(i8* %0)
ret i32 %2
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

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


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

x86 assembly (clang, -O2):
<timestamp>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @timestamp() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
ret double %10
}
void device_pm_pre_add_cleanup(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @device_pm_pre_add_cleanup(%struct.device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Test_Display(int, char **);
int main(int argc, char **argv) {
  Test_Display(argc, argv);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <Test_Display@plt>
xor    %eax,%eax
pop    %rcx
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
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @Test_Display(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @Test_Display(i32 %0, i8** %1)
ret i32 0
}
double ut_encode_clock(int hours, int minutes, double seconds) {
  return (hours * 60 + minutes) * 60 + seconds;
}


x86 assembly (clang, -O0):
<ut_encode_clock>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
imul   $0x3c,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
imul   $0x3c,%eax,%eax
cvtsi2sd %eax,%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ut_encode_clock>:
imul   $0x3c,%edi,%eax
add    %esi,%eax
imul   $0x3c,%eax,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ut_encode_clock(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 60
%9 = load i32, i32* %5
%10 = add nsw i32 %8, %9
%11 = mul nsw i32 %10, 60
%12 = sitofp i32 %11 to double
%13 = load double, double* %6
%14 = fadd double %12, %13
ret double %14
}

LLVM IR (-O2):
define double @ut_encode_clock(i32 %0, i32 %1, double %2) {
%4 = mul nsw i32 %0, 60
%5 = add nsw i32 %4, %1
%6 = mul nsw i32 %5, 60
%7 = sitofp i32 %6 to double
%8 = fadd double %7, %2
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ close_serial(int);
int closeGPS(int fd) {
  close_serial(fd);
  return 1;
}


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

x86 assembly (clang, -O2):
<closeGPS>:
push   %rax
call   1030 <close_serial@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @closeGPS(i32 %0) {
%2 = tail call i32 @close_serial(i32 %0)
ret i32 1
}
/* Variables and functions */
int anyStopRequested();
int isIdle(void) {
  int retValue_acc;
  int tmp;
  {
    {
      tmp = anyStopRequested();
      retValue_acc = tmp == 0;
    }
    return (retValue_acc);
    return (retValue_acc);
  }
}


x86 assembly (clang, -O0):
<isIdle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <anyStopRequested@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isIdle>:
push   %rax
xor    %eax,%eax
call   1030 <anyStopRequested@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isIdle() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @anyStopRequested()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
store i32 %6, i32* %1
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @isIdle() {
%1 = tail call i32 (...) @anyStopRequested()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
char IN(int);
char spiRead() { return IN(0x00); }


x86 assembly (clang, -O0):
<spiRead>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <IN@plt>
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @spiRead() {
%1 = call signext i8 @IN(i32 0)
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @spiRead() {
%1 = tail call signext i8 @IN(i32 0)
ret i8 %1
}
void lock_mm() {}


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

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

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

LLVM IR (-O2):
define void @lock_mm() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x3f() {
  Assert_real((isprint(63)),
              "/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",
              320, ("isprint should be 1 for ?"));
}


x86 assembly (clang, -O0):
<t_isprint_0x3f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x140,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x3f>:
push   %rax
mov    $0x3f,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x140,%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 = [26 x i8] c"isprint should be 1 for ?\00"
define void @t_isprint_0x3f() {
%1 = call i32 @isprint(i32 63)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 320, i8* getelementptr inbounds ([26 x i8], [26 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 = [26 x i8] c"isprint should be 1 for ?\00"
define void @t_isprint_0x3f() {
%1 = tail call i32 @isprint(i32 63)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 320, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}