xunge/DecIR huggingface dataset:
/* Variables and functions */
void *malloc(long);
unsigned char **alloc_2d_uchar(long width, long height) {
  long i;
  unsigned char **rows;
  rows = malloc(height * sizeof(unsigned char *));
  for (i = 0; i < height; i++) {
    rows[i] = malloc(width * sizeof(unsigned char));
  }
  return rows;
}


x86 assembly (clang, -O0):
<alloc_2d_uchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1174 <alloc_2d_uchar+0x64>
mov    -0x8(%rbp),%rdi
shl    $0x0,%rdi
call   1030 <malloc@plt>
mov    %rax,%rdx
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1139 <alloc_2d_uchar+0x29>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_2d_uchar>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x0(,%rsi,8),%rdi
call   1030 <malloc@plt>
mov    %rax,%r12
test   %r15,%r15
jle    1155 <alloc_2d_uchar+0x45>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
call   1030 <malloc@plt>
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <alloc_2d_uchar+0x30>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8** @alloc_2d_uchar(i64 %0, i64 %1) {
%3 = shl i64 %1, 3
%4 = tail call i8* @malloc(i64 %3)
%5 = bitcast i8* %4 to i8**
%6 = icmp sgt i64 %1, 0
br i1 %6, label %7, label %13
7: ; preds = %2, %7
%8 = phi i64 [ %11, %7 ], [ 0, %2 ]
%9 = tail call i8* @malloc(i64 %0)
%10 = getelementptr inbounds i8*, i8** %5, i64 %8
store i8* %9, i8** %10
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %13, label %7
13: ; preds = %7, %2
ret i8** %5
}
/* Variables and functions */
int exp(double);
double logisticRegression(double x, double offset, double slope) {
  return (1 / (1 + exp(-(x * slope - offset))));
}


x86 assembly (clang, -O0):
<logisticRegression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
mov    %eax,%ecx
add    $0x1,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logisticRegression>:
push   %rax
mulsd  %xmm2,%xmm0
subsd  %xmm1,%xmm0
xorpd  0xedf(%rip),%xmm0
call   1030 <exp@plt>
lea    0x1(%rax),%ecx
add    $0x2,%eax
xor    %edx,%edx
cmp    $0x3,%eax
cmovb  %ecx,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @logisticRegression(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %6
%9 = load double, double* %5
%10 = fneg double %9
%11 = call double @llvm.fmuladd.f64(double %7, double %8, double %10)
%12 = fneg double %11
%13 = call i32 @exp(double %12)
%14 = add nsw i32 1, %13
%15 = sdiv i32 1, %14
%16 = sitofp i32 %15 to double
ret double %16
}

LLVM IR (-O2):
define double @logisticRegression(double %0, double %1, double %2) {
%4 = fneg double %1
%5 = tail call double @llvm.fmuladd.f64(double %0, double %2, double %4)
%6 = fneg double %5
%7 = tail call i32 @exp(double %6)
%8 = add nsw i32 %7, 1
%9 = add i32 %7, 2
%10 = icmp ult i32 %9, 3
%11 = select i1 %10, i32 %8, i32 0
%12 = sitofp i32 %11 to double
ret double %12
}
/* Type definitions */
typedef int /*<<< orphan*/ timeo;
struct timeval {
  int member_0;
  long member_1;
  int tv_sec;
};
typedef int socklen_t;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_SNDTIMEO;
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, struct timeval *,
               int);
int fnet_set_send_timeout(int fd, int timeout) {
  struct timeval timeo = {2, 0L};
  socklen_t len = sizeof(timeo);
  timeo.tv_sec = timeout;
  return setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeo, len);
}


x86 assembly (clang, -O0):
<fnet_set_send_timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x18,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e8a(%rip),%rax
mov    (%rax),%esi
mov    0x2e91(%rip),%rax
mov    (%rax),%edx
mov    -0x24(%rbp),%r8d
lea    -0x20(%rbp),%rcx
call   1030 <setsockopt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnet_set_send_timeout>:
sub    $0x18,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x10(%rsp)
movups 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %esi,0x10(%rsp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rcx
mov    $0x18,%r8d
call   1030 <setsockopt@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64, i32 }
@__const.fnet_set_send_timeout.timeo = %struct.timeval { i32 2, i64 0, i32 0 }
@SOL_SOCKET = global i32 0
@SO_SNDTIMEO = global i32 0
define i32 @fnet_set_send_timeout(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.timeval
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = bitcast %struct.timeval* %5 to i8*
store i32 24, i32* %6
%8 = load i32, i32* %4
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 2
store i32 %8, i32* %9
%10 = load i32, i32* %3
%11 = load i32, i32* @SOL_SOCKET
%12 = load i32, i32* @SO_SNDTIMEO
%13 = load i32, i32* %6
%14 = call i32 @setsockopt(i32 %10, i32 %11, i32 %12, %struct.timeval* %5, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64, i32 }
@__const.fnet_set_send_timeout.timeo = %struct.timeval { i32 2, i64 0, i32 0 }
@SOL_SOCKET = global i32 0
@SO_SNDTIMEO = global i32 0
define i32 @fnet_set_send_timeout(i32 %0, i32 %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to i8*
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 2
store i32 %1, i32* %5
%6 = load i32, i32* @SOL_SOCKET
%7 = load i32, i32* @SO_SNDTIMEO
%8 = call i32 @setsockopt(i32 %0, i32 %6, i32 %7, %struct.timeval* %3, i32 24)
ret i32 %8
}
int _XMP_floori(int a, int b) {
  int div = a / b;
  if ((a < 0) || (b < 0)) {
    if ((a % b) == 0) {
      return div;
    } else {
      return div - 1;
    }
  } else {
    return div;
  }
}


x86 assembly (clang, -O0):
<_XMP_floori>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1128 <_XMP_floori+0x28>
cmpl   $0x0,-0xc(%rbp)
jge    1151 <_XMP_floori+0x51>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1143 <_XMP_floori+0x43>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <_XMP_floori+0x57>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <_XMP_floori+0x57>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_XMP_floori>:
mov    %edi,%eax
cltd
idiv   %esi
cmp    $0x1,%edx
mov    %eax,%ecx
adc    $0xffffffff,%ecx
or     %edi,%esi
cmovs  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @_XMP_floori(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = srem i32 %0, %1
%5 = or i32 %1, %0
%6 = icmp sgt i32 %5, -1
%7 = icmp ne i32 %4, 0
%8 = sext i1 %7 to i32
%9 = add nsw i32 %3, %8
%10 = select i1 %6, i32 %3, i32 %9
ret i32 %10
}
/* Variables and functions */
int cw_write(int, char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ strlen(char *);
int sk_send(int sock, char *buffer, int ssl) {
  if ((cw_write(sock, buffer, strlen(buffer), ssl)) == -1)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<sk_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
mov    -0x14(%rbp),%ecx
call   1040 <cw_write@plt>
cmp    $0xffffffff,%eax
jne    116f <sk_send+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1176 <sk_send+0x56>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sk_send>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
mov    %r14d,%ecx
call   1040 <cw_write@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sk_send(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = load i8*, i8** %6
%11 = call i32 @strlen(i8* %10)
%12 = load i32, i32* %7
%13 = call i32 @cw_write(i32 %8, i8* %9, i32 %11, i32 %12)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %16
15: ; preds = %3
store i32 0, i32* %4
br label %17
16: ; preds = %3
store i32 1, i32* %4
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @sk_send(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i32 @cw_write(i32 %0, i8* %1, i32 %4, i32 %2)
%6 = icmp ne i32 %5, -1
%7 = zext i1 %6 to i32
ret i32 %7
}
int fun1247() { return 1247; }


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

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

LLVM IR (-O0):
define i32 @fun1247() {
ret i32 1247
}

LLVM IR (-O2):
define i32 @fun1247() {
ret i32 1247
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void start() { printf("\nSTart(): \n"); }


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"\0ASTart(): \0A\00"
define void @start() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"\0ASTart(): \00"
define void @start() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
int Sleef_ilogbf(float x) { return __builtin_ilogbf(x); }


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

x86 assembly (clang, -O2):
<Sleef_ilogbf>:
jmp    1030 <ilogbf@plt>

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

LLVM IR (-O2):
define i32 @Sleef_ilogbf(float %0) {
%2 = tail call i32 @ilogbf(float %0)
ret i32 %2
}
/* Variables and functions */
int sqrt(int);
int rv(int x, int z) { return (-1 + sqrt(1 + 4 * (z - x))) / 4; }


x86 assembly (clang, -O0):
<rv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x4(%rbp),%edi
shl    $0x2,%edi
add    $0x1,%edi
call   1030 <sqrt@plt>
add    $0xffffffff,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rv>:
push   %rax
sub    %edi,%esi
lea    0x1(,%rsi,4),%edi
call   1030 <sqrt@plt>
lea    -0x1(%rax),%ecx
add    $0x2,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rv(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 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
%8 = mul nsw i32 4, %7
%9 = add nsw i32 1, %8
%10 = call i32 @sqrt(i32 %9)
%11 = add nsw i32 -1, %10
%12 = sdiv i32 %11, 4
ret i32 %12
}

LLVM IR (-O2):
define i32 @rv(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = shl nsw i32 %3, 2
%5 = or i32 %4, 1
%6 = tail call i32 @sqrt(i32 %5)
%7 = add nsw i32 %6, -1
%8 = sdiv i32 %7, 4
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void version(void) {
  printf("%s\n", "Libreforge Version: 0.0.1");
  printf("%s\n", "Copyright 2015, Michael B. Eichorn");
  printf("%s\n", "Simplified BSD License");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    0xed9(%rip),%rsi
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    0xee9(%rip),%rsi
call   1030 <printf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xee0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xef4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [26 x i8] c"Libreforge Version: 0.0.1\00"
@.str.2 = [35 x i8] c"Copyright 2015, Michael B. Eichorn\00"
@.str.3 = [23 x i8] c"Simplified BSD License\00"
@EXIT_SUCCESS = global i32 0
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [26 x i8] c"Libreforge Version: 0.0.1\00"
@.str.2 = [35 x i8] c"Copyright 2015, Michael B. Eichorn\00"
@.str.3 = [23 x i8] c"Simplified BSD License\00"
@EXIT_SUCCESS = global i32 0
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void en16(char *buf, unsigned long l) {
  buf[0] = l >> 8;
  buf[1] = l;
}


x86 assembly (clang, -O0):
<en16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<en16>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @en16(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = lshr i64 %5, 8
%7 = trunc i64 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i64, i64* %4
%11 = trunc i64 %10 to i8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
ret void
}

LLVM IR (-O2):
define void @en16(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 8
%4 = trunc i64 %3 to i8
store i8 %4, i8* %0
%5 = trunc i64 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int __infer_nondet_int();
int feof(FILE *stream) {
  FILE tmp;
  tmp = *stream;
  return __infer_nondet_int();
}


x86 assembly (clang, -O0):
<feof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @feof(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
store i32 %5, i32* %3
%6 = call i32 (...) @__infer_nondet_int()
ret i32 %6
}

LLVM IR (-O2):
define i32 @feof(i32* nocapture readnone %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ multiply(int);
void factorialof(int num) {
  int i;
  for (i = 2; i <= num; i++) {
    multiply(i);
  }
}


x86 assembly (clang, -O0):
<factorialof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1144 <factorialof+0x34>
mov    -0x8(%rbp),%edi
call   1030 <multiply@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <factorialof+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<factorialof>:
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     114a <factorialof+0x3a>
mov    %edi,%r14d
neg    %r14d
mov    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%edi
call   1030 <multiply@plt>
lea    (%r14,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1130 <factorialof+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @factorialof(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 2, %1 ]
%5 = tail call i32 @multiply(i32 %4)
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %4, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ dump(void *, int, char *, int);
int /*<<< orphan*/ printf(char *);
void dumprsrc(void *buf, int sz, uint8_t *fb) {
  printf("================ Resources\n");
  dump(buf, sz, "test", 3);
}


x86 assembly (clang, -O0):
<dumprsrc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xecf(%rip),%rdx
mov    $0x3,%ecx
call   1040 <dump@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumprsrc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x3,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <dump@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"================ Resources\0A\00"
@.str.1 = [5 x i8] c"test\00"
define void @dumprsrc(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 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 @dump(i8* %8, i32 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"test\00"
@str = [27 x i8] c"================ Resources\00"
define void @dumprsrc(i8* %0, i32 %1, i32* nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @dump(i8* %0, i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int8_t gte_int8_t(int8_t a, int8_t b) { return a >= b; }


x86 assembly (clang, -O0):
<gte_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gte_int8_t>:
xor    %eax,%eax
cmp    %esi,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @gte_int8_t(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 = icmp sge i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @gte_int8_t(i32 %0, i32 %1) {
%3 = icmp sge i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void cleanup_() {}


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

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

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

LLVM IR (-O2):
define void @cleanup_() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _IO(int, int);
int ioctl(int, int /*<<< orphan*/);
int CED_FullReset(int fh) { return ioctl(fh, _IO(0xce, 41)); }


x86 assembly (clang, -O0):
<CED_FullReset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xce,%edi
mov    $0x29,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CED_FullReset>:
push   %rbx
mov    %edi,%ebx
mov    $0xce,%edi
mov    $0x29,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @CED_FullReset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i32 206, i32 41)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @CED_FullReset(i32 %0) {
%2 = tail call i32 @_IO(i32 206, i32 41)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll8(struct __test_metadata *);
void wrapper_epoll8(struct __test_metadata *_metadata,
                    struct __fixture_variant_metadata *variant) {
  epoll8(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll8>:
jmp    1030 <epoll8@plt>

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

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll8(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll8(%struct.__test_metadata* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void mergesort(int *a, int p, int r) {
  if (p < r) {
    int m = (p + r) / 2;
    mergesort(a, p, m);
    mergesort(a, m + 1, r);
    merge(a, p, m, r);
  }
}


x86 assembly (clang, -O0):
<mergesort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <mergesort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <mergesort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <mergesort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergesort>:
cmp    %edx,%esi
jge    1172 <mergesort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1040 <mergesort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1040 <mergesort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <merge@plt>
ret

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

LLVM IR (-O2):
define void @mergesort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @mergesort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @mergesort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Type definitions */
struct freedv_data_channel {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct freedv_data_channel *);
void freedv_data_channel_destroy(struct freedv_data_channel *fdc) { free(fdc); }


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

x86 assembly (clang, -O2):
<freedv_data_channel_destroy>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.freedv_data_channel = type { i32 }
define void @freedv_data_channel_destroy(%struct.freedv_data_channel* %0) {
%2 = alloca %struct.freedv_data_channel*
store %struct.freedv_data_channel* %0, %struct.freedv_data_channel** %2
%3 = load %struct.freedv_data_channel*, %struct.freedv_data_channel** %2
%4 = call i32 @free(%struct.freedv_data_channel* %3)
ret void
}

LLVM IR (-O2):
%struct.freedv_data_channel = type { i32 }
define void @freedv_data_channel_destroy(%struct.freedv_data_channel* nocapture %0) {
%2 = tail call i32 @free(%struct.freedv_data_channel* %0)
ret void
}
void f(long unsigned int d) {
  typedef int t[d];
  t *g = (__typeof(g))d;
}


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

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

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

LLVM IR (-O2):
define void @f(i64 %0) {
ret void
}
/* Variables and functions */
int prussdrv_exec_code_at(int, unsigned int const *, int, int /*<<< orphan*/);
int prussdrv_exec_code(int prunum, const unsigned int *code, int codelen) {
  return prussdrv_exec_code_at(prunum, code, codelen, 0);
}


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

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

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

LLVM IR (-O2):
define i32 @prussdrv_exec_code(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @prussdrv_exec_code_at(i32 %0, i32* %1, i32 %2, i32 0)
ret i32 %4
}
double fromlong(long long l) {
  unsigned char *bit_representation = (unsigned char *)&l;
  double *result = (double *)bit_representation;
  return *result;
}


x86 assembly (clang, -O0):
<fromlong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fromlong>:
movq   %rdi,%xmm0
ret

LLVM IR (-O0):
define double @fromlong(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca double*
store i64 %0, i64* %2
%5 = bitcast i64* %2 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to double*
store double* %7, double** %4
%8 = load double*, double** %4
%9 = load double, double* %8
ret double %9
}

LLVM IR (-O2):
define double @fromlong(i64 %0) {
%2 = bitcast i64 %0 to double
ret double %2
}
void dstroy(object) int object;
{ move(object, 0); }


x86 assembly (clang, -O0):
<dstroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <move@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dstroy>:
xor    %esi,%esi
xor    %eax,%eax
jmp    1030 <move@plt>

LLVM IR (-O0):
define void @dstroy(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %3, i32 0)
ret void
}

LLVM IR (-O2):
define void @dstroy(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %0, i32 0)
ret void
}
/* Type definitions */
struct rbtree_node {
  int dummy;
};

/* Variables and functions */
struct rbtree_node *__rbtree_end(struct rbtree_node *, int /*<<< orphan*/);
struct rbtree_node *rbtree_first(struct rbtree_node *tree) {
  return __rbtree_end(tree, 0);
}


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

x86 assembly (clang, -O2):
<rbtree_first>:
xor    %esi,%esi
jmp    1030 <__rbtree_end@plt>

LLVM IR (-O0):
%struct.rbtree_node = type { i32 }
define %struct.rbtree_node* @rbtree_first(%struct.rbtree_node* %0) {
%2 = alloca %struct.rbtree_node*
store %struct.rbtree_node* %0, %struct.rbtree_node** %2
%3 = load %struct.rbtree_node*, %struct.rbtree_node** %2
%4 = call %struct.rbtree_node* @__rbtree_end(%struct.rbtree_node* %3, i32 0)
ret %struct.rbtree_node* %4
}

LLVM IR (-O2):
%struct.rbtree_node = type { i32 }
define %struct.rbtree_node* @rbtree_first(%struct.rbtree_node* %0) {
%2 = tail call %struct.rbtree_node* @__rbtree_end(%struct.rbtree_node* %0, i32 0)
ret %struct.rbtree_node* %2
}
float icsi_log_v2(const float val, register float *const pTable,
                  register const unsigned precision) {
  register const int *const pVal = (const int *)(&val);
  register const int exp = ((*pVal >> 23) & 255) - 127;
  register const int man = (*pVal & 0x7FFFFF) >> (23 - precision);
  return ((float)(exp) + pTable[man]) * 0.69314718055995f;
}


x86 assembly (clang, -O0):
<icsi_log_v2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
sar    $0x17,%eax
and    $0xff,%eax
sub    $0x7f,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
and    $0x7fffff,%eax
mov    $0x17,%ecx
sub    -0x14(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x28(%rbp)
cvtsi2ssl -0x24(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
movss  0xea2(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<icsi_log_v2>:
movd   %xmm0,%eax
mov    %eax,%ecx
shr    $0x17,%ecx
movzbl %cl,%edx
and    $0x7fffff,%eax
mov    $0x17,%cl
sub    %sil,%cl
shr    %cl,%eax
add    $0xffffff81,%edx
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
addss  (%rdi,%rax,4),%xmm0
mulss  0xed1(%rip),%xmm0
ret

LLVM IR (-O0):
define float @icsi_log_v2(float %0, float* %1, i32 %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
store float %0, float* %4
store float* %1, float** %5
store i32 %2, i32* %6
%10 = bitcast float* %4 to i32*
store i32* %10, i32** %7
%11 = load i32*, i32** %7
%12 = load i32, i32* %11
%13 = ashr i32 %12, 23
%14 = and i32 %13, 255
%15 = sub nsw i32 %14, 127
store i32 %15, i32* %8
%16 = load i32*, i32** %7
%17 = load i32, i32* %16
%18 = and i32 %17, 8388607
%19 = load i32, i32* %6
%20 = sub i32 23, %19
%21 = ashr i32 %18, %20
store i32 %21, i32* %9
%22 = load i32, i32* %8
%23 = sitofp i32 %22 to float
%24 = load float*, float** %5
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds float, float* %24, i64 %26
%28 = load float, float* %27
%29 = fadd float %23, %28
%30 = fmul float %29, 0x3FE62E4300000000
ret float %30
}

LLVM IR (-O2):
define float @icsi_log_v2(float %0, float* nocapture %1, i32 %2) {
%4 = bitcast float %0 to i32
%5 = lshr i32 %4, 23
%6 = and i32 %5, 255
%7 = add nsw i32 %6, -127
%8 = and i32 %4, 8388607
%9 = sub i32 23, %2
%10 = lshr i32 %8, %9
%11 = sitofp i32 %7 to float
%12 = zext i32 %10 to i64
%13 = getelementptr inbounds float, float* %1, i64 %12
%14 = load float, float* %13
%15 = fadd float %14, %11
%16 = fmul float %15, 0x3FE62E4300000000
ret float %16
}
dolen(ap, c) char **ap;
{ putnum((long)strlen(ap[1])); }


x86 assembly (clang, -O0):
<dolen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1040 <putnum@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dolen>:
push   %rax
mov    0x8(%rdi),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <putnum@plt>

LLVM IR (-O0):
define i32 @dolen(i8** %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i8** %0, i8*** %4
store i32 %1, i32* %5
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i64 @strlen(i8* %8)
%10 = call i32 (i64, ...) bitcast (i32 (...)* @putnum to i32 (i64, ...)*)(i64 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @dolen(i8** nocapture %0, i32 %1) {
%3 = getelementptr inbounds i8*, i8** %0, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @strlen(i8* dereferenceable(1) %4)
%6 = tail call i32 (i64, ...) bitcast (i32 (...)* @putnum to i32 (i64, ...)*)(i64 %5)
ret i32 undef
}
void RTPathTemp(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathTemp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int isdown(char buf[8]) { return !strcmp(buf, "\033[B"); }


x86 assembly (clang, -O0):
<isdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[B\00"
define i32 @isdown(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[B\00"
define i32 @isdown(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ irc_kick(char *, char *, char *);
char *strtok(char *, char *);
void child_kick(char *p) {
  char *chan, *nick, *param;
  chan = strtok(p, " ");
  nick = strtok(NULL, " ");
  param = strtok(NULL, "");
  irc_kick(chan, nick, param);
}


x86 assembly (clang, -O0):
<child_kick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xeb5(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xea2(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <irc_kick@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_kick>:
push   %r15
push   %r14
push   %rbx
lea    0xed4(%rip),%r14
mov    %r14,%rsi
call   1040 <strtok@plt>
mov    %rax,%r15
xor    %edi,%edi
mov    %r14,%rsi
call   1040 <strtok@plt>
mov    %rax,%rbx
lea    0xeb6(%rip),%rsi
xor    %edi,%edi
call   1040 <strtok@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <irc_kick@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [1 x i8] zeroinitializer
define void @child_kick(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @strtok(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %3
%8 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %4
%9 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
store i8* %9, i8** %5
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = call i32 @irc_kick(i8* %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [1 x i8] zeroinitializer
define void @child_kick(i8* %0) {
%2 = tail call i8* @strtok(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @irc_kick(i8* %2, i8* %3, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tinysh_char_out(int /*<<< orphan*/);
void tinysh_puts(char *s) {
  while (*s)
    tinysh_char_out(*s++);
}


x86 assembly (clang, -O0):
<tinysh_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <tinysh_puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <tinysh_char_out@plt>
jmp    111c <tinysh_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tinysh_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <tinysh_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tinysh_char_out@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <tinysh_puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @tinysh_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @tinysh_char_out(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_hashmap_isempty() {
  printf("NOT IMPLEMENTED:"
         "pa_hashmap_isempty"
         "\n");
}


x86 assembly (clang, -O0):
<pa_hashmap_isempty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [36 x i8] c"NOT IMPLEMENTED:pa_hashmap_isempty\0A\00"
define i32 @pa_hashmap_isempty() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [35 x i8] c"NOT IMPLEMENTED:pa_hashmap_isempty\00"
define i32 @pa_hashmap_isempty() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char *, int /*<<< orphan*/);
int u2mfn_get_fd() { return open("/proc/u2mfn", O_RDWR); }


x86 assembly (clang, -O0):
<u2mfn_get_fd>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <open@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<u2mfn_get_fd>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <open@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"/proc/u2mfn\00"
@O_RDWR = global i32 0
define i32 @u2mfn_get_fd() {
%1 = load i32, i32* @O_RDWR
%2 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [12 x i8] c"/proc/u2mfn\00"
@O_RDWR = global i32 0
define i32 @u2mfn_get_fd() {
%1 = load i32, i32* @O_RDWR
%2 = tail call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
void t_init_unicode() { setlocale(LC_ALL, ""); }


x86 assembly (clang, -O0):
<t_init_unicode>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <setlocale@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_init_unicode>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <setlocale@plt>

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
define void @t_init_unicode() {
%1 = load i32, i32* @LC_ALL
%2 = call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
define void @t_init_unicode() {
%1 = load i32, i32* @LC_ALL
%2 = tail call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __uid_t;

/* Variables and functions */
int /*<<< orphan*/ getpwuid(int /*<<< orphan*/);
int exist_pw_uid(__uid_t uid) {
  if (!getpwuid(uid)) {
    return -1;
    ;
  }
  return 0;
  ;
}


x86 assembly (clang, -O0):
<exist_pw_uid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <getpwuid@plt>
cmp    $0x0,%eax
jne    1138 <exist_pw_uid+0x28>
movl   $0xffffffff,-0x4(%rbp)
jmp    113f <exist_pw_uid+0x2f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exist_pw_uid>:
push   %rax
call   1030 <getpwuid@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @exist_pw_uid(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @getpwuid(i32 %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 -1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @exist_pw_uid(i32 %0) {
%2 = tail call i32 @getpwuid(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = sext i1 %3 to i32
ret i32 %4
}