xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int);
void main() {
  int x, y, z = 4;
  print("y 0");
  printid(y);
  x += -4;
  print("x -4");
  printid(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%edi
call   1040 <printid@plt>
mov    -0x4(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,-0x4(%rbp)
lea    0xeb1(%rip),%rdi
call   1030 <print@plt>
mov    -0x4(%rbp),%edi
call   1040 <printid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print@plt>
call   1040 <printid@plt>
lea    0xecb(%rip),%rdi
call   1030 <print@plt>
pop    %rax
jmp    1040 <printid@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"y 0\00"
@.str.1 = [5 x i8] c"x -4\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 4, i32* %3
%4 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @printid(i32 %5)
%7 = load i32, i32* %1
%8 = add nsw i32 %7, -4
store i32 %8, i32* %1
%9 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %1
%11 = call i32 @printid(i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"y 0\00"
@.str.1 = [5 x i8] c"x -4\00"
define void @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(i32 undef)
%3 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printid(i32 undef)
ret void
}
int fun1018() { return 1018; }


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

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

LLVM IR (-O0):
define i32 @fun1018() {
ret i32 1018
}

LLVM IR (-O2):
define i32 @fun1018() {
ret i32 1018
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ serial;
};
struct TYPE_4__ {
  TYPE_1__ xproperty;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xproperty_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xproperty.serial;
}


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

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

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

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

/* Variables and functions */
int pthread_create(int /*<<< orphan*/ *, int /*<<< orphan*/ *, void *, void *);
void pthread_create_opaque(pthread_t *threadptr, void *procptr, void *dataptr,
                           int *err) {
  *err = pthread_create(threadptr, NULL, procptr, dataptr);
}


x86 assembly (clang, -O0):
<pthread_create_opaque>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pthread_create@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_create_opaque>:
push   %rbx
mov    %rcx,%rbx
mov    %rdx,%rcx
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <pthread_create@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @pthread_create_opaque(i32* %0, i8* %1, i8* %2, i32* nocapture writeonly %3) {
%5 = tail call i32 @pthread_create(i32* %0, i32* null, i8* %1, i8* %2)
store i32 %5, i32* %3
ret void
}
void sip_new_token(unsigned char *pDst, unsigned char iLen) {}


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

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

LLVM IR (-O0):
define void @sip_new_token(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
ret void
}

LLVM IR (-O2):
define void @sip_new_token(i8* nocapture %0, i8 zeroext %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void displayBadInputMessage() {
  puts("\nI'm sorry, I didn't recognize your input; please try again.");
}


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

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

LLVM IR (-O0):
@.str = [61 x i8] c"\0AI'm sorry, I didn't recognize your input; please try again.\00"
define void @displayBadInputMessage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [61 x i8] c"\0AI'm sorry, I didn't recognize your input; please try again.\00"
define void @displayBadInputMessage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned xrop3_158_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = D & S;
  stk3 = T | stk4;
  stk2 = S ^ stk3;
  stk1 = D ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_158_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_158_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
or     %edi,%ecx
xor    %eax,%ecx
xor    $0xff,%ecx
not    %eax
and    %ecx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_158_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %5
%25 = load i32, i32* %6
%26 = and i32 %24, %25
store i32 %26, i32* %11
%27 = load i32, i32* %7
%28 = load i32, i32* %11
%29 = or i32 %27, %28
store i32 %29, i32* %10
%30 = load i32, i32* %6
%31 = load i32, i32* %10
%32 = xor i32 %30, %31
store i32 %32, i32* %9
%33 = load i32, i32* %5
%34 = load i32, i32* %9
%35 = xor i32 %33, %34
store i32 %35, i32* %8
%36 = load i32, i32* %8
%37 = load i32, i32* %6
%38 = xor i32 %37, -1
%39 = and i32 %36, %38
%40 = load i32, i32* %5
%41 = load i32, i32* %6
%42 = and i32 %40, %41
%43 = or i32 %39, %42
ret i32 %43
}

LLVM IR (-O2):
define i32 @xrop3_158_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %3
%8 = xor i32 %4, %7
%9 = xor i32 %8, 255
%10 = xor i32 %4, -1
%11 = and i32 %9, %10
%12 = or i32 %11, %3
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ ICPrintMama();
int /*<<< orphan*/ ICPrintPapa();
int /*<<< orphan*/ printf(char *);
void ICPrintParents(int parameter) {
  if (parameter % 3 == 0) {
    ICPrintMama();
  }
  if (parameter % 5 == 0) {
    ICPrintPapa();
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<ICPrintParents>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1156 <ICPrintParents+0x26>
mov    $0x0,%al
call   1050 <ICPrintMama@plt>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1171 <ICPrintParents+0x41>
mov    $0x0,%al
call   1040 <ICPrintPapa@plt>
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ICPrintParents>:
push   %rbx
mov    %edi,%ebx
imul   $0xaaaaaaab,%edi,%eax
add    $0x2aaaaaaa,%eax
cmp    $0x55555554,%eax
ja     114c <ICPrintParents+0x1c>
xor    %eax,%eax
call   1050 <ICPrintMama@plt>
imul   $0xcccccccd,%ebx,%eax
add    $0x19999999,%eax
cmp    $0x33333332,%eax
ja     1165 <ICPrintParents+0x35>
xor    %eax,%eax
call   1040 <ICPrintPapa@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @ICPrintParents(i32 %0) {
%2 = srem i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @ICPrintMama()
br label %6
6: ; preds = %4, %1
%7 = srem i32 %0, 5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @ICPrintPapa()
br label %11
11: ; preds = %9, %6
%12 = tail call i32 @putchar(i32 10)
ret void
}
double getActual(void) {
  double actual = 0;
  return actual;
}


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

x86 assembly (clang, -O2):
<getActual>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @getActual() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = load double, double* %1
ret double %2
}

LLVM IR (-O2):
define double @getActual() {
ret double 0.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ mmio_readw(void *);
uint16_t mmio_le_readw(void *addr) { return (mmio_readw(addr)); }


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

x86 assembly (clang, -O2):
<mmio_le_readw>:
jmp    1030 <mmio_readw@plt>

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

LLVM IR (-O2):
define i32 @mmio_le_readw(i8* %0) {
%2 = tail call i32 @mmio_readw(i8* %0)
ret i32 %2
}
void gtk_text_iter_backward_chars() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_backward_chars() {
ret void
}
int interval_div(x1, x2, y1, y2, low, high)
double x1, x2, y1, y2, *low, *high;
{ return (interval_div4(x1, x2, y1, y2, low, high)); }


x86 assembly (clang, -O0):
<interval_div>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    $0x4,%al
call   1030 <interval_div4@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interval_div>:
mov    $0x4,%al
jmp    1030 <interval_div4@plt>

LLVM IR (-O0):
define i32 @interval_div(double %0, double %1, double %2, double %3, double* %4, double* %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double* %4, double** %11
store double* %5, double** %12
%13 = load double, double* %7
%14 = load double, double* %8
%15 = load double, double* %9
%16 = load double, double* %10
%17 = load double*, double** %11
%18 = load double*, double** %12
%19 = call i32 (double, double, double, double, double*, double*, ...) bitcast (i32 (...)* @interval_div4 to i32 (double, double, double, double, double*, double*, ...)*)(double %13, double %14, double %15, double %16, double* %17, double* %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @interval_div(double %0, double %1, double %2, double %3, double* %4, double* %5) {
%7 = tail call i32 (double, double, double, double, double*, double*, ...) bitcast (i32 (...)* @interval_div4 to i32 (double, double, double, double, double*, double*, ...)*)(double %0, double %1, double %2, double %3, double* %4, double* %5)
ret i32 %7
}
int isalnum(int c) {
  return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
         (c >= '0' && c <= '9');
}


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1120 <isalnum+0x20>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isalnum+0x58>
cmpl   $0x61,-0x4(%rbp)
jl     1139 <isalnum+0x39>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isalnum+0x58>
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1152 <isalnum+0x52>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x1a,%eax
setb   %al
add    $0xffffffd0,%edi
cmp    $0xa,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isalnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %22, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 122
br i1 %13, label %22, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 48
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 57
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %5
%23 = phi i1 [ true, %11 ], [ true, %5 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = add i32 %0, -48
%6 = icmp ult i32 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ __u16;

/* Variables and functions */
int /*<<< orphan*/ output_char(int /*<<< orphan*/);
void put_royakey(__u16 rightOyaKeyCode) { output_char(rightOyaKeyCode); }


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

x86 assembly (clang, -O2):
<put_royakey>:
jmp    1030 <output_char@plt>

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

LLVM IR (-O2):
define void @put_royakey(i32 %0) {
%2 = tail call i32 @output_char(i32 %0)
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
scalar_t__ kill(int, int /*<<< orphan*/);
int find_process_by_pid(pid_t pid) { return (kill(pid, 0) == 0) ? pid : -pid; }


x86 assembly (clang, -O0):
<find_process_by_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <kill@plt>
cmp    $0x0,%rax
jne    113a <find_process_by_pid+0x2a>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <find_process_by_pid+0x32>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_process_by_pid>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
call   1030 <kill@plt>
mov    %ebx,%ecx
neg    %ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @find_process_by_pid(i32 %0) {
%2 = tail call i64 @kill(i32 %0, i32 0)
%3 = icmp eq i64 %2, 0
%4 = sub nsw i32 0, %0
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
int addArgs(int a, int b, int c) { return a + b + c; }


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

x86 assembly (clang, -O2):
<addArgs>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @addArgs(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @addArgs(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Type definitions */
struct mat2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat2_multiply(float *, float *, float *);
__attribute__((always_)) struct mat2 *
psmat2_multiply(struct mat2 *result, struct mat2 *a, struct mat2 *b) {
  mat2_multiply((float *)result, (float *)a, (float *)b);
  return result;
}


x86 assembly (clang, -O0):
<psmat2_multiply>:
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 <mat2_multiply@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psmat2_multiply>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat2_multiply@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat2 = type { i32 }
define %struct.mat2* @psmat2_multiply(%struct.mat2* %0, %struct.mat2* %1, %struct.mat2* %2) {
%4 = alloca %struct.mat2*
%5 = alloca %struct.mat2*
%6 = alloca %struct.mat2*
store %struct.mat2* %0, %struct.mat2** %4
store %struct.mat2* %1, %struct.mat2** %5
store %struct.mat2* %2, %struct.mat2** %6
%7 = load %struct.mat2*, %struct.mat2** %4
%8 = bitcast %struct.mat2* %7 to float*
%9 = load %struct.mat2*, %struct.mat2** %5
%10 = bitcast %struct.mat2* %9 to float*
%11 = load %struct.mat2*, %struct.mat2** %6
%12 = bitcast %struct.mat2* %11 to float*
%13 = call i32 @mat2_multiply(float* %8, float* %10, float* %12)
%14 = load %struct.mat2*, %struct.mat2** %4
ret %struct.mat2* %14
}

LLVM IR (-O2):
%struct.mat2 = type { i32 }
define %struct.mat2* @psmat2_multiply(%struct.mat2* returned %0, %struct.mat2* %1, %struct.mat2* %2) {
%4 = bitcast %struct.mat2* %0 to float*
%5 = bitcast %struct.mat2* %1 to float*
%6 = bitcast %struct.mat2* %2 to float*
%7 = tail call i32 @mat2_multiply(float* %4, float* %5, float* %6)
ret %struct.mat2* %0
}
int f9_0(unsigned x) {
  switch (x) {
  case 10 ... 0xFFFFFFFF:
    return 0;
  default:
    return 10;
  }
}


x86 assembly (clang, -O0):
<f9_0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    111e <f9_0+0x1e>
movl   $0x0,-0x4(%rbp)
jmp    1134 <f9_0+0x34>
mov    -0xc(%rbp),%eax
sub    $0xa,%eax
cmp    $0xfffffff5,%eax
jbe    1112 <f9_0+0x12>
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f9_0>:
xor    %ecx,%ecx
cmp    $0xa,%edi
mov    $0xa,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f9_0(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
]
5: ; preds = %6
store i32 0, i32* %2
br label %10
6: ; preds = %1
%7 = sub i32 %4, 10
%8 = icmp ule i32 %7, -11
br i1 %8, label %5, label %9
9: ; preds = %6
store i32 10, i32* %2
br label %10
10: ; preds = %9, %5
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @f9_0(i32 %0) {
%2 = icmp ult i32 %0, 10
%3 = select i1 %2, i32 10, i32 0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ adjustParallel();
int /*<<< orphan*/ connect_to_robot();
int /*<<< orphan*/ goStraight();
int /*<<< orphan*/ initialize_robot();
int /*<<< orphan*/ lookForEnd();
int /*<<< orphan*/ lookForFront();
int /*<<< orphan*/ setCoords();
int /*<<< orphan*/ setSensors();
int main() {
  connect_to_robot();
  initialize_robot();
  setSensors();
  setCoords();
  while (1) {
    adjustParallel();
    lookForFront();
    lookForEnd();
    goStraight();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1090 <connect_to_robot@plt>
mov    $0x0,%al
call   10a0 <initialize_robot@plt>
mov    $0x0,%al
call   1070 <setSensors@plt>
mov    $0x0,%al
call   1030 <setCoords@plt>
mov    $0x0,%al
call   1080 <adjustParallel@plt>
mov    $0x0,%al
call   1060 <lookForFront@plt>
mov    $0x0,%al
call   1050 <lookForEnd@plt>
mov    $0x0,%al
call   1040 <goStraight@plt>
jmp    11ab <main+0x2b>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1090 <connect_to_robot@plt>
xor    %eax,%eax
call   10a0 <initialize_robot@plt>
xor    %eax,%eax
call   1070 <setSensors@plt>
xor    %eax,%eax
call   1030 <setCoords@plt>
nopl   (%rax)
xor    %eax,%eax
call   1080 <adjustParallel@plt>
xor    %eax,%eax
call   1060 <lookForFront@plt>
xor    %eax,%eax
call   1050 <lookForEnd@plt>
xor    %eax,%eax
call   1040 <goStraight@plt>
jmp    11a0 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @connect_to_robot()
%3 = call i32 (...) @initialize_robot()
%4 = call i32 (...) @setSensors()
%5 = call i32 (...) @setCoords()
br label %6
6: ; preds = %0, %6
%7 = call i32 (...) @adjustParallel()
%8 = call i32 (...) @lookForFront()
%9 = call i32 (...) @lookForEnd()
%10 = call i32 (...) @goStraight()
br label %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @connect_to_robot()
%2 = tail call i32 (...) @initialize_robot()
%3 = tail call i32 (...) @setSensors()
%4 = tail call i32 (...) @setCoords()
br label %5
5: ; preds = %0, %5
%6 = tail call i32 (...) @adjustParallel()
%7 = tail call i32 (...) @lookForFront()
%8 = tail call i32 (...) @lookForEnd()
%9 = tail call i32 (...) @goStraight()
br label %5
}
void msSetError(int code, const char *message, const char *routine, ...) {
  (void)code;
  (void)message;
  (void)routine;
}


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

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

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

LLVM IR (-O2):
define void @msSetError(i32 %0, i8* nocapture %1, i8* nocapture %2, ...) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int fpdat_read();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void check_status(void) {
  uint8_t status;
  status = fpdat_read();
  if (status != 0x0d) {
    fprintf(stderr, "status 0x%02x\n", status);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <fpdat_read@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xd,-0x4(%rbp)
je     116e <check_status+0x3e>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_status>:
push   %rax
xor    %eax,%eax
call   1040 <fpdat_read@plt>
cmp    $0xd,%eax
jne    113f <check_status+0xf>
pop    %rax
ret
mov    0x2e9a(%rip),%rcx
mov    (%rcx),%edi
lea    0xeb1(%rip),%rsi
mov    %eax,%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"status 0x%02x\0A\00"
define void @check_status() {
%1 = alloca i32
%2 = call i32 (...) @fpdat_read()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 13
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = load i32, i32* %1
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %0
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"status 0x%02x\0A\00"
define void @check_status() {
%1 = tail call i32 (...) @fpdat_read()
%2 = icmp eq i32 %1, 13
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put_next(char const);
void print(const char *msg) {
  while (*msg != '\0') {
    put_next(*msg);
    ++msg;
  }
}


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

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

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

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

/* Variables and functions */
int icmp_uint16_t(uint16_t a, uint16_t b) {
  if (a > b)
    return 1;
  else if (a < b)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<icmp_uint16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1126 <icmp_uint16_t+0x26>
movl   $0x1,-0x4(%rbp)
jmp    1147 <icmp_uint16_t+0x47>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1140 <icmp_uint16_t+0x40>
movl   $0xffffffff,-0x4(%rbp)
jmp    1147 <icmp_uint16_t+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<icmp_uint16_t>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
setl   %cl
neg    %ecx
cmp    %rsi,%rdi
mov    $0x1,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @icmp_uint16_t(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = icmp slt i64 %0, %1
%5 = sext i1 %4 to i32
%6 = select i1 %3, i32 1, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_slice_buffer_create() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_slice_buffer_create>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_slice_buffer_create>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_slice_buffer_create() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_slice_buffer_create() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_55(int Salt, int Parameter) {
  unsigned b = Salt ^ 0x4EDE0CAC;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_55>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x4ede0cac,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_55>:
xor    $0x4ede0cac,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_55(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = xor i32 %6, 1323175084
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @yahoo_M1Common(i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @yahoo_f01_55(i32 %0, i32 %1) {
%3 = xor i32 %0, 1323175084
%4 = tail call i32 @yahoo_M1Common(i32 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_pstream_ref() {
  printf("NOT IMPLEMENTED:"
         "pa_pstream_ref"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"NOT IMPLEMENTED:pa_pstream_ref\0A\00"
define i32 @pa_pstream_ref() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_pstream_ref\00"
define i32 @pa_pstream_ref() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int iclip(int const, int /*<<< orphan*/, int);
int iclip_u8(const int v) { return iclip(v, 0, 255); }


x86 assembly (clang, -O0):
<iclip_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0xff,%edx
call   1030 <iclip@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iclip_u8>:
xor    %esi,%esi
mov    $0xff,%edx
jmp    1030 <iclip@plt>

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

LLVM IR (-O2):
define i32 @iclip_u8(i32 %0) {
%2 = tail call i32 @iclip(i32 %0, i32 0, i32 255)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ zvasprintf(char **, char const *, int /*<<< orphan*/);
char *minibuf_format(const char *fmt, va_list ap) {
  char *buf;
  zvasprintf(&buf, fmt, ap);
  return buf;
}


x86 assembly (clang, -O0):
<minibuf_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    -0x18(%rbp),%rdi
call   1030 <zvasprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minibuf_format>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <zvasprintf@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @minibuf_format(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @zvasprintf(i8** %3, i8* %0, i32 %1)
%6 = load i8*, i8** %3
ret i8* %6
}
int test_imm_93uint32_reg(unsigned int val) {
  return ((val) & (0x93 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_93uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x93,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_93uint32_reg(i32 %0) {
%2 = and i32 %0, 147
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void XProtocolRevision() {}


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

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

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

LLVM IR (-O2):
define void @XProtocolRevision() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ep_index(int /*<<< orphan*/, int);
int /*<<< orphan*/ usb_select_endpoint(int /*<<< orphan*/);
void usb_status_ack(int dir) {
  ;
  usb_select_endpoint(ep_index(0, dir));
  (*(volatile unsigned char *)((0x24100000) + 0x28)) |= 2;
}


x86 assembly (clang, -O0):
<usb_status_ack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
xor    %edi,%edi
call   1030 <ep_index@plt>
mov    %eax,%edi
call   1040 <usb_select_endpoint@plt>
mov    $0x24100028,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x2,%eax
mov    %al,%cl
mov    $0x24100028,%eax
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_status_ack>:
push   %rax
mov    %edi,%esi
xor    %edi,%edi
call   1030 <ep_index@plt>
mov    %eax,%edi
call   1040 <usb_select_endpoint@plt>
orb    $0x2,0x24100028
02
pop    %rax
ret

LLVM IR (-O0):
define void @usb_status_ack(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ep_index(i32 0, i32 %3)
%5 = call i32 @usb_select_endpoint(i32 %4)
%6 = load volatile i8, i8* inttoptr (i64 605028392 to i8*)
%7 = zext i8 %6 to i32
%8 = or i32 %7, 2
%9 = trunc i32 %8 to i8
store volatile i8 %9, i8* inttoptr (i64 605028392 to i8*)
ret void
}

LLVM IR (-O2):
define void @usb_status_ack(i32 %0) {
%2 = tail call i32 @ep_index(i32 0, i32 %0)
%3 = tail call i32 @usb_select_endpoint(i32 %2)
%4 = load volatile i8, i8* inttoptr (i64 605028392 to i8*)
%5 = or i8 %4, 2
store volatile i8 %5, i8* inttoptr (i64 605028392 to i8*)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ read_unixtstamp(char *, int *);
void test_no_decimals_without_dot() {
  char *str = "1234";
  uint64_t dest;
  read_unixtstamp(str, &dest);
  assert((dest / 1000000000) == 1234 && (dest % 1000000000) == 0);
}


x86 assembly (clang, -O0):
<test_no_decimals_without_dot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <read_unixtstamp@plt>
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x4d2,%ecx
mov    %al,-0xd(%rbp)
jne    1172 <test_no_decimals_without_dot+0x52>
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_no_decimals_without_dot>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <read_unixtstamp@plt>
xor    %edi,%edi
call   1030 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"1234\00"
define void @test_no_decimals_without_dot() {
%1 = alloca i8*
%2 = alloca i32
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @read_unixtstamp(i8* %3, i32* %2)
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 1000000000
%7 = icmp eq i32 %6, 1234
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i32, i32* %2
%10 = srem i32 %9, 1000000000
%11 = icmp eq i32 %10, 0
br label %12
12: ; preds = %8, %0
%13 = phi i1 [ false, %0 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"1234\00"
define void @test_no_decimals_without_dot() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @read_unixtstamp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ pause();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  alarm(3);
  pause();
  printf("Bye\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x3,%edi
call   1040 <alarm@plt>
mov    $0x0,%al
call   1050 <pause@plt>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1040 <alarm@plt>
xor    %eax,%eax
call   1050 <pause@plt>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"Bye\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @alarm(i32 3)
%7 = call i32 (...) @pause()
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_SUCCESS
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [4 x i8] c"Bye\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @alarm(i32 3)
%4 = tail call i32 (...) @pause()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_SUCCESS
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
char *strrchr(char *, char);
void zapnl(char *s) {
  s = strrchr(s, '\n');
  if (s != NULL)
    *s = '\0';
}


x86 assembly (clang, -O0):
<zapnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <zapnl+0x30>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zapnl>:
push   %rax
mov    $0xa,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1123 <zapnl+0x13>
movb   $0x0,(%rax)
pop    %rax
ret

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

LLVM IR (-O2):
define void @zapnl(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}
/* Variables and functions */
char *_RepGetHost(char *, char *, int /*<<< orphan*/);
char *RepGetHost(char *Type, char *Filename) {
  return (_RepGetHost(Type, Filename, 0));
}


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

x86 assembly (clang, -O2):
<RepGetHost>:
xor    %edx,%edx
jmp    1030 <_RepGetHost@plt>

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

LLVM IR (-O2):
define i8* @RepGetHost(i8* %0, i8* %1) {
%3 = tail call i8* @_RepGetHost(i8* %0, i8* %1, i32 0)
ret i8* %3
}
char *strtok(char *str, char *delim) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @strtok(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t elf_gnu_hash(const char *name) {
  uint32_t h = 5381;
  for (unsigned char c = *name; c != '\0'; c = *++name)
    h = h * 33 + c;
  return h & 0xffffffff;
}


x86 assembly (clang, -O0):
<elf_gnu_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
cmp    $0x0,%eax
je     114c <elf_gnu_hash+0x4c>
imul   $0x21,-0xc(%rbp),%eax
movzbl -0xd(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    0x1(%rax),%al
mov    %al,-0xd(%rbp)
jmp    1118 <elf_gnu_hash+0x18>
mov    -0xc(%rbp),%eax
and    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf_gnu_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <elf_gnu_hash+0x38>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <elf_gnu_hash+0x20>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @elf_gnu_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %1
%5 = phi i32 [ 5381, %1 ], [ %12, %6 ]
ret i32 %5
6: ; preds = %1, %6
%7 = phi i8 [ %14, %6 ], [ %2, %1 ]
%8 = phi i32 [ %12, %6 ], [ 5381, %1 ]
%9 = phi i8* [ %13, %6 ], [ %0, %1 ]
%10 = zext i8 %7 to i32
%11 = mul nsw i32 %8, 33
%12 = add nsw i32 %11, %10
%13 = getelementptr inbounds i8, i8* %9, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %4, label %6
}