#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*/ fprintf(int /*<<< orphan*/, char *, int);
int get_fpscr();
double inttof(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ test_coercion(double);
int /*<<< orphan*/ test_doublearr(int);
int /*<<< orphan*/ test_fipr();
int /*<<< orphan*/ test_floatarr(int);
int /*<<< orphan*/ test_fsca(int, double, double);
int /*<<< orphan*/ test_fsrra(double, double);
int /*<<< orphan*/ test_ftrv();
int main() {
  fprintf(stderr, "LL: %d\n", sizeof(unsigned long long));
  printf("%08X", get_fpscr());
  printf("\n");
  test_fsca(0x00000000, 0, 1);
  test_fsca(0x00011234, 0.43205646, 0.90184659);
  test_fsca(0xFEDCBA98, -0.99121743, -0.13224234);
  test_fsrra(25.0, 0.2);
  test_fsrra(0.05, 4.4721361);
  test_fsrra(-12.345, inttof(0x7FBFFFFF));
  test_coercion(-3.1415926);
  test_coercion(123456789012346567.890);
  test_coercion(-2147483648.0);
  test_coercion(5234.1234);
  test_doublearr(5);
  test_floatarr(5);
  test_fipr();
  test_ftrv();
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
lea    0xea1(%rip),%rsi
mov    $0x8,%edx
call   10b0 <fprintf@plt>
mov    $0x0,%al
call   1060 <get_fpscr@plt>
mov    %eax,%esi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
xor    %edi,%edi
xorps  %xmm0,%xmm0
movsd  0xe5d(%rip),%xmm1
call   1070 <test_fsca@plt>
mov    $0x11234,%edi
movsd  0xe3b(%rip),%xmm0
movsd  0xe3b(%rip),%xmm1
call   1070 <test_fsca@plt>
mov    $0xfedcba98,%edi
movsd  0xe11(%rip),%xmm0
movsd  0xe11(%rip),%xmm1
call   1070 <test_fsca@plt>
movsd  0xdec(%rip),%xmm0
movsd  0xdec(%rip),%xmm1
call   10c0 <test_fsrra@plt>
movsd  0xdc7(%rip),%xmm0
movsd  0xdc7(%rip),%xmm1
call   10c0 <test_fsrra@plt>
mov    $0x7fbfffff,%edi
call   1030 <inttof@plt>
movaps %xmm0,%xmm1
movsd  0xd9d(%rip),%xmm0
call   10c0 <test_fsrra@plt>
movsd  0xd88(%rip),%xmm0
call   1050 <test_coercion@plt>
movsd  0xd73(%rip),%xmm0
call   1050 <test_coercion@plt>
movsd  0xd5e(%rip),%xmm0
call   1050 <test_coercion@plt>
movsd  0xd49(%rip),%xmm0
call   1050 <test_coercion@plt>
mov    $0x5,%edi
call   10a0 <test_doublearr@plt>
mov    $0x5,%edi
call   10d0 <test_floatarr@plt>
mov    $0x0,%al
call   1090 <test_fipr@plt>
mov    $0x0,%al
call   1040 <test_ftrv@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e18(%rip),%rax
mov    (%rax),%edi
lea    0xe9f(%rip),%rsi
mov    $0x8,%edx
call   10c0 <fprintf@plt>
xor    %eax,%eax
call   1070 <get_fpscr@plt>
lea    0xe8f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0xa,%edi
call   1050 <putchar@plt>
movsd  0xdfc(%rip),%xmm1
xorps  %xmm0,%xmm0
xor    %edi,%edi
call   1080 <test_fsca@plt>
movsd  0xdf2(%rip),%xmm0
movsd  0xdf2(%rip),%xmm1
mov    $0x11234,%edi
call   1080 <test_fsca@plt>
movsd  0xde8(%rip),%xmm0
movsd  0xde8(%rip),%xmm1
mov    $0xfedcba98,%edi
call   1080 <test_fsca@plt>
movsd  0xdde(%rip),%xmm0
movsd  0xdde(%rip),%xmm1
call   10d0 <test_fsrra@plt>
movsd  0xdd9(%rip),%xmm0
movsd  0xdd9(%rip),%xmm1
call   10d0 <test_fsrra@plt>
mov    $0x7fbfffff,%edi
call   1030 <inttof@plt>
movaps %xmm0,%xmm1
movsd  0xdc7(%rip),%xmm0
call   10d0 <test_fsrra@plt>
movsd  0xdc2(%rip),%xmm0
call   1060 <test_coercion@plt>
movsd  0xdbd(%rip),%xmm0
call   1060 <test_coercion@plt>
movsd  0xdb8(%rip),%xmm0
call   1060 <test_coercion@plt>
movsd  0xdb3(%rip),%xmm0
call   1060 <test_coercion@plt>
mov    $0x5,%edi
call   10b0 <test_doublearr@plt>
mov    $0x5,%edi
call   10e0 <test_floatarr@plt>
xor    %eax,%eax
call   10a0 <test_fipr@plt>
xor    %eax,%eax
call   1040 <test_ftrv@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"LL: %d\0A\00"
@.str.1 = [5 x i8] c"%08X\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 8)
%4 = call i32 (...) @get_fpscr()
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @test_fsca(i32 0, double 0.000000e+00, double 1.000000e+00)
%8 = call i32 @test_fsca(i32 70196, double 0x3FDBA6D0236E6F1E, double 0x3FECDBED6141E451)
%9 = call i32 @test_fsca(i32 -19088744, double 0xBFEFB80D9DA267C9, double 0xBFC0ED5126B92754)
%10 = call i32 @test_fsrra(double 2.500000e+01, double 2.000000e-01)
%11 = call i32 @test_fsrra(double 5.000000e-02, double 0x4011E377A5530B40)
%12 = call double @inttof(i32 2143289343)
%13 = call i32 @test_fsrra(double -1.234500e+01, double %12)
%14 = call i32 @test_coercion(double 0xC00921FB4D12D84A)
%15 = call i32 @test_coercion(double 0x437B69B4BA630F6C)
%16 = call i32 @test_coercion(double 0xC1E0000000000000)
%17 = call i32 @test_coercion(double 0x40B4721F97247454)
%18 = call i32 @test_doublearr(i32 5)
%19 = call i32 @test_floatarr(i32 5)
%20 = call i32 (...) @test_fipr()
%21 = call i32 (...) @test_ftrv()
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"LL: %d\0A\00"
@.str.1 = [5 x i8] c"%08X\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = tail call i32 (...) @get_fpscr()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @test_fsca(i32 0, double 0.000000e+00, double 1.000000e+00)
%7 = tail call i32 @test_fsca(i32 70196, double 0x3FDBA6D0236E6F1E, double 0x3FECDBED6141E451)
%8 = tail call i32 @test_fsca(i32 -19088744, double 0xBFEFB80D9DA267C9, double 0xBFC0ED5126B92754)
%9 = tail call i32 @test_fsrra(double 2.500000e+01, double 2.000000e-01)
%10 = tail call i32 @test_fsrra(double 5.000000e-02, double 0x4011E377A5530B40)
%11 = tail call double @inttof(i32 2143289343)
%12 = tail call i32 @test_fsrra(double -1.234500e+01, double %11)
%13 = tail call i32 @test_coercion(double 0xC00921FB4D12D84A)
%14 = tail call i32 @test_coercion(double 0x437B69B4BA630F6C)
%15 = tail call i32 @test_coercion(double 0xC1E0000000000000)
%16 = tail call i32 @test_coercion(double 0x40B4721F97247454)
%17 = tail call i32 @test_doublearr(i32 5)
%18 = tail call i32 @test_floatarr(i32 5)
%19 = tail call i32 (...) @test_fipr()
%20 = tail call i32 (...) @test_ftrv()
ret i32 1
}