xunge/DecIR huggingface dataset:
_Bool Bool__EQ_(_Bool a, _Bool b) { return a == b; }


x86 assembly (clang, -O0):
<Bool__EQ_>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
and    $0x1,%cl
mov    %cl,-0x1(%rbp)
and    $0x1,%al
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    -0x2(%rbp),%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bool__EQ_>:
mov    %edi,%eax
xor    %esi,%eax
xor    $0x1,%al
ret

LLVM IR (-O0):
define zeroext i1 @Bool__EQ_(i1 zeroext %0, i1 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = zext i1 %0 to i8
store i8 %5, i8* %3
%6 = zext i1 %1 to i8
store i8 %6, i8* %4
%7 = load i8, i8* %3
%8 = trunc i8 %7 to i1
%9 = zext i1 %8 to i32
%10 = load i8, i8* %4
%11 = trunc i8 %10 to i1
%12 = zext i1 %11 to i32
%13 = icmp eq i32 %9, %12
ret i1 %13
}

LLVM IR (-O2):
define zeroext i1 @Bool__EQ_(i1 zeroext %0, i1 zeroext %1) {
%3 = xor i1 %0, %1
%4 = xor i1 %3, true
ret i1 %4
}
/* Variables and functions */
int RandomUniform();
unsigned int rand24(void) {
  return (unsigned int)(RandomUniform() * 4096 * 4096);
}


x86 assembly (clang, -O0):
<rand24>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <RandomUniform@plt>
shl    $0xc,%eax
shl    $0xc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand24>:
push   %rax
xor    %eax,%eax
call   1030 <RandomUniform@plt>
shl    $0x18,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rand24() {
%1 = call i32 (...) @RandomUniform()
%2 = mul nsw i32 %1, 4096
%3 = mul nsw i32 %2, 4096
ret i32 %3
}

LLVM IR (-O2):
define i32 @rand24() {
%1 = tail call i32 (...) @RandomUniform()
%2 = shl nsw i32 %1, 24
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _TimerBaseValid(scalar_t__);
void TimerADCEventSet(uint32_t ui32Base, uint32_t ui32ADCEvent) {
  ASSERT(_TimerBaseValid(ui32Base));
  (*((volatile uint32_t *)(ui32Base + 0x00000070))) = ui32ADCEvent;
}


x86 assembly (clang, -O0):
<TimerADCEventSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_TimerBaseValid@plt>
mov    %eax,%edi
call   1030 <ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x70(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerADCEventSet>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <_TimerBaseValid@plt>
mov    %eax,%edi
call   1030 <ASSERT@plt>
mov    %r14,0x70(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @TimerADCEventSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @_TimerBaseValid(i64 %5)
%7 = call i32 @ASSERT(i32 %6)
%8 = load i64, i64* %4
%9 = load i64, i64* %3
%10 = add nsw i64 %9, 112
%11 = inttoptr i64 %10 to i64*
store volatile i64 %8, i64* %11
ret void
}

LLVM IR (-O2):
define void @TimerADCEventSet(i64 %0, i64 %1) {
%3 = tail call i32 @_TimerBaseValid(i64 %0)
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i64 %0, 112
%6 = inttoptr i64 %5 to i64*
store volatile i64 %1, i64* %6
ret void
}
/* Variables and functions */
int ctoi(unsigned char const);
void c16k_set_c(const unsigned char source_a, unsigned char source_b,
                int values[], int *bar_chars) {
  int weight;
  weight = (10 * ctoi(source_a)) + ctoi(source_b);
  values[(*bar_chars)] = weight;
  (*bar_chars)++;
}


x86 assembly (clang, -O0):
<c16k_set_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <ctoi@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x20(%rbp)
movzbl -0x2(%rbp),%edi
call   1030 <ctoi@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq (%rcx),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c16k_set_c>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %esi,%r15d
call   1030 <ctoi@plt>
lea    (%rax,%rax,4),%ebp
mov    %r15d,%edi
call   1030 <ctoi@plt>
lea    (%rax,%rbp,2),%eax
movslq (%rbx),%rcx
mov    %eax,(%r14,%rcx,4)
addl   $0x1,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @c16k_set_c(i8 zeroext %0, i8 zeroext %1, i32* %2, i32* %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
store i8 %0, i8* %5
store i8 %1, i8* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%10 = load i8, i8* %5
%11 = call i32 @ctoi(i8 zeroext %10)
%12 = mul nsw i32 10, %11
%13 = load i8, i8* %6
%14 = call i32 @ctoi(i8 zeroext %13)
%15 = add nsw i32 %12, %14
store i32 %15, i32* %9
%16 = load i32, i32* %9
%17 = load i32*, i32** %7
%18 = load i32*, i32** %8
%19 = load i32, i32* %18
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %17, i64 %20
store i32 %16, i32* %21
%22 = load i32*, i32** %8
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
store i32 %24, i32* %22
ret void
}

LLVM IR (-O2):
define void @c16k_set_c(i8 zeroext %0, i8 zeroext %1, i32* nocapture writeonly %2, i32* nocapture %3) {
%5 = tail call i32 @ctoi(i8 zeroext %0)
%6 = mul nsw i32 %5, 10
%7 = tail call i32 @ctoi(i8 zeroext %1)
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %2, i64 %10
store i32 %8, i32* %11
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
ret void
}
void _gui_hilite_selected(struct guiObject *obj) { (void)obj; }


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

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

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

LLVM IR (-O2):
%struct.guiObject = type opaque
define void @_gui_hilite_selected(%struct.guiObject* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit2(int);
int empty_return_int2(int *a) {
  if (*a > 0) {
    return 1;
  } else {
    exit2(-1);
  }
}


x86 assembly (clang, -O0):
<empty_return_int2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jle    1135 <empty_return_int2+0x25>
movl   $0x1,-0x4(%rbp)
jmp    113f <empty_return_int2+0x2f>
mov    $0xffffffff,%edi
call   1030 <exit2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty_return_int2>:
push   %rax
cmpl   $0x0,(%rdi)
jg     1120 <empty_return_int2+0x10>
mov    $0xffffffff,%edi
call   1030 <exit2@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @empty_return_int2(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp sgt i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @exit2(i32 -1)
br label %6
6: ; preds = %1, %4
ret i32 1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void bitset(uint32_t *bs, int v) { bs[v >> 5] |= 1 << (v & 31); }


x86 assembly (clang, -O0):
<bitset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitset>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x5,%ecx
movslq %ecx,%rcx
or     %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @bitset(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = ashr i32 %9, 5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %8, i64 %11
%13 = load i32, i32* %12
%14 = or i32 %13, %7
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @bitset(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl nuw i32 1, %3
%5 = ashr i32 %1, 5
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %4
store i32 %9, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
short mls_type_get_short(unsigned char *buf, unsigned int len) {
  short dst = 0;
  assert(2 <= len);
  ;
  dst |= (short)((buf[0] << 8) & 0xff00);
  dst |= (short)(buf[1] & 0x00ff);
  return dst;
}


x86 assembly (clang, -O0):
<mls_type_get_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movw   $0x0,-0xe(%rbp)
mov    $0x2,%eax
cmp    -0xc(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
and    $0xff00,%eax
movswl %ax,%ecx
movswl -0xe(%rbp),%eax
or     %ecx,%eax
mov    %ax,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
and    $0xff,%eax
movswl %ax,%ecx
movswl -0xe(%rbp),%eax
or     %ecx,%eax
mov    %ax,-0xe(%rbp)
movswl -0xe(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mls_type_get_short>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x2,%esi
setae  %dil
call   1030 <assert@plt>
movzwl (%rbx),%eax
rol    $0x8,%ax
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @mls_type_get_short(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i16
store i8* %0, i8** %3
store i32 %1, i32* %4
store i16 0, i16* %5
%6 = load i32, i32* %4
%7 = icmp ule i32 2, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = and i32 %14, 65280
%16 = trunc i32 %15 to i16
%17 = sext i16 %16 to i32
%18 = load i16, i16* %5
%19 = sext i16 %18 to i32
%20 = or i32 %19, %17
%21 = trunc i32 %20 to i16
store i16 %21, i16* %5
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 1
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = and i32 %25, 255
%27 = trunc i32 %26 to i16
%28 = sext i16 %27 to i32
%29 = load i16, i16* %5
%30 = sext i16 %29 to i32
%31 = or i32 %30, %28
%32 = trunc i32 %31 to i16
store i16 %32, i16* %5
%33 = load i16, i16* %5
ret i16 %33
}

LLVM IR (-O2):
define signext i16 @mls_type_get_short(i8* nocapture %0, i32 %1) {
%3 = icmp ugt i32 %1, 1
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = load i8, i8* %0
%7 = zext i8 %6 to i16
%8 = shl nuw i16 %7, 8
%9 = getelementptr inbounds i8, i8* %0, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i16
%12 = or i16 %8, %11
ret i16 %12
}
void altera(int vet[], int x) {
  vet[0] = -1;
  x = -1;
}


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

x86 assembly (clang, -O2):
<altera>:
movl   $0xffffffff,(%rdi)
ret

LLVM IR (-O0):
define void @altera(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 = getelementptr inbounds i32, i32* %5, i64 0
store i32 -1, i32* %6
store i32 -1, i32* %4
ret void
}

LLVM IR (-O2):
define void @altera(i32* nocapture writeonly %0, i32 %1) {
store i32 -1, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EAGAIN;
int /*<<< orphan*/ errno;
int sys_fork(void) {
  errno = EAGAIN;
  return -1;
}


x86 assembly (clang, -O0):
<sys_fork>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ecc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_fork>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EAGAIN = global i32 0
@errno = global i32 0
define i32 @sys_fork() {
%1 = load i32, i32* @EAGAIN
store i32 %1, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EAGAIN = global i32 0
@errno = global i32 0
define i32 @sys_fork() {
%1 = load i32, i32* @EAGAIN
store i32 %1, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ isnan(double);
int /*<<< orphan*/ unit_error(char *, double, char const *, int);
void assert_nan(double real, char const *caller, int line) {
  if (!isnan(real)) {
    unit_error("%s: %d expected NAN, got %0.3e", real, caller, line);
  }
}


x86 assembly (clang, -O0):
<assert_nan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%eax
jne    115f <assert_nan+0x3f>
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xea6(%rip),%rdi
call   1030 <unit_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_nan>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
movsd  %xmm0,(%rsp)
call   1040 <isnan@plt>
test   %eax,%eax
je     113d <assert_nan+0x1d>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xebc(%rip),%rdi
movsd  (%rsp),%xmm0
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <unit_error@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"%s: %d expected NAN, got %0.3e\00"
define void @assert_nan(double %0, i8* %1, i32 %2) {
%4 = alloca double
%5 = alloca i8*
%6 = alloca i32
store double %0, double* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load double, double* %4
%8 = call i32 @isnan(double %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %3
%11 = load double, double* %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @unit_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %11, i8* %12, i32 %13)
br label %15
15: ; preds = %10, %3
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"%s: %d expected NAN, got %0.3e\00"
define void @assert_nan(double %0, i8* %1, i32 %2) {
%4 = tail call i32 @isnan(double %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @unit_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %0, i8* %1, i32 %2)
br label %8
8: ; preds = %6, %3
ret void
}
const char *ls_cost_nm9_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<ls_cost_nm9_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <ls_cost_nm9_name_out+0x2b>
jmp    111a <ls_cost_nm9_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <ls_cost_nm9_name_out+0x3b>
jmp    114b <ls_cost_nm9_name_out+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <ls_cost_nm9_name_out+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <ls_cost_nm9_name_out+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_cost_nm9_name_out>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @ls_cost_nm9_name_out(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @ls_cost_nm9_name_out(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
int f175(int *);
int f176(int *p) { return f175(p); }


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

x86 assembly (clang, -O2):
<f176>:
jmp    1030 <f175@plt>

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

LLVM IR (-O2):
define i32 @f176(i32* %0) {
%2 = tail call i32 @f175(i32* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ sr_skip_char(char const **, char);
int sr_skip_char_sequence(const char **input, char c) {
  int count = 0;
  while (sr_skip_char(input, c))
    ++count;
  return count;
}


x86 assembly (clang, -O0):
<sr_skip_char_sequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <sr_skip_char@plt>
cmp    $0x0,%rax
je     114e <sr_skip_char_sequence+0x3e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1129 <sr_skip_char_sequence+0x19>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sr_skip_char_sequence>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    $0xffffffff,%ebp
movsbl %sil,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <sr_skip_char@plt>
add    $0x1,%ebp
test   %rax,%rax
jne    1120 <sr_skip_char_sequence+0x10>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @sr_skip_char_sequence(i8** %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ %7, %3 ]
%5 = tail call i64 @sr_skip_char(i8** %0, i8 signext %1)
%6 = icmp eq i64 %5, 0
%7 = add nuw nsw i32 %4, 1
br i1 %6, label %8, label %3
8: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ LCD_WriteData(int);
void createLoseLogo() {
  LCD_WriteData(0x0);
  LCD_WriteData(0x1b);
  LCD_WriteData(0xe);
  LCD_WriteData(0x4);
  LCD_WriteData(0xe);
  LCD_WriteData(0x1b);
  LCD_WriteData(0x0);
  LCD_WriteData(0x0);
}


x86 assembly (clang, -O0):
<createLoseLogo>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x1b,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x4,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x1b,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<createLoseLogo>:
push   %rax
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x1b,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x4,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x1b,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <LCD_WriteData@plt>

LLVM IR (-O0):
define void @createLoseLogo() {
%1 = call i32 @LCD_WriteData(i32 0)
%2 = call i32 @LCD_WriteData(i32 27)
%3 = call i32 @LCD_WriteData(i32 14)
%4 = call i32 @LCD_WriteData(i32 4)
%5 = call i32 @LCD_WriteData(i32 14)
%6 = call i32 @LCD_WriteData(i32 27)
%7 = call i32 @LCD_WriteData(i32 0)
%8 = call i32 @LCD_WriteData(i32 0)
ret void
}

LLVM IR (-O2):
define void @createLoseLogo() {
%1 = tail call i32 @LCD_WriteData(i32 0)
%2 = tail call i32 @LCD_WriteData(i32 27)
%3 = tail call i32 @LCD_WriteData(i32 14)
%4 = tail call i32 @LCD_WriteData(i32 4)
%5 = tail call i32 @LCD_WriteData(i32 14)
%6 = tail call i32 @LCD_WriteData(i32 27)
%7 = tail call i32 @LCD_WriteData(i32 0)
%8 = tail call i32 @LCD_WriteData(i32 0)
ret void
}
__attribute((no)) int g() { return 7; }


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

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

LLVM IR (-O0):
define i32 @g() {
ret i32 7
}

LLVM IR (-O2):
define i32 @g() {
ret i32 7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n;
  scanf("%d", &n);
  printf("%X\n", n);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%X\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
int IsLabelSym(char c) {
  if (c == '+' || c == '-' || c == '/' || c == '*' || c == '$' || c == '=' ||
      c == ',')
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<IsLabelSym>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     1165 <IsLabelSym+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     1165 <IsLabelSym+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
je     1165 <IsLabelSym+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     1165 <IsLabelSym+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x24,%eax
je     1165 <IsLabelSym+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x3d,%eax
je     1165 <IsLabelSym+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x2c,%eax
jne    1171 <IsLabelSym+0x71>
movl   $0x0,-0x4(%rbp)
jmp    1178 <IsLabelSym+0x78>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsLabelSym>:
cmp    $0x3d,%dil
ja     111d <IsLabelSym+0x1d>
xor    %eax,%eax
movzbl %dil,%ecx
movabs $0x2000bc1000000000,%rdx
bt     %rcx,%rdx
jae    111d <IsLabelSym+0x1d>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @IsLabelSym(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 43
br i1 %6, label %31, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %31, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 47
br i1 %14, label %31, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 42
br i1 %18, label %31, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 36
br i1 %22, label %31, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 61
br i1 %26, label %31, label %27
27: ; preds = %23
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 44
br i1 %30, label %31, label %32
31: ; preds = %27, %23, %19, %15, %11, %7, %1
store i32 0, i32* %2
br label %33
32: ; preds = %27
store i32 1, i32* %2
br label %33
33: ; preds = %32, %31
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @IsLabelSym(i8 signext %0) {
switch i8 %0, label %2 [
i8 61, label %3
i8 47, label %3
i8 45, label %3
i8 44, label %3
i8 43, label %3
i8 42, label %3
i8 36, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 1, %2 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ]
ret i32 %4
}
/* Variables and functions */
int SIGCHLD;
int /*<<< orphan*/ exit(int);
void endprog(int s) { exit(s != SIGCHLD); }


x86 assembly (clang, -O0):
<endprog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<endprog>:
push   %rax
mov    0x2ed0(%rip),%rcx
xor    %eax,%eax
cmp    %edi,(%rcx)
setne  %al
mov    %eax,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@SIGCHLD = global i32 0
define void @endprog(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGCHLD
%5 = icmp ne i32 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
define void @endprog(i32 %0) {
%2 = load i32, i32* @SIGCHLD
%3 = icmp ne i32 %2, %0
%4 = zext i1 %3 to i32
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t prv_not_equal_int32_fn(int32_t a, int32_t b) { return a != b ? -1 : 0; }


x86 assembly (clang, -O0):
<prv_not_equal_int32_fn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovne %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_not_equal_int32_fn>:
xor    %eax,%eax
cmp    %rsi,%rdi
setne  %al
neg    %rax
ret

LLVM IR (-O0):
define i64 @prv_not_equal_int32_fn(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ne i64 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -1, i32 0
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
define i64 @prv_not_equal_int32_fn(i64 %0, i64 %1) {
%3 = icmp ne i64 %0, %1
%4 = sext i1 %3 to i64
ret i64 %4
}
/* Type definitions */
struct aeEventLoop {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void fin_cb(struct aeEventLoop *l, void *data) {
  puts("call the unknow final function \n");
}


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

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

LLVM IR (-O0):
%struct.aeEventLoop = type { i32 }
@.str = [33 x i8] c"call the unknow final function \0A\00"
define void @fin_cb(%struct.aeEventLoop* %0, i8* %1) {
%3 = alloca %struct.aeEventLoop*
%4 = alloca i8*
store %struct.aeEventLoop* %0, %struct.aeEventLoop** %3
store i8* %1, i8** %4
%5 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.aeEventLoop = type { i32 }
@.str = [33 x i8] c"call the unknow final function \0A\00"
define void @fin_cb(%struct.aeEventLoop* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}
void gtk_range_set_inverted() {}


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

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

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

LLVM IR (-O2):
define void @gtk_range_set_inverted() {
ret void
}
__attribute__((constructor)) void fb_ctor__astzmisc(void) {
label$0:;
label$1:;
}


x86 assembly (clang, -O0):
<fb_ctor__astzmisc>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <fb_ctor__astzmisc+0x9>
jmp    110e <fb_ctor__astzmisc+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @fb_ctor__astzmisc, i8* null }]
define void @fb_ctor__astzmisc() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
define void @fb_ctor__astzmisc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_dialog_hide_i(char const *);
void roadmap_preferences_cancel(const char *name, void *data) {
  roadmap_dialog_hide_i(name);
}


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

x86 assembly (clang, -O2):
<roadmap_preferences_cancel>:
jmp    1030 <roadmap_dialog_hide_i@plt>

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

LLVM IR (-O2):
define void @roadmap_preferences_cancel(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @roadmap_dialog_hide_i(i8* %0)
ret void
}
void w16(void *x, double y) { *(double *)(x + 32752) = y; }


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

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

LLVM IR (-O0):
define void @w16(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32752
%8 = bitcast i8* %7 to double*
store double %5, double* %8
ret void
}

LLVM IR (-O2):
define void @w16(i8* nocapture writeonly %0, double %1) {
%3 = getelementptr i8, i8* %0, i64 32752
%4 = bitcast i8* %3 to double*
store double %1, double* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_error_linux();
int /*<<< orphan*/ print_message(int, char *);
void check_function(int output) {
  if (output >= 0) {
    print_message(3, "test_passed\n");
  } else {
    print_message(3, "test_failed\n");
    get_error_linux();
  }
}


x86 assembly (clang, -O0):
<check_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     114b <check_function+0x2b>
mov    $0x3,%edi
lea    0xebf(%rip),%rsi
call   1030 <print_message@plt>
jmp    1163 <check_function+0x43>
mov    $0x3,%edi
lea    0xeb6(%rip),%rsi
call   1030 <print_message@plt>
mov    $0x0,%al
call   1040 <get_error_linux@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_function>:
test   %edi,%edi
js     1135 <check_function+0x15>
lea    0xed5(%rip),%rsi
mov    $0x3,%edi
jmp    1030 <print_message@plt>
push   %rax
lea    0xed0(%rip),%rsi
mov    $0x3,%edi
call   1030 <print_message@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <get_error_linux@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"test_passed\0A\00"
@.str.1 = [13 x i8] c"test_failed\0A\00"
define void @check_function(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @print_message(i32 3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = call i32 @print_message(i32 3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (...) @get_error_linux()
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"test_passed\0A\00"
@.str.1 = [13 x i8] c"test_failed\0A\00"
define void @check_function(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @print_message(i32 3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
5: ; preds = %1
%6 = tail call i32 @print_message(i32 3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 (...) @get_error_linux()
br label %8
8: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ test_Endian();
int main(int argc, char **argv) {
  test_Endian();
  while (--argc)
    puts(*++argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test_Endian@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     116c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
call   1030 <puts@plt>
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <test_Endian@plt>
cmp    $0x1,%ebp
je     1151 <main+0x31>
mov    %ebp,%ebp
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <puts@plt>
add    $0x1,%rbx
cmp    %ebx,%ebp
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (...) @test_Endian()
%4 = add nsw i32 %0, -1
%5 = icmp eq i32 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %12, %6 ], [ %4, %2 ]
%8 = phi i8** [ %9, %6 ], [ %1, %2 ]
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @puts(i8* dereferenceable(1) %10)
%12 = add nsw i32 %7, -1
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
float R4(unsigned char *p) {
  float value;
  unsigned char *q = (unsigned char *)&value + 3;
  int i;
  for (i = 0; i < 4; i++)
    *q-- = *p++;
  return value;
}


x86 assembly (clang, -O0):
<R4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1155 <R4+0x55>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111b <R4+0x1b>
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<R4>:
mov    (%rdi),%eax
bswap  %eax
movd   %eax,%xmm0
ret

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

LLVM IR (-O2):
define float @R4(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = shl nuw i32 %4, 24
%6 = getelementptr inbounds i8, i8* %0, i64 2
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = shl nuw nsw i32 %8, 16
%10 = or i32 %5, %9
%11 = getelementptr inbounds i8, i8* %0, i64 3
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = or i32 %10, %14
%16 = load i8, i8* %11
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
%19 = bitcast i32 %18 to float
ret float %19
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t bitreverse16(uint16_t x) {
  x = ((x >> 1) & 0x5555) | ((x & 0x5555) << 1);
  x = ((x >> 2) & 0x3333) | ((x & 0x3333) << 2);
  x = ((x >> 4) & 0x0f0f) | ((x & 0x0f0f) << 4);
  x = (x >> 8) | (x << 8);
  return x;
}


x86 assembly (clang, -O0):
<bitreverse16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
and    $0x5555,%eax
mov    -0x4(%rbp),%ecx
and    $0x5555,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
and    $0x3333,%eax
mov    -0x4(%rbp),%ecx
and    $0x3333,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
and    $0xf0f,%eax
mov    -0x4(%rbp),%ecx
and    $0xf0f,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitreverse16>:
mov    %edi,%eax
shr    %eax
and    $0x5555,%eax
and    $0x5555,%edi
lea    (%rax,%rdi,2),%eax
mov    %eax,%ecx
shr    $0x2,%ecx
and    $0x3333,%ecx
and    $0x3333,%eax
lea    (%rcx,%rax,4),%eax
mov    %eax,%ecx
shr    $0x4,%ecx
and    $0xf0f,%ecx
shl    $0x4,%eax
and    $0xf0f0,%eax
or     %ecx,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
shl    $0x8,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @bitreverse16(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 21845
%4 = shl i32 %0, 1
%5 = and i32 %4, 43690
%6 = or i32 %3, %5
%7 = lshr i32 %6, 2
%8 = and i32 %7, 13107
%9 = shl nuw nsw i32 %6, 2
%10 = and i32 %9, 52428
%11 = or i32 %8, %10
%12 = lshr i32 %11, 4
%13 = and i32 %12, 3855
%14 = shl nuw nsw i32 %11, 4
%15 = and i32 %14, 61680
%16 = or i32 %13, %15
%17 = lshr i32 %16, 8
%18 = shl nuw nsw i32 %16, 8
%19 = or i32 %17, %18
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ rf_command(int);
void rf_flush_tx_fifo(void) { rf_command(0xe1); }


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

x86 assembly (clang, -O2):
<rf_flush_tx_fifo>:
mov    $0xe1,%edi
jmp    1030 <rf_command@plt>

LLVM IR (-O0):
define void @rf_flush_tx_fifo() {
%1 = call i32 @rf_command(i32 225)
ret void
}

LLVM IR (-O2):
define void @rf_flush_tx_fifo() {
%1 = tail call i32 @rf_command(i32 225)
ret void
}
int setIndexLengthTest() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setIndexLengthTest() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int fsize(char fname[]) {
  int t;
  FILE *file;
  file = fopen(fname, "r");
  fseek(file, 0, SEEK_END);
  t = ftell(file);
  fclose(file);
  return t;
}


x86 assembly (clang, -O0):
<fsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e7d(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    -0x18(%rbp),%rdi
call   1040 <ftell@plt>
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsize>:
push   %rbp
push   %rbx
push   %rax
lea    0xeb6(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@SEEK_END = global i32 0
define i32 @fsize(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i32 0, i32 %8)
%10 = load i32*, i32** %4
%11 = call i32 @ftell(i32* %10)
store i32 %11, i32* %3
%12 = load i32*, i32** %4
%13 = call i32 @fclose(i32* %12)
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@SEEK_END = global i32 0
define i32 @fsize(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %2, i32 0, i32 %3)
%5 = tail call i32 @ftell(i32* %2)
%6 = tail call i32 @fclose(i32* %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ closeLogFile();
void lou_logEnd() { closeLogFile(); }


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

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

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

LLVM IR (-O2):
define void @lou_logEnd() {
%1 = tail call i32 (...) @closeLogFile()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _cow_assert_print_args(char const *, char const *,
                                          unsigned int, char const *,
                                          char const *);
void _cow_assert_print(const char *expr, const char *file, unsigned int line,
                       const char *func, const char *msg) {
  _cow_assert_print_args(expr, file, line, func, msg);
}


x86 assembly (clang, -O0):
<_cow_assert_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <_cow_assert_print_args@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cow_assert_print>:
jmp    1030 <_cow_assert_print_args@plt>

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

LLVM IR (-O2):
define void @_cow_assert_print(i8* %0, i8* %1, i32 %2, i8* %3, i8* %4) {
%6 = tail call i32 @_cow_assert_print_args(i8* %0, i8* %1, i32 %2, i8* %3, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putc(int /*<<< orphan*/);
void print(const char *str) {
  while (*str) {
    putc(*str++);
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <print+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putc@plt>
jmp    111c <print+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <print+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <print+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}