xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print_binary(unsigned int n) {
  unsigned int mask = 0;
  mask = ~mask ^ (~mask >> 1);
  for (; mask != 0; mask >>= 1) {
    putchar((n & mask) ? '1' : '0');
  }
}


x86 assembly (clang, -O0):
<print_binary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
shr    $0x1,%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116c <print_binary+0x5c>
mov    -0x4(%rbp),%edx
and    -0x8(%rbp),%edx
mov    $0x30,%eax
mov    $0x31,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <print_binary+0x26>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_binary>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0x80000000,%ebx
mov    $0x80000000,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%eax
and    %r14d,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
shr    %ebp
cmp    $0x1,%ebx
mov    %ebp,%ebx
ja     1130 <print_binary+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @print_binary(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %3
%5 = xor i32 %4, -1
%6 = load i32, i32* %3
%7 = xor i32 %6, -1
%8 = lshr i32 %7, 1
%9 = xor i32 %5, %8
store i32 %9, i32* %3
br label %10
10: ; preds = %22, %1
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %25
13: ; preds = %10
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = and i32 %14, %15
%17 = icmp ne i32 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 49, i32 48
%20 = trunc i32 %19 to i8
%21 = call i32 @putchar(i8 signext %20)
br label %22
22: ; preds = %13
%23 = load i32, i32* %3
%24 = lshr i32 %23, 1
store i32 %24, i32* %3
br label %10
25: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @print_binary(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ -2147483648, %1 ], [ %8, %2 ]
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i8 48, i8 49
%7 = tail call i32 @putchar(i8 signext %6)
%8 = lshr i32 %3, 1
%9 = icmp ult i32 %3, 2
br i1 %9, label %10, label %2
10: ; preds = %2
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long serial;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
void set_XCrossingEvent_serial(void *_p, unsigned long _v) {
  ((XCrossingEvent *)_p)->serial = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XCrossingEvent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
unsigned long rho_ruby_create_string_withlen2(const char *szVal, int len) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i64 @rho_ruby_create_string_withlen2(i8* nocapture readnone %0, i32 %1) {
ret i64 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
void err(FILE *out) { fputc('x', out); }


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

x86 assembly (clang, -O2):
<err>:
mov    %rdi,%rsi
mov    $0x78,%edi
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @err(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputc(i8 signext 120, i32* %3)
ret void
}

LLVM IR (-O2):
define void @err(i32* nocapture %0) {
%2 = tail call i32 @fputc(i8 signext 120, i32* %0)
ret void
}
char *kstrcpy(char *s1, const char *s2) {
  char *dst = s1;
  const char *src = s2;
  while ((*dst++ = *src++) != '\0')
    ;
  return s1;
}


x86 assembly (clang, -O0):
<kstrcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     114f <kstrcpy+0x4f>
jmp    111c <kstrcpy+0x1c>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kstrcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <kstrcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @kstrcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
int init_next3_xattr(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @init_next3_xattr() {
ret i32 0
}
char *fossil_unicode_to_utf8(const void *zUnicode) { return (char *)zUnicode; }


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

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

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

LLVM IR (-O2):
define i8* @fossil_unicode_to_utf8(i8* readnone returned %0) {
ret i8* %0
}
void itime0(int x[3]) { x[0] = x[1] = x[2] = -1; }


x86 assembly (clang, -O0):
<itime0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xffffffff,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0xffffffff,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<itime0>:
movl   $0xffffffff,0x8(%rdi)
movq   $0xffffffffffffffff,(%rdi)
ret

LLVM IR (-O0):
define void @itime0(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
store i32 -1, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 -1, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 -1, i32* %8
ret void
}

LLVM IR (-O2):
define void @itime0(i32* nocapture writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
store i32 -1, i32* %2
%3 = getelementptr inbounds i32, i32* %0, i64 1
store i32 -1, i32* %3
store i32 -1, i32* %0
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void TimerClockSourceSet(uint32_t ui32Base, uint32_t ui32Source) {
  ;

  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000FC8))) = ui32Source;
}


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

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

LLVM IR (-O0):
define void @TimerClockSourceSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 4040
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @TimerClockSourceSet(i64 %0, i64 %1) {
%3 = add i64 %0, 4040
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
int f_bge_rr2(float a1, float a2) {
  return !(__builtin_isgreaterequal(a1, a2));
}


x86 assembly (clang, -O0):
<f_bge_rr2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_bge_rr2>:
xor    %eax,%eax
ucomiss %xmm1,%xmm0
setb   %al
ret

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

LLVM IR (-O2):
define i32 @f_bge_rr2(float %0, float %1) {
%3 = fcmp ult float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ccr2cl();
int /*<<< orphan*/ emit(char *);
void sr2cx(void) {
  ccr2cl();
  emit("mov ch,[__sr+1]\n");
}


x86 assembly (clang, -O0):
<sr2cx>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ccr2cl@plt>
lea    0xece(%rip),%rdi
call   1040 <emit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sr2cx>:
push   %rax
xor    %eax,%eax
call   1030 <ccr2cl@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <emit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"mov ch,[__sr+1]\0A\00"
define void @sr2cx() {
%1 = call i32 (...) @ccr2cl()
%2 = call i32 @emit(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"mov ch,[__sr+1]\0A\00"
define void @sr2cx() {
%1 = tail call i32 (...) @ccr2cl()
%2 = tail call i32 @emit(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nrf_802154_swi_init();
void nrf_802154_request_init(void) { nrf_802154_swi_init(); }


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

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

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

LLVM IR (-O2):
define void @nrf_802154_request_init() {
%1 = tail call i32 (...) @nrf_802154_swi_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/);
void InitRandSeed(void) { srand((unsigned int)time(0)); }


x86 assembly (clang, -O0):
<InitRandSeed>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @InitRandSeed() {
%1 = call i64 @time(i32 0)
%2 = trunc i64 %1 to i32
%3 = call i32 @srand(i32 %2)
ret void
}

LLVM IR (-O2):
define void @InitRandSeed() {
%1 = tail call i64 @time(i32 0)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
ret void
}
/* Variables and functions */
char *get_min_3(char *, char *);
__attribute__((noclone, no, noipa)) void *test_min_3(void) {
  char c;
  char d;
  char *p = get_min_3(&c, &d);
  void *q = p > &c ? &c > &d ? &d : &c : p;
  return q;
}


x86 assembly (clang, -O0):
<test_min_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x1(%rbp),%rdi
lea    -0x2(%rbp),%rsi
call   1030 <get_min_3@plt>
mov    %rax,-0x10(%rbp)
lea    -0x1(%rbp),%rax
cmp    %rax,-0x10(%rbp)
jbe    116f <test_min_3+0x5f>
lea    -0x1(%rbp),%rax
lea    -0x2(%rbp),%rcx
cmp    %rcx,%rax
jbe    1155 <test_min_3+0x45>
lea    -0x2(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1162 <test_min_3+0x52>
lea    -0x1(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1162 <test_min_3+0x52>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1177 <test_min_3+0x67>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_min_3>:
push   %r14
push   %rbx
push   %rax
lea    0x7(%rsp),%r14
lea    0x6(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_min_3@plt>
cmp    %rbx,%r14
cmovbe %r14,%rbx
cmp    %r14,%rax
cmova  %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @test_min_3() {
%1 = alloca i8
%2 = alloca i8
%3 = call i8* @get_min_3(i8* %1, i8* %2)
%4 = icmp ugt i8* %3, %1
%5 = icmp ugt i8* %1, %2
%6 = select i1 %5, i8* %2, i8* %1
%7 = select i1 %4, i8* %6, i8* %3
ret i8* %7
}
int create_file_directory(char *filename) {
  (void)filename;
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @create_file_directory(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void sigint(int i) { exit(1); }


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

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

LLVM IR (-O0):
define void @sigint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @sigint(i32 %0) {
%2 = tail call i32 @exit(i32 1)
unreachable
}
struct module *__module_text_address(unsigned long addr) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.module = type opaque
define %struct.module* @__module_text_address(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret %struct.module* null
}

LLVM IR (-O2):
%struct.module = type opaque
define noalias %struct.module* @__module_text_address(i64 %0) {
ret %struct.module* null
}
/* Variables and functions */
int /*<<< orphan*/ RPI_AuxMiniUartInit(int, int);
int /*<<< orphan*/ printf(char *);
extern void RPI_EnableUart(char *pMessage) {
  RPI_AuxMiniUartInit(115200, 8);
  printf(pMessage);
}


x86 assembly (clang, -O0):
<RPI_EnableUart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1c200,%edi
mov    $0x8,%esi
call   1040 <RPI_AuxMiniUartInit@plt>
mov    -0x8(%rbp),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RPI_EnableUart>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1c200,%edi
mov    $0x8,%esi
call   1040 <RPI_AuxMiniUartInit@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
define void @RPI_EnableUart(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @RPI_AuxMiniUartInit(i32 115200, i32 8)
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* %4)
ret void
}

LLVM IR (-O2):
define void @RPI_EnableUart(i8* nocapture %0) {
%2 = tail call i32 @RPI_AuxMiniUartInit(i32 115200, i32 8)
%3 = tail call i32 @printf(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_interface_name(char *);
int /*<<< orphan*/ printf(char *);
void get_ip_address(char *ipAddr) {
  printf("Calling inet_ntop\n");
  char mac[4];
  get_interface_name(mac);
  printf("After inet_ntop\n");
}


x86 assembly (clang, -O0):
<get_ip_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    -0xc(%rbp),%rdi
call   1040 <get_interface_name@plt>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ip_address>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0x4(%rsp),%rdi
call   1040 <get_interface_name@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Calling inet_ntop\0A\00"
@.str.1 = [17 x i8] c"After inet_ntop\0A\00"
define void @get_ip_address(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
store i8* %0, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%6 = call i32 @get_interface_name(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"Calling inet_ntop\00"
@str.2 = [16 x i8] c"After inet_ntop\00"
define void @get_ip_address(i8* nocapture readnone %0) {
%2 = alloca [4 x i8]
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%5 = call i32 @get_interface_name(i8* %4)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
void ASTILCover_SetText(char *result, const char *src) {
  if (strcmp(src, "<?>") == 0)
    result[0] = '\0';
  else
    strcpy(result, src);
}


x86 assembly (clang, -O0):
<ASTILCover_SetText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1156 <ASTILCover_SetText+0x36>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    1163 <ASTILCover_SetText+0x43>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASTILCover_SetText>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1150 <ASTILCover_SetText+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>
movb   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"<?>\00"
define void @ASTILCover_SetText(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
store i8 0, i8* %0
br label %8
6: ; preds = %2
%7 = tail call i32 @strcpy(i8* %0, i8* %1)
br label %8
8: ; preds = %6, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lisys_error_get(char const **);
const char *lisys_error_get_string() {
  const char *ret;
  lisys_error_get(&ret);
  return ret;
}


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

x86 assembly (clang, -O2):
<lisys_error_get_string>:
push   %rax
mov    %rsp,%rdi
call   1030 <lisys_error_get@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @lisys_error_get_string() {
%1 = alloca i8*
%2 = call i32 @lisys_error_get(i8** %1)
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
define i8* @lisys_error_get_string() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = call i32 @lisys_error_get(i8** %1)
%4 = load i8*, i8** %1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ pios_sched();
void pios_yield() { pios_sched(); }


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

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

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

LLVM IR (-O2):
define void @pios_yield() {
%1 = tail call i32 (...) @pios_sched()
ret void
}
/* Variables and functions */
int pathcon_nm7_f0(double const **, double **, int *, double *, int);
int pathcon_nm7(const double **arg, double **res, int *iw, double *w, int mem) {
  return pathcon_nm7_f0(arg, res, iw, w, mem);
}


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

x86 assembly (clang, -O2):
<pathcon_nm7>:
jmp    1030 <pathcon_nm7_f0@plt>

LLVM IR (-O0):
define i32 @pathcon_nm7(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double**, double*** %6
%12 = load double**, double*** %7
%13 = load i32*, i32** %8
%14 = load double*, double** %9
%15 = load i32, i32* %10
%16 = call i32 @pathcon_nm7_f0(double** %11, double** %12, i32* %13, double* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @pathcon_nm7(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @pathcon_nm7_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Happy Friday Eve!\n"); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Happy Friday Eve!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"Happy Friday Eve!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ do_pass(int);
void do_it() {
  int i;
  int dummy;
  for (i = 0; i < 3; i++) {
    do_pass(i);
    dummy = i;
  }
}


x86 assembly (clang, -O0):
<do_it>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    1145 <do_it+0x35>
mov    -0x4(%rbp),%edi
call   1030 <do_pass@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <do_it+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_it>:
push   %rax
xor    %edi,%edi
call   1030 <do_pass@plt>
mov    $0x1,%edi
call   1030 <do_pass@plt>
mov    $0x2,%edi
pop    %rax
jmp    1030 <do_pass@plt>

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

LLVM IR (-O2):
define void @do_it() {
%1 = tail call i32 @do_pass(i32 0)
%2 = tail call i32 @do_pass(i32 1)
%3 = tail call i32 @do_pass(i32 2)
ret void
}
/* Variables and functions */
unsigned int fast_read(char const *, unsigned int);
size_t qlz_size_compressed(const char *source) {
  unsigned int n, r;
  n = (((*source) & 2) == 2) ? 4 : 1;
  r = fast_read(source + 1, n);
  r = r & (0xffffffff >> ((4 - n) * 8));
  return r;
}


x86 assembly (clang, -O0):
<qlz_size_compressed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x2,%edx
mov    $0x1,%eax
mov    $0x4,%ecx
cmp    $0x2,%edx
cmove  %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0xc(%rbp),%esi
call   1030 <fast_read@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x4,%ecx
sub    -0xc(%rbp),%ecx
shl    $0x3,%ecx
mov    $0xffffffff,%edx
shr    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qlz_size_compressed>:
push   %rbx
mov    (%rdi),%al
and    $0x2,%al
shr    %al
movzbl %al,%eax
lea    (%rax,%rax,2),%ebx
add    $0x1,%ebx
add    $0x1,%rdi
mov    %ebx,%esi
call   1030 <fast_read@plt>
shl    $0x3,%bl
neg    %bl
mov    %ebx,%ecx
shl    %cl,%eax
shr    %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @qlz_size_compressed(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = and i32 %7, 2
%9 = icmp eq i32 %8, 2
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 4, i32 1
store i32 %11, i32* %3
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i32, i32* %3
%15 = call i32 @fast_read(i8* %13, i32 %14)
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = load i32, i32* %3
%18 = sub i32 4, %17
%19 = mul i32 %18, 8
%20 = lshr i32 -1, %19
%21 = and i32 %16, %20
store i32 %21, i32* %4
%22 = load i32, i32* %4
%23 = zext i32 %22 to i64
ret i64 %23
}

LLVM IR (-O2):
define i64 @qlz_size_compressed(i8* %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 2
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 1, i32 4
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i32 @fast_read(i8* %6, i32 %5)
%8 = mul nsw i32 %5, -8
%9 = add nsw i32 %8, 32
%10 = lshr i32 -1, %9
%11 = and i32 %10, %7
%12 = zext i32 %11 to i64
ret i64 %12
}
int is_extended(const unsigned int part_type) {
  return (part_type == (const unsigned char)0x0F ||
          part_type == (const unsigned char)0x05 ||
          part_type == (const unsigned char)0x85);
}


x86 assembly (clang, -O0):
<is_extended>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0xf,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1132 <is_extended+0x32>
mov    $0x1,%al
cmpl   $0x5,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1132 <is_extended+0x32>
cmpl   $0x85,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_extended>:
mov    $0x1,%eax
cmp    $0x5,%edi
je     110f <is_extended+0xf>
cmp    $0xf,%edi
jne    1110 <is_extended+0x10>
ret
xor    %eax,%eax
cmp    $0x85,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_extended(i32 %0) {
switch i32 %0, label %2 [
i32 15, label %5
i32 5, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 133
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ addvv(double *, double const *);
int dotvv(double const *, double const *);
int /*<<< orphan*/ mulvf(double *, double const *, int);
void reflect(double *r, const double *I, const double *N) {
  mulvf(r, N, -2 * dotvv(N, I));
  addvv(r, I);
}


x86 assembly (clang, -O0):
<reflect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <dotvv@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
imul   $0xfffffffe,%eax,%edx
call   1050 <mulvf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <addvv@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reflect>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1040 <dotvv@plt>
lea    (%rax,%rax,1),%edx
neg    %edx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <mulvf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <addvv@plt>

LLVM IR (-O0):
define void @reflect(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = load double*, double** %6
%9 = load double*, double** %6
%10 = load double*, double** %5
%11 = call i32 @dotvv(double* %9, double* %10)
%12 = mul nsw i32 -2, %11
%13 = call i32 @mulvf(double* %7, double* %8, i32 %12)
%14 = load double*, double** %4
%15 = load double*, double** %5
%16 = call i32 @addvv(double* %14, double* %15)
ret void
}

LLVM IR (-O2):
define void @reflect(double* %0, double* %1, double* %2) {
%4 = tail call i32 @dotvv(double* %2, double* %1)
%5 = mul nsw i32 %4, -2
%6 = tail call i32 @mulvf(double* %0, double* %2, i32 %5)
%7 = tail call i32 @addvv(double* %0, double* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void error(char *msg) {
  printf("ERROR: %s\n", msg);
  exit(1);
}


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

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double INHGtoMB(double);
double INHGtoHPA(double INHG) {
  double HPA = INHGtoMB(INHG);
  return HPA;
}


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

x86 assembly (clang, -O2):
<INHGtoHPA>:
jmp    1030 <INHGtoMB@plt>

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

LLVM IR (-O2):
define double @INHGtoHPA(double %0) {
%2 = tail call double @INHGtoMB(double %0)
ret double %2
}
int nedf2(double a, double b) { return a != b; }


x86 assembly (clang, -O0):
<nedf2>:
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):
<nedf2>:
cmpneqsd %xmm1,%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @nedf2(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 @nedf2(double %0, double %1) {
%3 = fcmp une double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int mystrlen(const char *str) {
  int i = 0;
  while (str[i] != '\000') {
    i++;
  }
  return i;
}


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

x86 assembly (clang, -O2):
<mystrlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <mystrlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @mystrlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ scanf(char *, char *);
char *scanstr(int p, char *s) {
  s = (char *)malloc((p + 1) * sizeof(char));
  s[p] = '\0';
  scanf("%s\n", s);
  return s;
}


x86 assembly (clang, -O0):
<scanstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scanstr>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
lea    0x1(%r14),%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
movslq %r14d,%rax
movb   $0x0,(%rbx,%rax,1)
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i8* @scanstr(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 = add nsw i32 %5, 1
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %4
%17 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i8*, i8** %4
ret i8* %18
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i8* @scanstr(i32 %0, i8* nocapture readnone %1) {
%3 = add nsw i32 %0, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds i8, i8* %5, i64 %6
store i8 0, i8* %7
%8 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i8* %5
}
int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq) { return 0; }


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

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

LLVM IR (-O0):
%struct.device = type opaque
define i32 @dev_pm_set_dedicated_wake_irq(%struct.device* %0, i32 %1) {
%3 = alloca %struct.device*
%4 = alloca i32
store %struct.device* %0, %struct.device** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.device = type opaque
define i32 @dev_pm_set_dedicated_wake_irq(%struct.device* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void msleep(int ms) { usleep(ms * 1000); }


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

x86 assembly (clang, -O2):
<msleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @msleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @msleep(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
void cpuhvfs_set_opp_limit(unsigned int cluster, unsigned int ceiling,
                           unsigned int floor) {}


x86 assembly (clang, -O0):
<cpuhvfs_set_opp_limit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @cpuhvfs_set_opp_limit(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @cpuhvfs_set_opp_limit(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isprint(int);
char *printable(char *str) {
  register char *ptr;
  register int ch;
  ptr = str;
  while ((ch = *ptr) != '\0') {
    if (!isprint(ch)) {
      *ptr = '?';
    }
    ptr++;
  }
  return (str);
}


x86 assembly (clang, -O0):
<printable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1160 <printable+0x50>
mov    -0x14(%rbp),%edi
call   1030 <isprint@plt>
cmp    $0x0,%eax
jne    114f <printable+0x3f>
mov    -0x10(%rbp),%rax
movb   $0x3f,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <printable+0x14>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printable>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     114d <printable+0x3d>
lea    0x1(%r14),%rbx
jmp    113b <printable+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     114d <printable+0x3d>
movsbl %al,%edi
call   1030 <isprint@plt>
test   %eax,%eax
jne    1130 <printable+0x20>
movb   $0x3f,-0x1(%rbx)
jmp    1130 <printable+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @printable(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
br label %6
6: ; preds = %17, %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
store i32 %9, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %6
%12 = load i32, i32* %4
%13 = call i32 @isprint(i32 %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %11
%16 = load i8*, i8** %3
store i8 63, i8* %16
br label %17
17: ; preds = %15, %11
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %3
br label %6
20: ; preds = %6
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @printable(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i32 @isprint(i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %4
store i8 63, i8* %6
br label %11
11: ; preds = %10, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISBLK(int /*<<< orphan*/);
int errno;
scalar_t__ stat(char const *, struct stat *);
int path_is_block_device(const char *path) {
  struct stat statbuf;
  if (stat(path, &statbuf) < 0)
    return -errno;
  return !!S_ISBLK(statbuf.st_mode);
}


x86 assembly (clang, -O0):
<path_is_block_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    1156 <path_is_block_device+0x36>
xor    %eax,%eax
mov    0x2e94(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <path_is_block_device+0x50>
mov    -0x18(%rbp),%edi
call   1040 <S_ISBLK@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_is_block_device>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %rax,%rax
js     1141 <path_is_block_device+0x21>
mov    (%rsp),%edi
call   1040 <S_ISBLK@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rcx
ret
mov    0x2e98(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@errno = global i32 0
define i32 @path_is_block_device(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
br label %15
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISBLK(i32 %11)
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %9, %6
%16 = phi i32 [ %8, %6 ], [ %14, %9 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  struct {
    unsigned a : 3, b : 8, c : 10;
  } s;
  s.a = s.b = s.c = 5678;
  if (s.a != 6 || s.b != 46 || s.c != 558) {
    abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffe007ff,%eax
or     $0x117000,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xfffff807,%eax
or     $0x170,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xfffffff8,%eax
or     $0x6,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7,%eax
cmp    $0x6,%eax
jne    1184 <main+0x74>
mov    -0x8(%rbp),%eax
shr    $0x3,%eax
and    $0xff,%eax
cmp    $0x2e,%eax
jne    1184 <main+0x74>
mov    -0x8(%rbp),%eax
shr    $0xb,%eax
and    $0x3ff,%eax
cmp    $0x22e,%eax
je     118b <main+0x7b>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i24 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.anon
store i32 0, i32* %1
%3 = bitcast %struct.anon* %2 to i32*
%4 = load i32, i32* %3
%5 = and i32 %4, -2095105
%6 = or i32 %5, 1142784
store i32 %6, i32* %3
%7 = bitcast %struct.anon* %2 to i32*
%8 = load i32, i32* %7
%9 = and i32 %8, -2041
%10 = or i32 %9, 368
store i32 %10, i32* %7
%11 = bitcast %struct.anon* %2 to i32*
%12 = load i32, i32* %11
%13 = and i32 %12, -8
%14 = or i32 %13, 6
store i32 %14, i32* %11
%15 = bitcast %struct.anon* %2 to i32*
%16 = load i32, i32* %15
%17 = and i32 %16, 7
%18 = icmp ne i32 %17, 6
br i1 %18, label %31, label %19
19: ; preds = %0
%20 = bitcast %struct.anon* %2 to i32*
%21 = load i32, i32* %20
%22 = lshr i32 %21, 3
%23 = and i32 %22, 255
%24 = icmp ne i32 %23, 46
br i1 %24, label %31, label %25
25: ; preds = %19
%26 = bitcast %struct.anon* %2 to i32*
%27 = load i32, i32* %26
%28 = lshr i32 %27, 11
%29 = and i32 %28, 1023
%30 = icmp ne i32 %29, 558
br i1 %30, label %31, label %33
31: ; preds = %25, %19, %0
%32 = call i32 (...) @abort()
unreachable
33: ; preds = %25
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}