xunge/DecIR huggingface dataset:
void doublebuffer_() { doublebuffer_(); }


x86 assembly (clang, -O0):
<doublebuffer_>:
push   %rbp
mov    %rsp,%rbp
call   1030 <doublebuffer_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<doublebuffer_>:
jmp    1100 <doublebuffer_>

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

LLVM IR (-O2):
define void @doublebuffer_() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
char *gpioPath(char *);
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *directionPath(char *gpio_number) {
  char filename[50];
  sprintf(filename, "%s/direction", gpioPath(gpio_number));
  char *returnValue = malloc(sizeof(char) * 50);
  strcpy(returnValue, filename);
  return returnValue;
}


x86 assembly (clang, -O0):
<directionPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <gpioPath@plt>
mov    -0x50(%rbp),%rdi
mov    %rax,%rdx
lea    0xe95(%rip),%rsi
call   1060 <sprintf@plt>
mov    $0x32,%edi
call   1050 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x48(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<directionPath>:
push   %r14
push   %rbx
sub    $0x38,%rsp
call   1040 <gpioPath@plt>
lea    0xead(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rax,%rdx
call   1060 <sprintf@plt>
mov    $0x32,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%s/direction\00"
define i8* @directionPath(i8* %0) {
%2 = alloca i8*
%3 = alloca [50 x i8]
%4 = alloca i8*
store i8* %0, i8** %2
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i8* @gpioPath(i8* %6)
%8 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i8* @malloc(i32 50)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s/direction\00"
define i8* @directionPath(i8* %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = tail call i8* @gpioPath(i8* %0)
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = tail call dereferenceable_or_null(50) i8* @malloc(i32 50)
%7 = call i32 @strcpy(i8* %6, i8* %3)
ret i8* %6
}
/* Variables and functions */
char get_one_char();
int /*<<< orphan*/ redraw(int);
int /*<<< orphan*/ standout_end();
int /*<<< orphan*/ standout_start();
int /*<<< orphan*/ write(int, char *, int);
void Hit_Return(void) {
  char c;
  standout_start();
  write(1, "[Hit return to continue]", 24);
  standout_end();
  while ((c = get_one_char()) != '\n' && c != '\r')
    ;
  redraw(((int)1));
}


x86 assembly (clang, -O0):
<Hit_Return>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1070 <standout_start@plt>
mov    $0x1,%edi
lea    0xe95(%rip),%rsi
mov    $0x18,%edx
call   1050 <write@plt>
mov    $0x0,%al
call   1040 <standout_end@plt>
mov    $0x0,%al
call   1030 <get_one_char@plt>
mov    %al,-0x1(%rbp)
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     11a4 <Hit_Return+0x54>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    11b4 <Hit_Return+0x64>
jmp    11b9 <Hit_Return+0x69>
jmp    117c <Hit_Return+0x2c>
mov    $0x1,%edi
call   1060 <redraw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hit_Return>:
push   %rax
xor    %eax,%eax
call   1070 <standout_start@plt>
lea    0xea1(%rip),%rsi
mov    $0x1,%edi
mov    $0x18,%edx
call   1050 <write@plt>
xor    %eax,%eax
call   1040 <standout_end@plt>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <get_one_char@plt>
cmp    $0xd,%al
je     118f <Hit_Return+0x3f>
cmp    $0xa,%al
jne    1180 <Hit_Return+0x30>
mov    $0x1,%edi
pop    %rax
jmp    1060 <redraw@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"[Hit return to continue]\00"
define void @Hit_Return() {
%1 = alloca i8
%2 = call i32 (...) @standout_start()
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 24)
%4 = call i32 (...) @standout_end()
br label %5
5: ; preds = %15, %0
%6 = call signext i8 (...) @get_one_char()
store i8 %6, i8* %1
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 10
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i8, i8* %1
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 13
br label %13
13: ; preds = %9, %5
%14 = phi i1 [ false, %5 ], [ %12, %9 ]
br i1 %14, label %15, label %16
15: ; preds = %13
br label %5
16: ; preds = %13
%17 = call i32 @redraw(i32 1)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"[Hit return to continue]\00"
define void @Hit_Return() {
%1 = tail call i32 (...) @standout_start()
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 24)
%3 = tail call i32 (...) @standout_end()
br label %4
4: ; preds = %4, %0
%5 = tail call signext i8 (...) @get_one_char()
switch i8 %5, label %4 [
i8 13, label %6
i8 10, label %6
]
6: ; preds = %4, %4
%7 = tail call i32 @redraw(i32 1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
uint16_t bound_uint16(uint16_t val, uint16_t min, uint16_t max) {
  return val < min ? min : (val > max ? max : val);
}


x86 assembly (clang, -O0):
<bound_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    112b <bound_uint16+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1156 <bound_uint16+0x56>
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1146 <bound_uint16+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    114e <bound_uint16+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bound_uint16>:
mov    %rdx,%rax
cmp    %rdx,%rdi
cmovle %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @bound_uint16(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = icmp slt i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i64, i64* %5
br label %22
12: ; preds = %3
%13 = load i64, i64* %4
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i64, i64* %6
br label %20
18: ; preds = %12
%19 = load i64, i64* %4
br label %20
20: ; preds = %18, %16
%21 = phi i64 [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi i64 [ %11, %10 ], [ %21, %20 ]
ret i64 %23
}

LLVM IR (-O2):
define i64 @bound_uint16(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = icmp sgt i64 %0, %2
%6 = select i1 %5, i64 %2, i64 %0
%7 = select i1 %4, i64 %1, i64 %6
ret i64 %7
}
void ARGB4444ToI420() {}


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

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

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

LLVM IR (-O2):
define void @ARGB4444ToI420() {
ret void
}
/* Variables and functions */
int createMessageQueue();
int main() {
  int returnValue;
  returnValue = createMessageQueue();
  if (returnValue == 0) {
    goto shutdown;
  }
  return 0;
shutdown:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <createMessageQueue@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1138 <main+0x28>
jmp    1144 <main+0x34>
movl   $0x0,-0x4(%rbp)
jmp    114b <main+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <createMessageQueue@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @createMessageQueue()
ret i32 0
}
/* Variables and functions */
double getcurrenttime_();
void curtime_(double *timeVal) { *timeVal = getcurrenttime_(); }


x86 assembly (clang, -O0):
<curtime_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getcurrenttime_@plt>
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curtime_>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getcurrenttime_@plt>
movsd  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @curtime_(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = call double (...) @getcurrenttime_()
%4 = load double*, double** %2
store double %3, double* %4
ret void
}

LLVM IR (-O2):
define void @curtime_(double* nocapture writeonly %0) {
%2 = tail call double (...) @getcurrenttime_()
store double %2, double* %0
ret void
}
void g_source_set_closure() {}


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

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

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

LLVM IR (-O2):
define void @g_source_set_closure() {
ret void
}
int main() {
  int *p, a, b;
  if (b)
    p = &a;
  printf("%d", *p);
  p = &b;
  printf("%d %u", *p, &p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1131 <main+0x21>
lea    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xea9(%rip),%rdi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0xed0(%rip),%rdi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %u\00"
define i32 @main() {
%1 = alloca i32*
%2 = alloca i32
%3 = bitcast i32** %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
store i32* %2, i32** %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 undef, i32** %1)
ret i32 0
}
/* Variables and functions */
double P1z_z(double, double, double, double);
double P3z_x(double sign, double xi, double et, double qq) {
  return P1z_z(sign, xi, et, qq);
}


x86 assembly (clang, -O0):
<P3z_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <P1z_z@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<P3z_x>:
jmp    1030 <P1z_z@plt>

LLVM IR (-O0):
define double @P3z_x(double %0, double %1, double %2, double %3) {
%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
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call double @P1z_z(double %9, double %10, double %11, double %12)
ret double %13
}

LLVM IR (-O2):
define double @P3z_x(double %0, double %1, double %2, double %3) {
%5 = tail call double @P1z_z(double %0, double %1, double %2, double %3)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ expand(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char shorthand[] = "-a-z0-9-";
  char expanded[1000] = {0};
  expand(shorthand, expanded);
  printf("%s\n", expanded);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0xd(%rbp)
mov    0xeb5(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x400(%rbp),%rdi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1040 <memset@plt>
lea    -0xd(%rbp),%rdi
lea    -0x400(%rbp),%rsi
call   1050 <expand@plt>
lea    -0x400(%rbp),%rsi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
movabs $0x2d392d307a2d612d,%rax
2d 39 2d
mov    %rax,(%rsp)
movb   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rbx
mov    $0x3e8,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1050 <expand@plt>
lea    0xe98(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.shorthand = [9 x i8] c"-a-z0-9-\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
%3 = alloca [1000 x i8]
store i32 0, i32* %1
%4 = bitcast [9 x i8]* %2 to i8*
%5 = bitcast [1000 x i8]* %3 to i8*
%6 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%8 = call i32 @expand(i8* %6, i8* %7)
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.shorthand = [9 x i8] c"-a-z0-9-\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i32 @expand(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
void i2d_ASN1_INTEGER(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_ASN1_INTEGER() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Axle_Insert(int, int);
int /*<<< orphan*/ Car_Delete(int);
int Car_GetCarAxlesNum(int);
void Finishing(void) {
  if (0 == Car_GetCarAxlesNum(1)) {
    Car_Delete(1);
  }
  if (1 == Car_GetCarAxlesNum(1)) {
    Axle_Insert(1, 1);
  }
}


x86 assembly (clang, -O0):
<Finishing>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <Car_GetCarAxlesNum@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1154 <Finishing+0x24>
mov    $0x1,%edi
call   1040 <Car_Delete@plt>
mov    $0x1,%edi
call   1030 <Car_GetCarAxlesNum@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
jne    1179 <Finishing+0x49>
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <Axle_Insert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Finishing>:
push   %rax
mov    $0x1,%edi
call   1030 <Car_GetCarAxlesNum@plt>
test   %eax,%eax
jne    1149 <Finishing+0x19>
mov    $0x1,%edi
call   1040 <Car_Delete@plt>
mov    $0x1,%edi
call   1030 <Car_GetCarAxlesNum@plt>
cmp    $0x1,%eax
jne    1168 <Finishing+0x38>
mov    $0x1,%edi
mov    $0x1,%esi
pop    %rax
jmp    1050 <Axle_Insert@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @Finishing() {
%1 = call i32 @Car_GetCarAxlesNum(i32 1)
%2 = icmp eq i32 0, %1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @Car_Delete(i32 1)
br label %5
5: ; preds = %3, %0
%6 = call i32 @Car_GetCarAxlesNum(i32 1)
%7 = icmp eq i32 1, %6
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @Axle_Insert(i32 1, i32 1)
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
define void @Finishing() {
%1 = tail call i32 @Car_GetCarAxlesNum(i32 1)
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @Car_Delete(i32 1)
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @Car_GetCarAxlesNum(i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @Axle_Insert(i32 1, i32 1)
br label %10
10: ; preds = %8, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FOURCC(char, char, char, char);
int /*<<< orphan*/ NodeUnRegisterClass(int /*<<< orphan*/);
void ASAP_Done() { NodeUnRegisterClass(FOURCC('A', 'S', 'A', 'P')); }


x86 assembly (clang, -O0):
<ASAP_Done>:
push   %rbp
mov    %rsp,%rbp
mov    $0x41,%edx
mov    $0x53,%esi
mov    $0x50,%ecx
mov    %edx,%edi
call   1030 <FOURCC@plt>
mov    %eax,%edi
call   1040 <NodeUnRegisterClass@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASAP_Done>:
push   %rax
mov    $0x41,%edi
mov    $0x53,%esi
mov    $0x41,%edx
mov    $0x50,%ecx
call   1030 <FOURCC@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <NodeUnRegisterClass@plt>

LLVM IR (-O0):
define void @ASAP_Done() {
%1 = call i32 @FOURCC(i8 signext 65, i8 signext 83, i8 signext 65, i8 signext 80)
%2 = call i32 @NodeUnRegisterClass(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ASAP_Done() {
%1 = tail call i32 @FOURCC(i8 signext 65, i8 signext 83, i8 signext 65, i8 signext 80)
%2 = tail call i32 @NodeUnRegisterClass(i32 %1)
ret void
}
/* Variables and functions */
void *malloc(int);
void panic() {
  while (1) {
  }
  void *unreachable = malloc(1024);
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <panic+0x4>

x86 assembly (clang, -O2):
<panic>:
jmp    1100 <panic>

LLVM IR (-O0):
define void @panic() {
%1 = alloca i8*
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define void @panic() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ print_id(char *);
void *thr_func(void *arg) {
  print_id(" New Thread: ");
  return ((void *)0);
}


x86 assembly (clang, -O0):
<thr_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <print_id@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c" New Thread: \00"
define i8* @thr_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @print_id(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [14 x i8] c" New Thread: \00"
define noalias i8* @thr_func(i8* nocapture readnone %0) {
%2 = tail call i32 @print_id(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
const char *metisAbout_Name(void) { return "metis"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"metis\00"
define i8* @metisAbout_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int _acpi_compare_strings(const void *a, const void *b) {
  const char **pa = (const char **)a;
  const char **pb = (const char **)b;
  return strcasecmp((const char *)*pa, (const char *)*pb);
}


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

x86 assembly (clang, -O2):
<_acpi_compare_strings>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @_acpi_compare_strings(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @strcasecmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @_acpi_compare_strings(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcasecmp(i8* %5, i8* %6)
ret i32 %7
}
/* Variables and functions */
int ap_cmd_get_float(int, int, float *);
int ap_get_volume(int session, float *volume) {
  return (ap_cmd_get_float(session, 0xcc0a, volume));
}


x86 assembly (clang, -O0):
<ap_get_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0xcc0a,%esi
call   1030 <ap_cmd_get_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_get_volume>:
mov    %rsi,%rdx
mov    $0xcc0a,%esi
jmp    1030 <ap_cmd_get_float@plt>

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

LLVM IR (-O2):
define i32 @ap_get_volume(i32 %0, float* %1) {
%3 = tail call i32 @ap_cmd_get_float(i32 %0, i32 52234, float* %1)
ret i32 %3
}
void shell_init(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @and_test() {
ret void
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _TimerBaseValid(scalar_t__ volatile);
uint32_t TimerADCEventGet(uint32_t ui32Base) {
  ASSERT(_TimerBaseValid(ui32Base));
  return ((*((volatile uint32_t *)(ui32Base + 0x00000070))));
}


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

x86 assembly (clang, -O2):
<TimerADCEventGet>:
push   %rax
mov    %rdi,(%rsp)
mov    (%rsp),%rdi
call   1040 <_TimerBaseValid@plt>
mov    %eax,%edi
call   1030 <ASSERT@plt>
mov    (%rsp),%rax
mov    0x70(%rax),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @TimerADCEventGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = tail call i32 @_TimerBaseValid(i64 %3)
%5 = tail call i32 @ASSERT(i32 %4)
%6 = load volatile i64, i64* %2
%7 = add nsw i64 %6, 112
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}
unsigned long FanChannelRPMGet(unsigned long ulBase, unsigned long ulChannel) {
  ;
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x00000018 +
                                        (ulChannel * 0x10)))) &
          0x00001FFF);
}


x86 assembly (clang, -O0):
<FanChannelRPMGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x18,%rax
mov    -0x10(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rax
and    $0x1fff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FanChannelRPMGet>:
shl    $0x4,%rsi
mov    0x18(%rdi,%rsi,1),%rax
and    $0x1fff,%eax
ret

LLVM IR (-O0):
define i64 @FanChannelRPMGet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = add i64 %5, 24
%7 = load i64, i64* %4
%8 = mul i64 %7, 16
%9 = add i64 %6, %8
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = and i64 %11, 8191
ret i64 %12
}

LLVM IR (-O2):
define i64 @FanChannelRPMGet(i64 %0, i64 %1) {
%3 = add i64 %0, 24
%4 = shl i64 %1, 4
%5 = add i64 %3, %4
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = and i64 %7, 8191
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ startThreads(int, char **);
int main(int argc, char *argv[]) {
  startThreads(argc, argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <startThreads@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <startThreads@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @startThreads(i32 %0, i8** %1)
ret i32 0
}
void ff_hevc_put_hevc_uni_w_epel_h8_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_h8_8_sse4() {
ret void
}
int test_imm_F4int16_reg(short val) {
  return ((val) & (0xF4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F4int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xf4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_F4int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 244
%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_F4int16_reg(i16 signext %0) {
%2 = and i16 %0, 244
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int bi_add_limbs(unsigned long int *sum, unsigned long int *carry,
                 unsigned long int lhs, unsigned long int rhs) {
  *sum = lhs + rhs;
  if (*sum < lhs || *sum < rhs) {
    *carry = *carry + 1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<bi_add_limbs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rcx
add    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmp    -0x18(%rbp),%rax
jb     1145 <bi_add_limbs+0x45>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmp    -0x20(%rbp),%rax
jae    1157 <bi_add_limbs+0x57>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bi_add_limbs>:
add    %rcx,%rdx
mov    %rdx,(%rdi)
jb     1113 <bi_add_limbs+0x13>
cmp    %rcx,%rdx
jb     1113 <bi_add_limbs+0x13>
mov    $0x1,%eax
ret
addq   $0x1,(%rsi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @bi_add_limbs(i64* nocapture writeonly %0, i64* nocapture %1, i64 %2, i64 %3) {
%5 = add i64 %3, %2
store i64 %5, i64* %0
%6 = icmp ult i64 %5, %2
%7 = icmp ult i64 %5, %3
%8 = or i1 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i64, i64* %1
%11 = add i64 %10, 1
store i64 %11, i64* %1
br label %12
12: ; preds = %4, %9
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgscale2(void) { gen("shll\t$2,%ecx"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"shll\09$2,%ecx\00"
define void @cgscale2() {
%1 = call i32 @gen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"shll\09$2,%ecx\00"
define void @cgscale2() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct child_t {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int idle_cpu(struct child_t *me) { return EXIT_SUCCESS; }


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

x86 assembly (clang, -O2):
<idle_cpu>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.child_t = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @idle_cpu(%struct.child_t* %0) {
%2 = alloca %struct.child_t*
store %struct.child_t* %0, %struct.child_t** %2
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
%struct.child_t = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @idle_cpu(%struct.child_t* nocapture readnone %0) {
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
void irqchip_init(void) {}


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

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

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

LLVM IR (-O2):
define void @irqchip_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IPC_disconnect();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void ipc_stop(void) {
  fprintf(stderr, "INFO: close connection to CENTRAL\n");
  IPC_disconnect();
}


x86 assembly (clang, -O0):
<ipc_stop>:
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 <IPC_disconnect@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"INFO: close connection to CENTRAL\0A\00"
define void @ipc_stop() {
%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 (...) @IPC_disconnect()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"INFO: close connection to CENTRAL\0A\00"
define void @ipc_stop() {
%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 (...) @IPC_disconnect()
ret void
}
/* Variables and functions */
float fabsf(float);
void __hv_abs_f(float bIn, float *bOut) { *bOut = fabsf(bIn); }


x86 assembly (clang, -O0):
<__hv_abs_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xee7(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_abs_f>:
andps  0xef9(%rip),%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @__hv_abs_f(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
store float %0, float* %3
store float* %1, float** %4
%5 = load float, float* %3
%6 = call float @llvm.fabs.f32(float %5)
%7 = load float*, float** %4
store float %6, float* %7
ret void
}

LLVM IR (-O2):
define void @__hv_abs_f(float %0, float* nocapture writeonly %1) {
%3 = tail call float @llvm.fabs.f32(float %0)
store float %3, float* %1
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ localtime_r(scalar_t__ *, struct tm *);
int /*<<< orphan*/ memset(struct tm *, int /*<<< orphan*/, int);
scalar_t__ time(int /*<<< orphan*/ *);
void get_tm(struct tm *tm) {
  time_t now = time(NULL);
  if (now == ((time_t)-1)) {
    (void)memset(tm, 0, sizeof(struct tm));
  } else {
    (void)localtime_r(&now, tm);
  }
}


x86 assembly (clang, -O0):
<get_tm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    1169 <get_tm+0x39>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
jmp    1176 <get_tm+0x46>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
call   1030 <localtime_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tm>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %rax,0x8(%rsp)
cmp    $0xffffffffffffffff,%rax
je     115d <get_tm+0x2d>
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <localtime_r@plt>
add    $0x10,%rsp
pop    %rbx
ret
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
add    $0x10,%rsp
pop    %rbx
jmp    1040 <memset@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @get_tm(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca i64
store %struct.tm* %0, %struct.tm** %2
%4 = call i64 @time(i32* null)
store i64 %4, i64* %3
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load %struct.tm*, %struct.tm** %2
%9 = call i32 @memset(%struct.tm* %8, i32 0, i32 4)
br label %13
10: ; preds = %1
%11 = load %struct.tm*, %struct.tm** %2
%12 = call i32 @localtime_r(i64* %3, %struct.tm* %11)
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @get_tm(%struct.tm* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = tail call i64 @time(i32* null)
store i64 %4, i64* %2
%5 = icmp eq i64 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @memset(%struct.tm* %0, i32 0, i32 4)
br label %10
8: ; preds = %1
%9 = call i32 @localtime_r(i64* %2, %struct.tm* %0)
br label %10
10: ; preds = %8, %6
ret void
}
long rol(long value, int n) {
  __asm__("rol %%cl, %%eax" : "=a"(value) : "a"(value), "c"(n));
  return value;
}


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

x86 assembly (clang, -O2):
<rol>:
mov    %esi,%ecx
mov    %rdi,%rax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i64 @rol(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = call i64 asm "rol %cl, %eax", "={ax},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i64 %5, i32 %6)
store i64 %7, i64* %3
%8 = load i64, i64* %3
ret i64 %8
}

LLVM IR (-O2):
define i64 @rol(i64 %0, i32 %1) {
%3 = tail call i64 asm "rol %cl, %eax", "={ax},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i64 %0, i32 %1)
ret i64 %3
}
void w13(void *x, long long y) { *(long long *)(x + 32755) = y; }


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

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

LLVM IR (-O0):
define void @w13(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 = getelementptr i8, i8* %6, i64 32755
%8 = bitcast i8* %7 to i64*
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @w13(i8* nocapture writeonly %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 32755
%4 = bitcast i8* %3 to i64*
store i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ M_Menu_PlayerConfig_f();
void PlayerSetupFunc(void *unused) { M_Menu_PlayerConfig_f(); }


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

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

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

LLVM IR (-O2):
define void @PlayerSetupFunc(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @M_Menu_PlayerConfig_f()
ret void
}
int foo(int f) { return f; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printTestIntroInfo(int testNumber, const char *intro) {
  printf("Test #%d\n", testNumber);
  printf("Testing: %s\n", intro);
}


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

x86 assembly (clang, -O2):
<printTestIntroInfo>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"Test #%d\0A\00"
@.str.1 = [13 x i8] c"Testing: %s\0A\00"
define void @printTestIntroInfo(i32 %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzConstant_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN_DELAYED(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ SEND_DATAOFF_DELAYED(int /*<<< orphan*/, int);
void BrzConstant_reqdown(struct comp *comp, int port) {
  struct BrzConstant_ *c = (struct BrzConstant_ *)comp;
  SEND_ACKDOWN_DELAYED(0, 0);
  SEND_DATAOFF_DELAYED(0, 1);
}


x86 assembly (clang, -O0):
<BrzConstant_reqdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <SEND_ACKDOWN_DELAYED@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <SEND_DATAOFF_DELAYED@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzConstant_reqdown>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <SEND_ACKDOWN_DELAYED@plt>
xor    %edi,%edi
mov    $0x1,%esi
pop    %rax
jmp    1040 <SEND_DATAOFF_DELAYED@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzConstant_ = type { i32 }
define void @BrzConstant_reqdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzConstant_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzConstant_*
store %struct.BrzConstant_* %7, %struct.BrzConstant_** %5
%8 = call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
%9 = call i32 @SEND_DATAOFF_DELAYED(i32 0, i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzConstant_reqdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
%4 = tail call i32 @SEND_DATAOFF_DELAYED(i32 0, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ on_hit(int /*<<< orphan*/, int /*<<< orphan*/);
void use_on_hit_function(uint64_t tag, uint64_t index) { on_hit(tag, index); }


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

x86 assembly (clang, -O2):
<use_on_hit_function>:
jmp    1030 <on_hit@plt>

LLVM IR (-O0):
define void @use_on_hit_function(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 = call i32 @on_hit(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @use_on_hit_function(i32 %0, i32 %1) {
%3 = tail call i32 @on_hit(i32 %0, i32 %1)
ret void
}
int roundup(int const nx) { return (nx + 2 - 1) / 2 * 2; }


x86 assembly (clang, -O0):
<roundup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundup>:
mov    %edi,%eax
add    $0x1,%eax
shr    $0x1f,%eax
add    %edi,%eax
add    $0x1,%eax
and    $0xfffffffe,%eax
ret

LLVM IR (-O0):
define i32 @roundup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 2
%5 = sub nsw i32 %4, 1
%6 = sdiv i32 %5, 2
%7 = mul nsw i32 %6, 2
ret i32 %7
}

LLVM IR (-O2):
define i32 @roundup(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = sdiv i32 %2, 2
%4 = shl nsw i32 %3, 1
ret i32 %4
}
double hypot(double x, double y) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(x);
  (void)(y);
  return 0;
}


x86 assembly (clang, -O0):
<hypot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hypot>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.hypot = [6 x i8] c"hypot\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @hypot(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.hypot, i64 0, i64 0))
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%9 = load double, double* %3
%10 = load double, double* %4
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.hypot = [6 x i8] c"hypot\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @hypot(double %0, double %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.hypot, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret double 0.000000e+00
}
int Hello() { return 0; }


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

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

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

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