xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int fexecve(int fd, char *const argv[], char *const envp[]) {
  fprintf(stderr, "ERROR: fexecve is unsupported!\n");
  fprintf(stderr, "Tried to execute fd %d with arg0 '%s'\n", fd, *argv);
  abort();
}


x86 assembly (clang, -O0):
<fexecve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<fexecve>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb0(%rip),%r14
mov    (%r14),%edi
lea    0xec6(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14),%edi
mov    (%rbx),%rcx
lea    0xed2(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"ERROR: fexecve is unsupported!\0A\00"
@.str.1 = [39 x i8] c"Tried to execute fd %d with arg0 '%s'\0A\00"
define i32 @fexecve(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = load i32, i32* %4
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %10, i8* %12)
%14 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"ERROR: fexecve is unsupported!\0A\00"
@.str.1 = [39 x i8] c"Tried to execute fd %d with arg0 '%s'\0A\00"
define i32 @fexecve(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %1
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %0, i8* %7)
%9 = tail call i32 (...) @abort()
unreachable
}
long int long_abs(value)
long int value;
{
  if (value < 0L)
    return (-(value));
  else
    return (value);
}


x86 assembly (clang, -O0):
<long_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1122 <long_abs+0x22>
xor    %eax,%eax
sub    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112a <long_abs+0x2a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @long_abs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
int __u64tostr(int /*<<< orphan*/, char *, int);
int __i64tostr(int64_t value, char *nptr, int base) {
  int n = 0;
  if (value < 0) {
    value = -value;
    nptr[0] = '-';
    nptr++;
    n = 1;
  }
  return (n + __u64tostr((uint64_t)value, nptr, base));
}


x86 assembly (clang, -O0):
<__i64tostr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1159 <__i64tostr+0x49>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x2d,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <__u64tostr@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__i64tostr>:
push   %rbx
xor    %ebx,%ebx
test   %rdi,%rdi
jns    1127 <__i64tostr+0x17>
neg    %rdi
movb   $0x2d,(%rsi)
add    $0x1,%rsi
mov    $0x1,%ebx
call   1030 <__u64tostr@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__i64tostr(i64 %0, i8* %1, i32 %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i64 %0, i64* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i64, i64* %4
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %3
%11 = load i64, i64* %4
%12 = sub nsw i64 0, %11
store i64 %12, i64* %4
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i64 0
store i8 45, i8* %14
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %5
store i32 1, i32* %7
br label %17
17: ; preds = %10, %3
%18 = load i32, i32* %7
%19 = load i64, i64* %4
%20 = trunc i64 %19 to i32
%21 = load i8*, i8** %5
%22 = load i32, i32* %6
%23 = call i32 @__u64tostr(i32 %20, i8* %21, i32 %22)
%24 = add nsw i32 %18, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @__i64tostr(i64 %0, i8* %1, i32 %2) {
%4 = icmp slt i64 %0, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = sub nsw i64 0, %0
store i8 45, i8* %1
%7 = getelementptr inbounds i8, i8* %1, i64 1
br label %8
8: ; preds = %5, %3
%9 = phi i8* [ %7, %5 ], [ %1, %3 ]
%10 = phi i64 [ %6, %5 ], [ %0, %3 ]
%11 = phi i32 [ 1, %5 ], [ 0, %3 ]
%12 = trunc i64 %10 to i32
%13 = tail call i32 @__u64tostr(i32 %12, i8* %9, i32 %2)
%14 = add nsw i32 %13, %11
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ vfddTransWrite();
void transWrite() { vfddTransWrite(); }


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

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

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

LLVM IR (-O2):
define void @transWrite() {
%1 = tail call i32 (...) @vfddTransWrite()
ret void
}
long long int max(long long int a, long long int b) { return a >= b ? a : b; }


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

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

LLVM IR (-O0):
define i64 @max(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 sge 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 @max(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void adts_set_sampling_freq(uint8_t *p_adts, uint8_t i_freq) {
  p_adts[2] &= ~0x3c;
  p_adts[2] |= (i_freq & 0xf) << 2;
}


x86 assembly (clang, -O0):
<adts_set_sampling_freq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
and    $0xffffffc3,%ecx
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
and    $0xf,%ecx
shl    $0x2,%ecx
mov    -0x8(%rbp),%rax
or     0x8(%rax),%ecx
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<adts_set_sampling_freq>:
mov    0x8(%rdi),%eax
and    $0xffffffc3,%eax
and    $0xf,%esi
lea    (%rax,%rsi,4),%eax
mov    %eax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @adts_set_sampling_freq(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 2
%7 = load i32, i32* %6
%8 = and i32 %7, -61
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = and i32 %9, 15
%11 = shl i32 %10, 2
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = or i32 %14, %11
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @adts_set_sampling_freq(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 2
%4 = load i32, i32* %3
%5 = and i32 %4, -61
%6 = shl i32 %1, 2
%7 = and i32 %6, 60
%8 = or i32 %5, %7
store i32 %8, i32* %3
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ send_event;
};
typedef TYPE_1__ XFocusInEvent;

/* Variables and functions */
int get_XFocusInEvent_send_event(void *_p) {
  return (int)((XFocusInEvent *)_p)->send_event;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XFocusInEvent_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int setHighBits(int p, int val) { return (p & 0x0F) + val * 0x10; }


x86 assembly (clang, -O0):
<setHighBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    -0x8(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setHighBits>:
and    $0xf,%edi
shl    $0x4,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @setHighBits(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = and i32 %5, 15
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 16
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @setHighBits(i32 %0, i32 %1) {
%3 = and i32 %0, 15
%4 = shl nsw i32 %1, 4
%5 = or i32 %4, %3
ret i32 %5
}
void vax_to_local_shorts_(unsigned short *sa, const int *n) { return; }


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

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

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

LLVM IR (-O2):
define void @vax_to_local_shorts_(i16* nocapture %0, i32* nocapture %1) {
ret void
}
unsigned int test_14(int x) { return ~(x >> 31) >> 1; }


x86 assembly (clang, -O0):
<test_14>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
xor    $0xffffffff,%eax
sar    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_14>:
mov    %edi,%eax
sar    $0x1f,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @test_14(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 31
%5 = xor i32 %4, -1
%6 = ashr i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @test_14(i32 %0) {
%2 = ashr i32 %0, 31
%3 = xor i32 %2, -1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x68() {
  Assert_real((isxdigit(104) == 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_isxdigit.c",
              525, ("isxdigit should be 0 for h"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x68>:
push   %rax
mov    $0x68,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x20d,%edx
pop    %rax
jmp    1040 <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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for h\00"
define void @t_isxdigit_0x68() {
%1 = call i64 @isxdigit(i32 104)
%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 525, 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for h\00"
define void @t_isxdigit_0x68() {
%1 = tail call i64 @isxdigit(i32 104)
%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 525, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void tdd_forfixer(void) {
  int loopcounter;
  int counter;
  for (loopcounter = 0; loopcounter < 10; ++loopcounter)
    counter;
  for (loopcounter = 0; loopcounter < 10; ++loopcounter)
    counter--;
  for (loopcounter = 0; loopcounter < 10; ++loopcounter) {
    counter++;
  }
}


x86 assembly (clang, -O0):
<tdd_forfixer>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1123 <tdd_forfixer+0x23>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <tdd_forfixer+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    114b <tdd_forfixer+0x4b>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112a <tdd_forfixer+0x2a>
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1173 <tdd_forfixer+0x73>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <tdd_forfixer+0x52>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @tdd_forfixer() {
ret void
}
/* Variables and functions */
void *EmptyErrorFunction(const char *fnname, int errcode, ...) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @EmptyErrorFunction(i8* %0, i32 %1, ...) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @EmptyErrorFunction(i8* nocapture readnone %0, i32 %1, ...) {
ret i8* null
}
void CG_DrawAmmoWarning(void) {}


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

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

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

LLVM IR (-O2):
define void @CG_DrawAmmoWarning() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void fatal(char *s1, char *s2, int n) {
  fprintf(stderr, "Error: %s, %s\n", s1, s2);
  exit(n);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbx
mov    %edx,%ebx
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"Error: %s, %s\0A\00"
define void @fatal(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i32, i32* %6
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"Error: %s, %s\0A\00"
define void @fatal(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = tail call i32 @exit(i32 %2)
unreachable
}
void wx11bl(button, x, y) int *button;
float *x, *y;
{ wx11fl(); }


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

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

LLVM IR (-O0):
define void @wx11bl(i32* %0, float* %1, float* %2) {
%4 = alloca i32*
%5 = alloca float*
%6 = alloca float*
store i32* %0, i32** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = call i32 (...) @wx11fl()
ret void
}

LLVM IR (-O2):
define void @wx11bl(i32* nocapture readnone %0, float* nocapture readnone %1, float* nocapture readnone %2) {
%4 = tail call i32 (...) @wx11fl()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void foo(int status) { exit(status); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<foo>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
int Cyc_Sexp_whitespace(int ch) {
  int _T0;
  if (ch == 32)
    goto _TL16;
  else {
    goto _TL18;
  }
_TL18:
  if (ch == 9)
    goto _TL16;
  else {
    goto _TL17;
  }
_TL17:
  if (ch == 10)
    goto _TL16;
  else {
    goto _TL14;
  }
_TL16:
  _T0 = 1;
  goto _TL15;
_TL14:
  _T0 = ch == 13;
_TL15:
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Sexp_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jne    1116 <Cyc_Sexp_whitespace+0x16>
jmp    1143 <Cyc_Sexp_whitespace+0x43>
jmp    111b <Cyc_Sexp_whitespace+0x1b>
cmpl   $0x9,-0x4(%rbp)
jne    112a <Cyc_Sexp_whitespace+0x2a>
jmp    1143 <Cyc_Sexp_whitespace+0x43>
jmp    112f <Cyc_Sexp_whitespace+0x2f>
cmpl   $0xa,-0x4(%rbp)
jne    113e <Cyc_Sexp_whitespace+0x3e>
jmp    1143 <Cyc_Sexp_whitespace+0x43>
jmp    114f <Cyc_Sexp_whitespace+0x4f>
movl   $0x1,-0x8(%rbp)
jmp    115e <Cyc_Sexp_whitespace+0x5e>
cmpl   $0xd,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Sexp_whitespace>:
cmp    $0x20,%edi
ja     111d <Cyc_Sexp_whitespace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    111d <Cyc_Sexp_whitespace+0x1d>
ret
xor    %eax,%eax
cmp    $0xd,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @Cyc_Sexp_whitespace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ CallBack0(int);
int /*<<< orphan*/ CheckRunningInMainThread(char *);
int DoUpdate(void) {
  if (!CheckRunningInMainThread("DoUpdate"))
    return 978;
  CallBack0(71);
  return 0;
}


x86 assembly (clang, -O0):
<DoUpdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <CheckRunningInMainThread@plt>
cmp    $0x0,%eax
jne    1149 <DoUpdate+0x29>
movl   $0x3d2,-0x4(%rbp)
jmp    115a <DoUpdate+0x3a>
mov    $0x47,%edi
call   1040 <CallBack0@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoUpdate>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <CheckRunningInMainThread@plt>
test   %eax,%eax
je     113f <DoUpdate+0x1f>
mov    $0x47,%edi
call   1040 <CallBack0@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x3d2,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"DoUpdate\00"
define i32 @DoUpdate() {
%1 = tail call i32 @CheckRunningInMainThread(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @CallBack0(i32 71)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ 0, %3 ], [ 978, %0 ]
ret i32 %6
}
/* Variables and functions */
int backtrace(void **, int);
int stack_depth(int max) {
  void *stack[128];
  int size = 0;
  if (max > 128)
    max = 128;
  size = backtrace(stack, max);
  return size - 1;
}


x86 assembly (clang, -O0):
<stack_depth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x414(%rbp)
cmpl   $0x80,-0x4(%rbp)
jle    113c <stack_depth+0x2c>
movl   $0x80,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <backtrace@plt>
mov    %eax,-0x414(%rbp)
mov    -0x414(%rbp),%eax
sub    $0x1,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_depth>:
sub    $0x408,%rsp
cmp    $0x80,%edi
mov    $0x80,%esi
cmovl  %edi,%esi
mov    %rsp,%rdi
call   1030 <backtrace@plt>
add    $0xffffffff,%eax
add    $0x408,%rsp
ret

LLVM IR (-O0):
define i32 @stack_depth(i32 %0) {
%2 = alloca i32
%3 = alloca [128 x i8*]
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 128
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 128, i32* %2
br label %8
8: ; preds = %7, %1
%9 = getelementptr inbounds [128 x i8*], [128 x i8*]* %3, i64 0, i64 0
%10 = load i32, i32* %2
%11 = call i32 @backtrace(i8** %9, i32 %10)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
ret i32 %13
}

LLVM IR (-O2):
define i32 @stack_depth(i32 %0) {
%2 = alloca [128 x i8*]
%3 = bitcast [128 x i8*]* %2 to i8*
%4 = icmp slt i32 %0, 128
%5 = select i1 %4, i32 %0, i32 128
%6 = getelementptr inbounds [128 x i8*], [128 x i8*]* %2, i64 0, i64 0
%7 = call i32 @backtrace(i8** %6, i32 %5)
%8 = add nsw i32 %7, -1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void countdown(int signum) {
  static int num = 10;
  printf("%d..", num--);
  fflush(stdout);
  if (num < 0) {
    printf("DONE!\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<countdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ef7(%rip),%esi
mov    %esi,%eax
add    $0xffffffff,%eax
mov    %eax,0x2eec(%rip)
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
cmpl   $0x0,0x2ec9(%rip)
jge    118a <countdown+0x5a>
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countdown>:
push   %rax
mov    0x2ef9(%rip),%esi
lea    -0x1(%rsi),%eax
mov    %eax,0x2ef0(%rip)
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
cmpl   $0x0,0x2ecd(%rip)
js     1177 <countdown+0x37>
pop    %rax
ret
lea    0xe87(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@countdown.num = internal global i32 10
@.str = [5 x i8] c"%d..\00"
@stdout = global i32 0
@.str.1 = [7 x i8] c"DONE!\0A\00"
define void @countdown(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @countdown.num
%4 = add nsw i32 %3, -1
store i32 %4, i32* @countdown.num
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
%8 = load i32, i32* @countdown.num
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %1
ret void
}

LLVM IR (-O2):
@countdown.num = internal unnamed_addr global i32 10
@.str = [5 x i8] c"%d..\00"
@stdout = global i32 0
@str = [6 x i8] c"DONE!\00"
define void @countdown(i32 %0) {
%2 = load i32, i32* @countdown.num
%3 = add nsw i32 %2, -1
store i32 %3, i32* @countdown.num
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
%7 = load i32, i32* @countdown.num
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 @exit(i32 0)
unreachable
12: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RST(int, int, int);
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_0xdf(void) {
  RST(0x18, 5, 8);
  T_WAIT_UNTIL(11);
  return;
}


x86 assembly (clang, -O0):
<op_0xdf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18,%edi
mov    $0x5,%esi
mov    $0x8,%edx
call   1030 <RST@plt>
mov    $0xb,%edi
call   1040 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_0xdf>:
push   %rax
mov    $0x18,%edi
mov    $0x5,%esi
mov    $0x8,%edx
call   1030 <RST@plt>
mov    $0xb,%edi
pop    %rax
jmp    1040 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_0xdf() {
%1 = call i32 @RST(i32 24, i32 5, i32 8)
%2 = call i32 @T_WAIT_UNTIL(i32 11)
ret void
}

LLVM IR (-O2):
define void @op_0xdf() {
%1 = tail call i32 @RST(i32 24, i32 5, i32 8)
%2 = tail call i32 @T_WAIT_UNTIL(i32 11)
ret void
}
void ff_hevc_put_hevc_epel_h32_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h32_10_avx2() {
ret void
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t i = 0;
  while (str[i] != 0)
    i++;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1136 <strlen+0x36>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i64 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
br label %4
4: ; preds = %11, %1
%5 = load i8*, i8** %2
%6 = load i64, i64* %3
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i64, i64* %3
%13 = add i64 %12, 1
store i64 %13, i64* %3
br label %4
14: ; preds = %4
%15 = load i64, i64* %3
ret i64 %15
}

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
void picolcd_leds_set(struct picolcd_data *data) {}


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

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

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

LLVM IR (-O2):
%struct.picolcd_data = type opaque
define void @picolcd_leds_set(%struct.picolcd_data* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ None;
int /*<<< orphan*/ XCloseDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ *XOpenDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ XWarpPointer(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int, int);
void mouseMove(int x, int y) {
  Display *displayMain = XOpenDisplay(NULL);
  XWarpPointer(displayMain, None, None, 0, 0, 0, 0, -x, -y);
  XCloseDisplay(displayMain);
}


x86 assembly (clang, -O0):
<mouseMove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <XOpenDisplay@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
mov    0x2e89(%rip),%rax
mov    (%rax),%edx
xor    %r10d,%r10d
sub    -0x4(%rbp),%r10d
xor    %eax,%eax
sub    -0x8(%rbp),%eax
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <XWarpPointer@plt>
mov    -0x10(%rbp),%rdi
call   1050 <XCloseDisplay@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mouseMove>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
xor    %edi,%edi
call   1040 <XOpenDisplay@plt>
mov    %rax,%r15
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
neg    %r14d
neg    %ebx
sub    $0x8,%rsp
mov    %r15,%rdi
mov    %edx,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %rbx
push   %r14
push   $0x0
call   1030 <XWarpPointer@plt>
add    $0x20,%rsp
mov    %r15,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <XCloseDisplay@plt>

LLVM IR (-O0):
@None = global i32 0
define void @mouseMove(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32* @XOpenDisplay(i32* null)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* @None
%9 = load i32, i32* @None
%10 = load i32, i32* %3
%11 = sub nsw i32 0, %10
%12 = load i32, i32* %4
%13 = sub nsw i32 0, %12
%14 = call i32 @XWarpPointer(i32* %7, i32 %8, i32 %9, i32 0, i32 0, i32 0, i32 0, i32 %11, i32 %13)
%15 = load i32*, i32** %5
%16 = call i32 @XCloseDisplay(i32* %15)
ret void
}

LLVM IR (-O2):
@None = global i32 0
define void @mouseMove(i32 %0, i32 %1) {
%3 = tail call i32* @XOpenDisplay(i32* null)
%4 = load i32, i32* @None
%5 = sub nsw i32 0, %0
%6 = sub nsw i32 0, %1
%7 = tail call i32 @XWarpPointer(i32* %3, i32 %4, i32 %4, i32 0, i32 0, i32 0, i32 0, i32 %5, i32 %6)
%8 = tail call i32 @XCloseDisplay(i32* %3)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int streq(const char *s1, const char *s2) { return strcmp(s1, s2) == 0; }


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

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

LLVM IR (-O0):
define i32 @streq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @streq(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
__attribute__((always_)) int irq_select_affinity(unsigned int irq) { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
int __int64_t_clone_array(const int64_t *p, int64_t *q, int elements) {
  memcpy(q, p, elements * sizeof(int64_t));
  return 0;
}


x86 assembly (clang, -O0):
<__int64_t_clone_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__int64_t_clone_array>:
push   %rax
mov    %rdi,%rax
shl    $0x2,%edx
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__int64_t_clone_array(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i32 @memcpy(i32* %7, i32* %8, i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @__int64_t_clone_array(i32* %0, i32* %1, i32 %2) {
%4 = shl i32 %2, 2
%5 = tail call i32 @memcpy(i32* %1, i32* %0, i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ imprimir(int);
int main() {
  imprimir(6);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
call   1030 <imprimir@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @imprimir(i32 6)
ret i32 0
}
void getParameter(int Num, char *Para[]) {}


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

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

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

LLVM IR (-O2):
define void @getParameter(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
float sqrt(float);
float uv2velocity(float u, float v) { return sqrt(u * u + v * v); }


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

x86 assembly (clang, -O2):
<uv2velocity>:
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1129 <uv2velocity+0x19>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define float @uv2velocity(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %3
%7 = load float, float* %4
%8 = load float, float* %4
%9 = fmul float %7, %8
%10 = call float @llvm.fmuladd.f32(float %5, float %6, float %9)
%11 = call float @sqrt(float %10)
ret float %11
}

LLVM IR (-O2):
define float @uv2velocity(float %0, float %1) {
%3 = fmul float %1, %1
%4 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %3)
%5 = tail call float @sqrt(float %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
extern void console_warning(const char *msg) { printf("WARNING: %s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"WARNING: %s\0A\00"
define void @console_warning(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ulong_to_str(unsigned long, char *);
int /*<<< orphan*/ write_str(int, int /*<<< orphan*/);
void write_ulong(int fd, unsigned long i) {
  char buf[21];
  write_str(fd, ulong_to_str(i, buf));
}


x86 assembly (clang, -O0):
<write_ulong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <ulong_to_str@plt>
mov    -0x34(%rbp),%edi
mov    %eax,%esi
call   1030 <write_str@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_ulong>:
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%rax
mov    %edi,%ebx
mov    %rsp,%rsi
mov    %rax,%rdi
call   1040 <ulong_to_str@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <write_str@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @write_ulong(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca [21 x i8]
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i32, i32* %3
%7 = load i64, i64* %4
%8 = getelementptr inbounds [21 x i8], [21 x i8]* %5, i64 0, i64 0
%9 = call i32 @ulong_to_str(i64 %7, i8* %8)
%10 = call i32 @write_str(i32 %6, i32 %9)
ret void
}

LLVM IR (-O2):
define void @write_ulong(i32 %0, i64 %1) {
%3 = alloca [21 x i8]
%4 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 0
%5 = call i32 @ulong_to_str(i64 %1, i8* %4)
%6 = call i32 @write_str(i32 %0, i32 %5)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct TYPE_2__ {
  int fd;
};
struct epoll_event {
  TYPE_1__ data;
  int /*<<< orphan*/ events;
};

/* Variables and functions */
int /*<<< orphan*/ EPOLL_CTL_ADD;
int epoll_ctl(int, int /*<<< orphan*/, int, struct epoll_event *);
int epoll_add(int epfd, int fd, uint32_t events) {
  struct epoll_event ev;
  ev.events = events;
  ev.data.fd = fd;
  return epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &ev);
}


x86 assembly (clang, -O0):
<epoll_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
lea    -0x18(%rbp),%rcx
call   1030 <epoll_ctl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<epoll_add>:
push   %rax
mov    %esi,%eax
mov    %edx,0x4(%rsp)
mov    %esi,(%rsp)
mov    0x2ec7(%rip),%rcx
mov    (%rcx),%esi
mov    %rsp,%rcx
mov    %eax,%edx
call   1030 <epoll_ctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.epoll_event = type { %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
@EPOLL_CTL_ADD = global i32 0
define i32 @epoll_add(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.epoll_event
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = getelementptr inbounds %struct.epoll_event, %struct.epoll_event* %7, i32 0, i32 1
store i32 %8, i32* %9
%10 = load i32, i32* %5
%11 = getelementptr inbounds %struct.epoll_event, %struct.epoll_event* %7, i32 0, i32 0
%12 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %11, i32 0, i32 0
store i32 %10, i32* %12
%13 = load i32, i32* %4
%14 = load i32, i32* @EPOLL_CTL_ADD
%15 = load i32, i32* %5
%16 = call i32 @epoll_ctl(i32 %13, i32 %14, i32 %15, %struct.epoll_event* %7)
ret i32 %16
}

LLVM IR (-O2):
%struct.epoll_event = type { %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
@EPOLL_CTL_ADD = global i32 0
define i32 @epoll_add(i32 %0, i32 %1, i32 %2) {
%4 = alloca %struct.epoll_event
%5 = bitcast %struct.epoll_event* %4 to i8*
%6 = getelementptr inbounds %struct.epoll_event, %struct.epoll_event* %4, i64 0, i32 1
store i32 %2, i32* %6
%7 = getelementptr inbounds %struct.epoll_event, %struct.epoll_event* %4, i64 0, i32 0, i32 0
store i32 %1, i32* %7
%8 = load i32, i32* @EPOLL_CTL_ADD
%9 = call i32 @epoll_ctl(i32 %0, i32 %8, i32 %1, %struct.epoll_event* %4)
ret i32 %9
}
/* Type definitions */
typedef float uint64_t;

/* Variables and functions */
float get_speed_mega_bytes(uint64_t bytes_in_window, uint64_t window_size) {
  float windows_in_second = 1000 / (float)window_size;
  return (bytes_in_window * windows_in_second / (float)1000);
}


x86 assembly (clang, -O0):
<get_speed_mega_bytes>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xeea(%rip),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  0xece(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_speed_mega_bytes>:
movss  0xef8(%rip),%xmm2
movaps %xmm2,%xmm3
divss  %xmm1,%xmm3
mulss  %xmm3,%xmm0
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @get_speed_mega_bytes(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %4
%7 = fdiv float 1.000000e+03, %6
store float %7, float* %5
%8 = load float, float* %3
%9 = load float, float* %5
%10 = fmul float %8, %9
%11 = fdiv float %10, 1.000000e+03
ret float %11
}

LLVM IR (-O2):
define float @get_speed_mega_bytes(float %0, float %1) {
%3 = fdiv float 1.000000e+03, %1
%4 = fmul float %3, %0
%5 = fdiv float %4, 1.000000e+03
ret float %5
}