xunge/DecIR huggingface dataset:
/* Variables and functions */
int f443(int *);
int f444(int *p) { return f443(p); }


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

x86 assembly (clang, -O2):
<f444>:
jmp    1030 <f443@plt>

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

LLVM IR (-O2):
define i32 @f444(i32* %0) {
%2 = tail call i32 @f443(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ guncpmdistsq(double *, double *);
double sqrt(int /*<<< orphan*/);
double guncpmdist(double v1[6], double v2[6]) {
  return sqrt(guncpmdistsq(v1, v2));
}


x86 assembly (clang, -O0):
<guncpmdist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <guncpmdistsq@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<guncpmdist>:
push   %rax
call   1030 <guncpmdistsq@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @guncpmdist(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call i32 @guncpmdistsq(double* %5, double* %6)
%8 = call double @sqrt(i32 %7)
ret double %8
}

LLVM IR (-O2):
define double @guncpmdist(double* %0, double* %1) {
%3 = tail call i32 @guncpmdistsq(double* %0, double* %1)
%4 = tail call double @sqrt(i32 %3)
ret double %4
}
/* Variables and functions */
scalar_t__ isinf(double);
scalar_t__ isnan(double);
double fixf(double v, double def) {
  if (isnan(v) || isinf(v))
    return def;
  return v;
}


x86 assembly (clang, -O0):
<fixf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    115a <fixf+0x3a>
movsd  -0x10(%rbp),%xmm0
call   1040 <isinf@plt>
cmp    $0x0,%rax
je     1169 <fixf+0x49>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1173 <fixf+0x53>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixf>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <isnan@plt>
test   %rax,%rax
je     1145 <fixf+0x25>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret
movsd  0x8(%rsp),%xmm0
call   1040 <isinf@plt>
test   %rax,%rax
je     1161 <fixf+0x41>
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @fixf(double %0, double %1) {
%3 = tail call i64 @isnan(double %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @isinf(double %0)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, double %0, double %1
br label %9
9: ; preds = %5, %2
%10 = phi double [ %1, %2 ], [ %8, %5 ]
ret double %10
}
double py_zero2d(double x, double y) {
  (void)x;
  (void)y;
  return 0.0;
}


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

x86 assembly (clang, -O2):
<py_zero2d>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @py_zero2d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @py_zero2d(double %0, double %1) {
ret double 0.000000e+00
}
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t getImmed(uint8_t *op) {
  uint64_t res = 0;
  for (int i = 0; i < 8; i++) {
    res = (res << 8) + op[11 + i];
  }
  return res;
}


x86 assembly (clang, -O0):
<getImmed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    1147 <getImmed+0x47>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%edx
add    $0xb,%edx
movslq %edx,%rdx
add    (%rcx,%rdx,4),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <getImmed+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getImmed>:
mov    0x3c(%rdi),%eax
shl    $0x8,%eax
add    0x40(%rdi),%eax
shl    $0x8,%eax
add    0x44(%rdi),%eax
shl    $0x8,%eax
add    0x48(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @getImmed(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 15
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i32, i32* %0, i64 16
%6 = load i32, i32* %5
%7 = add i32 %6, %4
%8 = shl i32 %7, 8
%9 = getelementptr inbounds i32, i32* %0, i64 17
%10 = load i32, i32* %9
%11 = add i32 %10, %8
%12 = shl i32 %11, 8
%13 = getelementptr inbounds i32, i32* %0, i64 18
%14 = load i32, i32* %13
%15 = add nsw i32 %14, %12
ret i32 %15
}
int swapFacing(int facing) {
  if (facing == 1) {
    facing = -1;
  } else {
    facing = 1;
  }
  return facing;
}


x86 assembly (clang, -O0):
<swapFacing>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    111d <swapFacing+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1124 <swapFacing+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapFacing>:
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @swapFacing(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i32 -1, i32 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ si_clear_buffer(int);
int si_send_char(int, int);
int si_send_command(int fd, int cmd) {
  int ret;
  if (fd < 0)
    return 0;
  si_clear_buffer(fd);
  ret = si_send_char(fd, cmd);
  return (ret);
}


x86 assembly (clang, -O0):
<si_send_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1144 <si_send_command+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1160 <si_send_command+0x40>
mov    -0x8(%rbp),%edi
call   1030 <si_clear_buffer@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <si_send_char@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<si_send_command>:
test   %edi,%edi
js     113f <si_send_command+0x1f>
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <si_clear_buffer@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <si_send_char@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @si_send_command(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 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %17
10: ; preds = %2
%11 = load i32, i32* %4
%12 = call i32 @si_clear_buffer(i32 %11)
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = call i32 @si_send_char(i32 %13, i32 %14)
store i32 %15, i32* %6
%16 = load i32, i32* %6
store i32 %16, i32* %3
br label %17
17: ; preds = %10, %9
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @si_send_command(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @si_clear_buffer(i32 %0)
%6 = tail call i32 @si_send_char(i32 %0, i32 %1)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ %6, %4 ], [ 0, %2 ]
ret i32 %8
}
/* Variables and functions */
int accept(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
int socketAccept(int descriptor) { return accept(descriptor, NULL, 0); }


x86 assembly (clang, -O0):
<socketAccept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <accept@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socketAccept>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <accept@plt>

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

LLVM IR (-O2):
define i32 @socketAccept(i32 %0) {
%2 = tail call i32 @accept(i32 %0, i32* null, i32 0)
ret i32 %2
}
/* Type definitions */
typedef unsigned int uint_fast8_t;
typedef unsigned int uint8_t;

/* Variables and functions */
uint8_t aes_rotate_left_uint8(uint8_t a, uint_fast8_t num_bits) {
  return ((a << num_bits) | (a >> (8u - num_bits)));
}


x86 assembly (clang, -O0):
<aes_rotate_left_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x8,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_rotate_left_uint8>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x8,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @aes_rotate_left_uint8(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 8, %9
%11 = lshr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @aes_rotate_left_uint8(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub i32 8, %1
%5 = lshr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
void DPMSGetTimeouts() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int reverseBits(int);
int main(void) {
  uint32_t a = 43261596;
  printf("%d\n", reverseBits(a));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 43261596, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @reverseBits(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @reverseBits(i32 43261596)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ unused(char *, char const *, int);
int fd_reset(int fd, const char *label) {
  if (fd != -1 && close(fd) == -1) {
    do {
      unused("close(%s=%i) failed", label, fd);
    } while (0);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<fd_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
je     116e <fd_reset+0x4e>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    116e <fd_reset+0x4e>
jmp    114f <fd_reset+0x2f>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xea3(%rip),%rdi
call   1040 <unused@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1175 <fd_reset+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_reset>:
push   %rbp
push   %r14
push   %rbx
xor    %ebx,%ebx
cmp    $0xffffffff,%edi
je     1150 <fd_reset+0x30>
mov    %rsi,%r14
mov    %edi,%ebp
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1150 <fd_reset+0x30>
lea    0xebf(%rip),%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <unused@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"close(%s=%i) failed\00"
define i32 @fd_reset(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, -1
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i32 @close(i32 %0)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @unused(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %0)
br label %9
9: ; preds = %2, %4, %7
%10 = phi i32 [ -1, %7 ], [ 0, %4 ], [ 0, %2 ]
ret i32 %10
}
void mdp4_dsi_video_vsync_ctrl(int cndx, int enable) {}


x86 assembly (clang, -O0):
<mdp4_dsi_video_vsync_ctrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @mdp4_dsi_video_vsync_ctrl(i32 %0, i32 %1) {
ret void
}
unsigned xrop3_161_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = ~T;
  stk3 = S & stk4;
  stk2 = D | stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_161_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
and    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_161_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
lea    (%rcx,%rdi,1),%edx
mov    %esi,%eax
shl    $0x8,%eax
add    %eax,%esi
not    %eax
and    %ecx,%eax
or     $0xff,%eax
xor    %esi,%eax
or     %edx,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_161_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = xor i32 %24, -1
store i32 %25, i32* %11
%26 = load i32, i32* %6
%27 = load i32, i32* %11
%28 = and i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %5
%30 = load i32, i32* %10
%31 = or i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %7
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = xor i32 %35, -1
store i32 %36, i32* %8
%37 = load i32, i32* %8
%38 = load i32, i32* %6
%39 = xor i32 %38, -1
%40 = and i32 %37, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %6
%43 = and i32 %41, %42
%44 = or i32 %40, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_161_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %6
%9 = xor i32 %7, -1
%10 = and i32 %4, %9
%11 = or i32 %10, 255
%12 = xor i32 %11, %8
%13 = or i32 %5, %12
%14 = xor i32 %13, -1
%15 = or i32 %14, %3
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void mferror(char *s) {
  fprintf(stderr, "Error: %s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<mferror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<mferror>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @mferror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int, int, int);
int /*<<< orphan*/ output_w32(int);
void emit_fdivd(int s1, int s2, int d) {
  assem_debug("fdivd d%d,d%d,d%d\n", d, s1, s2);
  output_w32(0xee800b00 | ((d & 7) << 12) | ((s1 & 7) << 16) | (s2 & 7));
}


x86 assembly (clang, -O0):
<emit_fdivd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xebf(%rip),%rdi
call   1030 <assem_debug@plt>
mov    -0xc(%rbp),%edi
and    $0x7,%edi
shl    $0xc,%edi
or     $0xee800b00,%edi
mov    -0x4(%rbp),%eax
and    $0x7,%eax
shl    $0x10,%eax
or     %eax,%edi
mov    -0x8(%rbp),%eax
and    $0x7,%eax
or     %eax,%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fdivd>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xece(%rip),%rdi
mov    %edx,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1030 <assem_debug@plt>
and    $0x7,%r14d
shl    $0xc,%r14d
and    $0x7,%ebp
shl    $0x10,%ebp
and    $0x7,%ebx
or     %ebp,%ebx
lea    (%r14,%rbx,1),%edi
add    $0xee800b00,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"fdivd d%d,d%d,d%d\0A\00"
define void @emit_fdivd(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* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call i32 @assem_debug(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %6
%12 = and i32 %11, 7
%13 = shl i32 %12, 12
%14 = or i32 -293598464, %13
%15 = load i32, i32* %4
%16 = and i32 %15, 7
%17 = shl i32 %16, 16
%18 = or i32 %14, %17
%19 = load i32, i32* %5
%20 = and i32 %19, 7
%21 = or i32 %18, %20
%22 = call i32 @output_w32(i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"fdivd d%d,d%d,d%d\0A\00"
define void @emit_fdivd(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @assem_debug(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0, i32 %1)
%5 = shl i32 %2, 12
%6 = and i32 %5, 28672
%7 = shl i32 %0, 16
%8 = and i32 %7, 458752
%9 = and i32 %1, 7
%10 = or i32 %8, %9
%11 = or i32 %10, %6
%12 = or i32 %11, -293598464
%13 = tail call i32 @output_w32(i32 %12)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gmtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ strftime(char *, size_t, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void get_current_time_string(char *str, size_t len) {
  time_t t;
  time(&t);
  struct tm r;
  gmtime_r(&t, &r);
  strftime(str, len, "%D %T", &r);
}


x86 assembly (clang, -O0):
<get_current_time_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <time@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <gmtime_r@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe9b(%rip),%rdx
lea    -0x18(%rbp),%rcx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_time_string>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x4(%rsp),%r15
mov    %r15,%rdi
call   1040 <time@plt>
mov    %rsp,%r12
mov    %r15,%rdi
mov    %r12,%rsi
call   1030 <gmtime_r@plt>
lea    0xea0(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12,%rcx
call   1050 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [6 x i8] c"%D %T\00"
define void @get_current_time_string(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca %struct.tm
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = call i32 @time(i32* %5)
%8 = call i32 @gmtime_r(i32* %5, %struct.tm* %6)
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i32 @strftime(i8* %9, i64 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [6 x i8] c"%D %T\00"
define void @get_current_time_string(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca %struct.tm
%5 = bitcast i32* %3 to i8*
%6 = call i32 @time(i32* %3)
%7 = bitcast %struct.tm* %4 to i8*
%8 = call i32 @gmtime_r(i32* %3, %struct.tm* %4)
%9 = call i32 @strftime(i8* %0, i64 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret void
}
unsigned xrop3_35_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = T & stk3;
  stk1 = S | stk2;
  stk1 = ~stk1;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_35_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_35_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
or     %eax,%ecx
not    %ecx
not    %eax
and    %esi,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_35_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %7
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = xor i32 %31, -1
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = load i32, i32* %6
%35 = and i32 %33, %34
%36 = load i32, i32* %8
%37 = load i32, i32* %7
%38 = xor i32 %37, -1
%39 = and i32 %36, %38
%40 = or i32 %35, %39
%41 = load i32, i32* %7
%42 = load i32, i32* %6
%43 = xor i32 %42, -1
%44 = and i32 %41, %43
%45 = load i32, i32* %5
%46 = and i32 %44, %45
%47 = or i32 %40, %46
ret i32 %47
}

LLVM IR (-O2):
define i32 @xrop3_35_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = xor i32 %4, -1
%10 = and i32 %9, %5
%11 = or i32 %10, %8
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
void hexword(unsigned value, size_t field, FILE *fp) {
  if (field > 0) {
    hexword(value >> 4, --field, fp);
    putc("0123456789ABCDEF"[value & 0x0F], fp);
    return;
  }
  return;
}


x86 assembly (clang, -O0):
<hexword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    117e <hexword+0x5e>
mov    -0x4(%rbp),%edi
shr    $0x4,%edi
mov    -0x10(%rbp),%rsi
add    $0xffffffffffffffff,%rsi
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
call   1040 <hexword@plt>
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,%eax
mov    %eax,%ecx
lea    0xe96(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    -0x18(%rbp),%rsi
movsbl %al,%edi
call   1030 <putc@plt>
jmp    1183 <hexword+0x63>
jmp    1183 <hexword+0x63>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexword>:
test   %rsi,%rsi
je     1157 <hexword+0x37>
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %edi,%ebx
shr    $0x4,%edi
add    $0xffffffffffffffff,%rsi
call   1040 <hexword@plt>
and    $0xf,%ebx
lea    0xebc(%rip),%rax
movsbl (%rbx,%rax,1),%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putc@plt>
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define void @hexword(i32 %0, i64 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32*
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%7 = load i64, i64* %5
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %22
9: ; preds = %3
%10 = load i32, i32* %4
%11 = lshr i32 %10, 4
%12 = load i64, i64* %5
%13 = add i64 %12, -1
store i64 %13, i64* %5
%14 = load i32*, i32** %6
%15 = load i32, i32* %4
%16 = and i32 %15, 15
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = load i32*, i32** %6
%21 = call i32 @putc(i8 signext %19, i32* %20)
br label %23
22: ; preds = %3
br label %23
23: ; preds = %22, %9
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define void @hexword(i32 %0, i64 %1, i32* nocapture %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %5, label %6
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = lshr i32 %0, 4
%8 = add i64 %1, -1
tail call void @hexword(i32 %7, i64 %8, i32* %2)
%9 = and i32 %0, 15
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = tail call i32 @putc(i8 signext %12, i32* %2)
br label %5
}
/* Variables and functions */
void *calloc(int, int);
int /*<<< orphan*/ mes_aux(int, char *, int);
void *ighmm_calloc(int bytes) {
  void *res;
  if (bytes <= 0)
    bytes = 1;
  res = calloc(1, bytes);
  if (res)
    return (res);
  else
    mes_aux((1 | 16 | 4), "calloc: could not allocate %d bytes\n", bytes);
  return (NULL);
}


x86 assembly (clang, -O0):
<ighmm_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     113c <ighmm_calloc+0x1c>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1165 <ighmm_calloc+0x45>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1181 <ighmm_calloc+0x61>
mov    -0xc(%rbp),%edx
mov    $0x15,%edi
lea    0xe8c(%rip),%rsi
call   1040 <mes_aux@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ighmm_calloc>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
test   %edi,%edi
mov    $0x1,%eax
cmovle %eax,%ebx
mov    $0x1,%edi
mov    %ebx,%esi
call   1030 <calloc@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1157 <ighmm_calloc+0x37>
lea    0xeb5(%rip),%rsi
mov    $0x15,%edi
mov    %ebx,%edx
call   1040 <mes_aux@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [37 x i8] c"calloc: could not allocate %d bytes\0A\00"
define i8* @ighmm_calloc(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %3
br label %8
8: ; preds = %7, %1
%9 = load i32, i32* %3
%10 = call i8* @calloc(i32 1, i32 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i8*, i8** %4
store i8* %14, i8** %2
br label %19
15: ; preds = %8
%16 = load i32, i32* %3
%17 = call i32 @mes_aux(i32 21, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15
store i8* null, i8** %2
br label %19
19: ; preds = %18, %13
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@.str = [37 x i8] c"calloc: could not allocate %d bytes\0A\00"
define noalias i8* @ighmm_calloc(i32 %0) {
%2 = icmp sgt i32 %0, 1
%3 = select i1 %2, i32 %0, i32 1
%4 = tail call i8* @calloc(i32 1, i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @mes_aux(i32 21, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %8
8: ; preds = %1, %6
ret i8* %4
}
/* Variables and functions */
scalar_t__ floor(double);
float floorf(float s) { return (float)floor((double)s); }


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

x86 assembly (clang, -O2):
<floorf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @floorf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @floor(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @floorf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @floor(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
int last_boot_show(struct seq_file *s) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.seq_file = type opaque
define i32 @last_boot_show(%struct.seq_file* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RTLD_LAZY;
int /*<<< orphan*/ dlopen(char *, int /*<<< orphan*/);
int main() {
  dlopen("a", RTLD_LAZY);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <dlopen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@RTLD_LAZY = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @RTLD_LAZY
%3 = call i32 @dlopen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@RTLD_LAZY = global i32 0
define i32 @main() {
%1 = load i32, i32* @RTLD_LAZY
%2 = tail call i32 @dlopen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
unsigned long uDMAErrorStatusGet(void) {
  return ((*((volatile unsigned long *)(0x400FF04C))));
}


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

x86 assembly (clang, -O2):
<uDMAErrorStatusGet>:
mov    0x400ff04c,%rax
40
ret

LLVM IR (-O0):
define i64 @uDMAErrorStatusGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074786380 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @uDMAErrorStatusGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074786380 to i64*)
ret i64 %1
}
/* Variables and functions */
size_t encrypt(unsigned char **, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ free(unsigned char *);
size_t get_secret_len() {
  unsigned char *ctext;
  size_t secretlen = encrypt(&ctext, NULL, 0);
  free(ctext);
  return secretlen;
}


x86 assembly (clang, -O0):
<get_secret_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <encrypt@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_secret_len>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <encrypt@plt>
mov    %rax,%rbx
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i64 @get_secret_len() {
%1 = alloca i8*
%2 = alloca i64
%3 = call i64 @encrypt(i8** %1, i32* null, i32 0)
store i64 %3, i64* %2
%4 = load i8*, i8** %1
%5 = call i32 @free(i8* %4)
%6 = load i64, i64* %2
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_secret_len() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = call i64 @encrypt(i8** %1, i32* null, i32 0)
%4 = load i8*, i8** %1
%5 = call i32 @free(i8* %4)
ret i64 %3
}
/* Variables and functions */
scalar_t__ char_is_in_set(char, char *);
char get_random_int(char, char);
char get_random_regular_char(void) {
  char c = get_random_int('a', 'z' + 1);
  while (char_is_in_set(c, "#'\""))
    c = get_random_int('!', '~' + 1);
  return c;
}


x86 assembly (clang, -O0):
<get_random_regular_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x61,%edi
mov    $0x7b,%esi
call   1030 <get_random_int@plt>
mov    %al,-0x1(%rbp)
lea    0xebf(%rip),%rsi
movsbl -0x1(%rbp),%edi
call   1040 <char_is_in_set@plt>
cmp    $0x0,%rax
je     116b <get_random_regular_char+0x4b>
mov    $0x21,%edi
mov    $0x7f,%esi
call   1030 <get_random_int@plt>
mov    %al,-0x1(%rbp)
jmp    113a <get_random_regular_char+0x1a>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_random_regular_char>:
push   %r14
push   %rbx
push   %rax
mov    $0x61,%edi
mov    $0x7b,%esi
call   1030 <get_random_int@plt>
mov    %eax,%ebx
movsbl %al,%edi
lea    0xec1(%rip),%rsi
call   1040 <char_is_in_set@plt>
test   %rax,%rax
je     1171 <get_random_regular_char+0x51>
lea    0xeb0(%rip),%r14
mov    $0x21,%edi
mov    $0x7f,%esi
call   1030 <get_random_int@plt>
mov    %eax,%ebx
movsbl %al,%edi
mov    %r14,%rsi
call   1040 <char_is_in_set@plt>
test   %rax,%rax
jne    1150 <get_random_regular_char+0x30>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"#'\22\00"
define signext i8 @get_random_regular_char() {
%1 = alloca i8
%2 = call signext i8 @get_random_int(i8 signext 97, i8 signext 123)
store i8 %2, i8* %1
br label %3
3: ; preds = %7, %0
%4 = load i8, i8* %1
%5 = call i64 @char_is_in_set(i8 signext %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call signext i8 @get_random_int(i8 signext 33, i8 signext 127)
store i8 %8, i8* %1
br label %3
9: ; preds = %3
%10 = load i8, i8* %1
ret i8 %10
}

LLVM IR (-O2):
@.str = [4 x i8] c"#'\22\00"
define signext i8 @get_random_regular_char() {
%1 = tail call signext i8 @get_random_int(i8 signext 97, i8 signext 123)
%2 = tail call i64 @char_is_in_set(i8 signext %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %0, %4
%5 = tail call signext i8 @get_random_int(i8 signext 33, i8 signext 127)
%6 = tail call i64 @char_is_in_set(i8 signext %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4, %0
%9 = phi i8 [ %1, %0 ], [ %5, %4 ]
ret i8 %9
}
/* Type definitions */
struct password_cache {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct password_cache *);
int /*<<< orphan*/ password_cache_cleanup(struct password_cache *);
void password_cache_delete(struct password_cache *p) {
  if (p) {
    password_cache_cleanup(p);
    free(p);
  }
}


x86 assembly (clang, -O0):
<password_cache_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <password_cache_delete+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <password_cache_cleanup@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<password_cache_delete>:
test   %rdi,%rdi
je     1137 <password_cache_delete+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <password_cache_cleanup@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.password_cache = type { i32 }
define void @password_cache_delete(%struct.password_cache* %0) {
%2 = alloca %struct.password_cache*
store %struct.password_cache* %0, %struct.password_cache** %2
%3 = load %struct.password_cache*, %struct.password_cache** %2
%4 = icmp ne %struct.password_cache* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load %struct.password_cache*, %struct.password_cache** %2
%7 = call i32 @password_cache_cleanup(%struct.password_cache* %6)
%8 = load %struct.password_cache*, %struct.password_cache** %2
%9 = call i32 @free(%struct.password_cache* %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.password_cache = type { i32 }
define void @password_cache_delete(%struct.password_cache* %0) {
%2 = icmp eq %struct.password_cache* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @password_cache_cleanup(%struct.password_cache* %0)
%5 = tail call i32 @free(%struct.password_cache* %0)
br label %6
6: ; preds = %3, %1
ret void
}
int gs_len(char *X) {
  int i = 0;
  while (i++, *X++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<gs_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <gs_len+0x35>
jmp    110f <gs_len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gs_len>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <gs_len+0x10>
ret

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

LLVM IR (-O2):
define i32 @gs_len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = phi i32 [ 0, %1 ], [ %5, %2 ]
%5 = add nuw nsw i32 %4, 1
%6 = getelementptr inbounds i8, i8* %3, i64 1
%7 = load i8, i8* %3
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %2
9: ; preds = %2
ret i32 %5
}
/* Type definitions */
struct benc_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ benc_int(struct benc_t *, int);
int /*<<< orphan*/ benc_str(struct benc_t *, char const *);
void benc_dict_kv_i(struct benc_t *b, const char *key, int val) {
  benc_str(b, key);
  benc_int(b, val);
}


x86 assembly (clang, -O0):
<benc_dict_kv_i>:
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
call   1030 <benc_str@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <benc_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<benc_dict_kv_i>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <benc_str@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <benc_int@plt>

LLVM IR (-O0):
%struct.benc_t = type { i32 }
define void @benc_dict_kv_i(%struct.benc_t* %0, i8* %1, i32 %2) {
%4 = alloca %struct.benc_t*
%5 = alloca i8*
%6 = alloca i32
store %struct.benc_t* %0, %struct.benc_t** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.benc_t*, %struct.benc_t** %4
%8 = load i8*, i8** %5
%9 = call i32 @benc_str(%struct.benc_t* %7, i8* %8)
%10 = load %struct.benc_t*, %struct.benc_t** %4
%11 = load i32, i32* %6
%12 = call i32 @benc_int(%struct.benc_t* %10, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.benc_t = type { i32 }
define void @benc_dict_kv_i(%struct.benc_t* %0, i8* %1, i32 %2) {
%4 = tail call i32 @benc_str(%struct.benc_t* %0, i8* %1)
%5 = tail call i32 @benc_int(%struct.benc_t* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *our_realloc(void *ptr, size_t size) {
  void *ret = realloc(ptr, size);
  if (!ret && size) {
    fprintf(stderr, ("%s: Out of memory!\n"), "getopt");
    exit(3);
  }
  return (ret);
}


x86 assembly (clang, -O0):
<our_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    118d <our_realloc+0x5d>
cmpq   $0x0,-0x10(%rbp)
je     118d <our_realloc+0x5d>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
lea    0xe89(%rip),%rsi
lea    0xe96(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<our_realloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <realloc@plt>
test   %rbx,%rbx
je     1143 <our_realloc+0x13>
test   %rax,%rax
je     1145 <our_realloc+0x15>
pop    %rbx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
lea    0xeb8(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"%s: Out of memory!\0A\00"
@.str.1 = [7 x i8] c"getopt\00"
define i8* @our_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %18, label %11
11: ; preds = %2
%12 = load i64, i64* %4
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @exit(i32 3)
unreachable
18: ; preds = %11, %2
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"%s: Out of memory!\0A\00"
@.str.1 = [7 x i8] c"getopt\00"
define noalias i8* @our_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
%5 = icmp ne i64 %1, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @exit(i32 3)
unreachable
11: ; preds = %2
ret i8* %3
}
void term_JitterMax(void) {}


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

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

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

LLVM IR (-O2):
define void @term_JitterMax() {
ret void
}