xunge/DecIR huggingface dataset:
/* Variables and functions */
int M_PI_2;
int pow(int, int);
int sin(int);
float elasticEaseOutf(float p) {
  return sin(-13 * M_PI_2 * (p + 1)) * pow(2, -10 * p) + 1;
}


x86 assembly (clang, -O0):
<elasticEaseOutf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    0x2eb4(%rip),%rax
imul   $0xfffffff3,(%rax),%eax
cvtsi2ss %eax,%xmm0
movss  0xebe(%rip),%xmm1
addss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1030 <sin@plt>
mov    %eax,-0x8(%rbp)
movss  0xe9d(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elasticEaseOutf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
mov    0x2eb6(%rip),%rax
imul   $0xfffffff3,(%rax),%eax
cvtsi2ss %eax,%xmm2
movss  0xebf(%rip),%xmm1
addss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
cvttss2si %xmm1,%edi
call   1030 <sin@plt>
mov    %eax,%ebx
movss  0xc(%rsp),%xmm0
mulss  0xea2(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <pow@plt>
imul   %ebx,%eax
add    $0x1,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI_2 = global i32 0
define float @elasticEaseOutf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load i32, i32* @M_PI_2
%4 = mul nsw i32 -13, %3
%5 = sitofp i32 %4 to float
%6 = load float, float* %2
%7 = fadd float %6, 1.000000e+00
%8 = fmul float %5, %7
%9 = fptosi float %8 to i32
%10 = call i32 @sin(i32 %9)
%11 = load float, float* %2
%12 = fmul float -1.000000e+01, %11
%13 = fptosi float %12 to i32
%14 = call i32 @pow(i32 2, i32 %13)
%15 = mul nsw i32 %10, %14
%16 = add nsw i32 %15, 1
%17 = sitofp i32 %16 to float
ret float %17
}

LLVM IR (-O2):
@M_PI_2 = global i32 0
define float @elasticEaseOutf(float %0) {
%2 = load i32, i32* @M_PI_2
%3 = mul nsw i32 %2, -13
%4 = sitofp i32 %3 to float
%5 = fadd float %0, 1.000000e+00
%6 = fmul float %5, %4
%7 = fptosi float %6 to i32
%8 = tail call i32 @sin(i32 %7)
%9 = fmul float %0, -1.000000e+01
%10 = fptosi float %9 to i32
%11 = tail call i32 @pow(i32 2, i32 %10)
%12 = mul nsw i32 %11, %8
%13 = add nsw i32 %12, 1
%14 = sitofp i32 %13 to float
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int test_ais_16(void) {
  fprintf(stderr, "test_ais_16() failed: Not Written\n");
  return 0;
}


x86 assembly (clang, -O0):
<test_ais_16>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ais_16>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"test_ais_16() failed: Not Written\0A\00"
define i32 @test_ais_16() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"test_ais_16() failed: Not Written\0A\00"
define i32 @test_ais_16() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int bar1();
bool foo1() { return bar1(); }


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

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

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

LLVM IR (-O2):
define i32 @foo1() {
%1 = tail call i32 (...) @bar1()
ret i32 %1
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t csr_readl(uint32_t addr) { return *(volatile uint32_t *)addr; }


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

x86 assembly (clang, -O2):
<csr_readl>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
define i64 @csr_readl(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @csr_readl(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  char *song2 = "What's up loca peopa!!!!!";
  puts(song2);
  song2 = "Hey ya'll motherfuckers are BAD!";
  puts(song2);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"What's up loca peopa!!!!!\00"
@.str.1 = [33 x i8] c"Hey ya'll motherfuckers are BAD!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @puts(i8* %3)
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @puts(i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"What's up loca peopa!!!!!\00"
@.str.1 = [33 x i8] c"Hey ya'll motherfuckers are BAD!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int recv(int, void *, int, int);
int g_sck_recv(int sck, void *ptr, int len, int flags) {
  return recv(sck, ptr, len, flags);
}


x86 assembly (clang, -O0):
<g_sck_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_sck_recv>:
jmp    1030 <recv@plt>

LLVM IR (-O0):
define i32 @g_sck_recv(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @recv(i32 %9, i8* %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @g_sck_recv(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @recv(i32 %0, i8* %1, i32 %2, i32 %3)
ret i32 %5
}
int test_imm_E4int64_lowword_mem(long long *val) {
  return ((*val) & (0xE4 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E4int64_lowword_mem>:
testb  $0xe4,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E4int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 228
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage: mkresource FILE\n"
         "Converts text file to C string.\n"
         "Produces .h and .c files pair.\n");
}


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

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

LLVM IR (-O0):
@.str = [87 x i8] c"usage: mkresource FILE\0AConverts text file to C string.\0AProduces .h and .c files pair.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [86 x i8] c"usage: mkresource FILE\0AConverts text file to C string.\0AProduces .h and .c files pair.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ Interpolate_2(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int, int);
void Interp5(uint32_t *pc, uint32_t c1, uint32_t c2) {
  *pc = Interpolate_2(c1, 1, c2, 1, 1);
}


x86 assembly (clang, -O0):
<Interp5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%edx
mov    $0x1,%r8d
mov    %r8d,%esi
mov    %r8d,%ecx
call   1030 <Interpolate_2@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp5>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
mov    $0x1,%esi
mov    $0x1,%ecx
mov    $0x1,%r8d
call   1030 <Interpolate_2@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @Interp5(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = call i32 @Interpolate_2(i32 %7, i32 1, i32 %8, i32 1, i32 1)
%10 = load i32*, i32** %4
store i32 %9, i32* %10
ret void
}

LLVM IR (-O2):
define void @Interp5(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = tail call i32 @Interpolate_2(i32 %1, i32 1, i32 %2, i32 1, i32 1)
store i32 %4, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
FILE *uart_create() {
  FILE *fp;
  fp = fopen("/dev/uart", "r+");
  if (fp) {
    fprintf(fp, "uart open success.\n");
    return fp;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<uart_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1167 <uart_create+0x47>
mov    -0x10(%rbp),%rdi
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <uart_create+0x4f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_create>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1155 <uart_create+0x35>
lea    0xeca(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/uart\00"
@.str.1 = [3 x i8] c"r+\00"
@.str.2 = [20 x i8] c"uart open success.\0A\00"
define i32* @uart_create() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load i32*, i32** %2
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %2
store i32* %9, i32** %1
br label %11
10: ; preds = %0
store i32* null, i32** %1
br label %11
11: ; preds = %10, %6
%12 = load i32*, i32** %1
ret i32* %12
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/uart\00"
@.str.1 = [3 x i8] c"r+\00"
@.str.2 = [20 x i8] c"uart open success.\0A\00"
define noalias i32* @uart_create() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i64 19, i64 1, i32* %1)
br label %5
5: ; preds = %0, %3
ret i32* %1
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ width;
};
struct TYPE_4__ {
  TYPE_1__ xresizerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xresizerequest_width(void *_p) {
  return (int)((XEvent *)_p)->xresizerequest.width;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xresizerequest_width>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xresizerequest_width(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xresizerequest_width(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int numberOfSevens(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  printf("Input a number: ");
  scanf("%d", &num);
  printf("The number of sevens in your number is %d\n", numberOfSevens(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   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <numberOfSevens@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <numberOfSevens@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Input a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [43 x i8] c"The number of sevens in your number is %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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @numberOfSevens(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Input a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [43 x i8] c"The number of sevens in your number is %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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @numberOfSevens(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int other_function();
long some_function();
int test2;
calling_function() {
  long test1;
  register test2;
  test1 = some_function();
  if (test1 > 0)
    test2 = 0;
  else
    test2 = other_function();
  return test2;
}


x86 assembly (clang, -O0):
<calling_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <some_function@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    114a <calling_function+0x2a>
movl   $0x0,-0xc(%rbp)
jmp    1154 <calling_function+0x34>
mov    $0x0,%al
call   1040 <other_function@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calling_function>:
push   %rax
xor    %eax,%eax
call   1030 <some_function@plt>
test   %rax,%rax
jle    1131 <calling_function+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <other_function@plt>

LLVM IR (-O0):
@test2 = global i32 0
define i32 @calling_function() {
%1 = alloca i64
%2 = alloca i32
%3 = call i64 (...) @some_function()
store i64 %3, i64* %1
%4 = load i64, i64* %1
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 0, i32* %2
br label %9
7: ; preds = %0
%8 = call i32 (...) @other_function()
store i32 %8, i32* %2
br label %9
9: ; preds = %7, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@test2 = global i32 0
define i32 @calling_function() {
%1 = tail call i64 (...) @some_function()
%2 = icmp sgt i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @other_function()
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 0, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ gpio_free(int);
int /*<<< orphan*/ gpio_set_value(int, int /*<<< orphan*/);
void module_speaker_exit(void) {
  gpio_set_value(23, 0);
  gpio_free(23);
}


x86 assembly (clang, -O0):
<module_speaker_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x17,%edi
xor    %esi,%esi
call   1040 <gpio_set_value@plt>
mov    $0x17,%edi
call   1030 <gpio_free@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_speaker_exit>:
push   %rax
mov    $0x17,%edi
xor    %esi,%esi
call   1040 <gpio_set_value@plt>
mov    $0x17,%edi
pop    %rax
jmp    1030 <gpio_free@plt>

LLVM IR (-O0):
define void @module_speaker_exit() {
%1 = call i32 @gpio_set_value(i32 23, i32 0)
%2 = call i32 @gpio_free(i32 23)
ret void
}

LLVM IR (-O2):
define void @module_speaker_exit() {
%1 = tail call i32 @gpio_set_value(i32 23, i32 0)
%2 = tail call i32 @gpio_free(i32 23)
ret void
}
/* Variables and functions */
void printf(const char *input, ...) { return; }


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

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

LLVM IR (-O0):
define void @printf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @printf(i8* nocapture %0, ...) {
ret void
}
void H420ToRAW() {}


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

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

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

LLVM IR (-O2):
define void @H420ToRAW() {
ret void
}
int fib_recursive(int n) {
  if (n < 2)
    return 1;
  return fib_recursive(n - 1) + fib_recursive(n - 2);
}


x86 assembly (clang, -O0):
<fib_recursive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1131 <fib_recursive+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1154 <fib_recursive+0x44>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib_recursive@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib_recursive@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib_recursive>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x2,%edi
jl     1145 <fib_recursive+0x35>
mov    %edi,%ebx
add    $0x2,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x3(%rbx),%edi
call   1030 <fib_recursive@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x3,%ebx
ja     1130 <fib_recursive+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib_recursive(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib_recursive(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
double cakma_log(int, int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  printf("Sonuc: %f\n", cakma_log(a, b));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <cakma_log@plt>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [11 x i8] c"Sonuc: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call double @cakma_log(i32 %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [11 x i8] c"Sonuc: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call double @cakma_log(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}
/* Variables and functions */
int partition(int *, int, int);
void my_qsort(int *a, int left, int right) {
  int i;
  if (left >= right)
    return;
  int index = partition(a, left, right);
  my_qsort(a, left, index - 1);
  my_qsort(a, index + 1, right);
}


x86 assembly (clang, -O0):
<my_qsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1143 <my_qsort+0x23>
jmp    1179 <my_qsort+0x59>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
call   1040 <my_qsort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <my_qsort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_qsort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <my_qsort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <my_qsort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <my_qsort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @my_qsort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @my_qsort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwriteaddr1(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void fwriteaddr1addr2(uint8_t *mac1, uint8_t *mac2, FILE *fhd) {
  fwriteaddr1(mac1, fhd);
  fwriteaddr1(mac2, fhd);
  return;
}


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

x86 assembly (clang, -O2):
<fwriteaddr1addr2>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdx,%rsi
call   1030 <fwriteaddr1@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fwriteaddr1@plt>

LLVM IR (-O0):
define void @fwriteaddr1addr2(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %6
%9 = call i32 @fwriteaddr1(i32* %7, i32* %8)
%10 = load i32*, i32** %5
%11 = load i32*, i32** %6
%12 = call i32 @fwriteaddr1(i32* %10, i32* %11)
ret void
}

LLVM IR (-O2):
define void @fwriteaddr1addr2(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @fwriteaddr1(i32* %0, i32* %2)
%5 = tail call i32 @fwriteaddr1(i32* %1, i32* %2)
ret void
}
int Client() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Client() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ WRITETEST(char *);
void SetNormalKeyPad() { WRITETEST("\033>"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"\1B>\00"
define void @SetNormalKeyPad() {
%1 = call i32 @WRITETEST(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\1B>\00"
define void @SetNormalKeyPad() {
%1 = tail call i32 @WRITETEST(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned short ReadShort2(unsigned char *ptr) {
  return (unsigned short)(ptr[0] << 8 | ptr[1]);
}


x86 assembly (clang, -O0):
<ReadShort2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadShort2>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @ReadShort2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = or i32 %7, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @ReadShort2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
unsigned int get_current_time(void) {
  struct timeval tv;
  gettimeofday(&tv, 0);
  return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}


x86 assembly (clang, -O0):
<get_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_time>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,(%rsp),%ecx
movslq 0x4(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @get_current_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = add nsw i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @get_current_time() {
%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 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %9, %6
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xef() {
  Assert_real((isascii(239) == 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_isascii.c",
              1200, ("isascii should be 0 for 0xef"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xef>:
push   %rax
mov    $0xef,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4b0,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xef\00"
define void @t_isascii_0xef() {
%1 = call i64 @isascii(i32 239)
%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 1200, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xef\00"
define void @t_isascii_0xef() {
%1 = tail call i64 @isascii(i32 239)
%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 1200, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int f35(unsigned int);
unsigned int f36(unsigned int a) { return f35(f35(a)); }


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

x86 assembly (clang, -O2):
<f36>:
push   %rax
call   1030 <f35@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f35@plt>

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

LLVM IR (-O2):
define i32 @f36(i32 %0) {
%2 = tail call i32 @f35(i32 %0)
%3 = tail call i32 @f35(i32 %2)
ret i32 %3
}
/* Variables and functions */
int strcmp(char const *, char const *);
int stringCmp(const void *a, const void *b) {
  const char *pa = *(const char **)a;
  const char *pb = *(const char **)b;
  return (strcmp(pa, pb));
}


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

x86 assembly (clang, -O2):
<stringCmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @stringCmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
%9 = load i8*, i8** %8
store i8* %9, i8** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
store i8* %12, i8** %6
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = call i32 @strcmp(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @stringCmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
double f4(double x, double y, double z) {
  return (x * z) * ((1.0 / 12) * __builtin_copysign(4.0, y));
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movaps 0xee7(%rip),%xmm1
pand   %xmm1,%xmm2
movaps 0xeec(%rip),%xmm1
por    %xmm1,%xmm2
movsd  0xec0(%rip),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
andpd  0xef8(%rip),%xmm1
orpd   0xf00(%rip),%xmm1
mulsd  %xmm2,%xmm0
mulsd  0xf04(%rip),%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f4(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %6
%9 = fmul double %7, %8
%10 = load double, double* %5
%11 = call double @llvm.copysign.f64(double 4.000000e+00, double %10)
%12 = fmul double 0x3FB5555555555555, %11
%13 = fmul double %9, %12
ret double %13
}

LLVM IR (-O2):
define double @f4(double %0, double %1, double %2) {
%4 = fmul double %0, %2
%5 = tail call double @llvm.copysign.f64(double 4.000000e+00, double %1)
%6 = fmul double %5, 0x3FB5555555555555
%7 = fmul double %4, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("\nStack OverFlow\nFunção inline.\n\n");
  printf("\nStack OverFlow\nFunção comum.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"\0AStack OverFlow\0AFun\C3\A7\C3\A3o inline.\0A\0A\00"
@.str.1 = [34 x i8] c"\0AStack OverFlow\0AFun\C3\A7\C3\A3o comum.\0A\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [34 x i8] c"\0AStack OverFlow\0AFun\C3\A7\C3\A3o inline.\0A\00"
@str.2 = [33 x i8] c"\0AStack OverFlow\0AFun\C3\A7\C3\A3o comum.\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ graphics_exposures;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
int get_XGCValues_graphics_exposures(void *_p) {
  return (int)((XGCValues *)_p)->graphics_exposures;
}


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

x86 assembly (clang, -O2):
<get_XGCValues_graphics_exposures>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XGCValues_graphics_exposures(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XGCValues_graphics_exposures(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
char cast_ulong_char(unsigned long int x) { return (char)x; }


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

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

LLVM IR (-O0):
define signext i8 @cast_ulong_char(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @cast_ulong_char(i64 %0) {
%2 = trunc i64 %0 to i8
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ strchr(char *, char);
int /*<<< orphan*/ strncpy(int /*<<< orphan*/, char const *, size_t);
char *strncat(char *dst, const char *src, size_t n) {
  strncpy(strchr(dst, '\0'), src, n);
  return dst;
}


x86 assembly (clang, -O0):
<strncat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <strchr@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncat>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <strchr@plt>
mov    %eax,%edi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strncat(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = call i32 @strchr(i8* %7, i8 signext 0)
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @strncpy(i32 %8, i8* %9, i64 %10)
%12 = load i8*, i8** %4
ret i8* %12
}

LLVM IR (-O2):
define i8* @strncat(i8* returned %0, i8* %1, i64 %2) {
%4 = tail call i32 @strchr(i8* %0, i8 signext 0)
%5 = tail call i32 @strncpy(i32 %4, i8* %1, i64 %2)
ret i8* %0
}
/* Variables and functions */
scalar_t__ findMajority(char *, int, unsigned char *);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  unsigned char majority;
  if (findMajority("AAACCBBCCCBCC", 13, &majority))
    printf("Мажорант: %c\n", majority);
  else
    printf("Няма мажорант.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0xd,%esi
lea    -0x5(%rbp),%rdx
call   1040 <findMajority@plt>
cmp    $0x0,%rax
je     1165 <main+0x45>
movzbl -0x5(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1173 <main+0x53>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x7(%rsp),%rdx
mov    $0xd,%esi
call   1050 <findMajority@plt>
test   %rax,%rax
je     1161 <main+0x31>
movzbl 0x7(%rsp),%esi
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    116d <main+0x3d>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"AAACCBBCCCBCC\00"
@.str.1 = [22 x i8] c"\D0\9C\D0\B0\D0\B6\D0\BE\D1\80\D0\B0\D0\BD\D1\82: %c\0A\00"
@.str.2 = [28 x i8] c"\D0\9D\D1\8F\D0\BC\D0\B0 \D0\BC\D0\B0\D0\B6\D0\BE\D1\80\D0\B0\D0\BD\D1\82.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i64 @findMajority(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13, i8* %2)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %5
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"AAACCBBCCCBCC\00"
@.str.1 = [22 x i8] c"\D0\9C\D0\B0\D0\B6\D0\BE\D1\80\D0\B0\D0\BD\D1\82: %c\0A\00"
@str = [27 x i8] c"\D0\9D\D1\8F\D0\BC\D0\B0 \D0\BC\D0\B0\D0\B6\D0\BE\D1\80\D0\B0\D0\BD\D1\82.\00"
define i32 @main() {
%1 = alloca i8
%2 = call i64 @findMajority(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13, i8* %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %10
8: ; preds = %0
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %4
ret i32 0
}
/* Variables and functions */
int close(int);
int restartableDup2(int, int);
int moveDescriptor(int fd_from, int fd_to) {
  if (fd_from != fd_to) {
    if ((restartableDup2(fd_from, fd_to) == -1) || (close(fd_from) == -1))
      return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<moveDescriptor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1170 <moveDescriptor+0x50>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <restartableDup2@plt>
cmp    $0xffffffff,%eax
je     115f <moveDescriptor+0x3f>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
cmp    $0xffffffff,%eax
jne    116b <moveDescriptor+0x4b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <moveDescriptor+0x57>
jmp    1170 <moveDescriptor+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<moveDescriptor>:
push   %rbp
push   %rbx
push   %rax
cmp    %esi,%edi
je     1144 <moveDescriptor+0x24>
mov    %edi,%ebp
call   1030 <restartableDup2@plt>
mov    $0xffffffff,%ebx
cmp    $0xffffffff,%eax
je     1146 <moveDescriptor+0x26>
mov    %ebp,%edi
call   1040 <close@plt>
cmp    $0xffffffff,%eax
je     1146 <moveDescriptor+0x26>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @moveDescriptor(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i32 @restartableDup2(i32 %0, i32 %1)
%6 = icmp eq i32 %5, -1
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i32 @close(i32 %0)
%9 = icmp eq i32 %8, -1
br i1 %9, label %11, label %10
10: ; preds = %7, %2
br label %11
11: ; preds = %4, %7, %10
%12 = phi i32 [ 0, %10 ], [ -1, %7 ], [ -1, %4 ]
ret i32 %12
}
void sg_user_destroy_comp(void) {}


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

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

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

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