xunge/DecIR huggingface dataset:
imm0adrreg1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if (22 <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<imm0adrreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
mov    $0x16,%eax
cmp    0x10f444(%rcx),%eax
ja     1139 <imm0adrreg1+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1140 <imm0adrreg1+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imm0adrreg1>:
xor    %eax,%eax
cmpl   $0x16,0x10f444(%r9)
16
setae  %al
ret

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

LLVM IR (-O2):
define i32 @imm0adrreg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = getelementptr inbounds i32, i32* %5, i64 277777
%8 = load i32, i32* %7
%9 = icmp ugt i32 %8, 21
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int printf(char *, int);
int main(int argc, char const *argv[]) {
  int bph2o = 212;
  int rv;
  rv = printf("%d F is water's boiling point. \n", bph2o);
  printf("The printf() function printed %d characters.\n", rv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xd4,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [33 x i8] c"%d F is water's boiling point. \0A\00"
@.str.1 = [46 x i8] c"The printf() function printed %d characters.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 212, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %8)
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"%d F is water's boiling point. \0A\00"
@.str.1 = [46 x i8] c"The printf() function printed %d characters.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 212)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
void foo(void) {
  int a[4] = {1, 2, 3, 4};
  int *p = &a[0];
  int x = 5;
#pragma omp target data map(to : p[:4])
#pragma omp target data use_device_ptr(p)
#pragma omp target is_device_ptr(p)
  { p[0]++; }
#pragma omp target data map(to : a)
#pragma omp target data use_device_addr(a)
#pragma omp target is_device_ptr(a)
  { p[0]++; }
#pragma omp target data map(to : x)
#pragma omp target data use_device_addr(x)
  {
    int *q = &x;
#pragma omp target is_device_ptr(q)
    { q[0]++; }
  }
#pragma omp target data
  a[0]++;
#pragma omp target data map(to : p)
#pragma omp target data use_device_ptr(p) use_device_ptr(p)
  a[0]++;
#pragma omp target data map(to : a)
#pragma omp target data use_device_addr(a) use_device_addr(a)
  a[0]++;
#pragma omp target data map(to : a)
#pragma omp target data use_device_ptr(a)
  a[0]++;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x5,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
lea    -0x1c(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.foo.a = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
define void @foo() {
%1 = alloca [4 x i32]
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32*
%5 = bitcast [4 x i32]* %1 to i8*
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
store i32* %6, i32** %2
store i32 5, i32* %3
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 0
%13 = load i32, i32* %12
%14 = add nsw i32 %13, 1
store i32 %14, i32* %12
store i32* %3, i32** %4
%15 = load i32*, i32** %4
%16 = getelementptr inbounds i32, i32* %15, i64 0
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 1
store i32 %18, i32* %16
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%20 = load i32, i32* %19
%21 = add nsw i32 %20, 1
store i32 %21, i32* %19
%22 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
store i32 %24, i32* %22
%25 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%26 = load i32, i32* %25
%27 = add nsw i32 %26, 1
store i32 %27, i32* %25
%28 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%29 = load i32, i32* %28
%30 = add nsw i32 %29, 1
store i32 %30, i32* %28
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ iscntrl(int);
void t_iscntrl_0x11() {
  Assert_real((iscntrl(17)),
              "/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_iscntrl.c",
              90, ("iscntrl should be 1 for 0x11"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x11>:
push   %rax
mov    $0x11,%edi
call   1030 <iscntrl@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x5a,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x11\00"
define void @t_iscntrl_0x11() {
%1 = call i32 @iscntrl(i32 17)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 90, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x11\00"
define void @t_iscntrl_0x11() {
%1 = tail call i32 @iscntrl(i32 17)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 90, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int twister_genrand64_int64();
double twister_genrand64_real3(void) {
  return ((twister_genrand64_int64() >> 12) + 0.5) * (1.0 / 4503599627370496.0);
}


x86 assembly (clang, -O0):
<twister_genrand64_real3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <twister_genrand64_int64@plt>
sar    $0xc,%eax
cvtsi2sd %eax,%xmm0
movsd  0xede(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<twister_genrand64_real3>:
push   %rax
xor    %eax,%eax
call   1030 <twister_genrand64_int64@plt>
sar    $0xc,%eax
cvtsi2sd %eax,%xmm0
addsd  0xed9(%rip),%xmm0
mulsd  0xed9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @twister_genrand64_real3() {
%1 = call i32 (...) @twister_genrand64_int64()
%2 = ashr i32 %1, 12
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 5.000000e-01
%5 = fmul double %4, 0x3CB0000000000000
ret double %5
}

LLVM IR (-O2):
define double @twister_genrand64_real3() {
%1 = tail call i32 (...) @twister_genrand64_int64()
%2 = ashr i32 %1, 12
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 5.000000e-01
%5 = fmul double %4, 0x3CB0000000000000
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *malloc(size_t);
void *xMalloc(size_t size) {
  void *data = malloc(size);
  if (!data && size > 0) {
    assert(0);
  }
  return data;
}


x86 assembly (clang, -O0):
<xMalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1156 <xMalloc+0x36>
cmpq   $0x0,-0x8(%rbp)
jbe    1156 <xMalloc+0x36>
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xMalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1140 <xMalloc+0x20>
test   %r14,%r14
jne    1140 <xMalloc+0x20>
xor    %edi,%edi
call   1030 <assert@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @xMalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
%4 = icmp ne i64 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @assert(i32 0)
br label %8
8: ; preds = %6, %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ XkbAllEventsMask;
int /*<<< orphan*/ XkbSelectEvents(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ XkbUseCoreKbd;
void enable_gr_events(Display *dpy) {
  XkbSelectEvents(dpy, XkbUseCoreKbd, XkbAllEventsMask, XkbAllEventsMask);
}


x86 assembly (clang, -O0):
<enable_gr_events>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
mov    0x2ea7(%rip),%rax
mov    (%rax),%ecx
call   1030 <XkbSelectEvents@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_gr_events>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2ec0(%rip),%rax
mov    (%rax),%ecx
mov    %ecx,%edx
jmp    1030 <XkbSelectEvents@plt>

LLVM IR (-O0):
@XkbUseCoreKbd = global i32 0
@XkbAllEventsMask = global i32 0
define void @enable_gr_events(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @XkbUseCoreKbd
%5 = load i32, i32* @XkbAllEventsMask
%6 = load i32, i32* @XkbAllEventsMask
%7 = call i32 @XkbSelectEvents(i32* %3, i32 %4, i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@XkbUseCoreKbd = global i32 0
@XkbAllEventsMask = global i32 0
define void @enable_gr_events(i32* %0) {
%2 = load i32, i32* @XkbUseCoreKbd
%3 = load i32, i32* @XkbAllEventsMask
%4 = tail call i32 @XkbSelectEvents(i32* %0, i32 %2, i32 %3, i32 %3)
ret void
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int offset(int, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ safe_move(int, int);
int autohelperowl_attackpat162(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int a;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(-1, 0, move, transformation);
  return !safe_move(a, color);
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat162>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <safe_move@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat162>:
push   %rbx
mov    %ecx,%ebx
mov    %esi,%ecx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <offset@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1040 <safe_move@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat162(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 -1, i32 0, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = load i32, i32* %9
%20 = call i32 @safe_move(i32 %18, i32 %19)
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat162(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 -1, i32 0, i32 %2, i32 %1)
%7 = tail call i32 @safe_move(i32 %6, i32 %3)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
float vec2_norm(const float v[2]) { return sqrt(v[0] * v[0] + v[1] * v[1]); }


x86 assembly (clang, -O0):
<vec2_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <sqrt@plt>
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec2_norm>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1132 <vec2_norm+0x22>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @vec2_norm(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fmul float %11, %14
%16 = call float @llvm.fmuladd.f32(float %5, float %8, float %15)
%17 = fpext float %16 to double
%18 = call double @sqrt(double %17)
%19 = fptrunc double %18 to float
ret float %19
}

LLVM IR (-O2):
define float @vec2_norm(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fmul float %4, %4
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
%7 = tail call float @sqrtf(float %6)
ret float %7
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int timestamp_ns();
uint64_t timestamp_s() { return timestamp_ns() / 1000 / 1000 / 1000; }


x86 assembly (clang, -O0):
<timestamp_s>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <timestamp_ns@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    $0x3e8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<timestamp_s>:
push   %rax
xor    %eax,%eax
call   1030 <timestamp_ns@plt>
cltq
imul   $0x44b82fa1,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x3c,%rax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @timestamp_s() {
%1 = call i32 (...) @timestamp_ns()
%2 = sdiv i32 %1, 1000
%3 = sdiv i32 %2, 1000
%4 = sdiv i32 %3, 1000
ret i32 %4
}

LLVM IR (-O2):
define i32 @timestamp_s() {
%1 = tail call i32 (...) @timestamp_ns()
%2 = sdiv i32 %1, 1000000000
ret i32 %2
}
int mtd_has_partitions(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mtd_has_partitions() {
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int opt_normalmode(char *opt) {
  if (strcmp(opt, "-s") == 0)
    return 1;
  if (strcmp(opt, "--start") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<opt_normalmode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <opt_normalmode+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_normalmode+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <opt_normalmode+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_normalmode+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_normalmode>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <opt_normalmode+0x31>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"-s\00"
@.str.1 = [8 x i8] c"--start\00"
define i32 @opt_normalmode(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
int ft_len(const char *s, char c, int position_beg) {
  int length;
  length = 0;
  while (s[position_beg] != c && s[position_beg]) {
    length++;
    position_beg++;
  }
  return (length);
}


x86 assembly (clang, -O0):
<ft_len>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
movsbl -0x9(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x15(%rbp)
je     114a <ft_len+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    115a <ft_len+0x5a>
jmp    1171 <ft_len+0x71>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1118 <ft_len+0x18>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_len>:
movslq %edx,%rcx
mov    (%rdi,%rcx,1),%dl
xor    %eax,%eax
cmp    %sil,%dl
je     1131 <ft_len+0x31>
test   %dl,%dl
je     1131 <ft_len+0x31>
add    %rdi,%rcx
add    $0x1,%rcx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movzbl (%rcx,%rax,1),%edx
add    $0x1,%rax
cmp    %sil,%dl
je     1131 <ft_len+0x31>
test   %dl,%dl
jne    1120 <ft_len+0x20>
ret

LLVM IR (-O0):
define i32 @ft_len(i8* %0, i8 signext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %28, %3
%9 = load i8*, i8** %4
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %14, %16
br i1 %17, label %18, label %26
18: ; preds = %8
%19 = load i8*, i8** %4
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 0
br label %26
26: ; preds = %18, %8
%27 = phi i1 [ false, %8 ], [ %25, %18 ]
br i1 %27, label %28, label %33
28: ; preds = %26
%29 = load i32, i32* %7
%30 = add nsw i32 %29, 1
store i32 %30, i32* %7
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %8
33: ; preds = %26
%34 = load i32, i32* %7
ret i32 %34
}

LLVM IR (-O2):
define i32 @ft_len(i8* nocapture %0, i8 signext %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, %1
%8 = icmp eq i8 %6, 0
%9 = or i1 %7, %8
br i1 %9, label %20, label %10
10: ; preds = %3, %10
%11 = phi i64 [ %14, %10 ], [ %4, %3 ]
%12 = phi i32 [ %13, %10 ], [ 0, %3 ]
%13 = add nuw nsw i32 %12, 1
%14 = add i64 %11, 1
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, %1
%18 = icmp eq i8 %16, 0
%19 = or i1 %17, %18
br i1 %19, label %20, label %10
20: ; preds = %10, %3
%21 = phi i32 [ 0, %3 ], [ %13, %10 ]
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ ns2thpoint(float, float, float, float, float, float, float);
void ns2thpoint_(float *x, float *y, float *z, float *red, float *green,
                 float *blue, float *size) {
  ns2thpoint(*x, *y, *z, *red, *green, *blue, *size);
}


x86 assembly (clang, -O0):
<ns2thpoint_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm3
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm4
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm5
mov    0x10(%rbp),%rax
movss  (%rax),%xmm6
call   1030 <ns2thpoint@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns2thpoint_>:
mov    0x8(%rsp),%rax
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  (%rdx),%xmm2
movss  (%rcx),%xmm3
movss  (%r8),%xmm4
movss  (%r9),%xmm5
movss  (%rax),%xmm6
jmp    1030 <ns2thpoint@plt>

LLVM IR (-O0):
define void @ns2thpoint_(float* %0, float* %1, float* %2, float* %3, float* %4, float* %5, float* %6) {
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
%13 = alloca float*
%14 = alloca float*
store float* %0, float** %8
store float* %1, float** %9
store float* %2, float** %10
store float* %3, float** %11
store float* %4, float** %12
store float* %5, float** %13
store float* %6, float** %14
%15 = load float*, float** %8
%16 = load float, float* %15
%17 = load float*, float** %9
%18 = load float, float* %17
%19 = load float*, float** %10
%20 = load float, float* %19
%21 = load float*, float** %11
%22 = load float, float* %21
%23 = load float*, float** %12
%24 = load float, float* %23
%25 = load float*, float** %13
%26 = load float, float* %25
%27 = load float*, float** %14
%28 = load float, float* %27
%29 = call i32 @ns2thpoint(float %16, float %18, float %20, float %22, float %24, float %26, float %28)
ret void
}

LLVM IR (-O2):
define void @ns2thpoint_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4, float* nocapture %5, float* nocapture %6) {
%8 = load float, float* %0
%9 = load float, float* %1
%10 = load float, float* %2
%11 = load float, float* %3
%12 = load float, float* %4
%13 = load float, float* %5
%14 = load float, float* %6
%15 = tail call i32 @ns2thpoint(float %8, float %9, float %10, float %11, float %12, float %13, float %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ addch(char);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ bkgd(int /*<<< orphan*/);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ move(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ refresh();
void setupscreen() {
  bkgd(COLOR_PAIR(1));
  clear();
  attron(COLOR_PAIR(4));
  move(0, 0);
  addch(' ');
  attron(COLOR_PAIR(1));
  refresh();
}


x86 assembly (clang, -O0):
<setupscreen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <bkgd@plt>
mov    $0x0,%al
call   1080 <clear@plt>
mov    $0x4,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attron@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1090 <move@plt>
mov    $0x20,%edi
call   1050 <addch@plt>
mov    $0x1,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attron@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setupscreen>:
push   %rax
mov    $0x1,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <bkgd@plt>
xor    %eax,%eax
call   1080 <clear@plt>
mov    $0x4,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attron@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1090 <move@plt>
mov    $0x20,%edi
call   1050 <addch@plt>
mov    $0x1,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attron@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <refresh@plt>

LLVM IR (-O0):
define void @setupscreen() {
%1 = call i32 @COLOR_PAIR(i32 1)
%2 = call i32 @bkgd(i32 %1)
%3 = call i32 (...) @clear()
%4 = call i32 @COLOR_PAIR(i32 4)
%5 = call i32 @attron(i32 %4)
%6 = call i32 @move(i32 0, i32 0)
%7 = call i32 @addch(i8 signext 32)
%8 = call i32 @COLOR_PAIR(i32 1)
%9 = call i32 @attron(i32 %8)
%10 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
define void @setupscreen() {
%1 = tail call i32 @COLOR_PAIR(i32 1)
%2 = tail call i32 @bkgd(i32 %1)
%3 = tail call i32 (...) @clear()
%4 = tail call i32 @COLOR_PAIR(i32 4)
%5 = tail call i32 @attron(i32 %4)
%6 = tail call i32 @move(i32 0, i32 0)
%7 = tail call i32 @addch(i8 signext 32)
%8 = tail call i32 @COLOR_PAIR(i32 1)
%9 = tail call i32 @attron(i32 %8)
%10 = tail call i32 (...) @refresh()
ret void
}
void *copy(void *val) {
  int v = *((int *)val);
  int *new = malloc(sizeof(int));
  *new = v;
  return new;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @copy(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call dereferenceable_or_null(4) i8* @malloc(i64 4)
%5 = bitcast i8* %4 to i32*
store i32 %3, i32* %5
ret i8* %4
}
/* Type definitions */
typedef long long int64_t;

/* Variables and functions */
int64_t return_int64_1() { return -4611686018427387904LL; }


x86 assembly (clang, -O0):
<return_int64_1>:
push   %rbp
mov    %rsp,%rbp
movabs $0xc000000000000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_int64_1>:
movabs $0xc000000000000000,%rax
ret

LLVM IR (-O0):
define i64 @return_int64_1() {
ret i64 -4611686018427387904
}

LLVM IR (-O2):
define i64 @return_int64_1() {
ret i64 -4611686018427387904
}
void gtk_text_buffer_begin_user_action() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_begin_user_action() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void command_help(char const *progname, char const *const *argv,
                  char const *filename, int line) {
  puts("Graphhullset is a test client for the graph_hullset data type in "
       "libgraph.a\n"
       "\n"
       "Below, X and Y stand for single-character variable names;\n"
       "ID stands for a 34-bit ID, written as a number.\n"
       "\n"
       "Quickreference:\n"
       "    help                 alloc X [NELEMS]    add    X ID\n"
       "    quit                 free X\n"
       "    time                 print X\n"
       "    time [on / off]\n"
       "    time now\n");
}


x86 assembly (clang, -O0):
<command_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [356 x i8] c"Graphhullset is a test client for the graph_hullset data type in libgraph.a\0A\0ABelow, X and Y stand for single-character variable names;\0AID stands for a 34-bit ID, written as a number.\0A\0AQuickreference:\0A help alloc X [NELEMS] add X ID\0A quit free X\0A time print X\0A time [on / off]\0A time now\0A\00"
define void @command_help(i8* %0, i8** %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8** %1, i8*** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = call i32 @puts(i8* getelementptr inbounds ([356 x i8], [356 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [356 x i8] c"Graphhullset is a test client for the graph_hullset data type in libgraph.a\0A\0ABelow, X and Y stand for single-character variable names;\0AID stands for a 34-bit ID, written as a number.\0A\0AQuickreference:\0A help alloc X [NELEMS] add X ID\0A quit free X\0A time print X\0A time [on / off]\0A time now\0A\00"
define void @command_help(i8* nocapture readnone %0, i8** nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([356 x i8], [356 x i8]* @.str, i64 0, i64 0))
ret void
}
void ScaleRowDown2Box_16_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2Box_16_NEON() {
ret void
}
/* Variables and functions */
int bcm2835_read(int);
int /*<<< orphan*/ bcm2835_write(int, unsigned char);
void early_debug_putc(unsigned char byte) {
  while (bcm2835_read((0 + 0x201000 + 0x18)) & (1 << 5)) {
  }
  bcm2835_write((0 + 0x201000 + 0x00), byte);
}


x86 assembly (clang, -O0):
<early_debug_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x201018,%edi
call   1030 <bcm2835_read@plt>
and    $0x20,%eax
cmp    $0x0,%eax
je     1149 <early_debug_putc+0x29>
jmp    112e <early_debug_putc+0xe>
mov    $0x201000,%edi
movzbl -0x1(%rbp),%esi
call   1040 <bcm2835_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<early_debug_putc>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x201018,%edi
call   1030 <bcm2835_read@plt>
test   $0x20,%al
jne    1130 <early_debug_putc+0x10>
movzbl %bl,%esi
mov    $0x201000,%edi
pop    %rbx
jmp    1040 <bcm2835_write@plt>

LLVM IR (-O0):
define void @early_debug_putc(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = call i32 @bcm2835_read(i32 2101272)
%5 = and i32 %4, 32
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i8, i8* %2
%10 = call i32 @bcm2835_write(i32 2101248, i8 zeroext %9)
ret void
}

LLVM IR (-O2):
define void @early_debug_putc(i8 zeroext %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @bcm2835_read(i32 2101272)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = tail call i32 @bcm2835_write(i32 2101248, i8 zeroext %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int in_window(uint8_t seq_num, uint8_t min, uint8_t max) {
  uint8_t pos = seq_num - min;
  uint8_t maxpos = max - min + 1;
  return pos < maxpos;
}


x86 assembly (clang, -O0):
<in_window>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_window>:
xor    %eax,%eax
cmp    %rdx,%rdi
setle  %al
ret

LLVM IR (-O0):
define i32 @in_window(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%9 = load i64, i64* %4
%10 = load i64, i64* %5
%11 = sub nsw i64 %9, %10
store i64 %11, i64* %7
%12 = load i64, i64* %6
%13 = load i64, i64* %5
%14 = sub nsw i64 %12, %13
%15 = add nsw i64 %14, 1
store i64 %15, i64* %8
%16 = load i64, i64* %7
%17 = load i64, i64* %8
%18 = icmp slt i64 %16, %17
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @in_window(i64 %0, i64 %1, i64 %2) {
%4 = icmp sle i64 %0, %2
%5 = zext i1 %4 to i32
ret i32 %5
}
void X509_REQ_get_extensions(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_REQ_get_extensions() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f_1();
int /*<<< orphan*/ f_2();
int /*<<< orphan*/ f_main();
int main() {
  f_1();
  f_2();
  f_main();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f_1()
%2 = tail call i32 (...) @f_2()
%3 = tail call i32 (...) @f_main()
ret i32 0
}
void CRYPTO_set_mem_functions(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_set_mem_functions() {
ret void
}
void _SendTokenWithValue(int next, long *val) {}


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

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

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

LLVM IR (-O2):
define void @_SendTokenWithValue(i32 %0, i64* nocapture %1) {
ret void
}
/* Type definitions */
struct utsname {
  char *sysname;
  char *release;
  char *version;
  char *machine;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *);
int /*<<< orphan*/ uname(struct utsname *);
int main() {
  struct utsname u;
  uname(&u);
  printf("%s release %s (version %s) on %s\n", u.sysname, u.release, u.version,
         u.machine);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x28(%rbp),%rdi
call   1040 <uname@plt>
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0x8(%rsp),%rdi
call   1040 <uname@plt>
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    0x20(%rsp),%r8
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.utsname = type { i8*, i8*, i8*, i8* }
@.str = [34 x i8] c"%s release %s (version %s) on %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.utsname
store i32 0, i32* %1
%3 = call i32 @uname(%struct.utsname* %2)
%4 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 0
%5 = load i8*, i8** %4
%6 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 2
%9 = load i8*, i8** %8
%10 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 3
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %7, i8* %9, i8* %11)
ret i32 0
}

LLVM IR (-O2):
%struct.utsname = type { i8*, i8*, i8*, i8* }
@.str = [34 x i8] c"%s release %s (version %s) on %s\0A\00"
define i32 @main() {
%1 = alloca %struct.utsname
%2 = bitcast %struct.utsname* %1 to i8*
%3 = call i32 @uname(%struct.utsname* %1)
%4 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 0
%5 = load i8*, i8** %4
%6 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 2
%9 = load i8*, i8** %8
%10 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 3
%11 = load i8*, i8** %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %7, i8* %9, i8* %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x4e() {
  Assert_real((isspace(78) == 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_isspace.c",
              395, ("isspace should be 0 for N"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x4e>:
push   %rax
mov    $0x4e,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x18b,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for N\00"
define void @t_isspace_0x4e() {
%1 = call i64 @isspace(i32 78)
%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 395, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for N\00"
define void @t_isspace_0x4e() {
%1 = tail call i64 @isspace(i32 78)
%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 395, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 0; i <= 5; ++i) {
    printf("los digitos son: %i\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"los digitos son: %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 5
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"los digitos son: %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
/* Type definitions */
struct pkt_buff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tprintf(char *);
void no_next_header(struct pkt_buff *pkt) {
  tprintf(" [ No Next Header");
  tprintf(" ]\n");
}


x86 assembly (clang, -O0):
<no_next_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <tprintf@plt>
lea    0xee3(%rip),%rdi
call   1030 <tprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<no_next_header>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <tprintf@plt>
lea    0xeee(%rip),%rdi
pop    %rax
jmp    1030 <tprintf@plt>

LLVM IR (-O0):
%struct.pkt_buff = type { i32 }
@.str = [18 x i8] c" [ No Next Header\00"
@.str.1 = [4 x i8] c" ]\0A\00"
define void @no_next_header(%struct.pkt_buff* %0) {
%2 = alloca %struct.pkt_buff*
store %struct.pkt_buff* %0, %struct.pkt_buff** %2
%3 = call i32 @tprintf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @tprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.pkt_buff = type { i32 }
@.str = [18 x i8] c" [ No Next Header\00"
@.str.1 = [4 x i8] c" ]\0A\00"
define void @no_next_header(%struct.pkt_buff* nocapture readnone %0) {
%2 = tail call i32 @tprintf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @tprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long long C_Utils_min_longlong(const long long item1, const long long item2) {
  return item1 > item2 ? item1 : item2;
}


x86 assembly (clang, -O0):
<C_Utils_min_longlong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <C_Utils_min_longlong+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <C_Utils_min_longlong+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Utils_min_longlong>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @C_Utils_min_longlong(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}