xunge/DecIR huggingface dataset:
int main() {
  char a = 'a';
  char b;
  b = 2;
  return (a + b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movb   $0x2,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
store i8 97, i8* %2
store i8 2, i8* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 99
}
/* Type definitions */
struct fontparse {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ glorpline(struct fontparse *, int /*<<< orphan*/ *, char *);
void decryptagain(struct fontparse *fp, FILE *temp, char *rdtok) {
  while (glorpline(fp, temp, rdtok))
    ;
}


x86 assembly (clang, -O0):
<decryptagain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <glorpline@plt>
cmp    $0x0,%rax
je     1144 <decryptagain+0x34>
jmp    1124 <decryptagain+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decryptagain>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <glorpline@plt>
test   %rax,%rax
jne    1120 <decryptagain+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.fontparse = type { i32 }
define void @decryptagain(%struct.fontparse* %0, i32* %1, i8* %2) {
%4 = alloca %struct.fontparse*
%5 = alloca i32*
%6 = alloca i8*
store %struct.fontparse* %0, %struct.fontparse** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
br label %7
7: ; preds = %13, %3
%8 = load %struct.fontparse*, %struct.fontparse** %4
%9 = load i32*, i32** %5
%10 = load i8*, i8** %6
%11 = call i64 @glorpline(%struct.fontparse* %8, i32* %9, i8* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %7
br label %7
14: ; preds = %7
ret void
}

LLVM IR (-O2):
%struct.fontparse = type { i32 }
define void @decryptagain(%struct.fontparse* %0, i32* %1, i8* %2) {
br label %4
4: ; preds = %4, %3
%5 = tail call i64 @glorpline(%struct.fontparse* %0, i32* %1, i8* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %4
7: ; preds = %4
ret void
}
_Bool isTrojan(double q, double e, double i) {
  if (e > .22 || i > 38)
    return 0;
  double a = q / (1 - e);
  return a > 5.05 && a < 5.35;
}


x86 assembly (clang, -O0):
<isTrojan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1141 <isTrojan+0x41>
movsd  -0x20(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    114a <isTrojan+0x4a>
movb   $0x0,-0x1(%rbp)
jmp    119c <isTrojan+0x9c>
movsd  -0x10(%rbp),%xmm0
movsd  0xec1(%rip),%xmm1
subsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe9c(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x29(%rbp)
jbe    1194 <isTrojan+0x94>
movsd  0xe97(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
seta   %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isTrojan>:
xor    %eax,%eax
ucomisd 0xef6(%rip),%xmm1
ja     1142 <isTrojan+0x42>
ucomisd 0xef4(%rip),%xmm2
ja     1142 <isTrojan+0x42>
movsd  0xef2(%rip),%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
ucomisd 0xeea(%rip),%xmm0
seta   %cl
movsd  0xee7(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
and    %cl,%al
ret

LLVM IR (-O0):
define zeroext i1 @isTrojan(double %0, double %1, double %2) {
%4 = alloca i1
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%9 = load double, double* %6
%10 = fcmp ogt double %9, 2.200000e-01
br i1 %10, label %14, label %11
11: ; preds = %3
%12 = load double, double* %7
%13 = fcmp ogt double %12, 3.800000e+01
br i1 %13, label %14, label %15
14: ; preds = %11, %3
store i1 false, i1* %4
br label %27
15: ; preds = %11
%16 = load double, double* %5
%17 = load double, double* %6
%18 = fsub double 1.000000e+00, %17
%19 = fdiv double %16, %18
store double %19, double* %8
%20 = load double, double* %8
%21 = fcmp ogt double %20, 5.050000e+00
br i1 %21, label %22, label %25
22: ; preds = %15
%23 = load double, double* %8
%24 = fcmp olt double %23, 5.350000e+00
br label %25
25: ; preds = %22, %15
%26 = phi i1 [ false, %15 ], [ %24, %22 ]
store i1 %26, i1* %4
br label %27
27: ; preds = %25, %14
%28 = load i1, i1* %4
ret i1 %28
}

LLVM IR (-O2):
define zeroext i1 @isTrojan(double %0, double %1, double %2) {
%4 = fcmp ogt double %1, 2.200000e-01
%5 = fcmp ogt double %2, 3.800000e+01
%6 = or i1 %4, %5
br i1 %6, label %13, label %7
7: ; preds = %3
%8 = fsub double 1.000000e+00, %1
%9 = fdiv double %0, %8
%10 = fcmp ogt double %9, 5.050000e+00
%11 = fcmp olt double %9, 5.350000e+00
%12 = and i1 %10, %11
br label %13
13: ; preds = %3, %7
%14 = phi i1 [ %12, %7 ], [ false, %3 ]
ret i1 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_welcome(void) {
  printf("\t\t\t*** JACKPOT LOTTERY ***\t\t\t\n");
  printf("\n\t\t\tWelcome to the Lottery Draw!\t\t\t");
  printf("\n\tPlease select one of the following options from the Main Menu "
         "below...\t");
}


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

x86 assembly (clang, -O2):
<print_welcome>:
push   %rax
lea    0xf46(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
lea    0xee4(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"\09\09\09*** JACKPOT LOTTERY ***\09\09\09\0A\00"
@.str.1 = [36 x i8] c"\0A\09\09\09Welcome to the Lottery Draw!\09\09\09\00"
@.str.2 = [74 x i8] c"\0A\09Please select one of the following options from the Main Menu below...\09\00"
define void @print_welcome() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [36 x i8] c"\0A\09\09\09Welcome to the Lottery Draw!\09\09\09\00"
@.str.2 = [74 x i8] c"\0A\09Please select one of the following options from the Main Menu below...\09\00"
@str = [30 x i8] c"\09\09\09*** JACKPOT LOTTERY ***\09\09\09\00"
define void @print_welcome() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void POS_SVC_Handler(void) {}


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

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

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

LLVM IR (-O2):
define void @POS_SVC_Handler() {
ret void
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t len = 0;
  while (*str) {
    ++str;
    ++len;
  }
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113a <strlen+0x3a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ type;
};
typedef TYPE_1__ XKeyReleasedEvent;

/* Variables and functions */
int get_XKeyReleasedEvent_type(void *_p) {
  return (int)((XKeyReleasedEvent *)_p)->type;
}


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

x86 assembly (clang, -O2):
<get_XKeyReleasedEvent_type>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XKeyReleasedEvent_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void vwarn(const char *fmt, va_list ap) {
  vfprintf(stderr, fmt, ap);
  perror("");
}


x86 assembly (clang, -O0):
<vwarn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <vfprintf@plt>
lea    0xeb5(%rip),%rdi
call   1030 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vwarn>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <vfprintf@plt>
lea    0xec5(%rip),%rdi
pop    %rax
jmp    1030 <perror@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [1 x i8] zeroinitializer
define void @vwarn(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vfprintf(i32 %5, i8* %6, i32 %7)
%9 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [1 x i8] zeroinitializer
define void @vwarn(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
%5 = tail call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
void platform_enter_critical() {}


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

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

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

LLVM IR (-O2):
define void @platform_enter_critical() {
ret void
}
/* Variables and functions */
int f();
__attribute__((no, noclone)) int g1(int p1) { return f(); }


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

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

LLVM IR (-O0):
define i32 @g1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @f()
ret i32 %3
}

LLVM IR (-O2):
define i32 @g1(i32 %0) {
%2 = tail call i32 (...) @f()
ret i32 %2
}
void PiComs_TX_ISR(void) {}


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

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

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

LLVM IR (-O2):
define void @PiComs_TX_ISR() {
ret void
}
/* Variables and functions */
int sw_sync_timeline_is_valid(int);
int sw_sync_fence_is_valid(int fd) { return sw_sync_timeline_is_valid(fd); }


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

x86 assembly (clang, -O2):
<sw_sync_fence_is_valid>:
jmp    1030 <sw_sync_timeline_is_valid@plt>

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

LLVM IR (-O2):
define i32 @sw_sync_fence_is_valid(i32 %0) {
%2 = tail call i32 @sw_sync_timeline_is_valid(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ print_op_name(int);
int /*<<< orphan*/ printf(char *, ...);
void print_op(int a) {
  printf(" op %d ", a);
  print_op_name(a);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_op>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_op_name@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_op>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%edi
call   1050 <print_op_name@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c" op %d \00"
define void @print_op(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @print_op_name(i32 %0)
%4 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RB_AUTOBOOT;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reboot(int /*<<< orphan*/);
void rebootHandler(int signum) {
  printf("rebooting system\n");
  reboot(RB_AUTOBOOT);
}


x86 assembly (clang, -O0):
<rebootHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <reboot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rebootHandler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <reboot@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"rebooting system\0A\00"
@RB_AUTOBOOT = global i32 0
define void @rebootHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @RB_AUTOBOOT
%5 = call i32 @reboot(i32 %4)
ret void
}

LLVM IR (-O2):
@RB_AUTOBOOT = global i32 0
@str = [17 x i8] c"rebooting system\00"
define void @rebootHandler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @RB_AUTOBOOT
%4 = tail call i32 @reboot(i32 %3)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long root;
};
struct TYPE_4__ {
  TYPE_1__ xbutton;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xbutton_root(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xbutton.root = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xbutton_root(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void report_version(void) { exit(0); }


x86 assembly (clang, -O0):
<report_version>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<report_version>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @report_version() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @report_version() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ emscripten_run_script(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void c_writeback_nl(char *str) {
  char *buf = malloc(1024 * 2);
  if (!buf)
    exit(1);
  sprintf(buf, "writeback_nl(\"%s\");", str);
  emscripten_run_script(buf);
  free(buf);
}


x86 assembly (clang, -O0):
<c_writeback_nl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x800,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117f <c_writeback_nl+0x2f>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe72(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <emscripten_run_script@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_writeback_nl>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x800,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1192 <c_writeback_nl+0x42>
mov    %rax,%rbx
lea    0xe90(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <emscripten_run_script@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"writeback_nl(\22%s\22);\00"
define void @c_writeback_nl(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @malloc(i32 2048)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %3
%14 = call i32 @emscripten_run_script(i8* %13)
%15 = load i8*, i8** %3
%16 = call i32 @free(i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"writeback_nl(\22%s\22);\00"
define void @c_writeback_nl(i8* %0) {
%2 = tail call dereferenceable_or_null(2048) i8* @malloc(i32 2048)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
%7 = tail call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @emscripten_run_script(i8* %2)
%9 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ usleep(int);
void sleep_random(void) {
  int sec = rand() % 10;
  printf("Sleep %d msec...\n", sec * 10);
  usleep(sec * 1000 * 10);
}


x86 assembly (clang, -O0):
<sleep_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
imul   $0xa,-0x4(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
imul   $0x3e8,-0x4(%rbp),%eax
imul   $0xa,%eax,%edi
call   1050 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_random>:
push   %rbx
xor    %eax,%eax
call   1040 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
lea    (%rbx,%rbx,1),%eax
lea    (%rax,%rax,4),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
imul   $0x2710,%ebx,%edi
pop    %rbx
jmp    1050 <usleep@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Sleep %d msec...\0A\00"
define void @sleep_random() {
%1 = alloca i32
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 10
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, 10
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = mul nsw i32 %7, 1000
%9 = mul nsw i32 %8, 10
%10 = call i32 @usleep(i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Sleep %d msec...\0A\00"
define void @sleep_random() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 10
%3 = mul nsw i32 %2, 10
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = mul nsw i32 %2, 10000
%6 = tail call i32 @usleep(i32 %5)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void htole32(uint32_t num, uint8_t *out) {
  out[0] = num & 0xFF;
  out[1] = (num >> 8) & 0xFF;
  out[2] = (num >> 16) & 0xFF;
  out[3] = (num >> 24) & 0xFF;
}


x86 assembly (clang, -O0):
<htole32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<htole32>:
mov    %edi,%eax
movzbl %al,%ecx
mov    %ecx,(%rsi)
movzbl %ah,%ecx
mov    %ecx,0x4(%rsi)
mov    %edi,%ecx
shr    $0x10,%ecx
movzbl %cl,%ecx
mov    %ecx,0x8(%rsi)
shr    $0x18,%eax
mov    %eax,0xc(%rsi)
ret

LLVM IR (-O0):
define void @htole32(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 = and i32 %5, 255
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %3
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
%14 = load i32, i32* %3
%15 = ashr i32 %14, 16
%16 = and i32 %15, 255
%17 = load i32*, i32** %4
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 %16, i32* %18
%19 = load i32, i32* %3
%20 = ashr i32 %19, 24
%21 = and i32 %20, 255
%22 = load i32*, i32** %4
%23 = getelementptr inbounds i32, i32* %22, i64 3
store i32 %21, i32* %23
ret void
}

LLVM IR (-O2):
define void @htole32(i32 %0, i32* nocapture writeonly %1) {
%3 = and i32 %0, 255
store i32 %3, i32* %1
%4 = lshr i32 %0, 8
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %0, 16
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %8, i32* %9
%10 = lshr i32 %0, 24
%11 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %10, i32* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wdctl_command(int);
void wdctl_add_trusted_local_maclist(void) { wdctl_command(32); }


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

x86 assembly (clang, -O2):
<wdctl_add_trusted_local_maclist>:
mov    $0x20,%edi
jmp    1030 <wdctl_command@plt>

LLVM IR (-O0):
define void @wdctl_add_trusted_local_maclist() {
%1 = call i32 @wdctl_command(i32 32)
ret void
}

LLVM IR (-O2):
define void @wdctl_add_trusted_local_maclist() {
%1 = tail call i32 @wdctl_command(i32 32)
ret void
}
const char *redfish_get_version_str(void) {
  return "1"
         "."
         "0"
         "."
         "0";
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"1.0.0\00"
define i8* @redfish_get_version_str() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
unsigned long int unsignedlongint_ignoring_longlongint(unsigned long int x,
                                                       long long int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlongint_ignoring_longlongint(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
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlongint_ignoring_longlongint(i64 returned %0, i64 %1) {
ret i64 %0
}
float fun2(int n, float h) {
  if (n == 1)
    return h / 2;
  return fun2(n - 1, h / 2);
}


x86 assembly (clang, -O0):
<fun2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1145 <fun2+0x35>
movss  -0xc(%rbp),%xmm0
movss  0xec9(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1166 <fun2+0x56>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
movss  -0xc(%rbp),%xmm0
movss  0xea8(%rip),%xmm1
divss  %xmm1,%xmm0
call   1030 <fun2@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun2>:
cmp    $0x1,%edi
je     1165 <fun2+0x65>
lea    -0x1(%rdi),%ecx
lea    -0x2(%rdi),%eax
and    $0x7,%ecx
je     112d <fun2+0x2d>
xor    %edx,%edx
movss  0xee6(%rip),%xmm1
nopw   0x0(%rax,%rax,1)
mulss  %xmm1,%xmm0
add    $0x1,%edx
cmp    %edx,%ecx
jne    1120 <fun2+0x20>
sub    %edx,%edi
cmp    $0x7,%eax
jb     1165 <fun2+0x65>
add    $0xffffffff,%edi
movss  0xec3(%rip),%xmm1
nopl   (%rax)
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
add    $0xfffffff8,%edi
jne    1140 <fun2+0x40>
mulss  0xe93(%rip),%xmm0
ret

LLVM IR (-O0):
define float @fun2(i32 %0, float %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %4
store float %1, float* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load float, float* %5
%10 = fdiv float %9, 2.000000e+00
store float %10, float* %3
br label %17
11: ; preds = %2
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = load float, float* %5
%15 = fdiv float %14, 2.000000e+00
%16 = call float @fun2(i32 %13, float %15)
store float %16, float* %3
br label %17
17: ; preds = %11, %8
%18 = load float, float* %3
ret float %18
}

LLVM IR (-O2):
define float @fun2(i32 %0, float %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %22, label %4
4: ; preds = %2
%5 = add i32 %0, 7
%6 = add i32 %0, -2
%7 = and i32 %5, 7
%8 = icmp eq i32 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %4, %9
%10 = phi float [ %14, %9 ], [ %1, %4 ]
%11 = phi i32 [ %13, %9 ], [ %0, %4 ]
%12 = phi i32 [ %15, %9 ], [ 0, %4 ]
%13 = add nsw i32 %11, -1
%14 = fmul float %10, 5.000000e-01
%15 = add i32 %12, 1
%16 = icmp eq i32 %15, %7
br i1 %16, label %17, label %9
17: ; preds = %9, %4
%18 = phi float [ undef, %4 ], [ %14, %9 ]
%19 = phi float [ %1, %4 ], [ %14, %9 ]
%20 = phi i32 [ %0, %4 ], [ %13, %9 ]
%21 = icmp ult i32 %6, 7
br i1 %21, label %22, label %25
22: ; preds = %17, %25, %2
%23 = phi float [ %1, %2 ], [ %18, %17 ], [ %36, %25 ]
%24 = fmul float %23, 5.000000e-01
ret float %24
25: ; preds = %17, %25
%26 = phi float [ %36, %25 ], [ %19, %17 ]
%27 = phi i32 [ %35, %25 ], [ %20, %17 ]
%28 = fmul float %26, 5.000000e-01
%29 = fmul float %28, 5.000000e-01
%30 = fmul float %29, 5.000000e-01
%31 = fmul float %30, 5.000000e-01
%32 = fmul float %31, 5.000000e-01
%33 = fmul float %32, 5.000000e-01
%34 = fmul float %33, 5.000000e-01
%35 = add nsw i32 %27, -8
%36 = fmul float %34, 5.000000e-01
%37 = icmp eq i32 %35, 1
br i1 %37, label %22, label %25
}
int local_memory_node(int node_id) { return node_id; }


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

x86 assembly (clang, -O2):
<local_memory_node>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @local_memory_node(i32 returned %0) {
ret i32 %0
}
int test_imm_06int8_reg(signed char val) {
  return ((val) & (0x06 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_06int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_06int8_reg(i8 signext %0) {
%2 = and i8 %0, 6
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void preinit_1(void) { printf("preinit array 1\n"); }


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

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

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

LLVM IR (-O2):
@str = [16 x i8] c"preinit array 1\00"
define void @preinit_1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/ const *);
int /*<<< orphan*/ const *label_is_normal(int /*<<< orphan*/ const *);
const uint8_t *labeldata(const uint8_t *label) {
  assert(label);
  assert(label_is_normal(label));
  return label + 1;
}


x86 assembly (clang, -O0):
<labeldata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <label_is_normal@plt>
mov    %rax,%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
add    $0x4,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<labeldata>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1030 <label_is_normal@plt>
mov    %rax,%rdi
call   1040 <assert@plt>
add    $0x4,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32* @labeldata(i32* %0) {
%2 = tail call i32 @assert(i32* %0)
%3 = tail call i32* @label_is_normal(i32* %0)
%4 = tail call i32 @assert(i32* %3)
%5 = getelementptr inbounds i32, i32* %0, i64 1
ret i32* %5
}
void ff_hevc_put_hevc_qpel_h32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_h32_10_sse4() {
ret void
}
/* Variables and functions */
int write_block(int, int, int /*<<< orphan*/, int /*<<< orphan*/,
                int /*<<< orphan*/, int /*<<< orphan*/);
int servoDetach(int pin) { return write_block(36, pin, 0, 0, 0, 0); }


x86 assembly (clang, -O0):
<servoDetach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x24,%edi
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <write_block@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<servoDetach>:
mov    %edi,%esi
mov    $0x24,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <write_block@plt>

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

LLVM IR (-O2):
define i32 @servoDetach(i32 %0) {
%2 = tail call i32 @write_block(i32 36, i32 %0, i32 0, i32 0, i32 0, i32 0)
ret i32 %2
}
int internal_function(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @internal_function() {
ret i32 42
}

LLVM IR (-O2):
define i32 @internal_function() {
ret i32 42
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ initial_state;
};
typedef TYPE_1__ XWMHints;

/* Variables and functions */
int get_XWMHints_initial_state(void *_p) {
  return (int)((XWMHints *)_p)->initial_state;
}


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

x86 assembly (clang, -O2):
<get_XWMHints_initial_state>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XWMHints_initial_state(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int dosEquis(int a, int b) { return (a == 2 * b); }


x86 assembly (clang, -O0):
<dosEquis>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dosEquis>:
add    %esi,%esi
xor    %eax,%eax
cmp    %edi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @dosEquis(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = mul nsw i32 2, %6
%8 = icmp eq i32 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @dosEquis(i32 %0, i32 %1) {
%3 = shl nsw i32 %1, 1
%4 = icmp eq i32 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ putchar(char);
int main(void) {
  char ch;
  ch = getchar();
  putchar(ch);
  putchar('?');
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
mov    $0x3f,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @putchar(i8 signext %4)
%6 = call i32 @putchar(i8 signext 63)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = tail call i32 @putchar(i8 signext %1)
%3 = tail call i32 @putchar(i8 signext 63)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DebugLogEntryHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void DebugLogEntryLogging() { UAVObjLogging(DebugLogEntryHandle()); }


x86 assembly (clang, -O0):
<DebugLogEntryLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <DebugLogEntryHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @DebugLogEntryLogging() {
%1 = call i32 (...) @DebugLogEntryHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @DebugLogEntryLogging() {
%1 = tail call i32 (...) @DebugLogEntryHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_stream_pd(double *, int /*<<< orphan*/);
void test_mm_stream_pd(double *A, __m128d B) { _mm_stream_pd(A, B); }


x86 assembly (clang, -O0):
<test_mm_stream_pd>:
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 <_mm_stream_pd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_stream_pd>:
jmp    1030 <_mm_stream_pd@plt>

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

LLVM IR (-O2):
define void @test_mm_stream_pd(double* %0, i32 %1) {
%3 = tail call i32 @_mm_stream_pd(double* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t pack_get_u32(uint8_t *buffer, int byteNr) {
  uint32_t retVal;
  uint8_t *ptr;
  ptr = (uint8_t *)&retVal;
  *(ptr + 3) = *(buffer + byteNr + 3);
  *(ptr + 2) = *(buffer + byteNr + 2);
  *(ptr + 1) = *(buffer + byteNr + 1);
  *(ptr + 0) = *(buffer + byteNr + 0);
  return (retVal);
}


x86 assembly (clang, -O0):
<pack_get_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    0xc(%rax,%rcx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    0x8(%rax,%rcx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    0x4(%rax,%rcx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_get_u32>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @pack_get_u32(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
store i32* %5, i32** %6
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = getelementptr inbounds i32, i32* %10, i64 3
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = getelementptr inbounds i32, i32* %13, i64 3
store i32 %12, i32* %14
%15 = load i32*, i32** %3
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = getelementptr inbounds i32, i32* %18, i64 2
%20 = load i32, i32* %19
%21 = load i32*, i32** %6
%22 = getelementptr inbounds i32, i32* %21, i64 2
store i32 %20, i32* %22
%23 = load i32*, i32** %3
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
%27 = getelementptr inbounds i32, i32* %26, i64 1
%28 = load i32, i32* %27
%29 = load i32*, i32** %6
%30 = getelementptr inbounds i32, i32* %29, i64 1
store i32 %28, i32* %30
%31 = load i32*, i32** %3
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i32, i32* %31, i64 %33
%35 = getelementptr inbounds i32, i32* %34, i64 0
%36 = load i32, i32* %35
%37 = load i32*, i32** %6
%38 = getelementptr inbounds i32, i32* %37, i64 0
store i32 %36, i32* %38
%39 = load i32, i32* %5
ret i32 %39
}

LLVM IR (-O2):
define i32 @pack_get_u32(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello baz\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"hello baz\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"hello baz\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void *l_alloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *l_alloc0(size_t size) {
  void *p = l_alloc(size);
  memset(p, 0, size);
  return p;
}


x86 assembly (clang, -O0):
<l_alloc0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <l_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_alloc0>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <l_alloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @l_alloc0(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @l_alloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @memset(i8* %6, i32 0, i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @l_alloc0(i64 %0) {
%2 = tail call i8* @l_alloc(i64 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
int llvm_fcmp_oeq(double X, double Y) { return X == Y; }


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

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

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

LLVM IR (-O2):
define i32 @llvm_fcmp_oeq(double %0, double %1) {
%3 = fcmp oeq double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: loader_test <test_file>.yo\n");
  printf("\nLoader Test Failed\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"usage: loader_test <test_file>.yo\0A\00"
@.str.1 = [21 x i8] c"\0ALoader Test Failed\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%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))
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @EXIT_FAILURE
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"usage: loader_test <test_file>.yo\0A\00"
@EXIT_FAILURE = global i32 0
@str = [20 x i8] c"\0ALoader Test Failed\00"
define void @usage() {
%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))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}