xunge/DecIR huggingface dataset:
outnum(n) int n;
{
  int a;
  if (a = n / 10)
    outnum(a);
  ptc(n % 10 + '0');
}


x86 assembly (clang, -O0):
<outnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     114a <outnum+0x2a>
mov    -0xc(%rbp),%edi
call   1030 <outnum@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x30,%edi
mov    $0x0,%al
call   1040 <ptc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outnum>:
push   %rbx
lea    0x9(%rdi),%eax
movslq %edi,%rbx
cmp    $0x13,%eax
jb     1145 <outnum+0x25>
imul   $0x66666667,%rbx,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x22,%rdi
add    %eax,%edi
call   1030 <outnum@plt>
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
lea    (%rbx,%rax,1),%edi
add    $0x30,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <ptc@plt>

LLVM IR (-O0):
define i32 @outnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = sdiv i32 %5, 10
store i32 %6, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %4
%10 = call i32 @outnum(i32 %9)
br label %11
11: ; preds = %8, %1
%12 = load i32, i32* %3
%13 = srem i32 %12, 10
%14 = add nsw i32 %13, 48
%15 = call i32 (i32, ...) bitcast (i32 (...)* @ptc to i32 (i32, ...)*)(i32 %14)
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @outnum(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = sdiv i32 %0, 10
%6 = tail call i32 @outnum(i32 %5)
br label %7
7: ; preds = %4, %1
%8 = srem i32 %0, 10
%9 = add nsw i32 %8, 48
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @ptc to i32 (i32, ...)*)(i32 %9)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ hd44780_command(int);
void lcd_clear() { hd44780_command(0x01); }


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

x86 assembly (clang, -O2):
<lcd_clear>:
mov    $0x1,%edi
jmp    1030 <hd44780_command@plt>

LLVM IR (-O0):
define void @lcd_clear() {
%1 = call i32 @hd44780_command(i32 1)
ret void
}

LLVM IR (-O2):
define void @lcd_clear() {
%1 = tail call i32 @hd44780_command(i32 1)
ret void
}
int getUniLenOfGbStr(const unsigned char *p) {
  int len = 0;
  while (*p) {
    if (*p & 0x80) {
      p += 2;
    } else {
      p += 1;
    }
    len++;
  }
  return len;
}


x86 assembly (clang, -O0):
<getUniLenOfGbStr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115c <getUniLenOfGbStr+0x5c>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1142 <getUniLenOfGbStr+0x42>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    114e <getUniLenOfGbStr+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <getUniLenOfGbStr+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getUniLenOfGbStr>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1129 <getUniLenOfGbStr+0x29>
nopl   0x0(%rax,%rax,1)
xor    %edx,%edx
test   %cl,%cl
setns  %dl
sub    %rdx,%rdi
add    $0x1,%eax
movzbl 0x2(%rdi),%ecx
add    $0x2,%rdi
test   %cl,%cl
jne    1110 <getUniLenOfGbStr+0x10>
ret

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

LLVM IR (-O2):
define i32 @getUniLenOfGbStr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = icmp sgt i8 %5, -1
%9 = select i1 %8, i64 1, i64 2
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = add nuw nsw i32 %6, 1
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
scalar_t__ strtoll(char const *, char **, int);
unsigned long long strtoull(const char *str, char **endptr, int base) {
  return (unsigned long long)strtoll(str, endptr, base);
}


x86 assembly (clang, -O0):
<strtoull>:
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
call   1030 <strtoll@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoull>:
jmp    1030 <strtoll@plt>

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

LLVM IR (-O2):
define i64 @strtoull(i8* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i64 @strtoll(i8* %0, i8** %1, i32 %2)
ret i64 %4
}
float crandom(float x) {
  int n;
  n = x * 1048576.;
  return ((float)((1061 * n + 221589) % 1048576) / 1048576.);
}


x86 assembly (clang, -O0):
<crandom>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
imul   $0x425,-0x8(%rbp),%eax
add    $0x36195,%eax
mov    $0x100000,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb7(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<crandom>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
imul   $0x425,%eax,%eax
lea    0x36195(%rax),%ecx
lea    0x136194(%rax),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
and    $0xfff00000,%edx
neg    %edx
add    %edx,%eax
add    $0x36195,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0xec3(%rip),%xmm0
ret

LLVM IR (-O0):
define float @crandom(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fmul double %5, 0x4130000000000000
%7 = fptosi double %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = mul nsw i32 1061, %8
%10 = add nsw i32 %9, 221589
%11 = srem i32 %10, 1048576
%12 = sitofp i32 %11 to float
%13 = fpext float %12 to double
%14 = fdiv double %13, 0x4130000000000000
%15 = fptrunc double %14 to float
ret float %15
}

LLVM IR (-O2):
define float @crandom(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 0x4130000000000000
%4 = fptosi double %3 to i32
%5 = mul nsw i32 %4, 1061
%6 = add nsw i32 %5, 221589
%7 = srem i32 %6, 1048576
%8 = sitofp i32 %7 to float
%9 = fmul float %8, 0x3EB0000000000000
ret float %9
}
void map2check_check_deref(int line, const char *function_name) {}


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

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

LLVM IR (-O0):
define void @map2check_check_deref(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 @map2check_check_deref(i32 %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ dll_read(int, void *, size_t);
ssize_t __wrap_read(int fd, void *buf, size_t count) {
  return dll_read(fd, buf, count);
}


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

x86 assembly (clang, -O2):
<__wrap_read>:
jmp    1030 <dll_read@plt>

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

LLVM IR (-O2):
define i32 @__wrap_read(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @dll_read(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(void *);
void *realloc(void *, size_t const);
void *nhr_realloc(void *mem, const size_t new_size) {
  if (new_size > 0) {
    void *new_mem = realloc(mem, new_size);
    assert(new_mem);
    return new_mem;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<nhr_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jbe    1162 <nhr_realloc+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116a <nhr_realloc+0x4a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nhr_realloc>:
push   %rbx
test   %rsi,%rsi
je     1138 <nhr_realloc+0x18>
call   1040 <realloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <assert@plt>
jmp    113a <nhr_realloc+0x1a>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @nhr_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i64, i64* %5
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = load i64, i64* %5
%12 = call i8* @realloc(i8* %10, i64 %11)
store i8* %12, i8** %6
%13 = load i8*, i8** %6
%14 = call i32 @assert(i8* %13)
%15 = load i8*, i8** %6
store i8* %15, i8** %3
br label %17
16: ; preds = %2
store i8* null, i8** %3
br label %17
17: ; preds = %16, %9
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @nhr_realloc(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i8* @realloc(i8* %0, i64 %1)
%6 = tail call i32 @assert(i8* %5)
br label %7
7: ; preds = %2, %4
%8 = phi i8* [ %5, %4 ], [ null, %2 ]
ret i8* %8
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_hex(uint8_t *bytes, size_t bytes_len) {
  size_t i;
  for (i = 0; i < bytes_len; ++i) {
    printf("%02x", bytes[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1160 <print_hex+0x50>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <print_hex+0x18>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1157 <print_hex+0x37>
mov    %rsi,%r12
mov    %rdi,%r14
lea    0xec6(%rip),%r15
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_hex+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @print_hex(i32* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
struct ether_addr {
  int dummy;
};

/* Variables and functions */
char *ether_ntoa_r(struct ether_addr const *, char *);
char *ether_ntoa(const struct ether_addr *addr) {
  static char asc[18];
  return ether_ntoa_r(addr, asc);
}


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

x86 assembly (clang, -O2):
<ether_ntoa>:
lea    0x2f29(%rip),%rsi
jmp    1030 <ether_ntoa_r@plt>

LLVM IR (-O0):
%struct.ether_addr = type { i32 }
@ether_ntoa.asc = internal global [18 x i8] zeroinitializer
define i8* @ether_ntoa(%struct.ether_addr* %0) {
%2 = alloca %struct.ether_addr*
store %struct.ether_addr* %0, %struct.ether_addr** %2
%3 = load %struct.ether_addr*, %struct.ether_addr** %2
%4 = call i8* @ether_ntoa_r(%struct.ether_addr* %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @ether_ntoa.asc, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
%struct.ether_addr = type { i32 }
@ether_ntoa.asc = internal global [18 x i8] zeroinitializer
define i8* @ether_ntoa(%struct.ether_addr* %0) {
%2 = tail call i8* @ether_ntoa_r(%struct.ether_addr* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @ether_ntoa.asc, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double Multiplicacion(double a, double b) {
  printf("Enter a number: ");
  scanf("%lf", &a);
  printf("Enter a number: ");
  scanf("%lf", &b);
  return (a * b);
}


x86 assembly (clang, -O0):
<Multiplicacion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Multiplicacion>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0xec6(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%r14
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Multiplicacion(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%9 = load double, double* %3
%10 = load double, double* %4
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Multiplicacion(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%9 = load double, double* %3
%10 = load double, double* %4
%11 = fmul double %9, %10
ret double %11
}
double SN_get_tolerance(double *dparam) { return dparam[0]; }


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

x86 assembly (clang, -O2):
<SN_get_tolerance>:
movsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @SN_get_tolerance(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
ret double %5
}

LLVM IR (-O2):
define double @SN_get_tolerance(double* nocapture %0) {
%2 = load double, double* %0
ret double %2
}
/* Variables and functions */
int strncasecmp(char const *, char const *, int);
int _strnicmp(const char *s1, const char *s2, int count) {
  return strncasecmp(s1, s2, count);
}


x86 assembly (clang, -O0):
<_strnicmp>:
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
call   1030 <strncasecmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strnicmp>:
jmp    1030 <strncasecmp@plt>

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

LLVM IR (-O2):
define i32 @_strnicmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @strncasecmp(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
unsigned int config_pci_read(int, int, int, int);
unsigned int extended_pci_read(int, int, int, int);
unsigned int pci_read_config(int bus, int device, int function, int offset) {
  if (offset < 0x100) {
    return config_pci_read(bus, device, function, offset);
  }
  return extended_pci_read(bus, device, function, offset);
}


x86 assembly (clang, -O0):
<pci_read_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jge    115a <pci_read_config+0x3a>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <config_pci_read@plt>
mov    %eax,-0x4(%rbp)
jmp    116e <pci_read_config+0x4e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <extended_pci_read@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pci_read_config>:
cmp    $0xff,%ecx
jg     112d <pci_read_config+0xd>
jmp    1040 <config_pci_read@plt>
jmp    1030 <extended_pci_read@plt>

LLVM IR (-O0):
define i32 @pci_read_config(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %9
%11 = icmp slt i32 %10, 256
br i1 %11, label %12, label %18
12: ; preds = %4
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = call i32 @config_pci_read(i32 %13, i32 %14, i32 %15, i32 %16)
store i32 %17, i32* %5
br label %24
18: ; preds = %4
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = load i32, i32* %8
%22 = load i32, i32* %9
%23 = call i32 @extended_pci_read(i32 %19, i32 %20, i32 %21, i32 %22)
store i32 %23, i32* %5
br label %24
24: ; preds = %18, %12
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @pci_read_config(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %3, 256
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @config_pci_read(i32 %0, i32 %1, i32 %2, i32 %3)
br label %10
8: ; preds = %4
%9 = tail call i32 @extended_pci_read(i32 %0, i32 %1, i32 %2, i32 %3)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *, char const *);
void throwMemErr(const char *varname, const char *functionname) {
  printf("Memory allocation error: error allocating memory for variable "
         "%s in %s.\n",
         varname, functionname);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<throwMemErr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<throwMemErr>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [73 x i8] c"Memory allocation error: error allocating memory for variable %s in %s.\0A\00"
@EXIT_FAILURE = global i32 0
define void @throwMemErr(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 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@.str = [73 x i8] c"Memory allocation error: error allocating memory for variable %s in %s.\0A\00"
@EXIT_FAILURE = global i32 0
define void @throwMemErr(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void TEKMacPicunload(void) {}


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

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

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

LLVM IR (-O2):
define void @TEKMacPicunload() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_SET_RFM_TXD_PIN() { set_io_bit(0x37, 3); }


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

x86 assembly (clang, -O2):
<TOSH_SET_RFM_TXD_PIN>:
mov    $0x37,%edi
mov    $0x3,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_RFM_TXD_PIN() {
%1 = call i32 @set_io_bit(i32 55, i32 3)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_RFM_TXD_PIN() {
%1 = tail call i32 @set_io_bit(i32 55, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int *, int /*<<< orphan*/);
void f6e(int *p, int offset) { bar((p + offset) + 1, 0); }


x86 assembly (clang, -O0):
<f6e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
add    $0x4,%rdi
xor    %esi,%esi
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6e>:
movslq %esi,%rax
lea    (%rdi,%rax,4),%rdi
add    $0x4,%rdi
xor    %esi,%esi
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @f6e(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = call i32 @bar(i32* %9, i32 0)
ret void
}

LLVM IR (-O2):
define void @f6e(i32* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = getelementptr inbounds i32, i32* %4, i64 1
%6 = tail call i32 @bar(i32* %5, i32 0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int clear_standard_witsols(void) {
  int *a, *b;
  double *c;
  int fail = _ada_use_c2phc4c(857, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<clear_standard_witsols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x359,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_standard_witsols>:
mov    $0x359,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @clear_standard_witsols() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca double*
%4 = alloca i32
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %3
%8 = call i32 @_ada_use_c2phc4c(i32 857, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_standard_witsols() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 857, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
void *videowallcontrol_newInstance();
void *newInstance(void) { return videowallcontrol_newInstance(); }


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

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

LLVM IR (-O0):
define i8* @newInstance() {
%1 = call i8* (...) @videowallcontrol_newInstance()
ret i8* %1
}

LLVM IR (-O2):
define i8* @newInstance() {
%1 = tail call i8* (...) @videowallcontrol_newInstance()
ret i8* %1
}
void helper_function(int *a) {
  printf("%s(%d): a is %d\n", __func__, 4, *a);
  *a += 5;
  printf("%s(%d): a is %d\n", __func__, 6, *a);
}


x86 assembly (clang, -O0):
<helper_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
lea    0xed7(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x5,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
lea    0xeac(%rip),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x6,%edx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_function>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%ecx
lea    0xedf(%rip),%r14
lea    0xee9(%rip),%r15
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%ecx
add    $0x5,%ecx
mov    %ecx,(%rbx)
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x6,%edx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%s(%d): a is %d\0A\00"
@__func__.helper_function = [16 x i8] c"helper_function\00"
define void @helper_function(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.helper_function, i64 0, i64 0), i32 4, i32 %4)
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 5
store i32 %8, i32* %6
%9 = load i32*, i32** %2
%10 = load i32, i32* %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.helper_function, i64 0, i64 0), i32 6, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s(%d): a is %d\0A\00"
@__func__.helper_function = [16 x i8] c"helper_function\00"
define void @helper_function(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.helper_function, i64 0, i64 0), i32 4, i32 %2)
%4 = load i32, i32* %0
%5 = add nsw i32 %4, 5
store i32 %5, i32* %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.helper_function, i64 0, i64 0), i32 6, i32 %5)
ret void
}
/* Type definitions */
typedef scalar_t__ cl_int;

/* Variables and functions */
scalar_t__ CL_SUCCESS;
char *clErrorStr(scalar_t__);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void clError(char *s, cl_int err) {
  if (err != CL_SUCCESS) {
    fprintf(stderr, "%s: %s\n", s, clErrorStr(err));
  }
}


x86 assembly (clang, -O0):
<clError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2e9d(%rip),%rcx
cmp    (%rcx),%rax
je     1177 <clError+0x57>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <clErrorStr@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
lea    0xe8e(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clError>:
push   %rbp
push   %rbx
push   %rax
mov    0x2eae(%rip),%rax
cmp    %rsi,(%rax)
jne    1136 <clError+0x16>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rdi,%rbx
mov    0x2ea0(%rip),%rax
mov    (%rax),%ebp
mov    %rsi,%rdi
call   1030 <clErrorStr@plt>
lea    0xeaf(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@CL_SUCCESS = global i64 0
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
define void @clError(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 i64, i64* @CL_SUCCESS
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = call i8* @clErrorStr(i64 %11)
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %12)
br label %14
14: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
@CL_SUCCESS = global i64 0
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
define void @clError(i8* %0, i64 %1) {
%3 = load i64, i64* @CL_SUCCESS
%4 = icmp eq i64 %3, %1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i8* @clErrorStr(i64 %1)
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %7)
br label %9
9: ; preds = %5, %2
ret void
}
/* Type definitions */
struct string_tree {
  int dummy;
};
struct string_entries {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ *string_entries_RB_INSERT(struct string_entries *,
                                             struct string_tree *);
int string_tree_insert(struct string_entries *root, struct string_tree *st) {
  if (string_entries_RB_INSERT(root, st) != NULL) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<string_tree_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <string_entries_RB_INSERT@plt>
cmp    $0x0,%rax
je     1143 <string_tree_insert+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    114a <string_tree_insert+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_tree_insert>:
push   %rax
call   1030 <string_entries_RB_INSERT@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.string_entries = type { i32 }
%struct.string_tree = type { i32 }
define i32 @string_tree_insert(%struct.string_entries* %0, %struct.string_tree* %1) {
%3 = alloca i32
%4 = alloca %struct.string_entries*
%5 = alloca %struct.string_tree*
store %struct.string_entries* %0, %struct.string_entries** %4
store %struct.string_tree* %1, %struct.string_tree** %5
%6 = load %struct.string_entries*, %struct.string_entries** %4
%7 = load %struct.string_tree*, %struct.string_tree** %5
%8 = call i32* @string_entries_RB_INSERT(%struct.string_entries* %6, %struct.string_tree* %7)
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %12
11: ; preds = %2
store i32 0, i32* %3
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
%struct.string_entries = type { i32 }
%struct.string_tree = type { i32 }
define i32 @string_tree_insert(%struct.string_entries* %0, %struct.string_tree* %1) {
%3 = tail call i32* @string_entries_RB_INSERT(%struct.string_entries* %0, %struct.string_tree* %1)
%4 = icmp ne i32* %3, null
%5 = sext i1 %4 to i32
ret i32 %5
}
int __attribute__((no, noclone)) foo(float a) { return a * 4.9f; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mulss  0xef8(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @foo(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x40139999A0000000
%5 = fptosi float %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo(float %0) {
%2 = fmul float %0, 0x40139999A0000000
%3 = fptosi float %2 to i32
ret i32 %3
}
/* Variables and functions */
size_t fwrite(void const *, int, size_t, void *);
size_t file_write(void *file, const void *data, size_t size) {
  return fwrite(data, 1, size, file);
}


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

x86 assembly (clang, -O2):
<file_write>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define i64 @file_write(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @fwrite(i8* %1, i32 1, i64 %2, i8* %0)
ret i64 %4
}
/* Variables and functions */
char *gettext(char *);
int /*<<< orphan*/ printf(char *);
void report_header() {
  printf(gettext("RO    RA   SSZ   BSZ   StartSec     Size    Device\n"));
}


x86 assembly (clang, -O0):
<report_header>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_header>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"RO RA SSZ BSZ StartSec Size Device\0A\00"
define void @report_header() {
%1 = call i8* @gettext(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* %1)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"RO RA SSZ BSZ StartSec Size Device\0A\00"
define void @report_header() {
%1 = tail call i8* @gettext(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) %1)
ret void
}
int double_ne(double n1, double n2) { return n1 != n2; }


x86 assembly (clang, -O0):
<double_ne>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_ne>:
cmpneqsd %xmm1,%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @double_ne(double %0, double %1) {
%3 = fcmp une double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(unsigned char, unsigned char);
void SensorSetReg_ET8EC3(unsigned short uAddr, unsigned short uVal) {
  VIM_SIF_I2cWriteByte((unsigned char)uAddr, (unsigned char)uVal);
}


x86 assembly (clang, -O0):
<SensorSetReg_ET8EC3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,%cl
mov    -0x4(%rbp),%ax
movzbl %cl,%edi
movzbl %al,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetReg_ET8EC3>:
movzbl %dil,%edi
movzbl %sil,%esi
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetReg_ET8EC3(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = trunc i16 %5 to i8
%7 = load i16, i16* %4
%8 = trunc i16 %7 to i8
%9 = call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %6, i8 zeroext %8)
ret void
}

LLVM IR (-O2):
define void @SensorSetReg_ET8EC3(i16 zeroext %0, i16 zeroext %1) {
%3 = trunc i16 %0 to i8
%4 = trunc i16 %1 to i8
%5 = tail call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %3, i8 zeroext %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ writedata(int, char *, int /*<<< orphan*/);
void writestring(int fd, char *b) { writedata(fd, b, strlen(b)); }


x86 assembly (clang, -O0):
<writestring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <writedata@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writestring>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <writedata@plt>

LLVM IR (-O0):
define void @writestring(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @writedata(i32 %5, i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @writestring(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @writedata(i32 %0, i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wait_100_n_msec(long);
void sleep_msec(long n) { wait_100_n_msec(n / 100); }


x86 assembly (clang, -O0):
<sleep_msec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x64,%ecx
cqto
idiv   %rcx
mov    %rax,%rdi
call   1030 <wait_100_n_msec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_msec>:
movabs $0xa3d70a3d70a3d70b,%rcx
0a d7 a3
mov    %rdi,%rax
imul   %rcx
add    %rdx,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x6,%rdi
add    %rax,%rdi
jmp    1030 <wait_100_n_msec@plt>

LLVM IR (-O0):
define void @sleep_msec(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sdiv i64 %3, 100
%5 = call i32 @wait_100_n_msec(i64 %4)
ret void
}

LLVM IR (-O2):
define void @sleep_msec(i64 %0) {
%2 = sdiv i64 %0, 100
%3 = tail call i32 @wait_100_n_msec(i64 %2)
ret void
}
/* Variables and functions */
scalar_t__ isfinite(double);
double log(double);
double random_uniform();
double random_laplace(void) {
  double x = random_uniform();
  double y = random_uniform();
  double r = log(x / y);
  return isfinite(r) ? r : 0;
}


x86 assembly (clang, -O0):
<random_laplace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <random_uniform@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <random_uniform@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <isfinite@plt>
cmp    $0x0,%rax
je     1187 <random_laplace+0x57>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1194 <random_laplace+0x64>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1194 <random_laplace+0x64>
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_laplace>:
push   %rax
xor    %eax,%eax
call   1030 <random_uniform@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <random_uniform@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1050 <log@plt>
movsd  %xmm0,(%rsp)
call   1040 <isfinite@plt>
xorpd  %xmm0,%xmm0
test   %rax,%rax
je     116e <random_laplace+0x3e>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @random_laplace() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = call double (...) @random_uniform()
store double %4, double* %1
%5 = call double (...) @random_uniform()
store double %5, double* %2
%6 = load double, double* %1
%7 = load double, double* %2
%8 = fdiv double %6, %7
%9 = call double @log(double %8)
store double %9, double* %3
%10 = load double, double* %3
%11 = call i64 @isfinite(double %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = load double, double* %3
br label %16
15: ; preds = %0
br label %16
16: ; preds = %15, %13
%17 = phi double [ %14, %13 ], [ 0.000000e+00, %15 ]
ret double %17
}

LLVM IR (-O2):
define double @random_laplace() {
%1 = tail call double (...) @random_uniform()
%2 = tail call double (...) @random_uniform()
%3 = fdiv double %1, %2
%4 = tail call double @log(double %3)
%5 = tail call i64 @isfinite(double %4)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, double 0.000000e+00, double %4
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ atomic_thread_fence(int /*<<< orphan*/);
int /*<<< orphan*/ memory_order_acquire;
void nbc_thread_fence_acquire() { atomic_thread_fence(memory_order_acquire); }


x86 assembly (clang, -O0):
<nbc_thread_fence_acquire>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <atomic_thread_fence@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nbc_thread_fence_acquire>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <atomic_thread_fence@plt>

LLVM IR (-O0):
@memory_order_acquire = global i32 0
define void @nbc_thread_fence_acquire() {
%1 = load i32, i32* @memory_order_acquire
%2 = call i32 @atomic_thread_fence(i32 %1)
ret void
}

LLVM IR (-O2):
@memory_order_acquire = global i32 0
define void @nbc_thread_fence_acquire() {
%1 = load i32, i32* @memory_order_acquire
%2 = tail call i32 @atomic_thread_fence(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int /*<<< orphan*/ geteuid();
__attribute__((__weak__, __always___)) uid_t softboundmpx_geteuid() {
  return geteuid();
}


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

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

LLVM IR (-O0):
define weak i32 @softboundmpx_geteuid() {
%1 = call i32 (...) @geteuid()
ret i32 %1
}

LLVM IR (-O2):
define weak i32 @softboundmpx_geteuid() {
%1 = tail call i32 (...) @geteuid()
ret i32 %1
}
int *f7b(int *x) {
  int *p = 0;
  if (((void *)0) == x)
    p = qux();
  if (((void *)0) == x)
    *p = 1;
  return x;
}


x86 assembly (clang, -O0):
<f7b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
jne    113d <f7b+0x2d>
mov    $0x0,%al
call   1030 <qux@plt>
cltq
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
jne    1153 <f7b+0x43>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7b>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1128 <f7b+0x18>
xor    %eax,%eax
call   1030 <qux@plt>
cltq
movl   $0x1,(%rax)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @f7b(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
store i32* null, i32** %3
%4 = load i32*, i32** %2
%5 = icmp eq i32* null, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 (...) @qux()
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
br label %10
10: ; preds = %6, %1
%11 = load i32*, i32** %2
%12 = icmp eq i32* null, %11
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32*, i32** %3
store i32 1, i32* %14
br label %15
15: ; preds = %13, %10
%16 = load i32*, i32** %2
ret i32* %16
}

LLVM IR (-O2):
define i32* @f7b(i32* readnone returned %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 (...) @qux()
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
store i32 1, i32* %6
br label %7
7: ; preds = %1, %3
ret i32* %0
}
void To_Celsius(float *fahr_to_cels) {
  *fahr_to_cels = ((5.0 / 9.0) * (*fahr_to_cels - 32.0));
}


x86 assembly (clang, -O0):
<To_Celsius>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeec(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xed8(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<To_Celsius>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xef0(%rip),%xmm0
mulsd  0xef0(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @To_Celsius(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fsub double %5, 3.200000e+01
%7 = fmul double 0x3FE1C71C71C71C72, %6
%8 = fptrunc double %7 to float
%9 = load float*, float** %2
store float %8, float* %9
ret void
}

LLVM IR (-O2):
define void @To_Celsius(float* nocapture %0) {
%2 = load float, float* %0
%3 = fpext float %2 to double
%4 = fadd double %3, -3.200000e+01
%5 = fmul double %4, 0x3FE1C71C71C71C72
%6 = fptrunc double %5 to float
store float %6, float* %0
ret void
}