xunge/DecIR huggingface dataset:
/* Variables and functions */
void *realloc(void *, int);
int /*<<< orphan*/ zlog_fatal_output(int, char *, long);
void *zrealloc_20160308(const void *ptr, int len) {
  void *r;
  if (len < 1) {
    len = 1;
  }
  if ((r = realloc((void *)ptr, len)) == 0) {
    {
      zlog_fatal_output(1, "zrealloc: insufficient memory for %ld bytes: %m",
                        (long)len);
    };
  }
  return r;
}


x86 assembly (clang, -O0):
<zrealloc_20160308>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    1140 <zrealloc_20160308+0x20>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    116f <zrealloc_20160308+0x4f>
movslq -0xc(%rbp),%rdx
mov    $0x1,%edi
lea    0xe96(%rip),%rsi
call   1040 <zlog_fatal_output@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zrealloc_20160308>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
mov    $0x1,%ebp
cmovg  %esi,%ebp
mov    %ebp,%esi
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114f <zrealloc_20160308+0x2f>
mov    %ebp,%edx
lea    0xebb(%rip),%rsi
mov    $0x1,%edi
call   1040 <zlog_fatal_output@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"zrealloc: insufficient memory for %ld bytes: %m\00"
define i8* @zrealloc_20160308(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %4
br label %9
9: ; preds = %8, %2
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call i8* @realloc(i8* %10, i32 %11)
store i8* %12, i8** %5
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %18
14: ; preds = %9
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = call i32 @zlog_fatal_output(i32 1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i64 %16)
br label %18
18: ; preds = %14, %9
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
@.str = [48 x i8] c"zrealloc: insufficient memory for %ld bytes: %m\00"
define i8* @zrealloc_20160308(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
%4 = select i1 %3, i32 %1, i32 1
%5 = tail call i8* @realloc(i8* %0, i32 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = zext i32 %4 to i64
%9 = tail call i32 @zlog_fatal_output(i32 1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i64 %8)
br label %10
10: ; preds = %7, %2
ret i8* %5
}
float convert_adc_voltage(float adc_volts) {
  return adc_volts * (1E9 / 94.34E3 / 1000.) + 1.43;
}


x86 assembly (clang, -O0):
<convert_adc_voltage>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee2(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_adc_voltage>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @convert_adc_voltage(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call double @llvm.fmuladd.f64(double %4, double 0x4025332DA47F6E1E, double 1.430000e+00)
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @convert_adc_voltage(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 0x4025332DA47F6E1E, double 1.430000e+00)
%4 = fptrunc double %3 to float
ret float %4
}
/* Type definitions */
struct c2interface {
  int dummy;
};

/* Variables and functions */
int EIO;
scalar_t__ c2_pi_get_data(struct c2interface *, unsigned char *);
int c2_pi_check_command(struct c2interface *c2if) {
  unsigned char response;
  if (c2_pi_get_data(c2if, &response) < 0)
    return -EIO;
  if (response != 0x0D)
    return -EIO;
  return 0;
}


x86 assembly (clang, -O0):
<c2_pi_check_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x11(%rbp),%rsi
call   1030 <c2_pi_get_data@plt>
cmp    $0x0,%rax
jge    1146 <c2_pi_check_command+0x36>
xor    %eax,%eax
mov    0x2ea4(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    116d <c2_pi_check_command+0x5d>
movzbl -0x11(%rbp),%eax
cmp    $0xd,%eax
je     1166 <c2_pi_check_command+0x56>
xor    %eax,%eax
mov    0x2e84(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    116d <c2_pi_check_command+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c2_pi_check_command>:
push   %rax
lea    0x7(%rsp),%rsi
call   1030 <c2_pi_get_data@plt>
test   %rax,%rax
js     1129 <c2_pi_check_command+0x19>
xor    %eax,%eax
cmpb   $0xd,0x7(%rsp)
je     1134 <c2_pi_check_command+0x24>
mov    0x2eb0(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.c2interface = type { i32 }
@EIO = global i32 0
define i32 @c2_pi_check_command(%struct.c2interface* %0) {
%2 = alloca i32
%3 = alloca %struct.c2interface*
%4 = alloca i8
store %struct.c2interface* %0, %struct.c2interface** %3
%5 = load %struct.c2interface*, %struct.c2interface** %3
%6 = call i64 @c2_pi_get_data(%struct.c2interface* %5, i8* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @EIO
%10 = sub nsw i32 0, %9
store i32 %10, i32* %2
br label %19
11: ; preds = %1
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = icmp ne i32 %13, 13
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* @EIO
%17 = sub nsw i32 0, %16
store i32 %17, i32* %2
br label %19
18: ; preds = %11
store i32 0, i32* %2
br label %19
19: ; preds = %18, %15, %8
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
%struct.c2interface = type { i32 }
@EIO = global i32 0
define i32 @c2_pi_check_command(%struct.c2interface* %0) {
%2 = alloca i8
%3 = call i64 @c2_pi_get_data(%struct.c2interface* %0, i8* %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @EIO
%7 = sub nsw i32 0, %6
br label %14
8: ; preds = %1
%9 = load i8, i8* %2
%10 = icmp eq i8 %9, 13
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* @EIO
%13 = sub nsw i32 0, %12
br label %14
14: ; preds = %8, %11, %5
%15 = phi i32 [ %7, %5 ], [ %13, %11 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ join_bits_u(int, int, int, int, int, int);
int sign_extend(int /*<<< orphan*/, int);
signed join_bits_s(int val1, int offset1, int len1, int val2, int offset2,
                   int len2) {
  return sign_extend(join_bits_u(val1, offset1, len1, val2, offset2, len2),
                     len1 + len2);
}


x86 assembly (clang, -O0):
<join_bits_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
call   1040 <join_bits_u@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
add    -0x18(%rbp),%esi
call   1030 <sign_extend@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join_bits_s>:
push   %rbp
push   %rbx
push   %rax
mov    %r9d,%ebx
mov    %edx,%ebp
call   1040 <join_bits_u@plt>
add    %ebp,%ebx
mov    %eax,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <sign_extend@plt>

LLVM IR (-O0):
define i32 @join_bits_s(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
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @join_bits_u(i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
%20 = load i32, i32* %9
%21 = load i32, i32* %12
%22 = add nsw i32 %20, %21
%23 = call i32 @sign_extend(i32 %19, i32 %22)
ret i32 %23
}

LLVM IR (-O2):
define i32 @join_bits_s(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @join_bits_u(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
%8 = add nsw i32 %5, %2
%9 = tail call i32 @sign_extend(i32 %7, i32 %8)
ret i32 %9
}
/* Variables and functions */
double asin(double);
double ECasin(double x) {
  double y;
  double r;
  y = x;
  r = asin(y);
  return (r);
}


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

x86 assembly (clang, -O2):
<ECasin>:
jmp    1030 <asin@plt>

LLVM IR (-O0):
define double @ECasin(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @asin(double %6)
store double %7, double* %4
%8 = load double, double* %4
ret double %8
}

LLVM IR (-O2):
define double @ECasin(double %0) {
%2 = tail call double @asin(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_YELLOW_LED_OUTPUT() { set_io_bit(0x39, 5); }


x86 assembly (clang, -O0):
<TOSH_MAKE_YELLOW_LED_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x39,%edi
mov    $0x5,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_YELLOW_LED_OUTPUT>:
mov    $0x39,%edi
mov    $0x5,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_YELLOW_LED_OUTPUT() {
%1 = call i32 @set_io_bit(i32 57, i32 5)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_YELLOW_LED_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 57, i32 5)
ret void
}
int test_imm_9Bint8_reg(signed char val) {
  return ((val) & (-0x9B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Bint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff65,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Bint8_reg>:
test   $0xffffff65,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_9Bint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -155
%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_9Bint8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -155
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ do_at_tests_callee();
void do_at_tests() {
  int x;
  int i = 10;
  int y = 15;
  i++;
  i++;
  {
    double i = 15;
    i += 2.0;
  }
  {
    float i = 19;
    i += 2.0;
  }
  i++;
  i++;
  do_at_tests_callee();
  i++;
}


x86 assembly (clang, -O0):
<do_at_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xa,-0x8(%rbp)
movl   $0xf,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb3(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  0xeb1(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe8b(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <do_at_tests_callee@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @do_at_tests() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca float
store i32 10, i32* %2
store i32 15, i32* %3
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
store double 1.500000e+01, double* %4
%10 = load double, double* %4
%11 = fadd double %10, 2.000000e+00
store double %11, double* %4
store float 1.900000e+01, float* %5
%12 = load float, float* %5
%13 = fpext float %12 to double
%14 = fadd double %13, 2.000000e+00
%15 = fptrunc double %14 to float
store float %15, float* %5
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
%20 = call i32 (...) @do_at_tests_callee()
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
ret void
}

LLVM IR (-O2):
define void @do_at_tests() {
%1 = tail call i32 (...) @do_at_tests_callee()
ret void
}
void foo360(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo360(i32 %0) {
ret void
}
void ade7759_uninitialize_ring(struct iio_ring_buffer *ring) {}


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

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

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

LLVM IR (-O2):
%struct.iio_ring_buffer = type opaque
define void @ade7759_uninitialize_ring(%struct.iio_ring_buffer* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned value;
  scanf("%d", &value);
  printf("%o\n", value);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%o\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
char *itoa(int);
int print_str(char *);
int print_num(int a) {
  if (a == 0) {
    return print_str("0");
  }
  char *num_str = itoa(a);
  return print_str(num_str);
}


x86 assembly (clang, -O0):
<print_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1149 <print_num+0x29>
lea    0xec4(%rip),%rdi
call   1030 <print_str@plt>
mov    %eax,-0x4(%rbp)
jmp    1161 <print_num+0x41>
mov    -0x8(%rbp),%edi
call   1040 <itoa@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <print_str@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_num>:
test   %edi,%edi
je     1136 <print_num+0x16>
push   %rax
call   1040 <itoa@plt>
mov    %rax,%rdi
add    $0x8,%rsp
jmp    1030 <print_str@plt>
lea    0xec3(%rip),%rdi
jmp    1030 <print_str@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define i32 @print_num(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @itoa(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ]
%7 = tail call i32 @print_str(i8* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ SetDirection(unsigned char, int);
void Fwd(unsigned char Outputs) { SetDirection(Outputs, 0x80); }


x86 assembly (clang, -O0):
<Fwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x80,%esi
movzbl -0x1(%rbp),%edi
call   1030 <SetDirection@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fwd>:
mov    $0x80,%esi
jmp    1030 <SetDirection@plt>

LLVM IR (-O0):
define void @Fwd(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @SetDirection(i8 zeroext %3, i32 128)
ret void
}

LLVM IR (-O2):
define void @Fwd(i8 zeroext %0) {
%2 = tail call i32 @SetDirection(i8 zeroext %0, i32 128)
ret void
}
/* Type definitions */
typedef int __u16;

/* Variables and functions */
__u16 mdio_phy_id_prtad(int phy_id) { return (phy_id & 0x03e0) >> 5; }


x86 assembly (clang, -O0):
<mdio_phy_id_prtad>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3e0,%eax
sar    $0x5,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdio_phy_id_prtad>:
mov    %edi,%eax
shr    $0x5,%eax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @mdio_phy_id_prtad(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 992
%5 = ashr i32 %4, 5
ret i32 %5
}

LLVM IR (-O2):
define i32 @mdio_phy_id_prtad(i32 %0) {
%2 = lshr i32 %0, 5
%3 = and i32 %2, 31
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int mode;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
void set_XCrossingEvent_mode(void *_p, int _v) {
  ((XCrossingEvent *)_p)->mode = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XCrossingEvent_mode>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XCrossingEvent_mode(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void select_helpers(void) {
  { return; }
}


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

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

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

LLVM IR (-O2):
define void @select_helpers() {
ret void
}
/* Variables and functions */
int strnatcmp0(char const *, char const *, int);
int strnatcasecmp(const char *a, const char *b) { return strnatcmp0(a, b, 1); }


x86 assembly (clang, -O0):
<strnatcasecmp>:
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    $0x1,%edx
call   1030 <strnatcmp0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnatcasecmp>:
mov    $0x1,%edx
jmp    1030 <strnatcmp0@plt>

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

LLVM IR (-O2):
define i32 @strnatcasecmp(i8* %0, i8* %1) {
%3 = tail call i32 @strnatcmp0(i8* %0, i8* %1, i32 1)
ret i32 %3
}
long long bit51() { return 0x0008000000000000LL; }


x86 assembly (clang, -O0):
<bit51>:
push   %rbp
mov    %rsp,%rbp
movabs $0x8000000000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit51>:
movabs $0x8000000000000,%rax
ret

LLVM IR (-O0):
define i64 @bit51() {
ret i64 2251799813685248
}

LLVM IR (-O2):
define i64 @bit51() {
ret i64 2251799813685248
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void mem_clear(void *ptr, size_t nmemb, size_t size) {
  memset(ptr, 0, nmemb * size);
}


x86 assembly (clang, -O0):
<mem_clear>:
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),%rdx
imul   -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_clear>:
imul   %rsi,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @mem_clear(i8* %0, i64 %1, i64 %2) {
%4 = mul i64 %2, %1
%5 = tail call i32 @memset(i8* %0, i32 0, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void matrix_error(char *msg) {
  perror(msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<matrix_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<matrix_error>:
push   %rax
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @matrix_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @matrix_error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ xtoa(unsigned long, char *, int, int /*<<< orphan*/);
char *ultoa(unsigned long val, char *buf, int radix) {
  xtoa(val, buf, radix, 0);
  return buf;
}


x86 assembly (clang, -O0):
<ultoa>:
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 <xtoa@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ultoa>:
push   %rbx
mov    %rsi,%rbx
xor    %ecx,%ecx
call   1030 <xtoa@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ultoa(i64 %0, i8* returned %1, i32 %2) {
%4 = tail call i32 @xtoa(i64 %0, i8* %1, i32 %2, i32 0)
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int execute_keys_general_wrapper(int /*<<< orphan*/ const *, int /*<<< orphan*/,
                                 int /*<<< orphan*/, int);
int execute_keys_no_remap(const wchar_t keys[]) {
  return execute_keys_general_wrapper(keys, 0, 0, 1);
}


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

x86 assembly (clang, -O2):
<execute_keys_no_remap>:
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1030 <execute_keys_general_wrapper@plt>

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

LLVM IR (-O2):
define i32 @execute_keys_no_remap(i32* %0) {
%2 = tail call i32 @execute_keys_general_wrapper(i32* %0, i32 0, i32 0, i32 1)
ret i32 %2
}
int main() {
  2 + 3 * 5;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
h() { return 6; }


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

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

LLVM IR (-O0):
define i32 @h() {
ret i32 6
}

LLVM IR (-O2):
define i32 @h() {
ret i32 6
}
/* Variables and functions */
int /*<<< orphan*/ consolePrintNamedBlock(char *, char *);
int /*<<< orphan*/ scriptThrowException(char *);
void consoleCmdHelp(char *name) {
  if (!consolePrintNamedBlock("help", name))
    scriptThrowException("Wrong name of help page");
}


x86 assembly (clang, -O0):
<consoleCmdHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <consolePrintNamedBlock@plt>
cmp    $0x0,%eax
jne    1151 <consoleCmdHelp+0x31>
lea    0xeb9(%rip),%rdi
call   1040 <scriptThrowException@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<consoleCmdHelp>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <consolePrintNamedBlock@plt>
test   %eax,%eax
je     1136 <consoleCmdHelp+0x16>
pop    %rax
ret
lea    0xec8(%rip),%rdi
pop    %rax
jmp    1040 <scriptThrowException@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"help\00"
@.str.1 = [24 x i8] c"Wrong name of help page\00"
define void @consoleCmdHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @consolePrintNamedBlock(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @scriptThrowException(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"help\00"
@.str.1 = [24 x i8] c"Wrong name of help page\00"
define void @consoleCmdHelp(i8* %0) {
%2 = tail call i32 @consolePrintNamedBlock(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @scriptThrowException(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_nest_lock_t;

/* Variables and functions */
void omp_destroy_nest_lock(omp_nest_lock_t *_Lock) {}


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

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

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

LLVM IR (-O2):
define void @omp_destroy_nest_lock(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void list_clear_list(void *list, void *data) { free(list); }


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

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

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

LLVM IR (-O2):
define void @list_clear_list(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigalrm_handler(int sig) { printf("foo\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"foo\00"
define void @sigalrm_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_DEuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xDE << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_DEuint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 222
%7 = icmp ne i64 %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_DEuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 953482739712
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Sys_EnterCriticalSectionInternal(int);
void Sys_EnterCriticalSection(int section) {
  Sys_EnterCriticalSectionInternal(section);
}


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

x86 assembly (clang, -O2):
<Sys_EnterCriticalSection>:
jmp    1030 <Sys_EnterCriticalSectionInternal@plt>

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

LLVM IR (-O2):
define void @Sys_EnterCriticalSection(i32 %0) {
%2 = tail call i32 @Sys_EnterCriticalSectionInternal(i32 %0)
ret void
}
void _M2_FormatStrings_finish(__attribute__((unused)) int argc,
                              __attribute__((unused)) char *argv[]) {}


x86 assembly (clang, -O0):
<_M2_FormatStrings_finish>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @_M2_FormatStrings_finish(i32 %0, i8** nocapture %1) {
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t I2SInPointerNextGet(uint32_t ui32Base) {
  ;
  return ((*((volatile unsigned long *)(0x40021000 + 0x00000020))));
}


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

x86 assembly (clang, -O2):
<I2SInPointerNextGet>:
mov    %rdi,-0x8(%rsp)
mov    0x40021020,%rax
40
ret

LLVM IR (-O0):
define i64 @I2SInPointerNextGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1073877024 to i64*)
ret i64 %3
}

LLVM IR (-O2):
define i64 @I2SInPointerNextGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1073877024 to i64*)
ret i64 %3
}
unsigned int xdl_hashbits(unsigned int size) {
  unsigned int val = 1, bits = 0;
  for (; val < size && bits < 8 * sizeof(unsigned int); val <<= 1, bits++)
    ;
  return bits ? bits : 1;
}


x86 assembly (clang, -O0):
<xdl_hashbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0xd(%rbp)
jae    1133 <xdl_hashbits+0x33>
mov    -0xc(%rbp),%eax
cmp    $0x20,%rax
setb   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1143 <xdl_hashbits+0x43>
jmp    115f <xdl_hashbits+0x5f>
jmp    1148 <xdl_hashbits+0x48>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <xdl_hashbits+0x15>
cmpl   $0x0,-0xc(%rbp)
je     1174 <xdl_hashbits+0x74>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1181 <xdl_hashbits+0x81>
mov    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1181 <xdl_hashbits+0x81>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdl_hashbits>:
mov    $0x1,%eax
cmp    $0x2,%edi
jb     1130 <xdl_hashbits+0x30>
mov    $0x1,%ecx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    %ecx,%ecx
lea    0x1(%rdx),%eax
cmp    %edi,%ecx
jae    1130 <xdl_hashbits+0x30>
cmp    $0x1f,%edx
mov    %eax,%edx
jb     1120 <xdl_hashbits+0x20>
ret

LLVM IR (-O0):
define i32 @xdl_hashbits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp ult i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = icmp ult i64 %11, 32
br label %13
13: ; preds = %9, %5
%14 = phi i1 [ false, %5 ], [ %12, %9 ]
br i1 %14, label %15, label %21
15: ; preds = %13
br label %16
16: ; preds = %15
%17 = load i32, i32* %3
%18 = shl i32 %17, 1
store i32 %18, i32* %3
%19 = load i32, i32* %4
%20 = add i32 %19, 1
store i32 %20, i32* %4
br label %5
21: ; preds = %13
%22 = load i32, i32* %4
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = load i32, i32* %4
br label %27
26: ; preds = %21
br label %27
27: ; preds = %26, %24
%28 = phi i32 [ %25, %24 ], [ 1, %26 ]
ret i32 %28
}

LLVM IR (-O2):
define i32 @xdl_hashbits(i32 %0) {
%2 = icmp ugt i32 %0, 1
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ 1, %1 ]
%6 = shl i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %6, %0
%9 = icmp ult i32 %4, 31
%10 = select i1 %8, i1 %9, i1 false
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %12
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int ui32Gen;
typedef scalar_t__ ui32Base;

/* Variables and functions */
uint32_t PWMGenFaultStatus(uint32_t ui32Base, uint32_t ui32Gen,
                           uint32_t ui32Group) {
  ;
  ;

  ;
  if (ui32Group == 0) {
    return ((*((volatile uint32_t *)(((ui32Base) + 0x00000800 +
                                      ((ui32Gen)-0x00000040) * 2) +
                                     0x00000004))));
  } else {
    return ((*((volatile uint32_t *)(((ui32Base) + 0x00000800 +
                                      ((ui32Gen)-0x00000040) * 2) +
                                     0x00000008))));
  }
}


x86 assembly (clang, -O0):
<PWMGenFaultStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1141 <PWMGenFaultStatus+0x41>
mov    -0x10(%rbp),%rax
add    $0x800,%rax
mov    -0x18(%rbp),%rcx
sub    $0x40,%rcx
shl    $0x1,%rcx
add    %rcx,%rax
mov    0x4(%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1162 <PWMGenFaultStatus+0x62>
mov    -0x10(%rbp),%rax
add    $0x800,%rax
mov    -0x18(%rbp),%rcx
sub    $0x40,%rcx
shl    $0x1,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMGenFaultStatus>:
xor    %eax,%eax
test   %rdx,%rdx
setne  %al
lea    (%rdi,%rax,4),%rax
mov    0x784(%rax,%rsi,2),%rax
ret

LLVM IR (-O0):
define i64 @PWMGenFaultStatus(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %7
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %3
%11 = load i64, i64* %5
%12 = add nsw i64 %11, 2048
%13 = load i64, i64* %6
%14 = sub nsw i64 %13, 64
%15 = mul nsw i64 %14, 2
%16 = add nsw i64 %12, %15
%17 = add nsw i64 %16, 4
%18 = inttoptr i64 %17 to i64*
%19 = load volatile i64, i64* %18
store i64 %19, i64* %4
br label %30
20: ; preds = %3
%21 = load i64, i64* %5
%22 = add nsw i64 %21, 2048
%23 = load i64, i64* %6
%24 = sub nsw i64 %23, 64
%25 = mul nsw i64 %24, 2
%26 = add nsw i64 %22, %25
%27 = add nsw i64 %26, 8
%28 = inttoptr i64 %27 to i64*
%29 = load volatile i64, i64* %28
store i64 %29, i64* %4
br label %30
30: ; preds = %20, %10
%31 = load i64, i64* %4
ret i64 %31
}

LLVM IR (-O2):
define i64 @PWMGenFaultStatus(i64 %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
%5 = shl i64 %1, 1
%6 = select i1 %4, i64 1924, i64 1928
%7 = add i64 %6, %0
%8 = add i64 %7, %5
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
ret i64 %10
}
int fun444() { return 444; }


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

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

LLVM IR (-O0):
define i32 @fun444() {
ret i32 444
}

LLVM IR (-O2):
define i32 @fun444() {
ret i32 444
}
/* Variables and functions */
int /*<<< orphan*/ tosFilename_split(char const *, char *, void *, void *);
void tosFilename_getPath(const char *pszFilename, char *pszPath) {
  tosFilename_split(pszFilename, pszPath, ((void *)0), ((void *)0));
}


x86 assembly (clang, -O0):
<tosFilename_getPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <tosFilename_split@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tosFilename_getPath>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <tosFilename_split@plt>

LLVM IR (-O0):
define void @tosFilename_getPath(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @tosFilename_split(i8* %5, i8* %6, i8* null, i8* null)
ret void
}

LLVM IR (-O2):
define void @tosFilename_getPath(i8* %0, i8* %1) {
%3 = tail call i32 @tosFilename_split(i8* %0, i8* %1, i8* null, i8* null)
ret void
}
int config_MODULE_GHTTP(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_MODULE_GHTTP() {
ret i32 0
}
double ltr_int_dot_product(double vec1[3], double vec2[3]) {
  return (vec1[0] * vec2[0] + vec1[1] * vec2[1] + vec1[2] * vec2[2]);
}


x86 assembly (clang, -O0):
<ltr_int_dot_product>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @ltr_int_dot_product(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 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %24, double %18)
ret double %25
}

LLVM IR (-O2):
define double @ltr_int_dot_product(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
/* Variables and functions */
int VIDDummyVdp1Reset(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @VIDDummyVdp1Reset() {
ret i32 0
}
long sub_long(long arg1, long arg2) { return arg1 - arg2; }


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

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

LLVM IR (-O0):
define i64 @sub_long(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @sub_long(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
ret i64 %3
}
int test_imm_93uint8_reg(unsigned char val) {
  return ((val) & (-0x93 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_93uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff6d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_93uint8_reg(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, -147
%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_93uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 109
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xcirculaterequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcirculaterequest_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xcirculaterequest.serial = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xcirculaterequest_serial>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xcirculaterequest_serial(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xcirculaterequest_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const, int const, int const);
int sw_comp_display(const int fd_dev, const char *pattern, const int start_blk,
                    const int len) {
  printf("%15d\t%15d\t%15d\n", start_blk, start_blk + len - 1, len);
  return 0;
}


x86 assembly (clang, -O0):
<sw_comp_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x14(%rbp),%edx
add    -0x18(%rbp),%edx
sub    $0x1,%edx
mov    -0x18(%rbp),%ecx
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sw_comp_display>:
push   %rax
lea    (%rdx,%rcx,1),%eax
add    $0xffffffff,%eax
lea    0xee2(%rip),%rdi
mov    %edx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"%15d\09%15d\09%15d\0A\00"
define i32 @sw_comp_display(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = add nsw i32 %10, %11
%13 = sub nsw i32 %12, 1
%14 = load i32, i32* %8
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %13, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"%15d\09%15d\09%15d\0A\00"
define i32 @sw_comp_display(i32 %0, i8* nocapture readnone %1, i32 %2, i32 %3) {
%5 = add i32 %2, -1
%6 = add i32 %5, %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %6, i32 %3)
ret i32 0
}