#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 != 0) ? -1 : 0;
}


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    11a2 <CoProFPTestEval+0x82>
mov    -0x20(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CoProFPTestEval>:
cmp    %rsi,%rdi
jne    112a <CoProFPTestEval+0xa>
neg    %ecx
sbb    %eax,%eax
ret
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movslq %edx,%rdi
call   1040 <__writeHex@plt>
lea    0xebd(%rip),%rdi
call   1030 <__writeString@plt>
mov    %rbx,%rdi
call   1040 <__writeHex@plt>
lea    0xecb(%rip),%rdi
call   1030 <__writeString@plt>
mov    %r14,%rdi
call   1040 <__writeHex@plt>
lea    0xec5(%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 %29
24: ; preds = %4
%25 = load i32, i32* %9
%26 = icmp ne i32 %25, 0
%27 = zext i1 %26 to i64
%28 = select i1 %26, i32 -1, i32 0
store i32 %28, i32* %5
br label %29
29: ; preds = %24, %13
%30 = load i32, i32* %5
ret i32 %30
}

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 %17
14: ; preds = %4
%15 = icmp ne i32 %3, 0
%16 = sext i1 %15 to i32
br label %17
17: ; preds = %14, %6
%18 = phi i32 [ -1, %6 ], [ %16, %14 ]
ret i32 %18
}