xunge/DecIR huggingface dataset:
int sleep1() {}


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

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

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

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

/* Variables and functions */
uint32_t USBDMAChannelStatus(uint32_t ui32Base, uint32_t ui32Channel) {
  ;
  ;
  return (
      (*((volatile uint32_t *)(ui32Base + 0x00000204 + (0x10 * ui32Channel)))) &
      0x00000100);
}


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

x86 assembly (clang, -O2):
<USBDMAChannelStatus>:
movslq %edi,%rcx
movslq %esi,%rdx
shl    $0x4,%rdx
mov    $0x100,%eax
and    0x204(%rcx,%rdx,1),%eax
ret

LLVM IR (-O0):
define i32 @USBDMAChannelStatus(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 = add nsw i32 %5, 516
%7 = load i32, i32* %4
%8 = mul nsw i32 16, %7
%9 = add nsw i32 %6, %8
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = and i32 %12, 256
ret i32 %13
}

LLVM IR (-O2):
define i32 @USBDMAChannelStatus(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 516
%4 = shl nsw i32 %1, 4
%5 = add nsw i32 %3, %4
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, 256
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ get_console_last();
int /*<<< orphan*/ set_console(int /*<<< orphan*/);
void set_console_last(void) { set_console(get_console_last()); }


x86 assembly (clang, -O0):
<set_console_last>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_console_last@plt>
mov    %eax,%edi
call   1040 <set_console@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_console_last>:
push   %rax
xor    %eax,%eax
call   1030 <get_console_last@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <set_console@plt>

LLVM IR (-O0):
define void @set_console_last() {
%1 = call i32 (...) @get_console_last()
%2 = call i32 @set_console(i32 %1)
ret void
}

LLVM IR (-O2):
define void @set_console_last() {
%1 = tail call i32 (...) @get_console_last()
%2 = tail call i32 @set_console(i32 %1)
ret void
}
/* Variables and functions */
unsigned long ROTR(unsigned long, int);
unsigned long SHR(unsigned long, int);
unsigned long int S0(unsigned long int x) {
  return (ROTR(x, 7) ^ ROTR(x, 18) ^ SHR(x, 3));
}


x86 assembly (clang, -O0):
<S0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x7,%esi
call   1030 <ROTR@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x12,%esi
call   1030 <ROTR@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
xor    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1040 <SHR@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
xor    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S0>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    $0x7,%esi
call   1030 <ROTR@plt>
mov    %rax,%r14
mov    %r15,%rdi
mov    $0x12,%esi
call   1030 <ROTR@plt>
mov    %rax,%rbx
xor    %r14,%rbx
mov    %r15,%rdi
mov    $0x3,%esi
call   1040 <SHR@plt>
xor    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @S0(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @ROTR(i64 %3, i32 7)
%5 = load i64, i64* %2
%6 = call i64 @ROTR(i64 %5, i32 18)
%7 = xor i64 %4, %6
%8 = load i64, i64* %2
%9 = call i64 @SHR(i64 %8, i32 3)
%10 = xor i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @S0(i64 %0) {
%2 = tail call i64 @ROTR(i64 %0, i32 7)
%3 = tail call i64 @ROTR(i64 %0, i32 18)
%4 = xor i64 %3, %2
%5 = tail call i64 @SHR(i64 %0, i32 3)
%6 = xor i64 %4, %5
ret i64 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

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

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


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

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

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

LLVM IR (-O2):
define i32 @get_XClientMessageEvent_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void CSQC_Shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @CSQC_Shutdown() {
ret void
}
void finn_vec3_mul_vec3(float *result, float *lhs, float *rhs) {
  result[0] = lhs[0] * rhs[0];
  result[1] = lhs[1] * rhs[1];
  result[2] = lhs[2] * rhs[2];
}


x86 assembly (clang, -O0):
<finn_vec3_mul_vec3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<finn_vec3_mul_vec3>:
movss  (%rsi),%xmm0
mulss  (%rdx),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
mulss  0x4(%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
mulss  0x8(%rdx),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @finn_vec3_mul_vec3(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %6
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fmul float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fmul float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %5
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fmul float %27, %30
%32 = load float*, float** %4
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
ret void
}

LLVM IR (-O2):
define void @finn_vec3_mul_vec3(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fmul float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fmul float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %2, i64 2
%16 = load float, float* %15
%17 = fmul float %14, %16
%18 = getelementptr inbounds float, float* %0, i64 2
store float %17, float* %18
ret void
}
double signx(double x) {
  double sgn;
  if (x >= 0.) {
    sgn = 1.0;
  } else {
    sgn = -1.0;
  }
  return sgn;
}


x86 assembly (clang, -O0):
<signx>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112d <signx+0x2d>
movsd  0xee5(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113a <signx+0x3a>
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<signx>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setb   %al
lea    0xeec(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @signx(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 1.000000e+00, double* %3
br label %8
7: ; preds = %1
store double -1.000000e+00, double* %3
br label %8
8: ; preds = %7, %6
%9 = load double, double* %3
ret double %9
}

LLVM IR (-O2):
define double @signx(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
%3 = select i1 %2, double -1.000000e+00, double 1.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ OPER_AY_IX_16();
int /*<<< orphan*/ m68ki_set_ccr(int /*<<< orphan*/);
void m68k_op_move_16_toc_ix(void) { m68ki_set_ccr(OPER_AY_IX_16()); }


x86 assembly (clang, -O0):
<m68k_op_move_16_toc_ix>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <OPER_AY_IX_16@plt>
mov    %eax,%edi
call   1030 <m68ki_set_ccr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_move_16_toc_ix>:
push   %rax
xor    %eax,%eax
call   1040 <OPER_AY_IX_16@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <m68ki_set_ccr@plt>

LLVM IR (-O0):
define void @m68k_op_move_16_toc_ix() {
%1 = call i32 (...) @OPER_AY_IX_16()
%2 = call i32 @m68ki_set_ccr(i32 %1)
ret void
}

LLVM IR (-O2):
define void @m68k_op_move_16_toc_ix() {
%1 = tail call i32 (...) @OPER_AY_IX_16()
%2 = tail call i32 @m68ki_set_ccr(i32 %1)
ret void
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TCSETS;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, void *);
int tcsetattr(int fd, int optional_actions __attribute__((unused)),
              const struct termios *termios_p) {
  ioctl(fd, TCSETS, (void *)termios_p);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.termios = type { i32 }
@TCSETS = global i32 0
define i32 @tcsetattr(i32 %0, i32 %1, %struct.termios* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.termios*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.termios* %2, %struct.termios** %6
%7 = load i32, i32* %4
%8 = load i32, i32* @TCSETS
%9 = load %struct.termios*, %struct.termios** %6
%10 = bitcast %struct.termios* %9 to i8*
%11 = call i32 @ioctl(i32 %7, i32 %8, i8* %10)
ret i32 0
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@TCSETS = global i32 0
define i32 @tcsetattr(i32 %0, i32 %1, %struct.termios* %2) {
%4 = load i32, i32* @TCSETS
%5 = bitcast %struct.termios* %2 to i8*
%6 = tail call i32 @ioctl(i32 %0, i32 %4, i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_short_lun_info_header(void) {
  printf("    LUN ID  Device Name   Capacity   "
         "Block Size  Description\n");
  printf("    ------  -----------  ----------  ----------  "
         "----------------------------\n");
}


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

x86 assembly (clang, -O2):
<show_short_lun_info_header>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf19(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [62 x i8] c" LUN ID Device Name Capacity Block Size Description\0A\00"
@.str.1 = [79 x i8] c" ------ ----------- ---------- ---------- ----------------------------\0A\00"
define void @show_short_lun_info_header() {
%1 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [61 x i8] c" LUN ID Device Name Capacity Block Size Description\00"
@str.2 = [78 x i8] c" ------ ----------- ---------- ---------- ----------------------------\00"
define void @show_short_lun_info_header() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ mqd_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
                   unsigned int *msg_prio) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<mq_receive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mq_receive>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @mq_receive(i32 %0, i8* %1, i64 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i32, i32* @ENOSYS
%10 = call i32 @__set_errno(i32 %9)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @mq_receive(i32 %0, i8* nocapture readnone %1, i64 %2, i32* nocapture readnone %3) {
%5 = load i32, i32* @ENOSYS
%6 = tail call i32 @__set_errno(i32 %5)
ret i32 -1
}
int trace_init(const char *logdir) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @trace_init(i8* nocapture readnone %0) {
ret i32 0
}
int simulated_while_with_and(int p) {
  int i = 0;
  int k = 0;
LOOP_COND:
  if (k == 0 && i < p) {
    goto INCR;
  } else {
    goto RETURN;
  }
INCR:
  i++;
  goto LOOP_COND;
RETURN:
  return i;
}


x86 assembly (clang, -O0):
<simulated_while_with_and>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1130 <simulated_while_with_and+0x30>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1130 <simulated_while_with_and+0x30>
jmp    1135 <simulated_while_with_and+0x35>
jmp    1143 <simulated_while_with_and+0x43>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <simulated_while_with_and+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<simulated_while_with_and>:
xor    %eax,%eax
test   %edi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @simulated_while_with_and(i32 %0) {
%2 = call i32 @llvm.smax.i32(i32 %0, i32 0)
ret i32 %2
}
double interpolate(double x, double x1, double y1, double x2, double y2) {
  return (x - x1) * (y2 - y1) / (x2 - x1) + y1;
}


x86 assembly (clang, -O0):
<interpolate>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolate>:
subsd  %xmm1,%xmm0
subsd  %xmm2,%xmm4
mulsd  %xmm4,%xmm0
subsd  %xmm1,%xmm3
divsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @interpolate(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %6
%12 = load double, double* %7
%13 = fsub double %11, %12
%14 = load double, double* %10
%15 = load double, double* %8
%16 = fsub double %14, %15
%17 = fmul double %13, %16
%18 = load double, double* %9
%19 = load double, double* %7
%20 = fsub double %18, %19
%21 = fdiv double %17, %20
%22 = load double, double* %8
%23 = fadd double %21, %22
ret double %23
}

LLVM IR (-O2):
define double @interpolate(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %0, %1
%7 = fsub double %4, %2
%8 = fmul double %6, %7
%9 = fsub double %3, %1
%10 = fdiv double %8, %9
%11 = fadd double %10, %2
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_string(int, char const *);
void print_debug(const char *str) { __console_tx_string(7, str); }


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

x86 assembly (clang, -O2):
<print_debug>:
mov    %rdi,%rsi
mov    $0x7,%edi
jmp    1030 <__console_tx_string@plt>

LLVM IR (-O0):
define void @print_debug(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @__console_tx_string(i32 7, i8* %3)
ret void
}

LLVM IR (-O2):
define void @print_debug(i8* %0) {
%2 = tail call i32 @__console_tx_string(i32 7, i8* %0)
ret void
}
/* Type definitions */
struct timeval {
  int /*<<< orphan*/ tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  struct timeval t;
  gettimeofday(&t, NULL);
  printf("%ld %ld\n", t.tv_sec, t.tv_usec);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    (%rsp),%edx
mov    0x4(%rsp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@.str = [9 x i8] c"%ld %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval
store i32 0, i32* %1
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@.str = [9 x i8] c"%ld %ld\0A\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}
int drv_common_close(void *drv) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @drv_common_close(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ level_jump_to_next_stage();
int /*<<< orphan*/ quest_abort();
void level_pop_quest() {
  quest_abort();
  level_jump_to_next_stage();
}


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

x86 assembly (clang, -O2):
<level_pop_quest>:
push   %rax
xor    %eax,%eax
call   1040 <quest_abort@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <level_jump_to_next_stage@plt>

LLVM IR (-O0):
define void @level_pop_quest() {
%1 = call i32 (...) @quest_abort()
%2 = call i32 (...) @level_jump_to_next_stage()
ret void
}

LLVM IR (-O2):
define void @level_pop_quest() {
%1 = tail call i32 (...) @quest_abort()
%2 = tail call i32 (...) @level_jump_to_next_stage()
ret void
}
int safechar(char x) { return (x != '"' && x != '\\'); }


x86 assembly (clang, -O0):
<safechar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x22,%ecx
mov    %al,-0x2(%rbp)
je     1129 <safechar+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x5c,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<safechar>:
cmp    $0x22,%dil
setne  %al
cmp    $0x5c,%dil
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @safechar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 34
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 92
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @safechar(i8 signext %0) {
%2 = icmp ne i8 %0, 34
%3 = icmp ne i8 %0, 92
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void V_neg_pin_Sleep(void) {}


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

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

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

LLVM IR (-O2):
define void @V_neg_pin_Sleep() {
ret void
}
int tegra_smmu_save(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_smmu_save() {
ret i32 0
}
int DoObjGroup(char *s) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @DoObjGroup(i8* nocapture readnone %0) {
ret i32 2
}
void main() {
  int i, j, k;
  int sum = 0;
  for (i = 0; i < 5; ++i) {
    for (j = 0; j < 9; ++j) {
      for (k = 0; k < 8; ++k) {
        sum += i + j + k;
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1181 <main+0x81>
movl   $0x0,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jge    116e <main+0x6e>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    115b <main+0x5b>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <main+0x34>
jmp    1160 <main+0x60>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1123 <main+0x23>
jmp    1173 <main+0x73>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <main+0x12>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cblas_saxpy(int const, float const, float const *, int const,
                               float *, int const);
void c_saxpy(const int N, const float alpha, const float *X, const int strideX,
             float *Y, const int strideY) {
  cblas_saxpy(N, alpha, X, strideX, Y, strideY);
}


x86 assembly (clang, -O0):
<c_saxpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
movss  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <cblas_saxpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_saxpy>:
jmp    1030 <cblas_saxpy@plt>

LLVM IR (-O0):
define void @c_saxpy(i32 %0, float %1, float* %2, i32 %3, float* %4, i32 %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float*
%10 = alloca i32
%11 = alloca float*
%12 = alloca i32
store i32 %0, i32* %7
store float %1, float* %8
store float* %2, float** %9
store i32 %3, i32* %10
store float* %4, float** %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load float, float* %8
%15 = load float*, float** %9
%16 = load i32, i32* %10
%17 = load float*, float** %11
%18 = load i32, i32* %12
%19 = call i32 @cblas_saxpy(i32 %13, float %14, float* %15, i32 %16, float* %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @c_saxpy(i32 %0, float %1, float* %2, i32 %3, float* %4, i32 %5) {
%7 = tail call i32 @cblas_saxpy(i32 %0, float %1, float* %2, i32 %3, float* %4, i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ vprintf(char const *, int /*<<< orphan*/);
void hge_valarm(const unsigned int value, const char *expr, const char *format,
                va_list args) {
  if (!value) {
    vprintf(format, args);
    printf("\n%s\n", expr);
  }
}


x86 assembly (clang, -O0):
<hge_valarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    115c <hge_valarm+0x3c>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <vprintf@plt>
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hge_valarm>:
test   %edi,%edi
je     1125 <hge_valarm+0x5>
ret
push   %rbx
mov    %rsi,%rbx
mov    %rdx,%rdi
mov    %ecx,%esi
call   1040 <vprintf@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%s\0A\00"
define void @hge_valarm(i32 %0, i8* %1, i8* nocapture %2, i32 %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = tail call i32 @vprintf(i8* %2, i32 %3)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %9
9: ; preds = %6, %4
ret void
}
char *OpenMPString(void) { return (""); }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @OpenMPString() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @OpenMPString() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct pevent {
  int dummy;
};
struct event_format {
  int dummy;
};

/* Variables and functions */
struct event_format *pevent_find_event(struct pevent *, int);
struct event_format *pevent_data_event_from_type(struct pevent *pevent,
                                                 int type) {
  return pevent_find_event(pevent, type);
}


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

x86 assembly (clang, -O2):
<pevent_data_event_from_type>:
jmp    1030 <pevent_find_event@plt>

LLVM IR (-O0):
%struct.event_format = type { i32 }
%struct.pevent = type { i32 }
define %struct.event_format* @pevent_data_event_from_type(%struct.pevent* %0, i32 %1) {
%3 = alloca %struct.pevent*
%4 = alloca i32
store %struct.pevent* %0, %struct.pevent** %3
store i32 %1, i32* %4
%5 = load %struct.pevent*, %struct.pevent** %3
%6 = load i32, i32* %4
%7 = call %struct.event_format* @pevent_find_event(%struct.pevent* %5, i32 %6)
ret %struct.event_format* %7
}

LLVM IR (-O2):
%struct.event_format = type { i32 }
%struct.pevent = type { i32 }
define %struct.event_format* @pevent_data_event_from_type(%struct.pevent* %0, i32 %1) {
%3 = tail call %struct.event_format* @pevent_find_event(%struct.pevent* %0, i32 %1)
ret %struct.event_format* %3
}
/* Type definitions */
struct bit_map_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct bit_map_t *);
void bit_map_free(struct bit_map_t *bit_map) { free(bit_map); }


x86 assembly (clang, -O0):
<bit_map_free>:
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):
<bit_map_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.bit_map_t = type { i32 }
define void @bit_map_free(%struct.bit_map_t* nocapture %0) {
%2 = tail call i32 @free(%struct.bit_map_t* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p224_mul(uintptr_t, uintptr_t, uintptr_t);
void fiat_p224_mul(uint32_t out1[7], const uint32_t arg1[7],
                   const uint32_t arg2[7]) {
  internal_fiat_p224_mul((uintptr_t)out1, (uintptr_t)arg1, (uintptr_t)arg2);
}


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

x86 assembly (clang, -O2):
<fiat_p224_mul>:
jmp    1030 <internal_fiat_p224_mul@plt>

LLVM IR (-O0):
define void @fiat_p224_mul(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 = ptrtoint i32* %7 to i64
%9 = load i32*, i32** %5
%10 = ptrtoint i32* %9 to i64
%11 = load i32*, i32** %6
%12 = ptrtoint i32* %11 to i64
%13 = call i32 @internal_fiat_p224_mul(i64 %8, i64 %10, i64 %12)
ret void
}

LLVM IR (-O2):
define void @fiat_p224_mul(i32* %0, i32* %1, i32* %2) {
%4 = ptrtoint i32* %0 to i64
%5 = ptrtoint i32* %1 to i64
%6 = ptrtoint i32* %2 to i64
%7 = tail call i32 @internal_fiat_p224_mul(i64 %4, i64 %5, i64 %6)
ret void
}
double dhubble_da(double a) { return 0; }


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

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

LLVM IR (-O0):
define double @dhubble_da(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @dhubble_da(double %0) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *Realloc(void *origptr, size_t newsize) {
  void *ptr = realloc(origptr, newsize);
  if (ptr == NULL && newsize > 0) {
    do {
      fprintf(stderr, "csv"
                      ": "
                      "out of memory\n");
      exit(10);
    } while (0);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<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    118b <Realloc+0x5b>
cmpq   $0x0,-0x10(%rbp)
jbe    118b <Realloc+0x5b>
jmp    116c <Realloc+0x3c>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
lea    0xe84(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xa,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"csv: out of memory\0A\00"
define i8* @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 eq i8* %9, null
br i1 %10, label %11, label %20
11: ; preds = %2
%12 = load i64, i64* %4
%13 = icmp ugt i64 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %11
br label %15
15: ; preds = %14
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @exit(i32 10)
unreachable
19: ; No predecessors!
br label %20
20: ; preds = %19, %11, %2
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"csv: out of memory\0A\00"
define noalias i8* @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))
%10 = tail call i32 @exit(i32 10)
unreachable
11: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
__attribute__((always_)) uint16_t B_SWAP16(uint16_t s) {
  return (s >> 8) | (s << 8);
}


x86 assembly (clang, -O0):
<B_SWAP16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<B_SWAP16>:
mov    %edi,%eax
sar    $0x8,%eax
shl    $0x8,%edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @B_SWAP16(i32 %0) {
%2 = ashr i32 %0, 8
%3 = shl i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
void write_four_chars(unsigned char *head, const unsigned char *match) {
  head[0] = match[0];
  head[1] = match[1];
  head[2] = match[2];
  head[3] = match[3];
}


x86 assembly (clang, -O0):
<write_four_chars>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_four_chars>:
mov    (%rsi),%al
mov    %al,(%rdi)
mov    0x1(%rsi),%al
mov    %al,0x1(%rdi)
mov    0x2(%rsi),%al
mov    %al,0x2(%rdi)
mov    0x3(%rsi),%al
mov    %al,0x3(%rdi)
ret

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

LLVM IR (-O2):
define void @write_four_chars(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = getelementptr inbounds i8, i8* %1, i64 1
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = getelementptr inbounds i8, i8* %1, i64 2
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = getelementptr inbounds i8, i8* %1, i64 3
%11 = load i8, i8* %10
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gdb_handle_exception(int);
void handle_exception(int exceptionVector) {
  gdb_handle_exception(exceptionVector);
}


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

x86 assembly (clang, -O2):
<handle_exception>:
jmp    1030 <gdb_handle_exception@plt>

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

LLVM IR (-O2):
define void @handle_exception(i32 %0) {
%2 = tail call i32 @gdb_handle_exception(i32 %0)
ret void
}
int ld_eq_rr1(long double a1, long double a2) { return (((a1) == (a2))); }


x86 assembly (clang, -O0):
<ld_eq_rr1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %cl
sete   %al
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_eq_rr1>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fucomip %st(1),%st
fstp   %st(0)
setnp  %al
sete   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ld_eq_rr1(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp oeq x86_fp80 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ld_eq_rr1(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp oeq x86_fp80 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int test_imm_05int16_reg(short val) {
  return ((val) & (0x05 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_05int16_reg>:
test   $0x5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_05int16_reg(i16 signext %0) {
%2 = and i16 %0, 5
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void gdk_window_show_unraised() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_show_unraised() {
ret void
}
void security_task_to_inode(struct task_struct *p, struct inode *inode) {}


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

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

LLVM IR (-O0):
%struct.task_struct = type opaque
%struct.inode = type opaque
define void @security_task_to_inode(%struct.task_struct* %0, %struct.inode* %1) {
%3 = alloca %struct.task_struct*
%4 = alloca %struct.inode*
store %struct.task_struct* %0, %struct.task_struct** %3
store %struct.inode* %1, %struct.inode** %4
ret void
}

LLVM IR (-O2):
%struct.task_struct = type opaque
%struct.inode = type opaque
define void @security_task_to_inode(%struct.task_struct* nocapture %0, %struct.inode* nocapture %1) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t hex_char(uint8_t c) {
  return ((c < 10) ? ('0' + c) : ('a' + (c - 10)));
}


x86 assembly (clang, -O0):
<hex_char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    111f <hex_char+0x1f>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <hex_char+0x2b>
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_char>:
lea    0x57(%rdi),%ecx
lea    0x30(%rdi),%eax
cmp    $0xa,%edi
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hex_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add nsw i32 48, %6
br label %12
8: ; preds = %1
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 10
%11 = add nsw i32 97, %10
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ %7, %5 ], [ %11, %8 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @hex_char(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = select i1 %2, i32 48, i32 87
%4 = add nsw i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ japi_getpos(int, int *, int *);
void j_getpos(int arg0, int *arg1, int *arg2) { japi_getpos(arg0, arg1, arg2); }


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

x86 assembly (clang, -O2):
<j_getpos>:
jmp    1030 <japi_getpos@plt>

LLVM IR (-O0):
define void @j_getpos(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 @japi_getpos(i32 %7, i32* %8, i32* %9)
ret void
}

LLVM IR (-O2):
define void @j_getpos(i32 %0, i32* %1, i32* %2) {
%4 = tail call i32 @japi_getpos(i32 %0, i32* %1, i32* %2)
ret void
}
double Sleef_fdim(double x, double y) { return __builtin_fdim(x, y); }


x86 assembly (clang, -O0):
<Sleef_fdim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <fdim@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sleef_fdim>:
jmp    1030 <fdim@plt>

LLVM IR (-O0):
define double @Sleef_fdim(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 double @fdim(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @Sleef_fdim(double %0, double %1) {
%3 = tail call double @fdim(double %0, double %1)
ret double %3
}