xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int ioctl(int, int, void *);
int xioctl(int fd, int request, void *arg) {
  int r;
  do
    r = ioctl(fd, request, arg);
  while (-1 == r && EINTR == errno);
  return r;
}


x86 assembly (clang, -O0):
<xioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    -0x14(%rbp),%ecx
mov    %al,-0x15(%rbp)
jne    1161 <xioctl+0x51>
mov    0x2e8a(%rip),%rax
mov    (%rax),%rax
mov    0x2e88(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1122 <xioctl+0x12>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xioctl>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    0x2eb2(%rip),%r15
mov    0x2eb3(%rip),%r12
nopl   (%rax)
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    114a <xioctl+0x3a>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <xioctl+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EINTR = global i64 0
@errno = global i64 0
define i32 @xioctl(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
br label %8
8: ; preds = %20, %3
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = call i32 @ioctl(i32 %9, i32 %10, i8* %11)
store i32 %12, i32* %7
br label %13
13: ; preds = %8
%14 = load i32, i32* %7
%15 = icmp eq i32 -1, %14
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i64, i64* @EINTR
%18 = load i64, i64* @errno
%19 = icmp eq i64 %17, %18
br label %20
20: ; preds = %16, %13
%21 = phi i1 [ false, %13 ], [ %19, %16 ]
br i1 %21, label %8, label %22
22: ; preds = %20
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
@EINTR = global i64 0
@errno = global i64 0
define i32 @xioctl(i32 %0, i32 %1, i8* %2) {
br label %4
4: ; preds = %4, %3
%5 = tail call i32 @ioctl(i32 %0, i32 %1, i8* %2)
%6 = icmp eq i32 %5, -1
%7 = load i64, i64* @EINTR
%8 = load i64, i64* @errno
%9 = icmp eq i64 %7, %8
%10 = select i1 %6, i1 %9, i1 false
br i1 %10, label %4, label %11
11: ; preds = %4
ret i32 %5
}
/* Variables and functions */
scalar_t__ chars_is_digit(char);
bool chars_is_hex_digit(char c) {
  return chars_is_digit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
}


x86 assembly (clang, -O0):
<chars_is_hex_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <chars_is_digit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1185 <chars_is_hex_digit+0x75>
movsbl -0x1(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     115c <chars_is_hex_digit+0x4c>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x46,%ecx
mov    %al,-0x2(%rbp)
jle    1185 <chars_is_hex_digit+0x75>
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x61,%ecx
cmp    %edx,%ecx
mov    %al,-0x3(%rbp)
jg     117f <chars_is_hex_digit+0x6f>
movsbl -0x1(%rbp),%eax
cmp    $0x66,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chars_is_hex_digit>:
push   %rbx
mov    %edi,%ebx
call   1030 <chars_is_digit@plt>
test   %rax,%rax
setne  %al
and    $0xdf,%bl
add    $0xbf,%bl
cmp    $0x6,%bl
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @chars_is_hex_digit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @chars_is_digit(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %24, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 65, %8
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 70
br i1 %13, label %24, label %14
14: ; preds = %10, %6
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 97, %16
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sle i32 %20, 102
br label %22
22: ; preds = %18, %14
%23 = phi i1 [ false, %14 ], [ %21, %18 ]
br label %24
24: ; preds = %22, %10, %1
%25 = phi i1 [ true, %10 ], [ true, %1 ], [ %23, %22 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @chars_is_hex_digit(i8 signext %0) {
%2 = tail call i64 @chars_is_digit(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
void settask(unsigned int *set, int task) { *set |= 1 << task; }


x86 assembly (clang, -O0):
<settask>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<settask>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     %eax,(%rdi)
ret

LLVM IR (-O0):
define void @settask(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 1, %5
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = or i32 %8, %6
store i32 %9, i32* %7
ret void
}

LLVM IR (-O2):
define void @settask(i32* nocapture %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = load i32, i32* %0
%5 = or i32 %4, %3
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ psignal(int, char *);
int /*<<< orphan*/ stdout;
void sig_handle(int s) {
  fflush(stdout);
  psignal(s, "Caught signal");
  exit(1);
}


x86 assembly (clang, -O0):
<sig_handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    -0x4(%rbp),%edi
lea    0xead(%rip),%rsi
call   1050 <psignal@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_handle>:
push   %rbx
mov    %edi,%ebx
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
lea    0xeb8(%rip),%rsi
mov    %ebx,%edi
call   1050 <psignal@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [14 x i8] c"Caught signal\00"
define void @sig_handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @psignal(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [14 x i8] c"Caught signal\00"
define void @sig_handle(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 @psignal(i32 %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
int fun511() { return 511; }


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

x86 assembly (clang, -O2):
<fun511>:
mov    $0x1ff,%eax
ret

LLVM IR (-O0):
define i32 @fun511() {
ret i32 511
}

LLVM IR (-O2):
define i32 @fun511() {
ret i32 511
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t plan_next_block_index(uint32_t block_index) {
  block_index++;
  if (block_index == 8192) {
    block_index = 0;
  }
  return (block_index);
}


x86 assembly (clang, -O0):
<plan_next_block_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x2000,-0x4(%rbp)
jne    1124 <plan_next_block_index+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plan_next_block_index>:
lea    0x1(%rdi),%ecx
xor    %eax,%eax
cmp    $0x2000,%ecx
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @plan_next_block_index(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 8192
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @plan_next_block_index(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = icmp eq i32 %2, 8192
%4 = select i1 %3, i32 0, i32 %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ DisplayCurrWinText(char *);
int /*<<< orphan*/ Popup_Err(int /*<<< orphan*/, char *);
void WarnBaseCapacityApproaching() {
  DisplayCurrWinText("\n  Construct total within 10 of maximum capacity!\n");
  Popup_Err(0, "Constructs total within 10 of maximum capacity");
}


x86 assembly (clang, -O0):
<WarnBaseCapacityApproaching>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <DisplayCurrWinText@plt>
xor    %edi,%edi
lea    0xefa(%rip),%rsi
call   1030 <Popup_Err@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WarnBaseCapacityApproaching>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <DisplayCurrWinText@plt>
lea    0xeff(%rip),%rsi
xor    %edi,%edi
pop    %rax
jmp    1030 <Popup_Err@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"\0A Construct total within 10 of maximum capacity!\0A\00"
@.str.1 = [47 x i8] c"Constructs total within 10 of maximum capacity\00"
define void @WarnBaseCapacityApproaching() {
%1 = call i32 @DisplayCurrWinText(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @Popup_Err(i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"\0A Construct total within 10 of maximum capacity!\0A\00"
@.str.1 = [47 x i8] c"Constructs total within 10 of maximum capacity\00"
define void @WarnBaseCapacityApproaching() {
%1 = tail call i32 @DisplayCurrWinText(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @Popup_Err(i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_3Dint64_highword_reg(long long val) {
  return ((val >> 32) & (0x3D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_3Dint64_highword_reg>:
movabs $0x3d00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_3Dint64_highword_reg(i64 %0) {
%2 = and i64 %0, 261993005056
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int pow(int, int);
double f(int n) {
  if (n == 0)
    return 1;
  else
    return f(n - 1) + (1 / pow(2, n));
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1147 <f+0x27>
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1180 <f+0x60>
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  -0x18(%rbp),%xmm0
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
sub    $0x10,%rsp
test   %edi,%edi
je     115f <f+0x3f>
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1030 <f@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x2,%edi
mov    %ebx,%esi
call   1040 <pow@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovb  %eax,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
addsd  0x8(%rsp),%xmm0
jmp    1167 <f+0x47>
movsd  0xe99(%rip),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @f(i32 %0) {
%2 = alloca double
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store double 1.000000e+00, double* %2
br label %16
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call double @f(i32 %9)
%11 = load i32, i32* %3
%12 = call i32 @pow(i32 2, i32 %11)
%13 = sdiv i32 1, %12
%14 = sitofp i32 %13 to double
%15 = fadd double %10, %14
store double %15, double* %2
br label %16
16: ; preds = %7, %6
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @f(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi double [ %13, %5 ], [ 1.000000e+00, %1 ]
ret double %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call double @f(i32 %6)
%8 = tail call i32 @pow(i32 2, i32 %0)
%9 = add i32 %8, 1
%10 = icmp ult i32 %9, 3
%11 = select i1 %10, i32 %8, i32 0
%12 = sitofp i32 %11 to double
%13 = fadd double %7, %12
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ print_error(char *, void const *const, void const *const);
int values_not_equal_display_error(const void *const left,
                                   const void *const right) {
  const int not_equal = left != right;
  if (!not_equal) {
    print_error("0x%x == 0x%x\n", left, right);
  }
  return not_equal;
}


x86 assembly (clang, -O0):
<values_not_equal_display_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1151 <values_not_equal_display_error+0x41>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb4(%rip),%rdi
call   1030 <print_error@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<values_not_equal_display_error>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
cmp    %rsi,%rdi
jne    1131 <values_not_equal_display_error+0x21>
lea    0xeda(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
call   1030 <print_error@plt>
xor    %eax,%eax
cmp    %r14,%rbx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"0x%x == 0x%x\0A\00"
define i32 @values_not_equal_display_error(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, %1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @print_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
br label %6
6: ; preds = %4, %2
%7 = zext i1 %3 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ terminate_driver();
void sighandler(int signo) {
  terminate_driver();
  _exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <terminate_driver@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<sighandler>:
push   %rax
xor    %eax,%eax
call   1040 <terminate_driver@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @terminate_driver()
%4 = load i32, i32* @EXIT_FAILURE
%5 = call i32 @_exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @sighandler(i32 %0) {
%2 = tail call i32 (...) @terminate_driver()
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @_exit(i32 %3)
unreachable
}
/* Variables and functions */
char *getenv(char *);
const char *conf_get_autoconfig_name(void) {
  char *name = getenv("BOZ_KCONFIG_AUTOCONFIG");
  return name ? name : "include/config/auto.conf";
}


x86 assembly (clang, -O0):
<conf_get_autoconfig_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <conf_get_autoconfig_name+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <conf_get_autoconfig_name+0x40>
lea    0xed0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <conf_get_autoconfig_name+0x40>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_get_autoconfig_name>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xef0(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"BOZ_KCONFIG_AUTOCONFIG\00"
@.str.1 = [25 x i8] c"include/config/auto.conf\00"
define i8* @conf_get_autoconfig_name() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8*, i8** %1
br label %8
7: ; preds = %0
br label %8
8: ; preds = %7, %5
%9 = phi i8* [ %6, %5 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), %7 ]
ret i8* %9
}

LLVM IR (-O2):
@.str = [23 x i8] c"BOZ_KCONFIG_AUTOCONFIG\00"
@.str.1 = [25 x i8] c"include/config/auto.conf\00"
define i8* @conf_get_autoconfig_name() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ func(char *, char *);
void stricmp_greater() {
  Assert_real((func("equal", "EQUAM") > 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/string/stricmp.c",
              32, ("Should be > 0"));
}


x86 assembly (clang, -O0):
<stricmp_greater>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <func@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec2(%rip),%rsi
mov    $0x20,%edx
lea    0xf5a(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stricmp_greater>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <func@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
lea    0xec8(%rip),%rsi
lea    0xf65(%rip),%rcx
mov    $0x20,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"equal\00"
@.str.1 = [6 x i8] c"EQUAM\00"
@.str.2 = [164 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/string/stricmp.c\00"
@.str.3 = [14 x i8] c"Should be > 0\00"
define void @stricmp_greater() {
%1 = call i64 @func(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.2, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"equal\00"
@.str.1 = [6 x i8] c"EQUAM\00"
@.str.2 = [164 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/string/stricmp.c\00"
@.str.3 = [14 x i8] c"Should be > 0\00"
define void @stricmp_greater() {
%1 = tail call i64 @func(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.2, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}
const char *mfowm_string(unsigned short mfowm) {
  switch (mfowm) {
  case 0:
    return "Overwrite";
    break;
  case 1:
    return "Stop";
    break;
  default:
    return "Invalid";
  }
}


x86 assembly (clang, -O0):
<mfowm_string>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     1130 <mfowm_string+0x30>
jmp    111f <mfowm_string+0x1f>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1140 <mfowm_string+0x40>
jmp    1150 <mfowm_string+0x50>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <mfowm_string+0x5b>
lea    0xec3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <mfowm_string+0x5b>
lea    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mfowm_string>:
cmp    $0x1,%di
lea    0xeff(%rip),%rax
lea    0xefd(%rip),%rcx
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee1(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Overwrite\00"
@.str.1 = [5 x i8] c"Stop\00"
@.str.2 = [8 x i8] c"Invalid\00"
define i8* @mfowm_string(i16 zeroext %0) {
%2 = alloca i8*
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
switch i32 %5, label %8 [
i32 0, label %6
i32 1, label %7
]
6: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %7, %6
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [10 x i8] c"Overwrite\00"
@.str.1 = [5 x i8] c"Stop\00"
@.str.2 = [8 x i8] c"Invalid\00"
define i8* @mfowm_string(i16 zeroext %0) {
%2 = icmp eq i16 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i16 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
int badeol(s)
char *s;
{
  while (*s && (*s && *s <= ' '))
    s++;
  return (*s && *s != ';');
}


x86 assembly (clang, -O0):
<badeol>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <badeol+0x48>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xa(%rbp)
je     1142 <badeol+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
setle  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <badeol+0x58>
jmp    1169 <badeol+0x69>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <badeol+0x8>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xb(%rbp)
je     118e <badeol+0x8e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
setne  %al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<badeol>:
movzbl (%rdi),%eax
test   %al,%al
je     110f <badeol+0xf>
add    $0x1,%rdi
cmp    $0x21,%al
jl     1100 <badeol>
test   %al,%al
setne  %cl
cmp    $0x3b,%al
setne  %al
and    %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @badeol(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %8, %2 ]
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
%6 = icmp slt i8 %4, 33
%7 = and i1 %5, %6
%8 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %7, label %2, label %9
9: ; preds = %2
%10 = icmp ne i8 %4, 59
%11 = and i1 %5, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
int deinit(void) { return 1; }


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

x86 assembly (clang, -O2):
<deinit>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @deinit() {
ret i32 1
}

LLVM IR (-O2):
define i32 @deinit() {
ret i32 1
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int net_recv(int, char *, int, struct sockaddr_in *, int);
int /*<<< orphan*/ net_send(int, char *, int, struct sockaddr_in *, int);
void echo_serv(int fd) {
  struct sockaddr_in fm_addr;
  char buf[512];
  int n;
  while (1) {
    n = net_recv(fd, buf, sizeof(buf), &fm_addr, sizeof(struct sockaddr_in));
    net_send(fd, buf, n, &fm_addr, sizeof(struct sockaddr_in));
  }
}


x86 assembly (clang, -O0):
<echo_serv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x210(%rbp),%rsi
mov    $0x200,%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1040 <net_recv@plt>
mov    %eax,-0x214(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x210(%rbp),%rsi
mov    -0x214(%rbp),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <net_send@plt>
jmp    112e <echo_serv+0xe>

x86 assembly (clang, -O2):
<echo_serv>:
push   %r15
push   %r14
push   %rbx
sub    $0x210,%rsp
mov    %edi,%ebx
lea    0x10(%rsp),%r14
lea    0x8(%rsp),%r15
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x200,%edx
mov    %r15,%rcx
mov    $0x4,%r8d
call   1040 <net_recv@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
mov    %r15,%rcx
mov    $0x4,%r8d
call   1030 <net_send@plt>
jmp    1140 <echo_serv+0x20>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
define void @echo_serv(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_in
%4 = alloca [512 x i8]
%5 = alloca i32
store i32 %0, i32* %2
br label %6
6: ; preds = %1, %6
%7 = load i32, i32* %2
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%9 = call i32 @net_recv(i32 %7, i8* %8, i32 512, %struct.sockaddr_in* %3, i32 4)
store i32 %9, i32* %5
%10 = load i32, i32* %2
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%12 = load i32, i32* %5
%13 = call i32 @net_send(i32 %10, i8* %11, i32 %12, %struct.sockaddr_in* %3, i32 4)
br label %6
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
define void @echo_serv(i32 %0) {
%2 = alloca %struct.sockaddr_in
%3 = alloca [512 x i8]
%4 = bitcast %struct.sockaddr_in* %2 to i8*
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
br label %6
6: ; preds = %6, %1
%7 = call i32 @net_recv(i32 %0, i8* %5, i32 512, %struct.sockaddr_in* %2, i32 4)
%8 = call i32 @net_send(i32 %0, i8* %5, i32 %7, %struct.sockaddr_in* %2, i32 4)
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void os_exit_process(int value) { exit(value); }


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

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

LLVM IR (-O0):
define void @os_exit_process(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 @os_exit_process(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
void bitfix_prepare(void) { ; }


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

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

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

LLVM IR (-O2):
define void @bitfix_prepare() {
ret void
}
void GeoIP_range_by_ip_delete(char **ptr) {
  if (ptr) {
    if (ptr[0])
      free(ptr[0]);
    if (ptr[1])
      free(ptr[1]);
    free(ptr);
  }
}


x86 assembly (clang, -O0):
<GeoIP_range_by_ip_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1166 <GeoIP_range_by_ip_delete+0x56>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <GeoIP_range_by_ip_delete+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     115d <GeoIP_range_by_ip_delete+0x4d>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GeoIP_range_by_ip_delete>:
test   %rdi,%rdi
je     113d <GeoIP_range_by_ip_delete+0x2d>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1126 <GeoIP_range_by_ip_delete+0x16>
call   1030 <free@plt>
mov    0x8(%rbx),%rdi
test   %rdi,%rdi
je     1134 <GeoIP_range_by_ip_delete+0x24>
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @GeoIP_range_by_ip_delete(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
br i1 %4, label %5, label %26
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = load i8**, i8*** %2
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
br label %14
14: ; preds = %10, %5
%15 = load i8**, i8*** %2
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %23
19: ; preds = %14
%20 = load i8**, i8*** %2
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
br label %23
23: ; preds = %19, %14
%24 = load i8**, i8*** %2
%25 = bitcast i8** %24 to i8*
br label %26
26: ; preds = %23, %1
ret void
}

LLVM IR (-O2):
define void @GeoIP_range_by_ip_delete(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %3
tail call void @free(i8* %4)
br label %7
7: ; preds = %6, %3
%8 = getelementptr inbounds i8*, i8** %0, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %12, label %11
11: ; preds = %7
tail call void @free(i8* %9)
br label %12
12: ; preds = %11, %7
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
br label %14
14: ; preds = %12, %1
ret void
}
void texcoord(double t[3], double p[3]) {
  t[0] = p[0] + .5;
  t[1] = p[1] + .5;
  t[2] = p[2] + .5;
}


x86 assembly (clang, -O0):
<texcoord>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xee8(%rip),%xmm0
addsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xed0(%rip),%xmm0
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0xeb6(%rip),%xmm0
addsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<texcoord>:
movsd  0xef8(%rip),%xmm0
movsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
movsd  0x8(%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rdi)
addsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @texcoord(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fadd double %3, 5.000000e-01
store double %4, double* %0
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = fadd double %6, 5.000000e-01
%8 = getelementptr inbounds double, double* %0, i64 1
store double %7, double* %8
%9 = getelementptr inbounds double, double* %1, i64 2
%10 = load double, double* %9
%11 = fadd double %10, 5.000000e-01
%12 = getelementptr inbounds double, double* %0, i64 2
store double %11, double* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errormsg(int, char *);
void sigsegv(int signum) { errormsg(2, "segmentation fault.\n"); }


x86 assembly (clang, -O0):
<sigsegv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2,%edi
lea    0xed9(%rip),%rsi
call   1030 <errormsg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigsegv>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edi
jmp    1030 <errormsg@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"segmentation fault.\0A\00"
define void @sigsegv(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @errormsg(i32 2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"segmentation fault.\0A\00"
define void @sigsegv(i32 %0) {
%2 = tail call i32 @errormsg(i32 2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
  if (a = 5)
    printf("%d", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x5,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1155 <main+0x35>
jmp    1164 <main+0x44>
mov    -0x8(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movl   $0x5,0xc(%rsp)
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 5, i32* %2
br i1 true, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %4, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
store i32 5, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void vfree(void *mem) { assert(0); }


x86 assembly (clang, -O0):
<vfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @vfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @vfree(i8* nocapture readnone %0) {
%2 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nonnull_variadic(int, int *);
void call_nonnull_variadic(int a, int *b) { nonnull_variadic(a, b); }


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

x86 assembly (clang, -O2):
<call_nonnull_variadic>:
jmp    1030 <nonnull_variadic@plt>

LLVM IR (-O0):
define void @call_nonnull_variadic(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 @nonnull_variadic(i32 %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @call_nonnull_variadic(i32 %0, i32* %1) {
%3 = tail call i32 @nonnull_variadic(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void usage(char const *str) { _exit(2); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    $0x2,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @_exit(i32 2)
unreachable
}

LLVM IR (-O2):
define void @usage(i8* nocapture readnone %0) {
%2 = tail call i32 @_exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ uint_to_str(char *, int);
char *int_to_str(char *buf, int i) {
  if (buf == 0)
    return 0;
  char *ret = buf;
  if (i < 0) {
    *buf++ = '-';
    i = -i;
  }
  uint_to_str(buf, i);
  return ret;
}


x86 assembly (clang, -O0):
<int_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <int_to_str+0x27>
movq   $0x0,-0x8(%rbp)
jmp    1177 <int_to_str+0x67>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1163 <int_to_str+0x53>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,(%rax)
xor    %eax,%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <uint_to_str@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_str>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     1130 <int_to_str+0x20>
test   %esi,%esi
js     1122 <int_to_str+0x12>
mov    %rbx,%rdi
jmp    112b <int_to_str+0x1b>
lea    0x1(%rbx),%rdi
movb   $0x2d,(%rbx)
neg    %esi
call   1030 <uint_to_str@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @int_to_str(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = icmp slt i32 %1, 0
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 45, i8* %0
%8 = sub nsw i32 0, %1
br label %9
9: ; preds = %6, %4
%10 = phi i8* [ %7, %6 ], [ %0, %4 ]
%11 = phi i32 [ %8, %6 ], [ %1, %4 ]
%12 = tail call i32 @uint_to_str(i8* %10, i32 %11)
br label %13
13: ; preds = %2, %9
ret i8* %0
}
int execute_msgctl() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_msgctl() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ box_boolean(int);
int /*<<< orphan*/ dpop();
double untag_float_fast(int /*<<< orphan*/);
void primitive_float_less_impl(void) {
  double y = untag_float_fast(dpop());
  double x = untag_float_fast(dpop());
  ;
  box_boolean(x < y);
}


x86 assembly (clang, -O0):
<primitive_float_less_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <box_boolean@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_less_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
xor    %edi,%edi
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
seta   %dil
pop    %rax
jmp    1040 <box_boolean@plt>

LLVM IR (-O0):
define void @primitive_float_less_impl() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (...) @dpop()
%4 = call double @untag_float_fast(i32 %3)
store double %4, double* %1
%5 = call i32 (...) @dpop()
%6 = call double @untag_float_fast(i32 %5)
store double %6, double* %2
%7 = load double, double* %2
%8 = load double, double* %1
%9 = fcmp olt double %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @box_boolean(i32 %10)
ret void
}

LLVM IR (-O2):
define void @primitive_float_less_impl() {
%1 = tail call i32 (...) @dpop()
%2 = tail call double @untag_float_fast(i32 %1)
%3 = tail call i32 (...) @dpop()
%4 = tail call double @untag_float_fast(i32 %3)
%5 = fcmp olt double %4, %2
%6 = zext i1 %5 to i32
%7 = tail call i32 @box_boolean(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  ((void)(argc));
  ((void)(argv));
  printf("Hello, Nore!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, Nore!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello, Nore!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void *utilDataTransferDeviceToHost(void *src, unsigned int numbytes,
                                   unsigned int freeDeviceMem) {
  return src;
}


x86 assembly (clang, -O0):
<utilDataTransferDeviceToHost>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @utilDataTransferDeviceToHost(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
ret i8* %7
}

LLVM IR (-O2):
define i8* @utilDataTransferDeviceToHost(i8* readnone returned %0, i32 %1, i32 %2) {
ret i8* %0
}
/* Variables and functions */
float df(char *, char *, int);
float freesize(char *Partition, char *mount, int flag) {
  float prozent = df(Partition, mount, flag);
  return prozent;
}


x86 assembly (clang, -O0):
<freesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <df@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freesize>:
jmp    1030 <df@plt>

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

LLVM IR (-O2):
define float @freesize(i8* %0, i8* %1, i32 %2) {
%4 = tail call float @df(i8* %0, i8* %1, i32 %2)
ret float %4
}