xunge/DecIR huggingface dataset:
int test_imm_7Eint8_mem(signed char *val) {
  return ((*val) & (-0x7E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Eint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff82,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_7Eint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -126
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_7Eint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -126
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ step_hash(int);
unsigned func_11(int *p_12, int p_13, int *p_14) {
  signed char l_1043 = 0L;
  int l_1044 = 0x743F6940L;
  step_hash(558);
  l_1044 |= l_1043;
  step_hash(559);
  return l_1044;
}


x86 assembly (clang, -O0):
<func_11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movb   $0x0,-0x19(%rbp)
movl   $0x743f6940,-0x20(%rbp)
mov    $0x22e,%edi
call   1030 <step_hash@plt>
movsbl -0x19(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    $0x22f,%edi
call   1030 <step_hash@plt>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_11>:
push   %rax
mov    $0x22e,%edi
call   1030 <step_hash@plt>
mov    $0x22f,%edi
call   1030 <step_hash@plt>
mov    $0x743f6940,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @func_11(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
store i8 0, i8* %7
store i32 1950312768, i32* %8
%9 = call i32 @step_hash(i32 558)
%10 = load i8, i8* %7
%11 = sext i8 %10 to i32
%12 = load i32, i32* %8
%13 = or i32 %12, %11
store i32 %13, i32* %8
%14 = call i32 @step_hash(i32 559)
%15 = load i32, i32* %8
ret i32 %15
}

LLVM IR (-O2):
define i32 @func_11(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
%4 = tail call i32 @step_hash(i32 558)
%5 = tail call i32 @step_hash(i32 559)
ret i32 1950312768
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void select_mask(void) { outb(8, 0x3ce); }


x86 assembly (clang, -O0):
<select_mask>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0x3ce,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<select_mask>:
mov    $0x8,%edi
mov    $0x3ce,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @select_mask() {
%1 = call i32 @outb(i32 8, i32 974)
ret void
}

LLVM IR (-O2):
define void @select_mask() {
%1 = tail call i32 @outb(i32 8, i32 974)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void dll_die(const char *msg) {
  (void)msg;
  abort();
}


x86 assembly (clang, -O0):
<dll_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<dll_die>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @dll_die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @dll_die(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRCF_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRCF_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRCF_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Type definitions */
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double getRealTime() {
  struct timeval tv;
  double secsInMilli, usecsInMilli;
  gettimeofday(&tv, NULL);
  secsInMilli = ((double)tv.tv_sec) * 1000;
  usecsInMilli = tv.tv_usec / 1000;
  return secsInMilli + usecsInMilli;
}


x86 assembly (clang, -O0):
<getRealTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xecd(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRealTime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
mulsd  0xed1(%rip),%xmm1
movslq 0x8(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define double @getRealTime() {
%1 = alloca %struct.timeval
%2 = alloca double
%3 = alloca double
%4 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = fmul double %7, 1.000000e+03
store double %8, double* %2
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sdiv i32 %10, 1000
%12 = sitofp i32 %11 to double
store double %12, double* %3
%13 = load double, double* %2
%14 = load double, double* %3
%15 = fadd double %13, %14
ret double %15
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define double @getRealTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = fmul double %6, 1.000000e+03
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = sitofp i32 %10 to double
%12 = fadd double %7, %11
ret double %12
}
char *(strrchr)(const char *src, int ch) {
  char *ch1 = (char *)src, *result = ((void *)0);
  while (*ch1 != '\0') {
    if (*ch1 == (char)ch) {
      result = ch1;
    }
    ++ch1;
  }
  return result;
}


x86 assembly (clang, -O0):
<strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1159 <strrchr+0x59>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    -0xc(%rbp),%ecx
movsbl %cl,%ecx
cmp    %ecx,%eax
jne    1148 <strrchr+0x48>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111b <strrchr+0x1b>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrchr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <strrchr+0x26>
movsbl %sil,%edx
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
cmp    %ecx,%edx
cmove  %rdi,%rax
movzbl 0x1(%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <strrchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2
%6 = shl i32 %1, 24
%7 = ashr exact i32 %6, 24
br label %8
8: ; preds = %5, %8
%9 = phi i8 [ %3, %5 ], [ %16, %8 ]
%10 = phi i8* [ null, %5 ], [ %14, %8 ]
%11 = phi i8* [ %0, %5 ], [ %15, %8 ]
%12 = sext i8 %9 to i32
%13 = icmp eq i32 %7, %12
%14 = select i1 %13, i8* %11, i8* %10
%15 = getelementptr inbounds i8, i8* %11, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %8
18: ; preds = %8, %2
%19 = phi i8* [ null, %2 ], [ %14, %8 ]
ret i8* %19
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned int,
                           unsigned int, double);
void write_result(FILE *fout, unsigned int set_id_a, unsigned int set_id_b,
                  double intersection_percent) {
  fprintf(fout, "%d,%d,%f\n", set_id_a, set_id_b, intersection_percent);
  fflush(fout);
}


x86 assembly (clang, -O0):
<write_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
movsd  -0x18(%rbp),%xmm0
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fflush@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_result>:
push   %rbx
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%d,%d,%f\0A\00"
define void @write_result(i32* %0, i32 %1, i32 %2, double %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double %3, double* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load double, double* %8
%13 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, double %12)
%14 = load i32*, i32** %5
%15 = call i32 @fflush(i32* %14)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d,%d,%f\0A\00"
define void @write_result(i32* nocapture %0, i32 %1, i32 %2, double %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, double %3)
%6 = tail call i32 @fflush(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setRGBColor(short, int /*<<< orphan*/, int /*<<< orphan*/,
                               int /*<<< orphan*/);
void ledOffEffect(short ledNumber, short *data) {
  setRGBColor(ledNumber, 0, 0, 0);
}


x86 assembly (clang, -O0):
<ledOffEffect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %ecx,%ecx
movswl -0x2(%rbp),%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <setRGBColor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ledOffEffect>:
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <setRGBColor@plt>

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

LLVM IR (-O2):
define void @ledOffEffect(i16 signext %0, i16* nocapture readnone %1) {
%3 = tail call i32 @setRGBColor(i16 signext %0, i32 0, i32 0, i32 0)
ret void
}
int binExp(int base, int power) {
  int ans = 1;
  while (power) {
    if (power & 1)
      ans *= base;
    base *= base;
    power = power >> 1;
  }
  return ans;
}


x86 assembly (clang, -O0):
<binExp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114c <binExp+0x4c>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1134 <binExp+0x34>
mov    -0x4(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1111 <binExp+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<binExp>:
test   %esi,%esi
je     113a <binExp+0x3a>
mov    $0x1,%r8d
mov    $0x1,%eax
mov    %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   $0x1,%sil
mov    %edi,%ecx
cmove  %r8d,%ecx
imul   %ecx,%eax
imul   %edi,%edi
sar    %edx
cmp    $0x1,%esi
mov    %edx,%esi
ja     1120 <binExp+0x20>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @binExp(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 1, %2 ]
%6 = phi i32 [ %13, %4 ], [ %1, %2 ]
%7 = phi i32 [ %12, %4 ], [ %0, %2 ]
%8 = and i32 %6, 1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 1, i32 %7
%11 = mul nsw i32 %10, %5
%12 = mul nsw i32 %7, %7
%13 = ashr i32 %6, 1
%14 = icmp ult i32 %6, 2
br i1 %14, label %15, label %4
15: ; preds = %4, %2
%16 = phi i32 [ 1, %2 ], [ %11, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) { printf("update_header file.bin\n"); }


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"update_header file.bin\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int st_size;
};
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
scalar_t__ stat(char const *, struct stat *);
off_t fsize(const char *filename) {
  struct stat st;
  if (stat(filename, &st) != 0) {
    perror("stat()");
    return -1;
  }
  return st.st_size;
}


x86 assembly (clang, -O0):
<fsize>:
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
je     115b <fsize+0x3b>
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1161 <fsize+0x41>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsize>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %rax,%rax
jne    1133 <fsize+0x13>
mov    (%rsp),%eax
pop    %rcx
ret
lea    0xec6(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [7 x i8] c"stat()\00"
define i32 @fsize(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 ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %13
10: ; preds = %1
%11 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%12 = load i32, i32* %11
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [7 x i8] c"stat()\00"
define i32 @fsize(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%10 = load i32, i32* %9
br label %11
11: ; preds = %8, %6
%12 = phi i32 [ -1, %6 ], [ %10, %8 ]
ret i32 %12
}
/* Variables and functions */
unsigned long inet_addr(char *);
int /*<<< orphan*/ printf(char *, unsigned long);
int main() {
  unsigned long ip = inet_addr("127.0.0.1");
  printf("%ld\n", ip);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <inet_addr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec0(%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
call   1040 <inet_addr@plt>
lea    0xed6(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"127.0.0.1\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %1)
ret i32 0
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *s) {
  char *o = malloc(strlen(s) + 1);
  strcpy(o, s);
  return o;
}


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

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

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

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
reg0adrreg1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if (r0 <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0adrreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movsbl -0x5(%rbp),%eax
mov    -0x20(%rbp),%rcx
movsbl 0x43d11(%rcx),%ecx
cmp    %ecx,%eax
jg     1141 <reg0adrreg1+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1148 <reg0adrreg1+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0adrreg1>:
movsbl %dil,%ecx
movsbl 0x43d11(%r9),%edx
xor    %eax,%eax
cmp    %edx,%ecx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @reg0adrreg1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = shl i32 %0, 24
%8 = ashr exact i32 %7, 24
%9 = getelementptr inbounds i8, i8* %5, i64 277777
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sle i32 %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
float floatmod(float a, float b) { return (a - b * (int)(a / b)); }


x86 assembly (clang, -O0):
<floatmod>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
divss  -0x8(%rbp),%xmm2
cvttss2si %xmm2,%eax
cvtsi2ss %eax,%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floatmod>:
movaps %xmm0,%xmm2
divss  %xmm1,%xmm2
cvttps2dq %xmm2,%xmm2
cvtdq2ps %xmm2,%xmm2
mulss  %xmm1,%xmm2
subss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @floatmod(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 = load float, float* %3
%8 = load float, float* %4
%9 = fdiv float %7, %8
%10 = fptosi float %9 to i32
%11 = sitofp i32 %10 to float
%12 = fneg float %6
%13 = call float @llvm.fmuladd.f32(float %12, float %11, float %5)
ret float %13
}

LLVM IR (-O2):
define float @floatmod(float %0, float %1) {
%3 = fdiv float %0, %1
%4 = fptosi float %3 to i32
%5 = sitofp i32 %4 to float
%6 = fneg float %1
%7 = tail call float @llvm.fmuladd.f32(float %6, float %5, float %0)
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ Print(char *);
void cnsitm(void) { Print("Sorry, we can't accept unidentified objects."); }


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"Sorry, we can't accept unidentified objects.\00"
define void @cnsitm() {
%1 = call i32 @Print(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"Sorry, we can't accept unidentified objects.\00"
define void @cnsitm() {
%1 = tail call i32 @Print(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_74int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x74 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_74int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 116
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_74int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 498216206336
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void gdk_gc_get_colormap() {}


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

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

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

LLVM IR (-O2):
define void @gdk_gc_get_colormap() {
ret void
}
void uart_init(void) {
  (*(volatile unsigned long *)0x56000070) |= 0xa0;
  (*(volatile unsigned long *)0x56000078) = 0x0c;
  (*(volatile unsigned long *)0x50000000) = 0x03;
  (*(volatile unsigned long *)0x50000004) = 0x05;
  (*(volatile unsigned long *)0x50000008) = 0x00;
  (*(volatile unsigned long *)0x5000000c) = 0x00;
  (*(volatile unsigned long *)0x50000028) = ((50000000 / (115200 * 16)) - 1);
}


x86 assembly (clang, -O0):
<uart_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56000070,%eax
mov    (%rax),%rcx
or     $0xa0,%rcx
mov    $0x56000070,%eax
mov    %rcx,(%rax)
mov    $0x56000078,%eax
movq   $0xc,(%rax)
mov    $0x50000000,%eax
movq   $0x3,(%rax)
mov    $0x50000004,%eax
movq   $0x5,(%rax)
mov    $0x50000008,%eax
movq   $0x0,(%rax)
mov    $0x5000000c,%eax
movq   $0x0,(%rax)
mov    $0x50000028,%eax
movq   $0x1a,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_init>:
orq    $0xa0,0x56000070
movq   $0xc,0x56000078
movq   $0x3,0x50000000
movq   $0x5,0x50000004
movq   $0x0,0x50000008
movq   $0x0,0x5000000c
movq   $0x1a,0x50000028
ret

LLVM IR (-O0):
define void @uart_init() {
%1 = load volatile i64, i64* inttoptr (i64 1442840688 to i64*)
%2 = or i64 %1, 160
store volatile i64 %2, i64* inttoptr (i64 1442840688 to i64*)
store volatile i64 12, i64* inttoptr (i64 1442840696 to i64*)
store volatile i64 3, i64* inttoptr (i64 1342177280 to i64*)
store volatile i64 5, i64* inttoptr (i64 1342177284 to i64*)
store volatile i64 0, i64* inttoptr (i64 1342177288 to i64*)
store volatile i64 0, i64* inttoptr (i64 1342177292 to i64*)
store volatile i64 26, i64* inttoptr (i64 1342177320 to i64*)
ret void
}

LLVM IR (-O2):
define void @uart_init() {
%1 = load volatile i64, i64* inttoptr (i64 1442840688 to i64*)
%2 = or i64 %1, 160
store volatile i64 %2, i64* inttoptr (i64 1442840688 to i64*)
store volatile i64 12, i64* inttoptr (i64 1442840696 to i64*)
store volatile i64 3, i64* inttoptr (i64 1342177280 to i64*)
store volatile i64 5, i64* inttoptr (i64 1342177284 to i64*)
store volatile i64 0, i64* inttoptr (i64 1342177288 to i64*)
store volatile i64 0, i64* inttoptr (i64 1342177292 to i64*)
store volatile i64 26, i64* inttoptr (i64 1342177320 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int test_ais_10(void) {
  fprintf(stderr, "test_ais_10() failed: Not Written\n");
  return 0;
}


x86 assembly (clang, -O0):
<test_ais_10>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ais_10>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"test_ais_10() failed: Not Written\0A\00"
define i32 @test_ais_10() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"test_ais_10() failed: Not Written\0A\00"
define i32 @test_ais_10() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ BIO;
typedef int /*<<< orphan*/ ASN1_PCTX;

/* Variables and functions */
int print_gost_01(int /*<<< orphan*/ *, int /*<<< orphan*/ const *, int,
                  int /*<<< orphan*/ *, int /*<<< orphan*/);
int param_print_gost01(BIO *out, const EVP_PKEY *pkey, int indent,
                       ASN1_PCTX *pctx) {
  return print_gost_01(out, pkey, indent, pctx, 0);
}


x86 assembly (clang, -O0):
<param_print_gost01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <print_gost_01@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<param_print_gost01>:
xor    %r8d,%r8d
jmp    1030 <print_gost_01@plt>

LLVM IR (-O0):
define i32 @param_print_gost01(i32* %0, i32* %1, i32 %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = call i32 @print_gost_01(i32* %9, i32* %10, i32 %11, i32* %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
define i32 @param_print_gost01(i32* %0, i32* %1, i32 %2, i32* %3) {
%5 = tail call i32 @print_gost_01(i32* %0, i32* %1, i32 %2, i32* %3, i32 0)
ret i32 %5
}
int do_488() { return 488; }


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

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

LLVM IR (-O0):
define i32 @do_488() {
ret i32 488
}

LLVM IR (-O2):
define i32 @do_488() {
ret i32 488
}
/* Variables and functions */
int /*<<< orphan*/ XBEE_UART_UartPostEnable();
void XBEE_UART_ScbModePostEnable(void) { XBEE_UART_UartPostEnable(); }


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

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

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

LLVM IR (-O2):
define void @XBEE_UART_ScbModePostEnable() {
%1 = tail call i32 (...) @XBEE_UART_UartPostEnable()
ret void
}
/* Variables and functions */
scalar_t__ dataIsLittleEndian();
unsigned int swab32(unsigned int);
scalar_t__ systemIsLittleEndian();
unsigned int fix_int(unsigned int ui) {
  return (dataIsLittleEndian() != systemIsLittleEndian()) ? swab32(ui) : ui;
}


x86 assembly (clang, -O0):
<fix_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <dataIsLittleEndian@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <systemIsLittleEndian@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     116d <fix_int+0x3d>
mov    -0x4(%rbp),%edi
call   1030 <swab32@plt>
mov    %eax,-0x14(%rbp)
jmp    1173 <fix_int+0x43>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fix_int>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <dataIsLittleEndian@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <systemIsLittleEndian@plt>
cmp    %rax,%rbx
jne    1154 <fix_int+0x24>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <swab32@plt>

LLVM IR (-O0):
define i32 @fix_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @dataIsLittleEndian()
%4 = call i64 (...) @systemIsLittleEndian()
%5 = icmp ne i64 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @swab32(i32 %7)
br label %11
9: ; preds = %1
%10 = load i32, i32* %2
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @fix_int(i32 %0) {
%2 = tail call i64 (...) @dataIsLittleEndian()
%3 = tail call i64 (...) @systemIsLittleEndian()
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @swab32(i32 %0)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ %6, %5 ], [ %0, %1 ]
ret i32 %8
}
/* Variables and functions */
int RCT2_CALLPROC_X(int, int, int, int, int, int, int, int);
int RCT2_CALLPROC_EBPSAFE(int address) {
  return RCT2_CALLPROC_X(address, 0xBBBBBBBB, 0xBBBBBBBB, 0xBBBBBBBB,
                         0xBBBBBBBB, 0xBBBBBBBB, 0xBBBBBBBB, 0xBBBBBBBB);
}


x86 assembly (clang, -O0):
<RCT2_CALLPROC_EBPSAFE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xbbbbbbbb,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0xbbbbbbbb,(%rsp)
movl   $0xbbbbbbbb,0x8(%rsp)
bb
call   1030 <RCT2_CALLPROC_X@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RCT2_CALLPROC_EBPSAFE>:
push   %rax
mov    $0xbbbbbbbb,%esi
mov    $0xbbbbbbbb,%edx
mov    $0xbbbbbbbb,%ecx
mov    $0xbbbbbbbb,%r8d
mov    $0xbbbbbbbb,%r9d
push   $0xffffffffbbbbbbbb
push   $0xffffffffbbbbbbbb
call   1030 <RCT2_CALLPROC_X@plt>
add    $0x10,%rsp
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @RCT2_CALLPROC_EBPSAFE(i32 %0) {
%2 = tail call i32 @RCT2_CALLPROC_X(i32 %0, i32 -1145324613, i32 -1145324613, i32 -1145324613, i32 -1145324613, i32 -1145324613, i32 -1145324613, i32 -1145324613)
ret i32 %2
}
int bar(void) {
  int i = 0;
  do {
    if (i++)
      return 1;
  } while (1);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     112b <bar+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    113f <bar+0x3f>
jmp    1130 <bar+0x30>
mov    $0x1,%al
test   $0x1,%al
jne    110b <bar+0xb>
jmp    113f <bar+0x3f>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @bar() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  char a;
  a = 321;
  printf("a = 0x%x,%d\n", a, a);
  printf("0x%x\n", 321);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movsbl -0x5(%rbp),%esi
movsbl -0x5(%rbp),%edx
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x141,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x41,%esi
mov    $0x41,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x141,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"a = 0x%x,%d\0A\00"
@.str.1 = [6 x i8] c"0x%x\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 65, i32 65)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 321)
ret i32 0
}
unsigned int vcmpeq4(unsigned int a, unsigned int b) {
  unsigned int c, r;
  r = a ^ b;
  c = r | 0x80808080;
  r = r ^ c;
  c = c - 0x01010101;
  c = r & ~c;
  r = c >> 7;
  r = c - r;
  r = r | c;
  return r;
}


x86 assembly (clang, -O0):
<vcmpeq4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     $0x80808080,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1010101,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x7,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vcmpeq4>:
xor    %esi,%edi
mov    %edi,%eax
or     $0x80808080,%eax
xor    %eax,%edi
mov    $0x1010100,%ecx
sub    %eax,%ecx
and    %edi,%ecx
mov    %ecx,%edx
shr    $0x7,%edx
mov    %ecx,%eax
sub    %edx,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @vcmpeq4(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = or i32 %3, -2139062144
%5 = xor i32 %4, %3
%6 = sub i32 16843008, %4
%7 = and i32 %5, %6
%8 = lshr i32 %7, 7
%9 = sub i32 %7, %8
%10 = or i32 %9, %7
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ writeMonthlyClimate(double, double, int, int, char *,
                                       char *);
void writeMonthlyClimate_R(double *latitude, double *longitude, int *yearLow,
                           int *yearHigh, char **site, char **directory) {
  writeMonthlyClimate(*latitude, *longitude, *yearLow, *yearHigh, *site,
                      *directory);
}


x86 assembly (clang, -O0):
<writeMonthlyClimate_R>:
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    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
mov    -0x30(%rbp),%rax
mov    (%rax),%rcx
call   1030 <writeMonthlyClimate@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeMonthlyClimate_R>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
mov    (%rdx),%edi
mov    (%rcx),%esi
mov    (%r8),%rdx
mov    (%r9),%rcx
jmp    1030 <writeMonthlyClimate@plt>

LLVM IR (-O0):
define void @writeMonthlyClimate_R(double* %0, double* %1, i32* %2, i32* %3, i8** %4, i8** %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8**
%12 = alloca i8**
store double* %0, double** %7
store double* %1, double** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i8** %4, i8*** %11
store i8** %5, i8*** %12
%13 = load double*, double** %7
%14 = load double, double* %13
%15 = load double*, double** %8
%16 = load double, double* %15
%17 = load i32*, i32** %9
%18 = load i32, i32* %17
%19 = load i32*, i32** %10
%20 = load i32, i32* %19
%21 = load i8**, i8*** %11
%22 = load i8*, i8** %21
%23 = load i8**, i8*** %12
%24 = load i8*, i8** %23
%25 = call i32 @writeMonthlyClimate(double %14, double %16, i32 %18, i32 %20, i8* %22, i8* %24)
ret void
}

LLVM IR (-O2):
define void @writeMonthlyClimate_R(double* nocapture %0, double* nocapture %1, i32* nocapture %2, i32* nocapture %3, i8** nocapture %4, i8** nocapture %5) {
%7 = load double, double* %0
%8 = load double, double* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = tail call i32 @writeMonthlyClimate(double %7, double %8, i32 %9, i32 %10, i8* %11, i8* %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void luaI_free(void *block) {
  if (block) {
    *((char *)block) = -1;
    free(block);
  }
}


x86 assembly (clang, -O0):
<luaI_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1137 <luaI_free+0x27>
mov    -0x8(%rbp),%rax
movb   $0xff,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaI_free>:
test   %rdi,%rdi
je     111d <luaI_free+0xd>
movb   $0xff,(%rdi)
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @luaI_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8*, i8** %2
store i8 -1, i8* %6
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @luaI_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
store i8 -1, i8* %0
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
struct module {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
struct device *__root_device_register(char const *, struct module *);
struct device *root_device_register(const char *name) {
  return __root_device_register(name, ((struct module *)0));
}


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

x86 assembly (clang, -O2):
<root_device_register>:
xor    %esi,%esi
jmp    1030 <__root_device_register@plt>

LLVM IR (-O0):
%struct.device = type { i32 }
%struct.module = type { i32 }
define %struct.device* @root_device_register(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.device* @__root_device_register(i8* %3, %struct.module* null)
ret %struct.device* %4
}

LLVM IR (-O2):
%struct.device = type { i32 }
%struct.module = type { i32 }
define %struct.device* @root_device_register(i8* %0) {
%2 = tail call %struct.device* @__root_device_register(i8* %0, %struct.module* null)
ret %struct.device* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf(
      "-p <num>      TCP port number to listen on (default: 9764)\n"
      "-l <ip_addr>  interface to listen on, default is INDRR_ANY\n"
      "-c <num>      max simultaneous connections (default: 1024)\n"
      "-d            run as a daemon\n"
      "-h            print this help and exit\n"
      "-v            verbose (print errors/warnings)\n"
      "-s            strict mode (exit while open hdb failed before startup)\n"
      "-t <num>      number of worker threads to use, default 4\n"
      "-T <num>      timeout in millisecond, 0 for none, default 0\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [480 x i8] c"-p <num> TCP port number to listen on (default: 9764)\0A-l <ip_addr> interface to listen on, default is INDRR_ANY\0A-c <num> max simultaneous connections (default: 1024)\0A-d run as a daemon\0A-h print this help and exit\0A-v verbose (print errors/warnings)\0A-s strict mode (exit while open hdb failed before startup)\0A-t <num> number of worker threads to use, default 4\0A-T <num> timeout in millisecond, 0 for none, default 0\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([480 x i8], [480 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [479 x i8] c"-p <num> TCP port number to listen on (default: 9764)\0A-l <ip_addr> interface to listen on, default is INDRR_ANY\0A-c <num> max simultaneous connections (default: 1024)\0A-d run as a daemon\0A-h print this help and exit\0A-v verbose (print errors/warnings)\0A-s strict mode (exit while open hdb failed before startup)\0A-t <num> number of worker threads to use, default 4\0A-T <num> timeout in millisecond, 0 for none, default 0\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([479 x i8], [479 x i8]* @str, i64 0, i64 0))
ret void
}
void GC_push_thread_structures() {}


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

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

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

LLVM IR (-O2):
define void @GC_push_thread_structures() {
ret void
}
void g_type_plugin_complete_interface_info() {}


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

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

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

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