xunge/DecIR huggingface dataset:
int test_imm_B6int64_lowword_mem(long long *val) {
  return ((*val) & (0xB6 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_B6int64_lowword_mem>:
testb  $0xb6,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B6int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 182
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void GPIOPortJ_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<GPIOPortJ_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <GPIOPortJ_Handler+0x9>
jmp    1109 <GPIOPortJ_Handler+0x9>

x86 assembly (clang, -O2):
<GPIOPortJ_Handler>:
jmp    1100 <GPIOPortJ_Handler>

LLVM IR (-O0):
define void @GPIOPortJ_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @GPIOPortJ_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
struct _Locale_time {
  int dummy;
};

/* Variables and functions */
const char *_Locale_d_t_fmt(struct _Locale_time *ltime) { return "%m/%d/%y"; }


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

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

LLVM IR (-O0):
%struct._Locale_time = type { i32 }
@.str = [9 x i8] c"%m/%d/%y\00"
define i8* @_Locale_d_t_fmt(%struct._Locale_time* %0) {
%2 = alloca %struct._Locale_time*
store %struct._Locale_time* %0, %struct._Locale_time** %2
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct._Locale_time = type { i32 }
@.str = [9 x i8] c"%m/%d/%y\00"
define i8* @_Locale_d_t_fmt(%struct._Locale_time* nocapture readnone %0) {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void imprimirMenu() {
  printf("Bienvenidos al sistema de facturación\n"
         "1-Alta de carga principal\n"
         "2-Agregar una factura nueva\n"
         "3-Buscar una factura\n"
         "4-Imprimir factura\n"
         "4-Operaciones sobre las facturas\n"
         "0-Salir");
}


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

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

LLVM IR (-O0):
@.str = [174 x i8] c"Bienvenidos al sistema de facturaci\C3\B3n\0A1-Alta de carga principal\0A2-Agregar una factura nueva\0A3-Buscar una factura\0A4-Imprimir factura\0A4-Operaciones sobre las facturas\0A0-Salir\00"
define void @imprimirMenu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [174 x i8] c"Bienvenidos al sistema de facturaci\C3\B3n\0A1-Alta de carga principal\0A2-Agregar una factura nueva\0A3-Buscar una factura\0A4-Imprimir factura\0A4-Operaciones sobre las facturas\0A0-Salir\00"
define void @imprimirMenu() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_DAint16_mem(short *val) {
  return ((*val) & (-0xDA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DAint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff26,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_DAint16_mem>:
movzwl (%rdi),%eax
test   $0xff26,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_DAint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -218
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void RomOpen() {}


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

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

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

LLVM IR (-O2):
define void @RomOpen() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int do_printf(char *, char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int vsprintf(char *str, const char *format, va_list ap) {
  return do_printf(str, format, ap, 0);
}


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

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

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

LLVM IR (-O2):
define i32 @vsprintf(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @do_printf(i8* %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ mcp2515_spi_select();
int /*<<< orphan*/ mcp2515_spi_transfer(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ mcp2515_spi_unselect();
void mcp2515_bit_modify(uint8_t regAddr, uint8_t bitMask, uint8_t val) {
  mcp2515_spi_select();
  mcp2515_spi_transfer(0x05, NULL);
  mcp2515_spi_transfer(regAddr, NULL);
  mcp2515_spi_transfer(bitMask, NULL);
  mcp2515_spi_transfer(val, NULL);
  mcp2515_spi_unselect();
}


x86 assembly (clang, -O0):
<mcp2515_bit_modify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1030 <mcp2515_spi_select@plt>
mov    $0x5,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    -0x8(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    -0xc(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    $0x0,%al
call   1050 <mcp2515_spi_unselect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcp2515_bit_modify>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <mcp2515_spi_select@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    %r14d,%edi
xor    %esi,%esi
call   1040 <mcp2515_spi_transfer@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <mcp2515_spi_unselect@plt>

LLVM IR (-O0):
define void @mcp2515_bit_modify(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 = call i32 (...) @mcp2515_spi_select()
%8 = call i32 @mcp2515_spi_transfer(i32 5, i32* null)
%9 = load i32, i32* %4
%10 = call i32 @mcp2515_spi_transfer(i32 %9, i32* null)
%11 = load i32, i32* %5
%12 = call i32 @mcp2515_spi_transfer(i32 %11, i32* null)
%13 = load i32, i32* %6
%14 = call i32 @mcp2515_spi_transfer(i32 %13, i32* null)
%15 = call i32 (...) @mcp2515_spi_unselect()
ret void
}

LLVM IR (-O2):
define void @mcp2515_bit_modify(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @mcp2515_spi_select()
%5 = tail call i32 @mcp2515_spi_transfer(i32 5, i32* null)
%6 = tail call i32 @mcp2515_spi_transfer(i32 %0, i32* null)
%7 = tail call i32 @mcp2515_spi_transfer(i32 %1, i32* null)
%8 = tail call i32 @mcp2515_spi_transfer(i32 %2, i32* null)
%9 = tail call i32 (...) @mcp2515_spi_unselect()
ret void
}
int get_number() { return 4; }


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

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

LLVM IR (-O0):
define i32 @get_number() {
ret i32 4
}

LLVM IR (-O2):
define i32 @get_number() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ __wfi();
void idle(void) {
  while (1)
    __wfi();
}


x86 assembly (clang, -O0):
<idle>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <idle+0x9>
mov    $0x0,%al
call   1030 <__wfi@plt>
jmp    1119 <idle+0x9>

x86 assembly (clang, -O2):
<idle>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__wfi@plt>
jmp    1120 <idle+0x10>

LLVM IR (-O0):
define void @idle() {
br label %1
1: ; preds = %0, %1
%2 = call i32 (...) @__wfi()
br label %1
}

LLVM IR (-O2):
define void @idle() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @__wfi()
br label %1
}
double form_volume(double length_a, double b2a_ratio, double c2a_ratio) {
  const double length_b = length_a * b2a_ratio;
  const double length_c = length_a * c2a_ratio;
  const double form_volume = length_a * length_b * length_c;
  return form_volume;
}


x86 assembly (clang, -O0):
<form_volume>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<form_volume>:
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define double @form_volume(double %0, double %1, double %2) {
%4 = fmul double %0, %1
%5 = fmul double %0, %2
%6 = fmul double %4, %0
%7 = fmul double %6, %5
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ resetFlag(int);
int /*<<< orphan*/ setFlag(int);
unsigned char swap(unsigned char value) {
  value = ((value & 0xf) << 4) | ((value & 0xf0) >> 4);
  if (value == 0)
    setFlag(7);
  else
    resetFlag(7);
  resetFlag(6);
  resetFlag(5);
  resetFlag(4);
  return value;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
shl    $0x4,%eax
movzbl -0x1(%rbp),%ecx
and    $0xf0,%ecx
sar    $0x4,%ecx
or     %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jne    1166 <swap+0x46>
mov    $0x7,%edi
call   1030 <setFlag@plt>
jmp    1170 <swap+0x50>
mov    $0x7,%edi
call   1040 <resetFlag@plt>
mov    $0x6,%edi
call   1040 <resetFlag@plt>
mov    $0x5,%edi
call   1040 <resetFlag@plt>
mov    $0x4,%edi
call   1040 <resetFlag@plt>
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
je     1133 <swap+0x13>
mov    $0x7,%edi
call   1040 <resetFlag@plt>
jmp    113d <swap+0x1d>
mov    $0x7,%edi
call   1030 <setFlag@plt>
rol    $0x4,%bl
mov    $0x6,%edi
call   1040 <resetFlag@plt>
mov    $0x5,%edi
call   1040 <resetFlag@plt>
mov    $0x4,%edi
call   1040 <resetFlag@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @swap(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 15
%6 = shl i32 %5, 4
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = and i32 %8, 240
%10 = ashr i32 %9, 4
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
%13 = load i8, i8* %2
%14 = zext i8 %13 to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %1
%17 = call i32 @setFlag(i32 7)
br label %20
18: ; preds = %1
%19 = call i32 @resetFlag(i32 7)
br label %20
20: ; preds = %18, %16
%21 = call i32 @resetFlag(i32 6)
%22 = call i32 @resetFlag(i32 5)
%23 = call i32 @resetFlag(i32 4)
%24 = load i8, i8* %2
ret i8 %24
}

LLVM IR (-O2):
define zeroext i8 @swap(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @setFlag(i32 7)
br label %7
5: ; preds = %1
%6 = tail call i32 @resetFlag(i32 7)
br label %7
7: ; preds = %5, %3
%8 = tail call i8 @llvm.fshl.i8(i8 %0, i8 %0, i8 4)
%9 = tail call i32 @resetFlag(i32 6)
%10 = tail call i32 @resetFlag(i32 5)
%11 = tail call i32 @resetFlag(i32 4)
ret i8 %8
}
void XtIsSessionShell() {}


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

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

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

LLVM IR (-O2):
define void @XtIsSessionShell() {
ret void
}
/* Variables and functions */
int dsfmt_get_min_array_size();
int get_min_array_size(void) { return dsfmt_get_min_array_size(); }


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

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

LLVM IR (-O0):
define i32 @get_min_array_size() {
%1 = call i32 (...) @dsfmt_get_min_array_size()
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_min_array_size() {
%1 = tail call i32 (...) @dsfmt_get_min_array_size()
ret i32 %1
}
int test_imm_D2uint8_mem(unsigned char *val) {
  return ((*val) & (-0xD2 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D2uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff2e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D2uint8_mem>:
testb  $0x2e,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D2uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 46
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
AR0AX1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (p0[10000000]) = (((int *)11111111)[x1]); }


x86 assembly (clang, -O0):
<AR0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movslq -0x14(%rbp),%rcx
mov    $0xa98ac7,%eax
mov    (%rax,%rcx,4),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,0x2625a00(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0AX1>:
movslq %ecx,%rax
mov    0xa98ac7(,%rax,4),%eax
mov    %eax,0x2625a00(%r8)
ret

LLVM IR (-O0):
define i32 @AR0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* %11
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %12
%19 = getelementptr inbounds i32, i32* %18, i64 10000000
store i32 %17, i32* %19
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @AR0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture writeonly %4, i32* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %7
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %4, i64 10000000
store i32 %9, i32* %10
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ PAPI_shutdown();
void papif_shutdown_(void) { PAPI_shutdown(); }


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

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

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

LLVM IR (-O2):
define void @papif_shutdown_() {
%1 = tail call i32 (...) @PAPI_shutdown()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void thread_delay() { exit(1); }


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

x86 assembly (clang, -O2):
<thread_delay>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @thread_delay() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @thread_delay() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ td_thrhandle_t;
typedef int /*<<< orphan*/ td_thragent_t;
typedef int /*<<< orphan*/ td_err_e;
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ TD_OK;
td_err_e td_ta_map_id2thr(const td_thragent_t *ta, pthread_t pt,
                          td_thrhandle_t *th) {
  return TD_OK;
}


x86 assembly (clang, -O0):
<td_ta_map_id2thr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<td_ta_map_id2thr>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@TD_OK = global i32 0
define i32 @td_ta_map_id2thr(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* @TD_OK
ret i32 %7
}

LLVM IR (-O2):
@TD_OK = global i32 0
define i32 @td_ta_map_id2thr(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @TD_OK
ret i32 %4
}
/* Variables and functions */
double exp(double);
double rq_pricing_norm_dist(double z) {
  return 0.39894228040143 * exp(-(z * z) / 2.0);
}


x86 assembly (clang, -O0):
<rq_pricing_norm_dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xec2(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xea6(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_pricing_norm_dist>:
push   %rax
mulsd  %xmm0,%xmm0
mulsd  0xee3(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rq_pricing_norm_dist(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = fneg double %5
%7 = fdiv double %6, 2.000000e+00
%8 = call double @exp(double %7)
%9 = fmul double 0x3FD9884533D43620, %8
ret double %9
}

LLVM IR (-O2):
define double @rq_pricing_norm_dist(double %0) {
%2 = fneg double %0
%3 = fmul double %2, %0
%4 = fmul double %3, 5.000000e-01
%5 = tail call double @exp(double %4)
%6 = fmul double %5, 0x3FD9884533D43620
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;

/* Variables and functions */
int /*<<< orphan*/ EVP_MD_CTX_cleanup(int /*<<< orphan*/ *);
int /*<<< orphan*/ OPENSSL_free(int /*<<< orphan*/ *);
void EVP_MD_CTX_free(EVP_MD_CTX *ctx) {
  if (ctx != NULL) {
    EVP_MD_CTX_cleanup(ctx);
    OPENSSL_free(ctx);
  }
}


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

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

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

LLVM IR (-O2):
define void @EVP_MD_CTX_free(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @EVP_MD_CTX_cleanup(i32* %0)
%5 = tail call i32 @OPENSSL_free(i32* %0)
br label %6
6: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int __infer_nondet_int();
int __iswcsymf(wint_t wc) { return __infer_nondet_int(); }


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

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

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

LLVM IR (-O2):
define i32 @__iswcsymf(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void adapter_name(int adap, char *adapter_name, int len) {
  snprintf(adapter_name, len, "/dev/dvb/adapter%d", adap);
}


x86 assembly (clang, -O0):
<adapter_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x4(%rbp),%ecx
lea    0xecd(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adapter_name>:
mov    %edi,%ecx
lea    0xee7(%rip),%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"/dev/dvb/adapter%d\00"
define void @adapter_name(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"/dev/dvb/adapter%d\00"
define void @adapter_name(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
unsigned short lo16(x) { return ((unsigned short)((unsigned int)x)); }


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

x86 assembly (clang, -O2):
<lo16>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @lo16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i16
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @lo16(i32 %0) {
%2 = trunc i32 %0 to i16
ret i16 %2
}
int f(int n) { return n + (n > 1 ? f(n - 1) : 0); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    113e <f+0x2e>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
mov    %eax,-0xc(%rbp)
jmp    1148 <f+0x38>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <f+0x38>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
cmp    $0x2,%edi
jl     1122 <f+0x12>
lea    -0x1(%rbx),%edi
call   1030 <f@plt>
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @f(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 0, %1 ]
%8 = add nsw i32 %7, %0
ret i32 %8
}
int MPIN_FS() { return (1 + (254 - 1) / 8); }


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

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

LLVM IR (-O0):
define i32 @MPIN_FS() {
ret i32 32
}

LLVM IR (-O2):
define i32 @MPIN_FS() {
ret i32 32
}
unsigned long long rdtsc() {
  unsigned long long int x;
  unsigned a, d;
  __asm__ volatile("rdtsc" : "=a"(a), "=d"(d));
  return ((unsigned long long)a) | (((unsigned long long)d) << 32);
}


x86 assembly (clang, -O0):
<rdtsc>:
push   %rbp
mov    %rsp,%rbp
rdtsc
mov    %eax,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdtsc>:
rdtsc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @rdtsc() {
%1 = alloca i64
%2 = alloca i32
%3 = alloca i32
%4 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%5 = extractvalue { i32, i32 } %4, 0
%6 = extractvalue { i32, i32 } %4, 1
store i32 %5, i32* %2
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
%11 = shl i64 %10, 32
%12 = or i64 %8, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @rdtsc() {
%1 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
int longitud_string(char *s) {
  int i;
  i = 0;
  while (*(s++) != '\0') {
    i++;
  }
  return i;
}


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

x86 assembly (clang, -O2):
<longitud_string>:
cmpb   $0x0,(%rdi)
je     111c <longitud_string+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <longitud_string+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @longitud_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
long meat_time_offset_minutes(int const);
signed long int meat_time_offset_hours(int const i_hour) {
  return meat_time_offset_minutes(i_hour * 60l);
}


x86 assembly (clang, -O0):
<meat_time_offset_hours>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
imul   $0x3c,%rax,%rax
mov    %eax,%edi
call   1030 <meat_time_offset_minutes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<meat_time_offset_hours>:
imul   $0x3c,%edi,%edi
jmp    1030 <meat_time_offset_minutes@plt>

LLVM IR (-O0):
define i64 @meat_time_offset_hours(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = mul nsw i64 %4, 60
%6 = trunc i64 %5 to i32
%7 = call i64 @meat_time_offset_minutes(i32 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @meat_time_offset_hours(i32 %0) {
%2 = mul i32 %0, 60
%3 = tail call i64 @meat_time_offset_minutes(i32 %2)
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream = stderr;
  if (status == EXIT_SUCCESS) {
    stream = stdout;
  }
  fprintf(stream, "Usage: %s <path>\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <helpAndLeave+0x3d>
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [18 x i8] c"Usage: %s <path>\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32*, i32** @stderr
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_SUCCESS
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stdout
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [18 x i8] c"Usage: %s <path>\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
void save_processor_state(void) {}


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

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

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

LLVM IR (-O2):
define void @save_processor_state() {
ret void
}
/* Variables and functions */
double strtod(char *, char **);
int sysapi_get_double(char *data, double *val) {
  char *endptr;
  *val = strtod(data, &endptr);
  if (endptr)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<sysapi_get_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <strtod@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     114c <sysapi_get_double+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <sysapi_get_double+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysapi_get_double>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1030 <strtod@plt>
movsd  %xmm0,(%rbx)
xor    %eax,%eax
cmp    0x8(%rsp),%rax
sbb    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @sysapi_get_double(i8* %0, double* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call double @strtod(i8* %0, i8** %3)
store double %5, double* %1
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = sext i1 %7 to i32
ret i32 %8
}
int maxfunc(int a, int b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<maxfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <maxfunc+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <maxfunc+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxfunc>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @maxfunc(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("Hola mundo");
  while (1) {
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
jmp    112b <main+0x1b>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [11 x i8] c"Hola mundo\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
@.str = [11 x i8] c"Hola mundo\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ del(char *, char);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char str[] = "Eengggggggglish";
  printf("%s", str);
  del(str, 'k');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    $0x6b,%esi
call   1040 <del@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.str = [16 x i8] c"Eengggggggglish\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i8]
store i32 0, i32* %1
%3 = bitcast [16 x i8]* %2 to i8*
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%7 = call i32 @del(i8* %6, i8 signext 107)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [16 x i8] c"Eengggggggglish\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @del(i8* %2, i8 signext 107)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7;
typedef int /*<<< orphan*/ BIO;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ *BIO_new_NDEF(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                 int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_it;
BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7) {
  return BIO_new_NDEF(out, (ASN1_VALUE *)p7, &PKCS7_it);
}


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

x86 assembly (clang, -O2):
<BIO_new_PKCS7>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <BIO_new_NDEF@plt>

LLVM IR (-O0):
@PKCS7_it = global i32 0
define i32* @BIO_new_PKCS7(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = call i32* @BIO_new_NDEF(i32* %5, i32* %6, i32* @PKCS7_it)
ret i32* %7
}

LLVM IR (-O2):
@PKCS7_it = global i32 0
define i32* @BIO_new_PKCS7(i32* %0, i32* %1) {
%3 = tail call i32* @BIO_new_NDEF(i32* %0, i32* %1, i32* @PKCS7_it)
ret i32* %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void *strrchr(void *, int);
uint32_t __attribute__((no)) vm_strrchr(uint32_t a, int b, void *mem) {
  void *s = mem + a;
  void *r = strrchr(s, b);
  int ret = r ? r - mem : 0;
  return ret;
}


x86 assembly (clang, -O0):
<vm_strrchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <strrchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1160 <vm_strrchr+0x50>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x30(%rbp)
jmp    116b <vm_strrchr+0x5b>
xor    %eax,%eax
mov    %rax,-0x30(%rbp)
jmp    116b <vm_strrchr+0x5b>
mov    -0x30(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vm_strrchr>:
push   %rbx
mov    %rdx,%rbx
movslq %edi,%rdi
add    %rdx,%rdi
call   1030 <strrchr@plt>
mov    %eax,%edx
sub    %ebx,%edx
xor    %ecx,%ecx
test   %rax,%rax
cmovne %edx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @vm_strrchr(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%10 = load i8*, i8** %6
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr i8, i8* %10, i64 %12
store i8* %13, i8** %7
%14 = load i8*, i8** %7
%15 = load i32, i32* %5
%16 = call i8* @strrchr(i8* %14, i32 %15)
store i8* %16, i8** %8
%17 = load i8*, i8** %8
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %25
19: ; preds = %3
%20 = load i8*, i8** %8
%21 = load i8*, i8** %6
%22 = ptrtoint i8* %20 to i64
%23 = ptrtoint i8* %21 to i64
%24 = sub i64 %22, %23
br label %26
25: ; preds = %3
br label %26
26: ; preds = %25, %19
%27 = phi i64 [ %24, %19 ], [ 0, %25 ]
%28 = trunc i64 %27 to i32
store i32 %28, i32* %9
%29 = load i32, i32* %9
ret i32 %29
}

LLVM IR (-O2):
define i32 @vm_strrchr(i32 %0, i32 %1, i8* %2) {
%4 = sext i32 %0 to i64
%5 = getelementptr i8, i8* %2, i64 %4
%6 = tail call i8* @strrchr(i8* dereferenceable(1) %5, i32 %1)
%7 = icmp eq i8* %6, null
%8 = ptrtoint i8* %6 to i64
%9 = ptrtoint i8* %2 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
%12 = select i1 %7, i32 0, i32 %11
ret i32 %12
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local2;
  unsigned int local1;
  {
    state[0UL] = input[0UL] + 4284877637U;
    local1 = 0UL;
    while (local1 < 0U) {
      local2 = 0UL;
      while (local2 < 0U) {
        state[local2] += state[0UL];
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] - 255873917UL) + 559619733U;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0xff660b45,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jae    1168 <RandomFunc+0x68>
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jae    1159 <RandomFunc+0x59>
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%eax
add    -0x14(%rbp,%rax,4),%ecx
mov    %ecx,-0x14(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x18(%rbp)
jmp    1132 <RandomFunc+0x32>
mov    -0x1c(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x1c(%rbp)
jmp    1121 <RandomFunc+0x21>
mov    -0x14(%rbp),%eax
sub    $0xf40537d,%rax
add    $0x215b1e95,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0x1180d65d,%eax
add    (%rdi),%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = add i32 %10, -10089659
%12 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %11, i32* %12
store i32 0, i32* %7
br label %13
13: ; preds = %32, %2
%14 = load i32, i32* %7
%15 = icmp ult i32 %14, 0
br i1 %15, label %16, label %37
16: ; preds = %13
store i32 0, i32* %6
br label %17
17: ; preds = %20, %16
%18 = load i32, i32* %6
%19 = icmp ult i32 %18, 0
br i1 %19, label %20, label %32
20: ; preds = %17
%21 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%22 = load i32, i32* %21
%23 = load i32, i32* %6
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 %24
%26 = load i32, i32* %25
%27 = add i32 %26, %22
store i32 %27, i32* %25
%28 = load i32, i32* %6
%29 = zext i32 %28 to i64
%30 = add i64 %29, 2
%31 = trunc i64 %30 to i32
store i32 %31, i32* %6
br label %17
32: ; preds = %17
%33 = load i32, i32* %7
%34 = zext i32 %33 to i64
%35 = add i64 %34, 2
%36 = trunc i64 %35 to i32
store i32 %36, i32* %7
br label %13
37: ; preds = %13
%38 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%39 = load i32, i32* %38
%40 = zext i32 %39 to i64
%41 = sub i64 %40, 255873917
%42 = add i64 %41, 559619733
%43 = trunc i64 %42 to i32
%44 = load i32*, i32** %4
%45 = getelementptr inbounds i32, i32* %44, i64 0
store i32 %43, i32* %45
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = add i32 %3, 293656157
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void(sfree)(void *p) {
  if (p) {
    ((void)0);
    ;
    free(p);
  }
}


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

x86 assembly (clang, -O2):
<sfree>:
test   %rdi,%rdi
je     111a <sfree+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @sfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
struct KIrand {
  int dummy;
};

/* Variables and functions */
scalar_t__ KIrand_genrand_int32(struct KIrand *);
double KIrand_genrand_real1(struct KIrand *r) {
  return (double)KIrand_genrand_int32(r) * (1.0 / 4294967295.0);
}


x86 assembly (clang, -O0):
<KIrand_genrand_real1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <KIrand_genrand_int32@plt>
cvtsi2sd %rax,%xmm0
movsd  0xece(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KIrand_genrand_real1>:
push   %rax
call   1030 <KIrand_genrand_int32@plt>
cvtsi2sd %rax,%xmm0
mulsd  0xedd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.KIrand = type { i32 }
define double @KIrand_genrand_real1(%struct.KIrand* %0) {
%2 = alloca %struct.KIrand*
store %struct.KIrand* %0, %struct.KIrand** %2
%3 = load %struct.KIrand*, %struct.KIrand** %2
%4 = call i64 @KIrand_genrand_int32(%struct.KIrand* %3)
%5 = sitofp i64 %4 to double
%6 = fmul double %5, 0x3DF0000000100000
ret double %6
}

LLVM IR (-O2):
%struct.KIrand = type { i32 }
define double @KIrand_genrand_real1(%struct.KIrand* %0) {
%2 = tail call i64 @KIrand_genrand_int32(%struct.KIrand* %0)
%3 = sitofp i64 %2 to double
%4 = fmul double %3, 0x3DF0000000100000
ret double %4
}