#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ writeHex(long);
int /*<<< orphan*/ writeString(char *);
int CoProFPTestEval(long in, long out, int t_num, int err) {
  if (in != out) {
    writeHex(t_num);
    writeString(" < FPU co-processor test failed\n\t");
    writeHex(in);
    writeString(" < expected\n\t");
    writeHex(out);
    writeString(" < got \n");
    return -1;
  }
  return err;
}


x86 assembly (clang, -O0):
<CoProFPTestEval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     118f <CoProFPTestEval+0x6f>
movslq -0x1c(%rbp),%rdi
call   1040 <writeHex@plt>
lea    0xeac(%rip),%rdi
call   1030 <writeString@plt>
mov    -0x10(%rbp),%rdi
call   1040 <writeHex@plt>
lea    0xeb9(%rip),%rdi
call   1030 <writeString@plt>
mov    -0x18(%rbp),%rdi
call   1040 <writeHex@plt>
lea    0xeb2(%rip),%rdi
call   1030 <writeString@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1195 <CoProFPTestEval+0x75>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CoProFPTestEval>:
mov    %ecx,%eax
cmp    %rsi,%rdi
je     1179 <CoProFPTestEval+0x59>
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movslq %edx,%rdi
call   1040 <writeHex@plt>
lea    0xec0(%rip),%rdi
call   1030 <writeString@plt>
mov    %rbx,%rdi
call   1040 <writeHex@plt>
lea    0xece(%rip),%rdi
call   1030 <writeString@plt>
mov    %r14,%rdi
call   1040 <writeHex@plt>
lea    0xec8(%rip),%rdi
call   1030 <writeString@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [34 x i8] c" < FPU co-processor test failed\0A\09\00"
@.str.1 = [14 x i8] c" < expected\0A\09\00"
@.str.2 = [9 x i8] c" < got \0A\00"
define i32 @CoProFPTestEval(i64 %0, i64 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
store i64 %0, i64* %6
store i64 %1, i64* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %24
13: ; preds = %4
%14 = load i32, i32* %8
%15 = sext i32 %14 to i64
%16 = call i32 @writeHex(i64 %15)
%17 = call i32 @writeString(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%18 = load i64, i64* %6
%19 = call i32 @writeHex(i64 %18)
%20 = call i32 @writeString(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%21 = load i64, i64* %7
%22 = call i32 @writeHex(i64 %21)
%23 = call i32 @writeString(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %5
br label %26
24: ; preds = %4
%25 = load i32, i32* %9
store i32 %25, i32* %5
br label %26
26: ; preds = %24, %13
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
@.str = [34 x i8] c" < FPU co-processor test failed\0A\09\00"
@.str.1 = [14 x i8] c" < expected\0A\09\00"
@.str.2 = [9 x i8] c" < got \0A\00"
define i32 @CoProFPTestEval(i64 %0, i64 %1, i32 %2, i32 %3) {
%5 = icmp eq i64 %0, %1
br i1 %5, label %14, label %6
6: ; preds = %4
%7 = sext i32 %2 to i64
%8 = tail call i32 @writeHex(i64 %7)
%9 = tail call i32 @writeString(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @writeHex(i64 %0)
%11 = tail call i32 @writeString(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @writeHex(i64 %1)
%13 = tail call i32 @writeString(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %4, %6
%15 = phi i32 [ -1, %6 ], [ %3, %4 ]
ret i32 %15
}