xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ __m512i;

/* Variables and functions */
int /*<<< orphan*/ _mm512_shuffle_i32x4(int /*<<< orphan*/, int /*<<< orphan*/,
                                        int);
__attribute__((always_)) __m512i unpack_lo_128(__m512i a, __m512i b) {
  return _mm512_shuffle_i32x4(a, b, 0x88);
}


x86 assembly (clang, -O0):
<unpack_lo_128>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x88,%edx
call   1030 <_mm512_shuffle_i32x4@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_lo_128>:
mov    $0x88,%edx
jmp    1030 <_mm512_shuffle_i32x4@plt>

LLVM IR (-O0):
define i32 @unpack_lo_128(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 = load i32, i32* %4
%7 = call i32 @_mm512_shuffle_i32x4(i32 %5, i32 %6, i32 136)
ret i32 %7
}

LLVM IR (-O2):
define i32 @unpack_lo_128(i32 %0, i32 %1) {
%3 = tail call i32 @_mm512_shuffle_i32x4(i32 %0, i32 %1, i32 136)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ NVIC_SystemReset();
void pm_reboot(void) { NVIC_SystemReset(); }


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

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

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

LLVM IR (-O2):
define void @pm_reboot() {
%1 = tail call i32 (...) @NVIC_SystemReset()
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int recvfrom(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int *);
int udp_recv(int sock, char *buf, int lenbuf) {
  int zero = 0;
  return recvfrom(sock, buf, lenbuf, 0, (struct sockaddr *)NULL, &zero);
}


x86 assembly (clang, -O0):
<udp_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
lea    -0x18(%rbp),%r9
call   1030 <recvfrom@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udp_recv>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%r9
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <recvfrom@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @udp_recv(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @recvfrom(i32 %8, i8* %9, i32 %10, i32 0, %struct.sockaddr* null, i32* %7)
ret i32 %11
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @udp_recv(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%6 = call i32 @recvfrom(i32 %0, i8* %1, i32 %2, i32 0, %struct.sockaddr* null, i32* %4)
ret i32 %6
}
int roundUpToMultipleOf16(int n) {
  if (0 != (n & 15))
    n = (n + 15) & ~15;
  return n;
}


x86 assembly (clang, -O0):
<roundUpToMultipleOf16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     1123 <roundUpToMultipleOf16+0x23>
mov    -0x4(%rbp),%eax
add    $0xf,%eax
and    $0xfffffff0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundUpToMultipleOf16>:
lea    0xf(%rdi),%eax
and    $0xfffffff0,%eax
test   $0xf,%dil
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @roundUpToMultipleOf16(i32 %0) {
%2 = and i32 %0, 15
%3 = icmp eq i32 %2, 0
%4 = add nsw i32 %0, 15
%5 = and i32 %4, -16
%6 = select i1 %3, i32 %0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerP__0__Event__fired(int /*<<< orphan*/);
void Msp430TimerP__0__VectorTimerX0__fired(void) {
  Msp430TimerP__0__Event__fired(0);
}


x86 assembly (clang, -O0):
<Msp430TimerP__0__VectorTimerX0__fired>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <Msp430TimerP__0__Event__fired@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Msp430TimerP__0__VectorTimerX0__fired() {
%1 = call i32 @Msp430TimerP__0__Event__fired(i32 0)
ret void
}

LLVM IR (-O2):
define void @Msp430TimerP__0__VectorTimerX0__fired() {
%1 = tail call i32 @Msp430TimerP__0__Event__fired(i32 0)
ret void
}
char *assert_fail() {
  do {
    if (!(0 == 1))
      return "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/marshall/mintest/refs/heads/master/"
             "tests/test_asserts.c"
             ":"
             "29"
             ": "
             "0 == 1";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<assert_fail>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_fail>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/marshall/mintest/refs/heads/master/tests/test_asserts.c:29: 0 == 1\00"
define i8* @assert_fail() {
%1 = alloca i8*
br label %2
2: ; preds = %0
store i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i8** %1
br label %4
3: ; No predecessors!
store i8* null, i8** %1
br label %4
4: ; preds = %3, %2
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/marshall/mintest/refs/heads/master/tests/test_asserts.c:29: 0 == 1\00"
define i8* @assert_fail() {
ret i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0)
}
int cAtoi(const char c) { return c == '1' ? 1 : 0; }


x86 assembly (clang, -O0):
<cAtoi>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x31,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cAtoi>:
xor    %eax,%eax
cmp    $0x31,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @cAtoi(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 49
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
define i32 @cAtoi(i8 signext %0) {
%2 = icmp eq i8 %0, 49
%3 = zext i1 %2 to i32
ret i32 %3
}
void dummyclick(void *w) {}


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

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

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

LLVM IR (-O2):
define void @dummyclick(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i;
  char n;
  for (i = 1; i <= 255; i++) {
    printf("%c-%d\n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%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   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c-%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
int setnonblock(int sock) {
  int flags = fcntl(sock, F_GETFL, 0);
  if (flags == -1) {
    return -1;
  }
  return fcntl(sock, F_SETFL, flags | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<setnonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1147 <setnonblock+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <setnonblock+0x57>
mov    -0x8(%rbp),%edi
mov    0x2e87(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
mov    0x2e8b(%rip),%rax
or     (%rax),%edx
call   1030 <fcntl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setnonblock>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
je     1144 <setnonblock+0x34>
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb0(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <fcntl@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @setnonblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @F_GETFL
%7 = call i32 @fcntl(i32 %5, i32 %6, i32 0)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %18
11: ; preds = %1
%12 = load i32, i32* %3
%13 = load i32, i32* @F_SETFL
%14 = load i32, i32* %4
%15 = load i32, i32* @O_NONBLOCK
%16 = or i32 %14, %15
%17 = call i32 @fcntl(i32 %12, i32 %13, i32 %16)
store i32 %17, i32* %2
br label %18
18: ; preds = %11, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @setnonblock(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i32, i32* @F_SETFL
%7 = load i32, i32* @O_NONBLOCK
%8 = or i32 %7, %3
%9 = tail call i32 @fcntl(i32 %0, i32 %6, i32 %8)
br label %10
10: ; preds = %1, %5
%11 = phi i32 [ %9, %5 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
scalar_t__ isnan(double);
unsigned int fpu_fcom_c2(double a, double b) {
  if (isnan(a) || isnan(b))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<fpu_fcom_c2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    114a <fpu_fcom_c2+0x3a>
movsd  -0x18(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     1156 <fpu_fcom_c2+0x46>
movl   $0x1,-0x4(%rbp)
jmp    115d <fpu_fcom_c2+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpu_fcom_c2>:
push   %rax
movsd  %xmm1,(%rsp)
call   1030 <isnan@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112a <fpu_fcom_c2+0x1a>
pop    %rcx
ret
movsd  (%rsp),%xmm0
call   1030 <isnan@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fpu_fcom_c2(double %0, double %1) {
%3 = tail call i64 @isnan(double %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @isnan(double %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}
int cvCeil(double value) {
  int i = (int)value;
  return i + (i < value);
}


x86 assembly (clang, -O0):
<cvCeil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvCeil>:
cvttsd2si %xmm0,%ecx
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cvCeil(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = load double, double* %2
%10 = fcmp olt double %8, %9
%11 = zext i1 %10 to i32
%12 = add nsw i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @cvCeil(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fcmp olt double %3, %0
%5 = zext i1 %4 to i32
%6 = add nsw i32 %5, %2
ret i32 %6
}
void rt2x00crypto_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
                                       struct sk_buff *skb,
                                       struct txentry_desc *txdesc) {}


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

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
%struct.rt2x00_dev = type opaque
%struct.sk_buff = type opaque
%struct.txentry_desc = type opaque
define void @rt2x00crypto_create_tx_descriptor(%struct.rt2x00_dev* %0, %struct.sk_buff* %1, %struct.txentry_desc* %2) {
%4 = alloca %struct.rt2x00_dev*
%5 = alloca %struct.sk_buff*
%6 = alloca %struct.txentry_desc*
store %struct.rt2x00_dev* %0, %struct.rt2x00_dev** %4
store %struct.sk_buff* %1, %struct.sk_buff** %5
store %struct.txentry_desc* %2, %struct.txentry_desc** %6
ret void
}

LLVM IR (-O2):
%struct.rt2x00_dev = type opaque
%struct.sk_buff = type opaque
%struct.txentry_desc = type opaque
define void @rt2x00crypto_create_tx_descriptor(%struct.rt2x00_dev* nocapture %0, %struct.sk_buff* nocapture %1, %struct.txentry_desc* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ load_default_tasks();
int /*<<< orphan*/ load_default_time_to_complete();
int /*<<< orphan*/ load_default_zero_accepted();
void load_game_defaults() {
  load_default_time_to_complete();
  load_default_zero_accepted();
  load_default_tasks();
}


x86 assembly (clang, -O0):
<load_game_defaults>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <load_default_time_to_complete@plt>
mov    $0x0,%al
call   1030 <load_default_zero_accepted@plt>
mov    $0x0,%al
call   1040 <load_default_tasks@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_game_defaults>:
push   %rax
xor    %eax,%eax
call   1050 <load_default_time_to_complete@plt>
xor    %eax,%eax
call   1030 <load_default_zero_accepted@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <load_default_tasks@plt>

LLVM IR (-O0):
define void @load_game_defaults() {
%1 = call i32 (...) @load_default_time_to_complete()
%2 = call i32 (...) @load_default_zero_accepted()
%3 = call i32 (...) @load_default_tasks()
ret void
}

LLVM IR (-O2):
define void @load_game_defaults() {
%1 = tail call i32 (...) @load_default_time_to_complete()
%2 = tail call i32 (...) @load_default_zero_accepted()
%3 = tail call i32 (...) @load_default_tasks()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __on_cpu(int, void (*)(void *), void *, int /*<<< orphan*/);
void on_cpu_async(int cpu, void (*function)(void *data), void *data) {
  __on_cpu(cpu, function, data, 0);
}


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

x86 assembly (clang, -O2):
<on_cpu_async>:
xor    %ecx,%ecx
jmp    1030 <__on_cpu@plt>

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

LLVM IR (-O2):
define void @on_cpu_async(i32 %0, void (i8*)* %1, i8* %2) {
%4 = tail call i32 @__on_cpu(i32 %0, void (i8*)* %1, i8* %2, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int getNOfPresses(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdin;
int main() {
  char message[161];
  fgets(message, 160, stdin);
  printf("%d", getNOfPresses(message));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xb0(%rbp),%rdi
mov    0x2e98(%rip),%rax
mov    (%rax),%edx
mov    $0xa0,%esi
call   1050 <fgets@plt>
lea    -0xb0(%rbp),%rdi
call   1030 <getNOfPresses@plt>
mov    %eax,%esi
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xb0,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa0,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1030 <getNOfPresses@plt>
lea    0xea0(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [161 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [161 x i8], [161 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 160, i32 %4)
%6 = getelementptr inbounds [161 x i8], [161 x i8]* %2, i64 0, i64 0
%7 = call i32 @getNOfPresses(i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [161 x i8]
%2 = getelementptr inbounds [161 x i8], [161 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 160, i32 %3)
%5 = call i32 @getNOfPresses(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
void find_task_by_pid_type(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<find_task_by_pid_type>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_task_by_pid_type>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.find_task_by_pid_type = [22 x i8] c"find_task_by_pid_type\00"
define void @find_task_by_pid_type() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__func__.find_task_by_pid_type, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.find_task_by_pid_type = [22 x i8] c"find_task_by_pid_type\00"
define void @find_task_by_pid_type() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__func__.find_task_by_pid_type, i64 0, i64 0))
ret void
}
double soma(double v1, double v2) { return v1 + v2; }


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

x86 assembly (clang, -O2):
<soma>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @soma(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @soma(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef size_t uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mem_readb_phys(size_t);
void DMAPageRead(uint32_t PhysAddress, uint8_t *DataRead, uint32_t TotalSize) {
  uint32_t i = 0;
  for (i = 0; i < TotalSize; i++)
    DataRead[i] = mem_readb_phys(PhysAddress + i);
}


x86 assembly (clang, -O0):
<DMAPageRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    116d <DMAPageRead+0x5d>
mov    -0x8(%rbp),%rdi
add    -0x20(%rbp),%rdi
call   1030 <mem_readb_phys@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1134 <DMAPageRead+0x24>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DMAPageRead>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1146 <DMAPageRead+0x36>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rdi
call   1030 <mem_readb_phys@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <DMAPageRead+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @DMAPageRead(i64 %0, i32* nocapture writeonly %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %12, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %10, %5 ], [ 0, %3 ]
%7 = add i64 %6, %0
%8 = tail call i32 @mem_readb_phys(i64 %7)
%9 = getelementptr inbounds i32, i32* %1, i64 %6
store i32 %8, i32* %9
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %2
br i1 %11, label %12, label %5
12: ; preds = %5, %3
ret void
}
unsigned long ADCComparatorIntStatus(unsigned long ulBase) {
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x00000034))));
}


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

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

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

LLVM IR (-O2):
define i64 @ADCComparatorIntStatus(i64 %0) {
%2 = add i64 %0, 52
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
ret i64 %4
}
double _Complex div_double_cc(double _Complex a, double _Complex b) {
  return a / b;
}


x86 assembly (clang, -O0):
<div_double_cc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
call   1150 <__divdc3>
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
add    $0x30,%rsp
pop    %rbp
ret
nop

x86 assembly (clang, -O2):
<div_double_cc>:
jmp    1110 <__divdc3>
cs nopw 0x0(%rax,%rax,1)
nop

LLVM IR (-O0):
define { double, double } @div_double_cc(double %0, double %1, double %2, double %3) {
%5 = alloca { double, double }
%6 = alloca { double, double }
%7 = alloca { double, double }
%8 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 0
store double %0, double* %8
%9 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 1
store double %1, double* %9
%10 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 0
store double %2, double* %10
%11 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 1
store double %3, double* %11
%12 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 0
%13 = load double, double* %12
%14 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 1
%15 = load double, double* %14
%16 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 0
%17 = load double, double* %16
%18 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 1
%19 = load double, double* %18
%20 = call { double, double } @__divdc3(double %13, double %15, double %17, double %19)
%21 = extractvalue { double, double } %20, 0
%22 = extractvalue { double, double } %20, 1
%23 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%24 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
store double %21, double* %23
store double %22, double* %24
%25 = load { double, double }, { double, double }* %5
ret { double, double } %25
}

LLVM IR (-O2):
define { double, double } @div_double_cc(double %0, double %1, double %2, double %3) {
%5 = tail call { double, double } @__divdc3(double %0, double %1, double %2, double %3)
ret { double, double } %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x3b() {
  Assert_real((isascii(59)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              300, ("isascii should be 1 for ;"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x3b>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x12c,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for ;\00"
define void @t_isascii_0x3b() {
%1 = call i32 @isascii(i32 59)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 300, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for ;\00"
define void @t_isascii_0x3b() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 300, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_EFuint16_reg(unsigned short val) {
  return ((val) & (-0xEF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EFuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff11,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EFuint16_reg>:
test   $0xff11,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_EFuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -239
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int compare_string(const void *data1, const void *data2) {
  return (int)strcmp((char *)data1, (char *)data2);
}


x86 assembly (clang, -O0):
<compare_string>:
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>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_string>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @compare_string(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 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @compare_string(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = trunc i64 %3 to i32
ret i32 %4
}
int cycles_exit(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cycles_exit() {
ret i32 0
}
/* Variables and functions */
float log2f(float);
void sLog2_process(float bIn, float *bOut) {
  *bOut = (bIn > 0.0f) ? log2f(bIn) : 0.0f;
}


x86 assembly (clang, -O0):
<sLog2_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1146 <sLog2_process+0x36>
movss  -0x4(%rbp),%xmm0
call   1030 <log2f@plt>
movss  %xmm0,-0x14(%rbp)
jmp    1153 <sLog2_process+0x43>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1153 <sLog2_process+0x43>
movss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sLog2_process>:
push   %rbx
mov    %rdi,%rbx
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jbe    1127 <sLog2_process+0x17>
movaps %xmm1,%xmm0
call   1030 <log2f@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @sLog2_process(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 = fcmp ogt float %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load float, float* %3
%9 = call float @log2f(float %8)
br label %11
10: ; preds = %2
br label %11
11: ; preds = %10, %7
%12 = phi float [ %9, %7 ], [ 0.000000e+00, %10 ]
%13 = load float*, float** %4
store float %12, float* %13
ret void
}

LLVM IR (-O2):
define void @sLog2_process(float %0, float* nocapture writeonly %1) {
%3 = fcmp ogt float %0, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call float @log2f(float %0)
br label %6
6: ; preds = %2, %4
%7 = phi float [ %5, %4 ], [ 0.000000e+00, %2 ]
store float %7, float* %1
ret void
}
XIntersectRegion() {}


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

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

LLVM IR (-O0):
define i32 @XIntersectRegion() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XIntersectRegion() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ handle_50(int /*<<< orphan*/);
int gen_50() {
  handle_50(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @gen_50() {
%1 = call i32 @handle_50(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_50() {
%1 = tail call i32 @handle_50(i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/ *, char *, int, int);
void setbuf(FILE *stream, char *buf) { setvbuf(stream, buf, buf ? 2 : 0, 80); }


x86 assembly (clang, -O0):
<setbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rcx
xor    %edx,%edx
mov    $0x2,%eax
cmp    $0x0,%rcx
cmovne %eax,%edx
mov    $0x50,%ecx
call   1030 <setvbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbuf>:
xor    %edx,%edx
test   %rsi,%rsi
setne  %dl
add    %edx,%edx
mov    $0x50,%ecx
jmp    1030 <setvbuf@plt>

LLVM IR (-O0):
define void @setbuf(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 2, i32 0
%11 = call i32 @setvbuf(i32* %5, i8* %6, i32 %10, i32 80)
ret void
}

LLVM IR (-O2):
define void @setbuf(i32* nocapture %0, i8* %1) {
%3 = icmp eq i8* %1, null
%4 = select i1 %3, i32 0, i32 2
%5 = tail call i32 @setvbuf(i32* %0, i8* %1, i32 %4, i32 80)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main() {
  int i;
  for (i = 0; i < 100; i++) {
    printf("Hello world\n");
    sleep(2);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1164 <main+0x44>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x64,%ebp
lea    0xed1(%rip),%rbx
nop
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
add    $0xffffffff,%ebp
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world\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 slt i32 %4, 100
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @sleep(i32 2)
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 = [12 x i8] c"Hello world\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 2)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 100
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
int main(void) {
  struct {
    int a;
    int b;
  } a;
  a.b = 0;
  a.a = 4;
  return a.b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32, i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.anon
store i32 0, i32* %1
%3 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 1
store i32 0, i32* %3
%4 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
store i32 4, i32* %4
%5 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 1
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int sscanf(const char *str, const char *format, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sscanf(i8* nocapture readnone %0, i8* nocapture readnone %1, ...) {
ret i32 0
}
/* Variables and functions */
int maxInt(int *, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ reverse(char *);
int main() {
  char s[] = "karl";
  reverse(s);
  int arr[] = {1, 4, 2, 8, 2};
  printf("%d\n", maxInt(arr, 5));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xeb6(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rdi
call   1030 <reverse@plt>
mov    0xeaf(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeaa(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1050 <maxInt@plt>
mov    %eax,%esi
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x6c72616b,0x8(%rsp)
6c
lea    0x8(%rsp),%rdi
call   1030 <reverse@plt>
mov    0xecf(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x5,%esi
call   1050 <maxInt@plt>
lea    0xe8e(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [5 x i8] c"karl\00"
@__const.main.arr = [5 x i32] [i32 1, i32 4, i32 2, i32 8, i32 2]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca [5 x i32]
store i32 0, i32* %1
%4 = bitcast [5 x i8]* %2 to i8*
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%6 = call i32 @reverse(i8* %5)
%7 = bitcast [5 x i32]* %3 to i8*
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%9 = call i32 @maxInt(i32* %8, i32 5)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [5 x i8] c"karl\00"
@__const.main.arr = [5 x i32] [i32 1, i32 4, i32 2, i32 8, i32 2]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca [5 x i32]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = call i32 @reverse(i8* %3)
%5 = bitcast [5 x i32]* %2 to i8*
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%7 = call i32 @maxInt(i32* %6, i32 5)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
void gtk_icon_source_set_direction() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_source_set_direction() {
ret void
}
/* Variables and functions */
int main() {
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ TCFLSH;
int ioctl(int, int /*<<< orphan*/, int);
int tcflush(int fd, int queue) { return ioctl(fd, TCFLSH, queue); }


x86 assembly (clang, -O0):
<tcflush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcflush>:
mov    %esi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
@TCFLSH = global i32 0
define i32 @tcflush(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 = load i32, i32* @TCFLSH
%7 = load i32, i32* %4
%8 = call i32 @ioctl(i32 %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@TCFLSH = global i32 0
define i32 @tcflush(i32 %0, i32 %1) {
%3 = load i32, i32* @TCFLSH
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32 %1)
ret i32 %4
}
float linearInterpolationf(float p) { return p; }


x86 assembly (clang, -O0):
<linearInterpolationf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @linearInterpolationf(float returned %0) {
ret float %0
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=23 REPO_URL=heads/master "
         "REVISION=r3p2-01rel3-889560e CHANGED_REVISION=889560e "
         "CHANGE_DATE=2013-08-11 17:42:46 +0200 BUILD_DATE=Sun Sep 22 23:49:25 "
         "CEST 2013 BUILD=release TARGET_PLATFORM=rk30 MALI_PLATFORM=rk30 "
         "KDIR=/media/xtra-dev/src/mk808/kernel/kernel-3.0.36-rk3188-netxeon/"
         "drivers/gpu/mali/rk3x OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 "
         "USING_UMP= USING_PROFILING= USING_INTERNAL_PROFILING= "
         "USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__malidrv_build_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [468 x i8] c"malidrv: API_VERSION=23 REPO_URL=heads/master REVISION=r3p2-01rel3-889560e CHANGED_REVISION=889560e CHANGE_DATE=2013-08-11 17:42:46 +0200 BUILD_DATE=Sun Sep 22 23:49:25 CEST 2013 BUILD=release TARGET_PLATFORM=rk30 MALI_PLATFORM=rk30 KDIR=/media/xtra-dev/src/mk808/kernel/kernel-3.0.36-rk3188-netxeon/drivers/gpu/mali/rk3x OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP= USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([468 x i8], [468 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [468 x i8] c"malidrv: API_VERSION=23 REPO_URL=heads/master REVISION=r3p2-01rel3-889560e CHANGED_REVISION=889560e CHANGE_DATE=2013-08-11 17:42:46 +0200 BUILD_DATE=Sun Sep 22 23:49:25 CEST 2013 BUILD=release TARGET_PLATFORM=rk30 MALI_PLATFORM=rk30 KDIR=/media/xtra-dev/src/mk808/kernel/kernel-3.0.36-rk3188-netxeon/drivers/gpu/mali/rk3x OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP= USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([468 x i8], [468 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void stack_overflow(void) {
  printf("STACK OVERFLOW\n");
  exit(1);
}


x86 assembly (clang, -O0):
<stack_overflow>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<stack_overflow>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"STACK OVERFLOW\0A\00"
define void @stack_overflow() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [15 x i8] c"STACK OVERFLOW\00"
define void @stack_overflow() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, char, size_t);
void __bzero(void *s, size_t len) { memset(s, '\0', len); }


x86 assembly (clang, -O0):
<__bzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__bzero>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @__bzero(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @memset(i8* %5, i8 signext 0, i64 %6)
ret void
}

LLVM IR (-O2):
define void @__bzero(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i8 signext 0, i64 %1)
ret void
}