xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_javascript_comments() {
  test_parser_verify_parse(test_parser_sourcefile("javascript", " //comment"),
                           "javascript", "", "//comment", 0);
}


x86 assembly (clang, -O0):
<test_javascript_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed9(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xece(%rip),%rdx
lea    0xebe(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_javascript_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xedc(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xed7(%rip),%rdx
lea    0xec7(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"javascript\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_javascript_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"javascript\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_javascript_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
int shifts2(long long x, int i) { return ((x << i) + (x >> i)); }


x86 assembly (clang, -O0):
<shifts2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    %cl,%rax
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
sar    %cl,%rdx
mov    %rdx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shifts2>:
mov    %esi,%ecx
mov    %rdi,%rax
shl    %cl,%rax
sar    %cl,%rdi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @shifts2(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = shl i64 %5, %7
%9 = load i64, i64* %3
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = ashr i64 %9, %11
%13 = add nsw i64 %8, %12
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @shifts2(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = shl i64 %0, %3
%5 = ashr i64 %0, %3
%6 = add nsw i64 %4, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t LCDIDDDataRead(uint32_t ui32Base, uint32_t ui32CS) {
  uint32_t ui32Reg;
  ;
  ;
  ui32Reg = ui32CS ? 0x00000024 : 0x00000018;
  return ((uint16_t)(*((volatile uint32_t *)(ui32Base + ui32Reg))));
}


x86 assembly (clang, -O0):
<LCDIDDDataRead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x18,%eax
mov    $0x24,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
cltq
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDIDDDataRead>:
test   %esi,%esi
mov    $0x18,%eax
mov    $0x24,%ecx
cmove  %eax,%ecx
movslq %edi,%rax
mov    (%rcx,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @LCDIDDDataRead(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 36, i32 24
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = add nsw i32 %10, %11
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
%15 = load volatile i32, i32* %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @LCDIDDDataRead(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i32 24, i32 36
%5 = add nsw i32 %4, %0
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
ret i32 %8
}
void quat_inverse(float q[4]) {
  q[1] = -q[1];
  q[2] = -q[2];
  q[3] = -q[3];
}


x86 assembly (clang, -O0):
<quat_inverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<quat_inverse>:
movaps 0xef9(%rip),%xmm0
movss  0x4(%rdi),%xmm1
movss  0x8(%rdi),%xmm2
movss  0xc(%rdi),%xmm3
xorps  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
xorps  %xmm0,%xmm2
movss  %xmm2,0x8(%rdi)
xorps  %xmm0,%xmm3
movss  %xmm3,0xc(%rdi)
ret

LLVM IR (-O0):
define void @quat_inverse(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 1
%5 = load float, float* %4
%6 = fneg float %5
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 1
store float %6, float* %8
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 2
%11 = load float, float* %10
%12 = fneg float %11
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 2
store float %12, float* %14
%15 = load float*, float** %2
%16 = getelementptr inbounds float, float* %15, i64 3
%17 = load float, float* %16
%18 = fneg float %17
%19 = load float*, float** %2
%20 = getelementptr inbounds float, float* %19, i64 3
store float %18, float* %20
ret void
}

LLVM IR (-O2):
define void @quat_inverse(float* nocapture %0) {
%2 = getelementptr inbounds float, float* %0, i64 1
%3 = load float, float* %2
%4 = fneg float %3
store float %4, float* %2
%5 = getelementptr inbounds float, float* %0, i64 2
%6 = load float, float* %5
%7 = fneg float %6
store float %7, float* %5
%8 = getelementptr inbounds float, float* %0, i64 3
%9 = load float, float* %8
%10 = fneg float %9
store float %10, float* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int main() {
  test1();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test1()
ret i32 0
}
void suma_resta(int a, int b, int *s, int *r) {
  *s = a + b;
  *r = a - b;
}


x86 assembly (clang, -O0):
<suma_resta>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<suma_resta>:
lea    (%rsi,%rdi,1),%eax
mov    %eax,(%rdx)
sub    %esi,%edi
mov    %edi,(%rcx)
ret

LLVM IR (-O0):
define void @suma_resta(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
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = load i32*, i32** %7
store i32 %11, i32* %12
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
%16 = load i32*, i32** %8
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @suma_resta(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = add nsw i32 %1, %0
store i32 %5, i32* %2
%6 = sub nsw i32 %0, %1
store i32 %6, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cris_fidx_d(int /*<<< orphan*/);
int /*<<< orphan*/ cris_fidx_i(int /*<<< orphan*/);
int /*<<< orphan*/ cris_ftag_d(int /*<<< orphan*/);
int /*<<< orphan*/ cris_ftag_i(int /*<<< orphan*/);
int /*<<< orphan*/ pass();
int main(void) {
  cris_ftag_i(0);
  cris_ftag_d(0);
  cris_fidx_i(0);
  cris_fidx_d(0);
  pass();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <cris_ftag_i@plt>
xor    %edi,%edi
call   1070 <cris_ftag_d@plt>
xor    %edi,%edi
call   1060 <cris_fidx_i@plt>
xor    %edi,%edi
call   1030 <cris_fidx_d@plt>
mov    $0x0,%al
call   1050 <pass@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <cris_ftag_i@plt>
xor    %edi,%edi
call   1070 <cris_ftag_d@plt>
xor    %edi,%edi
call   1060 <cris_fidx_i@plt>
xor    %edi,%edi
call   1030 <cris_fidx_d@plt>
xor    %eax,%eax
call   1050 <pass@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @cris_ftag_i(i32 0)
%3 = call i32 @cris_ftag_d(i32 0)
%4 = call i32 @cris_fidx_i(i32 0)
%5 = call i32 @cris_fidx_d(i32 0)
%6 = call i32 (...) @pass()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @cris_ftag_i(i32 0)
%2 = tail call i32 @cris_ftag_d(i32 0)
%3 = tail call i32 @cris_fidx_i(i32 0)
%4 = tail call i32 @cris_fidx_d(i32 0)
%5 = tail call i32 (...) @pass()
ret i32 0
}
/* Type definitions */
struct pt_regs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __do_IRQ(int);
void handle_irq(int irq, struct pt_regs *regs) { __do_IRQ(irq); }


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

x86 assembly (clang, -O2):
<handle_irq>:
jmp    1030 <__do_IRQ@plt>

LLVM IR (-O0):
%struct.pt_regs = type { i32 }
define void @handle_irq(i32 %0, %struct.pt_regs* %1) {
%3 = alloca i32
%4 = alloca %struct.pt_regs*
store i32 %0, i32* %3
store %struct.pt_regs* %1, %struct.pt_regs** %4
%5 = load i32, i32* %3
%6 = call i32 @__do_IRQ(i32 %5)
ret void
}

LLVM IR (-O2):
%struct.pt_regs = type { i32 }
define void @handle_irq(i32 %0, %struct.pt_regs* nocapture readnone %1) {
%3 = tail call i32 @__do_IRQ(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ t10(int);
void t11() { t10(1); }


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

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

LLVM IR (-O0):
define void @t11() {
%1 = call i32 @t10(i32 1)
ret void
}

LLVM IR (-O2):
define void @t11() {
%1 = tail call i32 @t10(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inv_host_serif_get_instance();
int inv_host_serif_get_type(int /*<<< orphan*/);
int inv_host_serif_get_type_i(void) {
  return inv_host_serif_get_type(inv_host_serif_get_instance());
}


x86 assembly (clang, -O0):
<inv_host_serif_get_type_i>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <inv_host_serif_get_instance@plt>
mov    %eax,%edi
call   1030 <inv_host_serif_get_type@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_host_serif_get_type_i>:
push   %rax
xor    %eax,%eax
call   1040 <inv_host_serif_get_instance@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <inv_host_serif_get_type@plt>

LLVM IR (-O0):
define i32 @inv_host_serif_get_type_i() {
%1 = call i32 (...) @inv_host_serif_get_instance()
%2 = call i32 @inv_host_serif_get_type(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @inv_host_serif_get_type_i() {
%1 = tail call i32 (...) @inv_host_serif_get_instance()
%2 = tail call i32 @inv_host_serif_get_type(i32 %1)
ret i32 %2
}
int heap_max(int *A) { return A[0]; }


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

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

LLVM IR (-O0):
define i32 @heap_max(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @heap_max(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
unsigned long fnv1_a(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int get_index(char *key, int size) {
  unsigned long hash = fnv1_a(key, strlen(key));
  int i = (int)(hash % size);
  return i;
}


x86 assembly (clang, -O0):
<get_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1040 <fnv1_a@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_index>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <fnv1_a@plt>
movslq %ebp,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1150 <get_index+0x30>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
jmp    1156 <get_index+0x36>
xor    %edx,%edx
div    %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_index(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = call i64 @fnv1_a(i8* %7, i32 %9)
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = urem i64 %11, %13
%15 = trunc i64 %14 to i32
store i32 %15, i32* %6
%16 = load i32, i32* %6
ret i32 %16
}

LLVM IR (-O2):
define i32 @get_index(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i64 @fnv1_a(i8* %0, i32 %3)
%5 = sext i32 %1 to i64
%6 = urem i64 %4, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int ipv6_addr_split(char *, char, int);
int ipv6_addr_split_iface(char *addr_str) {
  return ipv6_addr_split(addr_str, '%', -1);
}


x86 assembly (clang, -O0):
<ipv6_addr_split_iface>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x25,%esi
mov    $0xffffffff,%edx
call   1030 <ipv6_addr_split@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv6_addr_split_iface>:
mov    $0x25,%esi
mov    $0xffffffff,%edx
jmp    1030 <ipv6_addr_split@plt>

LLVM IR (-O0):
define i32 @ipv6_addr_split_iface(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ipv6_addr_split(i8* %3, i8 signext 37, i32 -1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @ipv6_addr_split_iface(i8* %0) {
%2 = tail call i32 @ipv6_addr_split(i8* %0, i8 signext 37, i32 -1)
ret i32 %2
}
/* Variables and functions */
unsigned char __startrek_read_nxtcolorsensor_mode();
unsigned char ecrobot_get_nxtcolorsensor_mode(unsigned char port_id) {
  unsigned char tmp;
  {
    tmp = __startrek_read_nxtcolorsensor_mode();
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<ecrobot_get_nxtcolorsensor_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <__startrek_read_nxtcolorsensor_mode@plt>
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @ecrobot_get_nxtcolorsensor_mode(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = call zeroext i8 (...) @__startrek_read_nxtcolorsensor_mode()
store i8 %4, i8* %3
%5 = load i8, i8* %3
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @ecrobot_get_nxtcolorsensor_mode(i8 zeroext %0) {
%2 = tail call zeroext i8 (...) @__startrek_read_nxtcolorsensor_mode()
ret i8 %2
}
unsigned short f(short a) {
  short b;
  if (a > 0)
    return 0;
  b = ((int)a) + -(int)32768;
  return b;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
jle    1123 <f+0x23>
movw   $0x0,-0x2(%rbp)
jmp    1138 <f+0x38>
movswl -0x4(%rbp),%eax
add    $0xffff8000,%eax
mov    %ax,-0x6(%rbp)
mov    -0x6(%rbp),%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%ecx
xor    $0xffff8000,%ecx
xor    %eax,%eax
test   %di,%di
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f(i16 signext %0) {
%2 = alloca i16
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i16 0, i16* %2
br label %15
9: ; preds = %1
%10 = load i16, i16* %3
%11 = sext i16 %10 to i32
%12 = add nsw i32 %11, -32768
%13 = trunc i32 %12 to i16
store i16 %13, i16* %4
%14 = load i16, i16* %4
store i16 %14, i16* %2
br label %15
15: ; preds = %9, %8
%16 = load i16, i16* %2
ret i16 %16
}

LLVM IR (-O2):
define zeroext i16 @f(i16 signext %0) {
%2 = icmp sgt i16 %0, 0
%3 = xor i16 %0, -32768
%4 = select i1 %2, i16 0, i16 %3
ret i16 %4
}
/* Variables and functions */
char getchar();
scalar_t__ islower(char);
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int /*<<< orphan*/ tolower(char);
int /*<<< orphan*/ toupper(char);
main() {
  char ch;
  ch = getchar();
  if (islower(ch))
    putchar(toupper(ch));
  else
    putchar(tolower(ch));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1040 <islower@plt>
cmp    $0x0,%rax
je     1191 <main+0x41>
movsbl -0x5(%rbp),%edi
call   1050 <toupper@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    11a1 <main+0x51>
movsbl -0x5(%rbp),%edi
call   1070 <tolower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <getchar@plt>
movsbl %al,%ebx
mov    %ebx,%edi
call   1040 <islower@plt>
mov    %ebx,%edi
test   %rax,%rax
je     1170 <main+0x20>
call   1050 <toupper@plt>
jmp    1175 <main+0x25>
call   1070 <tolower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = call i64 @islower(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i8, i8* %2
%9 = call i32 @toupper(i8 signext %8)
%10 = call i32 @putchar(i32 %9)
br label %15
11: ; preds = %0
%12 = load i8, i8* %2
%13 = call i32 @tolower(i8 signext %12)
%14 = call i32 @putchar(i32 %13)
br label %15
15: ; preds = %11, %7
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = tail call i64 @islower(i8 signext %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @toupper(i8 signext %1)
br label %8
6: ; preds = %0
%7 = tail call i32 @tolower(i8 signext %1)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %7, %6 ], [ %5, %4 ]
%10 = tail call i32 @putchar(i32 %9)
ret i32 0
}
/* Variables and functions */
int GetNextUTFCode(char const *, unsigned int *);
int GetUTFCode(const char *text) {
  unsigned int octets;
  return (GetNextUTFCode(text, &octets));
}


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

x86 assembly (clang, -O2):
<GetUTFCode>:
push   %rax
lea    0x4(%rsp),%rsi
call   1030 <GetNextUTFCode@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @GetUTFCode(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @GetNextUTFCode(i8* %0, i32* %2)
ret i32 %4
}
double f11(double y) {
  double t = y - 0.0;
  return t - 0.0;
}


x86 assembly (clang, -O0):
<f11>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @f11(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 0.000000e+00
store double %5, double* %3
%6 = load double, double* %3
%7 = fsub double %6, 0.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f11(double returned %0) {
ret double %0
}
void lcd_on() {}


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

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

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

LLVM IR (-O2):
define void @lcd_on() {
ret void
}
void srp_core_resume(void) { return; }


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

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

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

LLVM IR (-O2):
define void @srp_core_resume() {
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int, int);
void print64bits(char *name, uint64_t val) {
  printf("%s%08x%08x\n", name, (uint32_t)(val >> 32),
         (uint32_t)(val & 0xFFFFFFFF));
}


x86 assembly (clang, -O0):
<print64bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x20,%ecx
sar    %cl,%edx
mov    -0xc(%rbp),%ecx
and    $0xffffffff,%ecx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print64bits>:
mov    %esi,%ecx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s%08x%08x\0A\00"
define void @print64bits(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = ashr i32 %6, 32
%8 = load i32, i32* %4
%9 = and i32 %8, -1
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %7, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s%08x%08x\0A\00"
define void @print64bits(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i32 poison, i32 %1)
ret void
}
int main(void) {
  while (1) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
jmp    110b <main+0xb>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int HV_E_FAIL;
int fprintf(int /*<<< orphan*/ *, char *, char *, char *, char *, char *);
int kvp_write_file(FILE *f, char *s1, char *s2, char *s3) {
  int ret;
  ret = fprintf(f, "%s%s%s%s\n", s1, s2, "=", s3);
  if (ret < 0) {
    return HV_E_FAIL;
  }
  return 0;
}


x86 assembly (clang, -O0):
<kvp_write_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r9
lea    0xec1(%rip),%rsi
lea    0xec4(%rip),%r8
call   1030 <fprintf@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jge    1169 <kvp_write_file+0x59>
mov    0x2e81(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <kvp_write_file+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kvp_write_file>:
push   %rax
mov    %rcx,%r9
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xedf(%rip),%rsi
lea    0xee2(%rip),%r8
call   1030 <fprintf@plt>
mov    0x2eac(%rip),%rcx
sar    $0x1f,%eax
and    (%rcx),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%s%s%s%s\0A\00"
@.str.1 = [2 x i8] c"=\00"
@HV_E_FAIL = global i32 0
define i32 @kvp_write_file(i32* nocapture %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = icmp slt i32 %5, 0
%7 = load i32, i32* @HV_E_FAIL
%8 = select i1 %6, i32 %7, i32 0
ret i32 %8
}
void flush_cache_dup_mm(struct mm_struct *mm) {}


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

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

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

LLVM IR (-O2):
%struct.mm_struct = type opaque
define void @flush_cache_dup_mm(%struct.mm_struct* nocapture %0) {
ret void
}
void load_color_scheme(char *name, char *dir) {}


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

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

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

LLVM IR (-O2):
define void @load_color_scheme(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void RTCrc32(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCrc32() {
ret void
}
/* Variables and functions */
int kelime(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int sayac(char *);
int main() {
  char str[20] = "";
  char *p = str;
  printf("Uzunluk: %d\n", sayac(p));
  puts(p);
  printf("Kelime sayisi: %d\n", kelime(p));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1050 <memset@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1070 <sayac@plt>
mov    %eax,%esi
lea    0xe77(%rip),%rdi
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x28(%rbp),%rdi
call   1060 <kelime@plt>
mov    %eax,%esi
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <sayac@plt>
lea    0xe9a(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1050 <kelime@plt>
lea    0xe89(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Uzunluk: %d\0A\00"
@.str.1 = [19 x i8] c"Kelime sayisi: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [20 x i8]* %2 to i8*
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @sayac(i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
%10 = call i32 @puts(i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @kelime(i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Uzunluk: %d\0A\00"
@.str.1 = [19 x i8] c"Kelime sayisi: %d\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @sayac(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @puts(i8* %2)
%6 = call i32 @kelime(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ go(char *);
int main(int argc, char *argv[]) {
  go(argv[1]);
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <go@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <go@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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @go(i8* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @go(i8* %4)
ret i32 0
}
/* Variables and functions */
int ece391_close(int);
int close(int file) { return ece391_close(file); }


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

x86 assembly (clang, -O2):
<close>:
jmp    1030 <ece391_close@plt>

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

LLVM IR (-O2):
define i32 @close(i32 %0) {
%2 = tail call i32 @ece391_close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x56() {
  Assert_real((isbdigit(86) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              435, ("isbdigit should be 0 for V"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for V\00"
define void @t_isbdigit_0x56() {
%1 = call i64 @isbdigit(i32 86)
%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 435, 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for V\00"
define void @t_isbdigit_0x56() {
%1 = tail call i64 @isbdigit(i32 86)
%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 435, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int lgs(int n) {
  int reg = 0;
  while (n) {
    n /= 10;
    reg++;
  }
  return reg;
}


x86 assembly (clang, -O0):
<lgs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <lgs+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <lgs+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lgs>:
xor    %eax,%eax
test   %edi,%edi
je     1132 <lgs+0x32>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <lgs+0x10>
ret

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

LLVM IR (-O2):
define i32 @lgs(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = add i32 %5, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x81() {
  Assert_real((isalpha(129) == 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_isalpha.c",
              650, ("isalpha should be 0 for 0x81"));
}


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

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

/* Variables and functions */
double calc_tree(struct tree *);
int /*<<< orphan*/ printf(char *, double);
double fun_print(struct tree *tree) {
  double result;
  result = calc_tree(tree);
  printf("%.2f\n", result);
  return result;
}


x86 assembly (clang, -O0):
<fun_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <calc_tree@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_print>:
push   %rax
call   1040 <calc_tree@plt>
movsd  %xmm0,(%rsp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.tree = type { i32 }
@.str = [6 x i8] c"%.2f\0A\00"
define double @fun_print(%struct.tree* %0) {
%2 = alloca %struct.tree*
%3 = alloca double
store %struct.tree* %0, %struct.tree** %2
%4 = load %struct.tree*, %struct.tree** %2
%5 = call double @calc_tree(%struct.tree* %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %6)
%8 = load double, double* %3
ret double %8
}

LLVM IR (-O2):
%struct.tree = type { i32 }
@.str = [6 x i8] c"%.2f\0A\00"
define double @fun_print(%struct.tree* %0) {
%2 = tail call double @calc_tree(%struct.tree* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %2)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *, int);
int htoi_new(char *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char string[5];
  get_string(string, 5);
  printf("Decimal equivalent: %d\n", htoi_new(string));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x9(%rbp),%rdi
mov    $0x5,%esi
call   1030 <get_string@plt>
lea    -0x9(%rbp),%rdi
call   1050 <htoi_new@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xb(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <get_string@plt>
mov    %rbx,%rdi
call   1050 <htoi_new@plt>
lea    0xeaa(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Decimal equivalent: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%4 = call i32 @get_string(i8* %3, i32 5)
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%6 = call i32 @htoi_new(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Decimal equivalent: %d\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @get_string(i8* %2, i32 5)
%4 = call i32 @htoi_new(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
bool bool_return_val(bool value) { return value; }


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

x86 assembly (clang, -O2):
<bool_return_val>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @bool_return_val(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t ntoh64(uint64_t n) { return n; }


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

x86 assembly (clang, -O2):
<ntoh64>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @ntoh64(i32 returned %0) {
ret i32 %0
}
__attribute__((always_)) unsigned short GetTickCount() {
  return *(unsigned short *)0x46c;
}


x86 assembly (clang, -O0):
<GetTickCount>:
push   %rbp
mov    %rsp,%rbp
mov    $0x46c,%eax
movzwl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTickCount>:
movzwl 0x46c,%eax
ret

LLVM IR (-O0):
define zeroext i16 @GetTickCount() {
%1 = load i16, i16* inttoptr (i64 1132 to i16*)
ret i16 %1
}

LLVM IR (-O2):
define zeroext i16 @GetTickCount() {
%1 = load i16, i16* inttoptr (i64 1132 to i16*)
ret i16 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x91() {
  Assert_real((ispunct(145) == 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_ispunct.c",
              730, ("ispunct should be 0 for 0x91"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x91>:
push   %rax
mov    $0x91,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2da,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x91\00"
define void @t_ispunct_0x91() {
%1 = call i64 @ispunct(i32 145)
%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 730, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x91\00"
define void @t_ispunct_0x91() {
%1 = tail call i64 @ispunct(i32 145)
%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 730, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
float asinf(float);
float __rasind(float x) { return (asinf(x) * 57.29577951308232F); }


x86 assembly (clang, -O0):
<__rasind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <asinf@plt>
movss  0xed1(%rip),%xmm1
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__rasind>:
push   %rax
call   1030 <asinf@plt>
mulss  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @__rasind(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @asinf(float %3)
%5 = fmul float %4, 0x404CA5DC20000000
ret float %5
}

LLVM IR (-O2):
define float @__rasind(float %0) {
%2 = tail call float @asinf(float %0)
%3 = fmul float %2, 0x404CA5DC20000000
ret float %3
}