xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isDecDigit(char const);
int charToInt(const char digito) {
  if (isDecDigit(digito))
    return digito - 48;
  if (digito >= 'A' && digito <= 'F')
    return digito - 55;
  return 0;
}


x86 assembly (clang, -O0):
<charToInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isDecDigit@plt>
cmp    $0x0,%rax
je     1140 <charToInt+0x30>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <charToInt+0x60>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1169 <charToInt+0x59>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jg     1169 <charToInt+0x59>
movsbl -0x5(%rbp),%eax
sub    $0x37,%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <charToInt+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charToInt>:
push   %rbx
mov    %edi,%ebx
call   1030 <isDecDigit@plt>
test   %rax,%rax
je     1125 <charToInt+0x15>
movsbl %bl,%eax
add    $0xffffffd0,%eax
pop    %rbx
ret
lea    -0x41(%rbx),%ecx
xor    %eax,%eax
cmp    $0x5,%cl
ja     1135 <charToInt+0x25>
movzbl %bl,%eax
add    $0xffffffc9,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @charToInt(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isDecDigit(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 48
store i32 %10, i32* %2
br label %24
11: ; preds = %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %23
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 70
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 55
store i32 %22, i32* %2
br label %24
23: ; preds = %15, %11
store i32 0, i32* %2
br label %24
24: ; preds = %23, %19, %7
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @charToInt(i8 signext %0) {
%2 = tail call i64 @isDecDigit(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = sext i8 %0 to i32
%6 = add nsw i32 %5, -48
br label %13
7: ; preds = %1
%8 = add i8 %0, -65
%9 = icmp ult i8 %8, 6
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = zext i8 %0 to i32
%12 = add nsw i32 %11, -55
br label %13
13: ; preds = %7, %10, %4
%14 = phi i32 [ %6, %4 ], [ %12, %10 ], [ 0, %7 ]
ret i32 %14
}
int any_MSB_zero(unsigned x) {
  unsigned msb_mask = 0xFFu << (sizeof(int) - 1u << 3);
  return !!(~x & msb_mask);
}


x86 assembly (clang, -O0):
<any_MSB_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xff000000,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<any_MSB_zero>:
xor    %eax,%eax
cmp    $0xff000000,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @any_MSB_zero(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -16777216, i32* %3
%4 = load i32, i32* %2
%5 = xor i32 %4, -1
%6 = load i32, i32* %3
%7 = and i32 %5, %6
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @any_MSB_zero(i32 %0) {
%2 = icmp ult i32 %0, -16777216
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ check_migration();
int /*<<< orphan*/ check_migration_cpuid();
int /*<<< orphan*/ prepare_system_for_benchmarking();
int /*<<< orphan*/ show_tsc_info();
int main() {
  show_tsc_info();
  prepare_system_for_benchmarking();
  check_migration();
  check_migration_cpuid();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <show_tsc_info@plt>
mov    $0x0,%al
call   1050 <prepare_system_for_benchmarking@plt>
mov    $0x0,%al
call   1060 <check_migration@plt>
mov    $0x0,%al
call   1040 <check_migration_cpuid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <show_tsc_info@plt>
xor    %eax,%eax
call   1050 <prepare_system_for_benchmarking@plt>
xor    %eax,%eax
call   1060 <check_migration@plt>
xor    %eax,%eax
call   1040 <check_migration_cpuid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @show_tsc_info()
%3 = call i32 (...) @prepare_system_for_benchmarking()
%4 = call i32 (...) @check_migration()
%5 = call i32 (...) @check_migration_cpuid()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @show_tsc_info()
%2 = tail call i32 (...) @prepare_system_for_benchmarking()
%3 = tail call i32 (...) @check_migration()
%4 = tail call i32 (...) @check_migration_cpuid()
ret i32 0
}
int sra(int x, int k) {
  int xsrl = (unsigned)x >> k;
  int w = sizeof(int) << 3;
  int mask = (int)-1 << (w - k);
  int m = 1 << (w - 1);
  mask &= !(x & m) - 1;
  return xsrl | mask;
}


x86 assembly (clang, -O0):
<sra>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0xc(%rbp)
movl   $0x20,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
sub    -0x8(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
and    -0x18(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
sub    $0x1,%eax
and    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
or     -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sra>:
mov    %edi,%eax
mov    %edi,%edx
sar    $0x1f,%edx
mov    %esi,%ecx
neg    %cl
shr    %cl,%edx
mov    %esi,%ecx
shrd   %cl,%edx,%eax
ret

LLVM IR (-O0):
define i32 @sra(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = lshr i32 %9, %10
store i32 %11, i32* %5
store i32 32, i32* %6
%12 = load i32, i32* %6
%13 = load i32, i32* %4
%14 = sub nsw i32 %12, %13
%15 = shl i32 -1, %14
store i32 %15, i32* %7
%16 = load i32, i32* %6
%17 = sub nsw i32 %16, 1
%18 = shl i32 1, %17
store i32 %18, i32* %8
%19 = load i32, i32* %3
%20 = load i32, i32* %8
%21 = and i32 %19, %20
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
%24 = zext i1 %23 to i32
%25 = sub nsw i32 %24, 1
%26 = load i32, i32* %7
%27 = and i32 %26, %25
store i32 %27, i32* %7
%28 = load i32, i32* %5
%29 = load i32, i32* %7
%30 = or i32 %28, %29
ret i32 %30
}

LLVM IR (-O2):
define i32 @sra(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = shl nsw i32 -1, %4
%6 = xor i32 %0, -1
%7 = lshr i32 %6, 31
%8 = add nsw i32 %7, -1
%9 = and i32 %5, %8
%10 = or i32 %9, %3
ret i32 %10
}
/* Variables and functions */
float noise3_perlin(float *);
float orgPerlinNoise(float x, float y, float z) {
  float v[3];
  v[0] = x;
  v[1] = y;
  v[2] = z;
  return noise3_perlin(v);
}


x86 assembly (clang, -O0):
<orgPerlinNoise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
call   1030 <noise3_perlin@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<orgPerlinNoise>:
sub    $0x18,%rsp
movss  %xmm0,0xc(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm2,0x14(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <noise3_perlin@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @orgPerlinNoise(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca [3 x float]
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 0
store float %8, float* %9
%10 = load float, float* %5
%11 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 1
store float %10, float* %11
%12 = load float, float* %6
%13 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 2
store float %12, float* %13
%14 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 0
%15 = call float @noise3_perlin(float* %14)
ret float %15
}

LLVM IR (-O2):
define float @orgPerlinNoise(float %0, float %1, float %2) {
%4 = alloca [3 x float]
%5 = bitcast [3 x float]* %4 to i8*
%6 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 0
store float %0, float* %6
%7 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 1
store float %1, float* %7
%8 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 2
store float %2, float* %8
%9 = call float @noise3_perlin(float* %6)
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ read_mosaic_grid_sizes(char const *, int *, int *);
void read_mosaic_grid_sizes_(const char *mosaic_file, int *nx, int *ny) {
  read_mosaic_grid_sizes(mosaic_file, nx, ny);
}


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

x86 assembly (clang, -O2):
<read_mosaic_grid_sizes_>:
jmp    1030 <read_mosaic_grid_sizes@plt>

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

LLVM IR (-O2):
define void @read_mosaic_grid_sizes_(i8* %0, i32* %1, i32* %2) {
%4 = tail call i32 @read_mosaic_grid_sizes(i8* %0, i32* %1, i32* %2)
ret void
}
int test_imm_0Euint16_reg(unsigned short val) {
  return ((val) & (0x0E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_0Euint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 14
%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_0Euint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 14
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
fchmod() { write(2, "Warning: fchmod() unimplemented\n", 32); }


x86 assembly (clang, -O0):
<fchmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
lea    0xedc(%rip),%rsi
mov    $0x20,%edx
call   1030 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fchmod>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edi
mov    $0x20,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Warning: fchmod() unimplemented\0A\00"
define i32 @fchmod() {
%1 = alloca i32
%2 = call i32 @write(i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 32)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [33 x i8] c"Warning: fchmod() unimplemented\0A\00"
define i32 @fchmod() {
%1 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 32)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void sig_segment_fault(int signo) {
  printf("sig number is %d\n", signo);
  exit(0);
}


x86 assembly (clang, -O0):
<sig_segment_fault>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_segment_fault>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"sig number is %d\0A\00"
define void @sig_segment_fault(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [18 x i8] c"sig number is %d\0A\00"
define void @sig_segment_fault(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
extern void cset_gate_Lock(volatile int *gate) {
  asm volatile("jmp cset_gate_Lock_check\n"
               "cset_gate_Lock_wait:\n"
               "pause\n"
               "cset_gate_Lock_check:\n"
               "mov %[lock], %%eax\n"
               "cmp %[gate], %%eax\n"
               "je cset_gate_Lock_wait\n"
               "lock xchg %%eax, %[gate]\n"
               "test %%eax, %%eax\n"
               "jnz cset_gate_Lock_wait\n"
               : [gate] "=m"(*gate)
               : [lock] "r"(1)
               : "eax");
}


x86 assembly (clang, -O0):
<cset_gate_Lock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
jmp    1118 <cset_gate_Lock_check>

x86 assembly (clang, -O2):
<cset_gate_Lock>:
mov    $0x1,%ecx
jmp    1109 <cset_gate_Lock_check>

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

LLVM IR (-O2):
define void @cset_gate_Lock(i32* %0) {
tail call void asm sideeffect "jmp cset_gate_Lock_check\0Acset_gate_Lock_wait:\0Apause\0Acset_gate_Lock_check:\0Amov $1, %eax\0Acmp $0, %eax\0Aje cset_gate_Lock_wait\0Alock xchg %eax, $0\0Atest %eax, %eax\0Ajnz cset_gate_Lock_wait\0A", "=*m,r,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32 1)
ret void
}
/* Variables and functions */
scalar_t__ hmalloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *hstrdup(const char *s) {
  char *p;
  p = (char *)hmalloc(strlen(s) + 1);
  strcpy(p, s);
  return p;
}


x86 assembly (clang, -O0):
<hstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <hmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <hmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @hstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @hmalloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @hstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @hmalloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ decodertfhtml(unsigned char *, int *);
int fread(unsigned char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(unsigned char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
void main() {
  unsigned char buf[1024 * 1024];
  int len = fread(buf, 1, 1024 * 1024, stdin);
  decodertfhtml(buf, &len);
  fwrite(buf, 1, len, stdout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100010,%rsp
lea    -0x100000(%rbp),%rdi
mov    0x2e9f(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
mov    $0x100000,%edx
call   1030 <fread@plt>
mov    %eax,-0x100004(%rbp)
lea    -0x100000(%rbp),%rdi
lea    -0x100004(%rbp),%rsi
call   1040 <decodertfhtml@plt>
lea    -0x100000(%rbp),%rdi
mov    -0x100004(%rbp),%edx
mov    0x2e51(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1050 <fwrite@plt>
add    $0x100010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100010,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%ecx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x100000,%edx
call   1030 <fread@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <decodertfhtml@plt>
mov    0xc(%rsp),%edx
mov    0x2e64(%rip),%rax
mov    (%rax),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1050 <fwrite@plt>
add    $0x100010,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
define void @main() {
%1 = alloca [1048576 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %1, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32 @fread(i8* %3, i32 1, i32 1048576, i32 %4)
store i32 %5, i32* %2
%6 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %1, i64 0, i64 0
%7 = call i32 @decodertfhtml(i8* %6, i32* %2)
%8 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %1, i64 0, i64 0
%9 = load i32, i32* %2
%10 = load i32, i32* @stdout
%11 = call i32 @fwrite(i8* %8, i32 1, i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@stdout = global i32 0
define void @main() {
%1 = alloca [1048576 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
%5 = load i32, i32* @stdin
%6 = call i32 @fread(i8* %3, i32 1, i32 1048576, i32 %5)
store i32 %6, i32* %2
%7 = call i32 @decodertfhtml(i8* %3, i32* %2)
%8 = load i32, i32* %2
%9 = load i32, i32* @stdout
%10 = call i32 @fwrite(i8* %3, i32 1, i32 %8, i32 %9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int _fork_watchdog0(int /*<<< orphan*/, int /*<<< orphan*/);
int _fork_watchdog(pid_t child, pid_t parent) {
  return _fork_watchdog0(child, parent);
}


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

x86 assembly (clang, -O2):
<_fork_watchdog>:
jmp    1030 <_fork_watchdog0@plt>

LLVM IR (-O0):
define i32 @_fork_watchdog(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 @_fork_watchdog0(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @_fork_watchdog(i32 %0, i32 %1) {
%3 = tail call i32 @_fork_watchdog0(i32 %0, i32 %1)
ret i32 %3
}
int isDecimal(char c) { return c >= '0' && c <= '9'; }


x86 assembly (clang, -O0):
<isDecimal>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <isDecimal+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isDecimal>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isDecimal(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
double f(double const x, double const y) { return 2 / (x * x) - y * y / 2; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xee0(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xeca(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mulsd  %xmm0,%xmm0
movsd  0xef4(%rip),%xmm2
divsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm1
mulsd  0xeec(%rip),%xmm1
addsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @f(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = fmul double %5, %6
%8 = fdiv double 2.000000e+00, %7
%9 = load double, double* %4
%10 = load double, double* %4
%11 = fmul double %9, %10
%12 = fdiv double %11, 2.000000e+00
%13 = fsub double %8, %12
ret double %13
}

LLVM IR (-O2):
define double @f(double %0, double %1) {
%3 = fmul double %0, %0
%4 = fdiv double 2.000000e+00, %3
%5 = fmul double %1, %1
%6 = fmul double %5, 5.000000e-01
%7 = fsub double %4, %6
ret double %7
}
const char *get_os() { return "POSIX"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"POSIX\00"
define i8* @get_os() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"POSIX\00"
define i8* @get_os() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ FAIL(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
__attribute__((constructor)) void secondInit() {
  FAIL("initializer-bounds-check, second init called");
  exit(0);
}


x86 assembly (clang, -O0):
<secondInit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <FAIL@plt>
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<secondInit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <FAIL@plt>
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"initializer-bounds-check, second init called\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @secondInit, i8* null }]
define void @secondInit() {
%1 = call i32 @FAIL(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [45 x i8] c"initializer-bounds-check, second init called\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @secondInit, i8* null }]
define void @secondInit() {
%1 = tail call i32 @FAIL(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ my_lib_function();
int main(void) {
  my_lib_function();
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <my_lib_function@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <my_lib_function@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @my_lib_function()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SynthOS_initScheduler();
void SynthOS_init() { SynthOS_initScheduler(); }


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

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

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

LLVM IR (-O2):
define void @SynthOS_init() {
%1 = tail call i32 (...) @SynthOS_initScheduler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello() { printf("\n\n\n\nhello world\n\n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"\0A\0A\0A\0Ahello world\0A\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ spiAssertCs();
int /*<<< orphan*/ spiTransfer(unsigned int volatile);
void WriteSpiCommand(volatile unsigned int command) {
  spiAssertCs();
  spiTransfer(command & 0xFF);
  spiAssertCs();
}


x86 assembly (clang, -O0):
<WriteSpiCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <spiAssertCs@plt>
mov    -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <spiTransfer@plt>
mov    $0x0,%al
call   1040 <spiAssertCs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteSpiCommand>:
push   %rax
mov    %edi,0x4(%rsp)
xor    %eax,%eax
call   1040 <spiAssertCs@plt>
mov    0x4(%rsp),%eax
movzbl %al,%edi
call   1030 <spiTransfer@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <spiAssertCs@plt>

LLVM IR (-O0):
define void @WriteSpiCommand(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = call i32 (...) @spiAssertCs()
%4 = load volatile i32, i32* %2
%5 = and i32 %4, 255
%6 = call i32 @spiTransfer(i32 %5)
%7 = call i32 (...) @spiAssertCs()
ret void
}

LLVM IR (-O2):
define void @WriteSpiCommand(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = tail call i32 (...) @spiAssertCs()
%4 = load volatile i32, i32* %2
%5 = and i32 %4, 255
%6 = tail call i32 @spiTransfer(i32 %5)
%7 = tail call i32 (...) @spiAssertCs()
ret void
}
int d_le_mm2(double *a1, double *a2) { return !(((*a1) <= (*a2))); }


x86 assembly (clang, -O0):
<d_le_mm2>:
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),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_le_mm2>:
movsd  (%rsi),%xmm0
xor    %eax,%eax
ucomisd (%rdi),%xmm0
setb   %al
ret

LLVM IR (-O0):
define i32 @d_le_mm2(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = fcmp ole double %6, %8
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @d_le_mm2(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp ugt double %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int dec_to_oct(int dec) {
  int ret = 0;
  int mult = 1;
  while (dec != 0) {
    int rem = dec % 10;
    ret += (rem * mult);
    dec /= 10;
    mult *= 8;
  }
  return ret;
}


x86 assembly (clang, -O0):
<dec_to_oct>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1156 <dec_to_oct+0x56>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <dec_to_oct+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec_to_oct>:
xor    %eax,%eax
test   %edi,%edi
je     1143 <dec_to_oct+0x43>
mov    $0x1,%ecx
nopl   0x0(%rax,%rax,1)
movslq %edi,%rdx
imul   $0x66666667,%rdx,%rdi
mov    %rdi,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdi
add    %esi,%edi
lea    (%rdi,%rdi,1),%esi
lea    (%rsi,%rsi,4),%r8d
mov    %edx,%esi
sub    %r8d,%esi
imul   %ecx,%esi
add    %esi,%eax
shl    $0x3,%ecx
add    $0x9,%edx
cmp    $0x12,%edx
ja     1110 <dec_to_oct+0x10>
ret

LLVM IR (-O0):
define i32 @dec_to_oct(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 1, i32* %4
br label %6
6: ; preds = %9, %1
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %21
9: ; preds = %6
%10 = load i32, i32* %2
%11 = srem i32 %10, 10
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = mul nsw i32 %12, %13
%15 = load i32, i32* %3
%16 = add nsw i32 %15, %14
store i32 %16, i32* %3
%17 = load i32, i32* %2
%18 = sdiv i32 %17, 10
store i32 %18, i32* %2
%19 = load i32, i32* %4
%20 = mul nsw i32 %19, 8
store i32 %20, i32* %4
br label %6
21: ; preds = %6
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @dec_to_oct(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ %0, %1 ]
%5 = phi i32 [ %11, %3 ], [ 1, %1 ]
%6 = phi i32 [ %9, %3 ], [ 0, %1 ]
%7 = srem i32 %4, 10
%8 = mul nsw i32 %7, %5
%9 = add nsw i32 %8, %6
%10 = sdiv i32 %4, 10
%11 = shl nsw i32 %5, 3
%12 = add i32 %4, 9
%13 = icmp ult i32 %12, 19
br i1 %13, label %14, label %3
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %15
}
void avio_seek_time() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_value_array_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
int put_string(const char *str, char **ptr) {
  if (!str)
    str = "";
  strcpy(*ptr, str);
  *ptr += strlen(str) + 1;
  return 0;
}


x86 assembly (clang, -O0):
<put_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1146 <put_string+0x26>
lea    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
lea    0xecc(%rip),%rax
cmove  %rax,%rbx
mov    (%rsi),%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    (%r14),%rcx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @put_string(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 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %2
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %3
br label %8
8: ; preds = %7, %2
%9 = load i8**, i8*** %4
%10 = load i8*, i8** %9
%11 = load i8*, i8** %3
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
%14 = call i64 @strlen(i8* %13)
%15 = add nsw i64 %14, 1
%16 = load i8**, i8*** %4
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8, i8* %17, i64 %15
store i8* %18, i8** %16
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @put_string(i8* %0, i8** nocapture %1) {
%3 = icmp eq i8* %0, null
%4 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %0
%5 = load i8*, i8** %1
%6 = tail call i32 @strcpy(i8* %5, i8* %4)
%7 = tail call i64 @strlen(i8* dereferenceable(1) %4)
%8 = add nsw i64 %7, 1
%9 = load i8*, i8** %1
%10 = getelementptr inbounds i8, i8* %9, i64 %8
store i8* %10, i8** %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char const *, int);
int /*<<< orphan*/ stderr;
void exit_i(int status, const char *file, int line) {
  if (status != 0) {
    fprintf(stderr, "exiting status = %d, file='%s' linenum=%d\n", status, file,
            line);
  }
  exit(status);
}


x86 assembly (clang, -O0):
<exit_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115c <exit_i+0x3c>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_i>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
je     1144 <exit_i+0x24>
mov    %edx,%r8d
mov    %rsi,%rcx
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"exiting status = %d, file='%s' linenum=%d\0A\00"
define void @exit_i(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 i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load i32, i32* @stderr
%11 = load i32, i32* %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %12, i32 %13)
br label %15
15: ; preds = %9, %3
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"exiting status = %d, file='%s' linenum=%d\0A\00"
define void @exit_i(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1, i32 %2)
br label %8
8: ; preds = %5, %3
%9 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ vecNd_scalarDiv_new(double *, double *, double const,
                                       int const);
void vecNd_scalarDiv(double v[], const double scalar, const int n) {
  vecNd_scalarDiv_new(v, v, scalar, n);
}


x86 assembly (clang, -O0):
<vecNd_scalarDiv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%edx
call   1030 <vecNd_scalarDiv_new@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vecNd_scalarDiv>:
mov    %esi,%edx
mov    %rdi,%rsi
jmp    1030 <vecNd_scalarDiv_new@plt>

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

LLVM IR (-O2):
define void @vecNd_scalarDiv(double* %0, double %1, i32 %2) {
%4 = tail call i32 @vecNd_scalarDiv_new(double* %0, double* %0, double %1, i32 %2)
ret void
}
void INT_Excep_MTU7_TGIA7(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU7_TGIA7() {
ret void
}
/* Variables and functions */
int O_CREAT;
int O_EXCL;
int S_IRUSR;
int S_IWUSR;
int /*<<< orphan*/ printf(char *, int);
int shm_open(char *, int, int);
int /*<<< orphan*/ shm_unlink(char *);
int main(void) {
  int i;
  i = shm_open("/tmp/shared", O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
  printf("shm_open rc = %d\n", i);
  shm_unlink("/tmp/shared");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
mov    0x2e81(%rip),%rax
or     (%rax),%esi
mov    0x2e70(%rip),%rax
mov    (%rax),%edx
mov    0x2e7f(%rip),%rax
or     (%rax),%edx
lea    0xe96(%rip),%rdi
call   1040 <shm_open@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
lea    0xe78(%rip),%rdi
call   1050 <shm_unlink@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    0x2e91(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e7e(%rip),%rax
mov    0x2e8f(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
lea    0xea4(%rip),%rbx
mov    %rbx,%rdi
call   1040 <shm_open@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1050 <shm_unlink@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/tmp/shared\00"
@O_CREAT = global i32 0
@O_EXCL = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@.str.1 = [18 x i8] c"shm_open rc = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @O_CREAT
%4 = load i32, i32* @O_EXCL
%5 = or i32 %3, %4
%6 = load i32, i32* @S_IRUSR
%7 = load i32, i32* @S_IWUSR
%8 = or i32 %6, %7
%9 = call i32 @shm_open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8)
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = call i32 @shm_unlink(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"/tmp/shared\00"
@O_CREAT = global i32 0
@O_EXCL = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@.str.1 = [18 x i8] c"shm_open rc = %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @O_CREAT
%2 = load i32, i32* @O_EXCL
%3 = or i32 %2, %1
%4 = load i32, i32* @S_IRUSR
%5 = load i32, i32* @S_IWUSR
%6 = or i32 %5, %4
%7 = tail call i32 @shm_open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = tail call i32 @shm_unlink(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ link_il(char *);
int /*<<< orphan*/ load_il(char *);
void built_in() {
  load_il("sys.il");
  link_il("sys.il");
}


x86 assembly (clang, -O0):
<built_in>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <load_il@plt>
lea    0xec9(%rip),%rdi
call   1030 <link_il@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<built_in>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <load_il@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <link_il@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"sys.il\00"
define void @built_in() {
%1 = call i32 @load_il(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @link_il(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"sys.il\00"
define void @built_in() {
%1 = tail call i32 @load_il(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @link_il(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
char *corta_string(char *apuntador) {
  if ((*apuntador == '\0') || (*(apuntador + 1) == '\0'))
    return "Error en corta_string";
  apuntador = apuntador + 1;
  return apuntador;
}


x86 assembly (clang, -O0):
<corta_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1129 <corta_string+0x29>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    1139 <corta_string+0x39>
lea    0xed0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    114d <corta_string+0x4d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<corta_string>:
cmpb   $0x0,(%rdi)
je     1119 <corta_string+0x19>
cmpb   $0x0,0x1(%rdi)
lea    0x1(%rdi),%rcx
lea    0xeec(%rip),%rax
cmovne %rcx,%rax
ret
lea    0xee0(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"Error en corta_string\00"
define i8* @corta_string(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %5
br label %9
9: ; preds = %4, %1
%10 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %1 ], [ %8, %4 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ enable_8259A_irq(unsigned int);
void end_8259A_irq(unsigned int irq) { enable_8259A_irq(irq); }


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

x86 assembly (clang, -O2):
<end_8259A_irq>:
jmp    1030 <enable_8259A_irq@plt>

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

LLVM IR (-O2):
define void @end_8259A_irq(i32 %0) {
%2 = tail call i32 @enable_8259A_irq(i32 %0)
ret void
}
/* Type definitions */
struct cpu {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cpu_set_r8(struct cpu *, int, unsigned char);
void cpu_set_e(struct cpu *cpu, unsigned char e) { cpu_set_r8(cpu, (4), e); }


x86 assembly (clang, -O0):
<cpu_set_e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
movzbl -0x9(%rbp),%edx
call   1030 <cpu_set_r8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_set_e>:
mov    %esi,%edx
mov    $0x4,%esi
jmp    1030 <cpu_set_r8@plt>

LLVM IR (-O0):
%struct.cpu = type { i32 }
define void @cpu_set_e(%struct.cpu* %0, i8 zeroext %1) {
%3 = alloca %struct.cpu*
%4 = alloca i8
store %struct.cpu* %0, %struct.cpu** %3
store i8 %1, i8* %4
%5 = load %struct.cpu*, %struct.cpu** %3
%6 = load i8, i8* %4
%7 = call i32 @cpu_set_r8(%struct.cpu* %5, i32 4, i8 zeroext %6)
ret void
}

LLVM IR (-O2):
%struct.cpu = type { i32 }
define void @cpu_set_e(%struct.cpu* %0, i8 zeroext %1) {
%3 = tail call i32 @cpu_set_r8(%struct.cpu* %0, i32 4, i8 zeroext %1)
ret void
}
int setbits(int x, int p, int n, int y) {
  return (x & ~(~(~0 << n) << (p - n + 1))) | ((y & ~(~0 << n)) << (p - n + 1));
}


x86 assembly (clang, -O0):
<setbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%esi
shl    %cl,%esi
mov    %esi,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%edx
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbits>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
mov    %eax,%edx
shl    %cl,%edx
not    %edx
and    %edi,%edx
and    %r8d,%eax
shl    %cl,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @setbits(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %7
%11 = shl i32 -1, %10
%12 = xor i32 %11, -1
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = sub nsw i32 %13, %14
%16 = add nsw i32 %15, 1
%17 = shl i32 %12, %16
%18 = xor i32 %17, -1
%19 = and i32 %9, %18
%20 = load i32, i32* %8
%21 = load i32, i32* %7
%22 = shl i32 -1, %21
%23 = xor i32 %22, -1
%24 = and i32 %20, %23
%25 = load i32, i32* %6
%26 = load i32, i32* %7
%27 = sub nsw i32 %25, %26
%28 = add nsw i32 %27, 1
%29 = shl i32 %24, %28
%30 = or i32 %19, %29
ret i32 %30
}

LLVM IR (-O2):
define i32 @setbits(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl nsw i32 -1, %2
%6 = xor i32 %5, -1
%7 = sub nsw i32 %1, %2
%8 = add nsw i32 %7, 1
%9 = shl i32 %6, %8
%10 = xor i32 %9, -1
%11 = and i32 %10, %0
%12 = and i32 %6, %3
%13 = shl i32 %12, %8
%14 = or i32 %11, %13
ret i32 %14
}