#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 ordering_err_2();
int compare_double(void *context, const double *check, const double *baseline) {
  if (!check || !baseline)
    return ordering_err_2();
  return ((
      (((((((((((((((((signed long)(*check)) - ((signed long)(*baseline))))) <=
                  (((0))))
                     ? (((((((signed long)(*check)) -
                            ((signed long)(*baseline))))) < (((0))))
                            ? ((-1))
                            : ((0)))
                     : ((1))))) ==
              ((((((((((
                      ((((*check))) <= (((*baseline))))
                          ? (((((*check))) < (((*baseline)))) ? ((-1)) : ((0)))
                          : ((1)))))))) <= (((0))))
                     ? ((((((((((((*check))) <= (((*baseline))))
                                   ? (((((*check))) < (((*baseline)))) ? ((-1))
                                                                       : ((0)))
                                   : ((1)))))))) < (((0))))
                            ? ((-1))
                            : ((0)))
                     : ((1))))))
                 ? ((((signed long)(*check)) - ((signed long)(*baseline))))
                 : (((((
                       ((((*check))) <= (((*baseline))))
                           ? (((((*check))) < (((*baseline)))) ? ((-1)) : ((0)))
                           : ((1))))))))))) !=
         (((int)-(((int)0x37ED)
                  << (8 * (((!!(((!!(sizeof(int))) * ((sizeof(int)) - 1)))) *
                            ((((!!(sizeof(int))) * ((sizeof(int)) - 1))) -
                             1)))))))) &&
        (((((((((((((((signed long)(*check)) - ((signed long)(*baseline))))) <=
                  (((0))))
                     ? (((((((signed long)(*check)) -
                            ((signed long)(*baseline))))) < (((0))))
                            ? ((-1))
                            : ((0)))
                     : ((1))))) ==
              (((((((((
                      (((((*check))) <= (((*baseline))))
                           ? (((((*check))) < (((*baseline)))) ? ((-1)) : ((0)))
                           : ((1)))))))) <= (((0))))
                     ? ((((((((((((*check))) <= (((*baseline))))
                                   ? (((((*check))) < (((*baseline)))) ? ((-1))
                                                                       : ((0)))
                                   : ((1)))))))) < (((0))))
                            ? ((-1))
                            : ((0)))
                     : ((1))))))
                 ? ((((signed long)(*check)) - ((signed long)(*baseline))))
                 : (((((
                       ((((*check))) <= (((*baseline))))
                           ? (((((*check))) < (((*baseline)))) ? ((-1)) : ((0)))
                           : ((1))))))))))) !=
         (((int)-(((int)0x37EE)
                  << (8 * (((!!(((!!(sizeof(int))) * ((sizeof(int)) - 1)))) *
                            ((((!!(sizeof(int))) * ((sizeof(int)) - 1))) -
                             1))))))))))
          ? (((((((((((((signed long)(*check)) -
                       ((signed long)(*baseline))))) <= (((0))))
                       ? (((((((signed long)(*check)) -
                              ((signed long)(*baseline))))) < (((0))))
                              ? ((-1))
                              : ((0)))
                       : ((1))))) ==
                ((((((((((((((*check))) <= (((*baseline))))
                              ? (((((*check))) < (((*baseline)))) ? ((-1))
                                                                  : ((0)))
                              : ((1)))))))) <= (((0))))
                       ? (((((((
                               (((((*check))) <= (((*baseline))))
                                    ? (((((*check))) < (((*baseline)))) ? ((-1))
                                                                        : ((0)))
                                    : ((1)))))))) < (((0))))
                              ? ((-1))
                              : ((0)))
                       : ((1))))))
                   ? ((((signed long)(*check)) - ((signed long)(*baseline))))
                   : (((((((((*check))) <= (((*baseline))))
                              ? (((((*check))) < (((*baseline)))) ? ((-1))
                                                                  : ((0)))
                              : ((1))))))))))
          : ((((((((((((((((((signed long)(*check)) -
                            ((signed long)(*baseline))))) <= (((0))))
                            ? (((((((signed long)(*check)) -
                                   ((signed long)(*baseline))))) < (((0))))
                                   ? ((-1))
                                   : ((0)))
                            : ((1))))) ==
                     ((((((((((((((*check))) <= (((*baseline))))
                                   ? (((((*check))) < (((*baseline)))) ? ((-1))
                                                                       : ((0)))
                                   : ((1)))))))) <= (((0))))
                            ? ((((((((((((*check))) <= (((*baseline))))
                                          ? (((((*check))) < (((*baseline))))
                                                 ? ((-1))
                                                 : ((0)))
                                          : ((1)))))))) < (((0))))
                                   ? ((-1))
                                   : ((0)))
                            : ((1))))))
                        ? ((((signed long)(*check)) -
                            ((signed long)(*baseline))))
                        : (((((((((*check))) <= (((*baseline))))
                                   ? (((((*check))) < (((*baseline)))) ? ((-1))
                                                                       : ((0)))
                                   : ((1)))))))))))) <= ((0)))
                  ? (((((((((((((((((signed long)(*check)) -
                                   ((signed long)(*baseline))))) <= (((0))))
                                   ? (((((((signed long)(*check)) -
                                          ((signed long)(*baseline))))) <
                                       (((0))))
                                          ? ((-1))
                                          : ((0)))
                                   : ((1))))) ==
                            ((((((((((((((*check))) <= (((*baseline))))
                                          ? (((((*check))) < (((*baseline))))
                                                 ? ((-1))
                                                 : ((0)))
                                          : ((1)))))))) <= (((0))))
                                   ? ((((((((((((*check))) <= (((*baseline))))
                                                 ? (((((*check))) <
                                                     (((*baseline))))
                                                        ? ((-1))
                                                        : ((0)))
                                                 : ((1)))))))) < (((0))))
                                          ? ((-1))
                                          : ((0)))
                                   : ((1))))))
                               ? ((((signed long)(*check)) -
                                   ((signed long)(*baseline))))
                               : (((((((((*check))) <= (((*baseline))))
                                          ? (((((*check))) < (((*baseline))))
                                                 ? ((-1))
                                                 : ((0)))
                                          : ((1)))))))))))) < ((0)))
                         ? (((((int)-(((int)0x37EF)
                                      << (8 * (((!!(((!!(sizeof(int))) *
                                                     ((sizeof(int)) - 1)))) *
                                                ((((!!(sizeof(int))) *
                                                   ((sizeof(int)) - 1))) -
                                                 1)))))))))
                         : (((0))))
                  : (((((int)-(((int)-(
                        ((int)0x37EF)
                        << (8 *
                            (((!!(((!!(sizeof(int))) * ((sizeof(int)) - 1)))) *
                              ((((!!(sizeof(int))) * ((sizeof(int)) - 1))) -
                               1)))))))))))))));
}


x86 assembly (clang, -O0):
<compare_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     113d <compare_double+0x2d>
cmpq   $0x0,-0x20(%rbp)
jne    114c <compare_double+0x3c>
mov    $0x0,%al
call   1030 <ordering_err_2@plt>
mov    %eax,-0x4(%rbp)
jmp    1aa3 <compare_double+0x993>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rax
mov    -0x20(%rbp),%rcx
cvttsd2si (%rcx),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jg     1196 <compare_double+0x86>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rdx
mov    -0x20(%rbp),%rax
cvttsd2si (%rax),%rax
sub    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x24(%rbp)
jmp    11a3 <compare_double+0x93>
mov    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11a3 <compare_double+0x93>
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     11e9 <compare_double+0xd9>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x2c(%rbp)
jmp    11f6 <compare_double+0xe6>
mov    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11f6 <compare_double+0xe6>
mov    -0x2c(%rbp),%eax
cmp    $0x0,%eax
jg     1267 <compare_double+0x157>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1242 <compare_double+0x132>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x30(%rbp)
jmp    124f <compare_double+0x13f>
mov    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    124f <compare_double+0x13f>
mov    -0x30(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x34(%rbp)
jmp    1274 <compare_double+0x164>
mov    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1274 <compare_double+0x164>
mov    -0x28(%rbp),%eax
mov    -0x34(%rbp),%ecx
cmp    %ecx,%eax
jne    12a0 <compare_double+0x190>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rax
mov    -0x20(%rbp),%rcx
cvttsd2si (%rcx),%rcx
sub    %rcx,%rax
mov    %rax,-0x40(%rbp)
jmp    12f6 <compare_double+0x1e6>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     12e0 <compare_double+0x1d0>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x44(%rbp)
jmp    12ed <compare_double+0x1dd>
mov    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12ed <compare_double+0x1dd>
mov    -0x44(%rbp),%eax
cltq
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    $0xffffffffc8130000,%rax
je     1683 <compare_double+0x573>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rax
mov    -0x20(%rbp),%rcx
cvttsd2si (%rcx),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jg     1350 <compare_double+0x240>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rdx
mov    -0x20(%rbp),%rax
cvttsd2si (%rax),%rax
sub    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x48(%rbp)
jmp    135d <compare_double+0x24d>
mov    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    135d <compare_double+0x24d>
mov    -0x48(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     13a3 <compare_double+0x293>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x50(%rbp)
jmp    13b0 <compare_double+0x2a0>
mov    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    13b0 <compare_double+0x2a0>
mov    -0x50(%rbp),%eax
cmp    $0x0,%eax
jg     1421 <compare_double+0x311>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     13fc <compare_double+0x2ec>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x54(%rbp)
jmp    1409 <compare_double+0x2f9>
mov    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1409 <compare_double+0x2f9>
mov    -0x54(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x58(%rbp)
jmp    142e <compare_double+0x31e>
mov    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    142e <compare_double+0x31e>
mov    -0x4c(%rbp),%eax
mov    -0x58(%rbp),%ecx
cmp    %ecx,%eax
jne    145a <compare_double+0x34a>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rax
mov    -0x20(%rbp),%rcx
cvttsd2si (%rcx),%rcx
sub    %rcx,%rax
mov    %rax,-0x60(%rbp)
jmp    14b0 <compare_double+0x3a0>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     149a <compare_double+0x38a>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x64(%rbp)
jmp    14a7 <compare_double+0x397>
mov    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    14a7 <compare_double+0x397>
mov    -0x64(%rbp),%eax
cltq
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
cmp    $0xffffffffc8120000,%rax
je     1683 <compare_double+0x573>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rax
mov    -0x20(%rbp),%rcx
cvttsd2si (%rcx),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jg     150a <compare_double+0x3fa>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rdx
mov    -0x20(%rbp),%rax
cvttsd2si (%rax),%rax
sub    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x68(%rbp)
jmp    1517 <compare_double+0x407>
mov    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1517 <compare_double+0x407>
mov    -0x68(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     155d <compare_double+0x44d>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x70(%rbp)
jmp    156a <compare_double+0x45a>
mov    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    156a <compare_double+0x45a>
mov    -0x70(%rbp),%eax
cmp    $0x0,%eax
jg     15db <compare_double+0x4cb>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     15b6 <compare_double+0x4a6>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x74(%rbp)
jmp    15c3 <compare_double+0x4b3>
mov    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    15c3 <compare_double+0x4b3>
mov    -0x74(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x78(%rbp)
jmp    15e8 <compare_double+0x4d8>
mov    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    15e8 <compare_double+0x4d8>
mov    -0x6c(%rbp),%eax
mov    -0x78(%rbp),%ecx
cmp    %ecx,%eax
jne    1614 <compare_double+0x504>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rax
mov    -0x20(%rbp),%rcx
cvttsd2si (%rcx),%rcx
sub    %rcx,%rax
mov    %rax,-0x80(%rbp)
jmp    1673 <compare_double+0x563>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1657 <compare_double+0x547>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x84(%rbp)
jmp    1667 <compare_double+0x557>
mov    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1667 <compare_double+0x557>
mov    -0x84(%rbp),%eax
cltq
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0x90(%rbp)
jmp    1a99 <compare_double+0x989>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rax
mov    -0x20(%rbp),%rcx
cvttsd2si (%rcx),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jg     16d0 <compare_double+0x5c0>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rdx
mov    -0x20(%rbp),%rax
cvttsd2si (%rax),%rax
sub    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x94(%rbp)
jmp    16e0 <compare_double+0x5d0>
mov    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    16e0 <compare_double+0x5d0>
mov    -0x94(%rbp),%eax
mov    %eax,-0x98(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     172f <compare_double+0x61f>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x9c(%rbp)
jmp    173f <compare_double+0x62f>
mov    $0x1,%eax
mov    %eax,-0x9c(%rbp)
jmp    173f <compare_double+0x62f>
mov    -0x9c(%rbp),%eax
cmp    $0x0,%eax
jg     17bf <compare_double+0x6af>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1791 <compare_double+0x681>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0xa0(%rbp)
jmp    17a1 <compare_double+0x691>
mov    $0x1,%eax
mov    %eax,-0xa0(%rbp)
jmp    17a1 <compare_double+0x691>
mov    -0xa0(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0xa4(%rbp)
jmp    17cf <compare_double+0x6bf>
mov    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    17cf <compare_double+0x6bf>
mov    -0x98(%rbp),%eax
mov    -0xa4(%rbp),%ecx
cmp    %ecx,%eax
jne    1804 <compare_double+0x6f4>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rax
mov    -0x20(%rbp),%rcx
cvttsd2si (%rcx),%rcx
sub    %rcx,%rax
mov    %rax,-0xb0(%rbp)
jmp    1866 <compare_double+0x756>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1847 <compare_double+0x737>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0xb4(%rbp)
jmp    1857 <compare_double+0x747>
mov    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1857 <compare_double+0x747>
mov    -0xb4(%rbp),%eax
cltq
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
cmp    $0x0,%rax
jg     1a7a <compare_double+0x96a>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rax
mov    -0x20(%rbp),%rcx
cvttsd2si (%rcx),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jg     18c4 <compare_double+0x7b4>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rdx
mov    -0x20(%rbp),%rax
cvttsd2si (%rax),%rax
sub    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0xb8(%rbp)
jmp    18d4 <compare_double+0x7c4>
mov    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    18d4 <compare_double+0x7c4>
mov    -0xb8(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1923 <compare_double+0x813>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0xc0(%rbp)
jmp    1933 <compare_double+0x823>
mov    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    1933 <compare_double+0x823>
mov    -0xc0(%rbp),%eax
cmp    $0x0,%eax
jg     19b3 <compare_double+0x8a3>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1985 <compare_double+0x875>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0xc4(%rbp)
jmp    1995 <compare_double+0x885>
mov    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    1995 <compare_double+0x885>
mov    -0xc4(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0xc8(%rbp)
jmp    19c3 <compare_double+0x8b3>
mov    $0x1,%eax
mov    %eax,-0xc8(%rbp)
jmp    19c3 <compare_double+0x8b3>
mov    -0xbc(%rbp),%eax
mov    -0xc8(%rbp),%ecx
cmp    %ecx,%eax
jne    19f8 <compare_double+0x8e8>
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%rax
mov    -0x20(%rbp),%rcx
cvttsd2si (%rcx),%rcx
sub    %rcx,%rax
mov    %rax,-0xd0(%rbp)
jmp    1a5a <compare_double+0x94a>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1a3b <compare_double+0x92b>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0xd4(%rbp)
jmp    1a4b <compare_double+0x93b>
mov    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1a4b <compare_double+0x93b>
mov    -0xd4(%rbp),%eax
cltq
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rdx
xor    %eax,%eax
mov    $0xc8110000,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0xd8(%rbp)
jmp    1a8a <compare_double+0x97a>
mov    $0x37ef0000,%eax
mov    %eax,-0xd8(%rbp)
jmp    1a8a <compare_double+0x97a>
mov    -0xd8(%rbp),%eax
cltq
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_double>:
test   %rsi,%rsi
je     118d <compare_double+0x7d>
test   %rdx,%rdx
je     118d <compare_double+0x7d>
movsd  (%rsi),%xmm0
movsd  (%rdx),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd %xmm0,%xmm1
cvttsd2si %xmm0,%rsi
cvttsd2si %xmm1,%rax
mov    $0x1,%r8d
mov    %ecx,%edi
cmovb  %r8d,%edi
xor    %edx,%edx
cmp    %rax,%rsi
setne  %dl
neg    %edx
sub    %rax,%rsi
cmovg  %r8d,%edx
cmp    %edi,%edx
jne    1165 <compare_double+0x55>
cmp    $0xffffffffc8130000,%rsi
je     1172 <compare_double+0x62>
cmp    %edi,%edx
jne    11c5 <compare_double+0xb5>
cmp    $0xffffffffc8120000,%rsi
jne    11c5 <compare_double+0xb5>
ucomisd %xmm0,%xmm1
jae    1194 <compare_double+0x84>
mov    $0x37ef0000,%eax
cmp    $0x1,%edx
jne    118c <compare_double+0x7c>
mov    $0x1,%ecx
test   %rsi,%rsi
jle    11a2 <compare_double+0x92>
ret
xor    %eax,%eax
jmp    1030 <ordering_err_2@plt>
cmp    %ecx,%edx
jne    11a2 <compare_double+0x92>
mov    $0x37ef0000,%eax
test   %rsi,%rsi
jg     118c <compare_double+0x7c>
xor    %esi,%esi
ucomisd %xmm0,%xmm1
mov    $0xffffffffc8110000,%rax
cmovb  %rsi,%rax
cmovbe %rsi,%rax
mov    $0xffffffffc8110000,%rsi
cmp    %ecx,%edx
cmove  %rsi,%rax
ret
mov    %rsi,%rax
cmp    %edi,%edx
je     118c <compare_double+0x7c>
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %rcx
ucomisd %xmm0,%xmm1
mov    $0x1,%eax
cmovae %rcx,%rax
ret

LLVM IR (-O0):
define i32 @compare_double(i8* %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
store i8* %0, i8** %5
store double* %1, double** %6
store double* %2, double** %7
%8 = load double*, double** %6
%9 = icmp ne double* %8, null
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load double*, double** %7
%12 = icmp ne double* %11, null
br i1 %12, label %15, label %13
13: ; preds = %10, %3
%14 = call i32 (...) @ordering_err_2()
store i32 %14, i32* %4
br label %488
15: ; preds = %10
%16 = load double*, double** %6
%17 = load double, double* %16
%18 = fptosi double %17 to i64
%19 = load double*, double** %7
%20 = load double, double* %19
%21 = fptosi double %20 to i64
%22 = sub nsw i64 %18, %21
%23 = icmp sle i64 %22, 0
br i1 %23, label %24, label %35
24: ; preds = %15
%25 = load double*, double** %6
%26 = load double, double* %25
%27 = fptosi double %26 to i64
%28 = load double*, double** %7
%29 = load double, double* %28
%30 = fptosi double %29 to i64
%31 = sub nsw i64 %27, %30
%32 = icmp slt i64 %31, 0
%33 = zext i1 %32 to i64
%34 = select i1 %32, i32 -1, i32 0
br label %36
35: ; preds = %15
br label %36
36: ; preds = %35, %24
%37 = phi i32 [ %34, %24 ], [ 1, %35 ]
%38 = load double*, double** %6
%39 = load double, double* %38
%40 = load double*, double** %7
%41 = load double, double* %40
%42 = fcmp ole double %39, %41
br i1 %42, label %43, label %51
43: ; preds = %36
%44 = load double*, double** %6
%45 = load double, double* %44
%46 = load double*, double** %7
%47 = load double, double* %46
%48 = fcmp olt double %45, %47
%49 = zext i1 %48 to i64
%50 = select i1 %48, i32 -1, i32 0
br label %52
51: ; preds = %36
br label %52
52: ; preds = %51, %43
%53 = phi i32 [ %50, %43 ], [ 1, %51 ]
%54 = icmp sle i32 %53, 0
br i1 %54, label %55, label %75
55: ; preds = %52
%56 = load double*, double** %6
%57 = load double, double* %56
%58 = load double*, double** %7
%59 = load double, double* %58
%60 = fcmp ole double %57, %59
br i1 %60, label %61, label %69
61: ; preds = %55
%62 = load double*, double** %6
%63 = load double, double* %62
%64 = load double*, double** %7
%65 = load double, double* %64
%66 = fcmp olt double %63, %65
%67 = zext i1 %66 to i64
%68 = select i1 %66, i32 -1, i32 0
br label %70
69: ; preds = %55
br label %70
70: ; preds = %69, %61
%71 = phi i32 [ %68, %61 ], [ 1, %69 ]
%72 = icmp slt i32 %71, 0
%73 = zext i1 %72 to i64
%74 = select i1 %72, i32 -1, i32 0
br label %76
75: ; preds = %52
br label %76
76: ; preds = %75, %70
%77 = phi i32 [ %74, %70 ], [ 1, %75 ]
%78 = icmp eq i32 %37, %77
br i1 %78, label %79, label %87
79: ; preds = %76
%80 = load double*, double** %6
%81 = load double, double* %80
%82 = fptosi double %81 to i64
%83 = load double*, double** %7
%84 = load double, double* %83
%85 = fptosi double %84 to i64
%86 = sub nsw i64 %82, %85
br label %105
87: ; preds = %76
%88 = load double*, double** %6
%89 = load double, double* %88
%90 = load double*, double** %7
%91 = load double, double* %90
%92 = fcmp ole double %89, %91
br i1 %92, label %93, label %101
93: ; preds = %87
%94 = load double*, double** %6
%95 = load double, double* %94
%96 = load double*, double** %7
%97 = load double, double* %96
%98 = fcmp olt double %95, %97
%99 = zext i1 %98 to i64
%100 = select i1 %98, i32 -1, i32 0
br label %102
101: ; preds = %87
br label %102
102: ; preds = %101, %93
%103 = phi i32 [ %100, %93 ], [ 1, %101 ]
%104 = sext i32 %103 to i64
br label %105
105: ; preds = %102, %79
%106 = phi i64 [ %86, %79 ], [ %104, %102 ]
%107 = icmp ne i64 %106, -938278912
br i1 %107, label %108, label %293
108: ; preds = %105
%109 = load double*, double** %6
%110 = load double, double* %109
%111 = fptosi double %110 to i64
%112 = load double*, double** %7
%113 = load double, double* %112
%114 = fptosi double %113 to i64
%115 = sub nsw i64 %111, %114
%116 = icmp sle i64 %115, 0
br i1 %116, label %117, label %128
117: ; preds = %108
%118 = load double*, double** %6
%119 = load double, double* %118
%120 = fptosi double %119 to i64
%121 = load double*, double** %7
%122 = load double, double* %121
%123 = fptosi double %122 to i64
%124 = sub nsw i64 %120, %123
%125 = icmp slt i64 %124, 0
%126 = zext i1 %125 to i64
%127 = select i1 %125, i32 -1, i32 0
br label %129
128: ; preds = %108
br label %129
129: ; preds = %128, %117
%130 = phi i32 [ %127, %117 ], [ 1, %128 ]
%131 = load double*, double** %6
%132 = load double, double* %131
%133 = load double*, double** %7
%134 = load double, double* %133
%135 = fcmp ole double %132, %134
br i1 %135, label %136, label %144
136: ; preds = %129
%137 = load double*, double** %6
%138 = load double, double* %137
%139 = load double*, double** %7
%140 = load double, double* %139
%141 = fcmp olt double %138, %140
%142 = zext i1 %141 to i64
%143 = select i1 %141, i32 -1, i32 0
br label %145
144: ; preds = %129
br label %145
145: ; preds = %144, %136
%146 = phi i32 [ %143, %136 ], [ 1, %144 ]
%147 = icmp sle i32 %146, 0
br i1 %147, label %148, label %168
148: ; preds = %145
%149 = load double*, double** %6
%150 = load double, double* %149
%151 = load double*, double** %7
%152 = load double, double* %151
%153 = fcmp ole double %150, %152
br i1 %153, label %154, label %162
154: ; preds = %148
%155 = load double*, double** %6
%156 = load double, double* %155
%157 = load double*, double** %7
%158 = load double, double* %157
%159 = fcmp olt double %156, %158
%160 = zext i1 %159 to i64
%161 = select i1 %159, i32 -1, i32 0
br label %163
162: ; preds = %148
br label %163
163: ; preds = %162, %154
%164 = phi i32 [ %161, %154 ], [ 1, %162 ]
%165 = icmp slt i32 %164, 0
%166 = zext i1 %165 to i64
%167 = select i1 %165, i32 -1, i32 0
br label %169
168: ; preds = %145
br label %169
169: ; preds = %168, %163
%170 = phi i32 [ %167, %163 ], [ 1, %168 ]
%171 = icmp eq i32 %130, %170
br i1 %171, label %172, label %180
172: ; preds = %169
%173 = load double*, double** %6
%174 = load double, double* %173
%175 = fptosi double %174 to i64
%176 = load double*, double** %7
%177 = load double, double* %176
%178 = fptosi double %177 to i64
%179 = sub nsw i64 %175, %178
br label %198
180: ; preds = %169
%181 = load double*, double** %6
%182 = load double, double* %181
%183 = load double*, double** %7
%184 = load double, double* %183
%185 = fcmp ole double %182, %184
br i1 %185, label %186, label %194
186: ; preds = %180
%187 = load double*, double** %6
%188 = load double, double* %187
%189 = load double*, double** %7
%190 = load double, double* %189
%191 = fcmp olt double %188, %190
%192 = zext i1 %191 to i64
%193 = select i1 %191, i32 -1, i32 0
br label %195
194: ; preds = %180
br label %195
195: ; preds = %194, %186
%196 = phi i32 [ %193, %186 ], [ 1, %194 ]
%197 = sext i32 %196 to i64
br label %198
198: ; preds = %195, %172
%199 = phi i64 [ %179, %172 ], [ %197, %195 ]
%200 = icmp ne i64 %199, -938344448
br i1 %200, label %201, label %293
201: ; preds = %198
%202 = load double*, double** %6
%203 = load double, double* %202
%204 = fptosi double %203 to i64
%205 = load double*, double** %7
%206 = load double, double* %205
%207 = fptosi double %206 to i64
%208 = sub nsw i64 %204, %207
%209 = icmp sle i64 %208, 0
br i1 %209, label %210, label %221
210: ; preds = %201
%211 = load double*, double** %6
%212 = load double, double* %211
%213 = fptosi double %212 to i64
%214 = load double*, double** %7
%215 = load double, double* %214
%216 = fptosi double %215 to i64
%217 = sub nsw i64 %213, %216
%218 = icmp slt i64 %217, 0
%219 = zext i1 %218 to i64
%220 = select i1 %218, i32 -1, i32 0
br label %222
221: ; preds = %201
br label %222
222: ; preds = %221, %210
%223 = phi i32 [ %220, %210 ], [ 1, %221 ]
%224 = load double*, double** %6
%225 = load double, double* %224
%226 = load double*, double** %7
%227 = load double, double* %226
%228 = fcmp ole double %225, %227
br i1 %228, label %229, label %237
229: ; preds = %222
%230 = load double*, double** %6
%231 = load double, double* %230
%232 = load double*, double** %7
%233 = load double, double* %232
%234 = fcmp olt double %231, %233
%235 = zext i1 %234 to i64
%236 = select i1 %234, i32 -1, i32 0
br label %238
237: ; preds = %222
br label %238
238: ; preds = %237, %229
%239 = phi i32 [ %236, %229 ], [ 1, %237 ]
%240 = icmp sle i32 %239, 0
br i1 %240, label %241, label %261
241: ; preds = %238
%242 = load double*, double** %6
%243 = load double, double* %242
%244 = load double*, double** %7
%245 = load double, double* %244
%246 = fcmp ole double %243, %245
br i1 %246, label %247, label %255
247: ; preds = %241
%248 = load double*, double** %6
%249 = load double, double* %248
%250 = load double*, double** %7
%251 = load double, double* %250
%252 = fcmp olt double %249, %251
%253 = zext i1 %252 to i64
%254 = select i1 %252, i32 -1, i32 0
br label %256
255: ; preds = %241
br label %256
256: ; preds = %255, %247
%257 = phi i32 [ %254, %247 ], [ 1, %255 ]
%258 = icmp slt i32 %257, 0
%259 = zext i1 %258 to i64
%260 = select i1 %258, i32 -1, i32 0
br label %262
261: ; preds = %238
br label %262
262: ; preds = %261, %256
%263 = phi i32 [ %260, %256 ], [ 1, %261 ]
%264 = icmp eq i32 %223, %263
br i1 %264, label %265, label %273
265: ; preds = %262
%266 = load double*, double** %6
%267 = load double, double* %266
%268 = fptosi double %267 to i64
%269 = load double*, double** %7
%270 = load double, double* %269
%271 = fptosi double %270 to i64
%272 = sub nsw i64 %268, %271
br label %291
273: ; preds = %262
%274 = load double*, double** %6
%275 = load double, double* %274
%276 = load double*, double** %7
%277 = load double, double* %276
%278 = fcmp ole double %275, %277
br i1 %278, label %279, label %287
279: ; preds = %273
%280 = load double*, double** %6
%281 = load double, double* %280
%282 = load double*, double** %7
%283 = load double, double* %282
%284 = fcmp olt double %281, %283
%285 = zext i1 %284 to i64
%286 = select i1 %284, i32 -1, i32 0
br label %288
287: ; preds = %273
br label %288
288: ; preds = %287, %279
%289 = phi i32 [ %286, %279 ], [ 1, %287 ]
%290 = sext i32 %289 to i64
br label %291
291: ; preds = %288, %265
%292 = phi i64 [ %272, %265 ], [ %290, %288 ]
br label %485
293: ; preds = %198, %105
%294 = load double*, double** %6
%295 = load double, double* %294
%296 = fptosi double %295 to i64
%297 = load double*, double** %7
%298 = load double, double* %297
%299 = fptosi double %298 to i64
%300 = sub nsw i64 %296, %299
%301 = icmp sle i64 %300, 0
br i1 %301, label %302, label %313
302: ; preds = %293
%303 = load double*, double** %6
%304 = load double, double* %303
%305 = fptosi double %304 to i64
%306 = load double*, double** %7
%307 = load double, double* %306
%308 = fptosi double %307 to i64
%309 = sub nsw i64 %305, %308
%310 = icmp slt i64 %309, 0
%311 = zext i1 %310 to i64
%312 = select i1 %310, i32 -1, i32 0
br label %314
313: ; preds = %293
br label %314
314: ; preds = %313, %302
%315 = phi i32 [ %312, %302 ], [ 1, %313 ]
%316 = load double*, double** %6
%317 = load double, double* %316
%318 = load double*, double** %7
%319 = load double, double* %318
%320 = fcmp ole double %317, %319
br i1 %320, label %321, label %329
321: ; preds = %314
%322 = load double*, double** %6
%323 = load double, double* %322
%324 = load double*, double** %7
%325 = load double, double* %324
%326 = fcmp olt double %323, %325
%327 = zext i1 %326 to i64
%328 = select i1 %326, i32 -1, i32 0
br label %330
329: ; preds = %314
br label %330
330: ; preds = %329, %321
%331 = phi i32 [ %328, %321 ], [ 1, %329 ]
%332 = icmp sle i32 %331, 0
br i1 %332, label %333, label %353
333: ; preds = %330
%334 = load double*, double** %6
%335 = load double, double* %334
%336 = load double*, double** %7
%337 = load double, double* %336
%338 = fcmp ole double %335, %337
br i1 %338, label %339, label %347
339: ; preds = %333
%340 = load double*, double** %6
%341 = load double, double* %340
%342 = load double*, double** %7
%343 = load double, double* %342
%344 = fcmp olt double %341, %343
%345 = zext i1 %344 to i64
%346 = select i1 %344, i32 -1, i32 0
br label %348
347: ; preds = %333
br label %348
348: ; preds = %347, %339
%349 = phi i32 [ %346, %339 ], [ 1, %347 ]
%350 = icmp slt i32 %349, 0
%351 = zext i1 %350 to i64
%352 = select i1 %350, i32 -1, i32 0
br label %354
353: ; preds = %330
br label %354
354: ; preds = %353, %348
%355 = phi i32 [ %352, %348 ], [ 1, %353 ]
%356 = icmp eq i32 %315, %355
br i1 %356, label %357, label %365
357: ; preds = %354
%358 = load double*, double** %6
%359 = load double, double* %358
%360 = fptosi double %359 to i64
%361 = load double*, double** %7
%362 = load double, double* %361
%363 = fptosi double %362 to i64
%364 = sub nsw i64 %360, %363
br label %383
365: ; preds = %354
%366 = load double*, double** %6
%367 = load double, double* %366
%368 = load double*, double** %7
%369 = load double, double* %368
%370 = fcmp ole double %367, %369
br i1 %370, label %371, label %379
371: ; preds = %365
%372 = load double*, double** %6
%373 = load double, double* %372
%374 = load double*, double** %7
%375 = load double, double* %374
%376 = fcmp olt double %373, %375
%377 = zext i1 %376 to i64
%378 = select i1 %376, i32 -1, i32 0
br label %380
379: ; preds = %365
br label %380
380: ; preds = %379, %371
%381 = phi i32 [ %378, %371 ], [ 1, %379 ]
%382 = sext i32 %381 to i64
br label %383
383: ; preds = %380, %357
%384 = phi i64 [ %364, %357 ], [ %382, %380 ]
%385 = icmp sle i64 %384, 0
br i1 %385, label %386, label %481
386: ; preds = %383
%387 = load double*, double** %6
%388 = load double, double* %387
%389 = fptosi double %388 to i64
%390 = load double*, double** %7
%391 = load double, double* %390
%392 = fptosi double %391 to i64
%393 = sub nsw i64 %389, %392
%394 = icmp sle i64 %393, 0
br i1 %394, label %395, label %406
395: ; preds = %386
%396 = load double*, double** %6
%397 = load double, double* %396
%398 = fptosi double %397 to i64
%399 = load double*, double** %7
%400 = load double, double* %399
%401 = fptosi double %400 to i64
%402 = sub nsw i64 %398, %401
%403 = icmp slt i64 %402, 0
%404 = zext i1 %403 to i64
%405 = select i1 %403, i32 -1, i32 0
br label %407
406: ; preds = %386
br label %407
407: ; preds = %406, %395
%408 = phi i32 [ %405, %395 ], [ 1, %406 ]
%409 = load double*, double** %6
%410 = load double, double* %409
%411 = load double*, double** %7
%412 = load double, double* %411
%413 = fcmp ole double %410, %412
br i1 %413, label %414, label %422
414: ; preds = %407
%415 = load double*, double** %6
%416 = load double, double* %415
%417 = load double*, double** %7
%418 = load double, double* %417
%419 = fcmp olt double %416, %418
%420 = zext i1 %419 to i64
%421 = select i1 %419, i32 -1, i32 0
br label %423
422: ; preds = %407
br label %423
423: ; preds = %422, %414
%424 = phi i32 [ %421, %414 ], [ 1, %422 ]
%425 = icmp sle i32 %424, 0
br i1 %425, label %426, label %446
426: ; preds = %423
%427 = load double*, double** %6
%428 = load double, double* %427
%429 = load double*, double** %7
%430 = load double, double* %429
%431 = fcmp ole double %428, %430
br i1 %431, label %432, label %440
432: ; preds = %426
%433 = load double*, double** %6
%434 = load double, double* %433
%435 = load double*, double** %7
%436 = load double, double* %435
%437 = fcmp olt double %434, %436
%438 = zext i1 %437 to i64
%439 = select i1 %437, i32 -1, i32 0
br label %441
440: ; preds = %426
br label %441
441: ; preds = %440, %432
%442 = phi i32 [ %439, %432 ], [ 1, %440 ]
%443 = icmp slt i32 %442, 0
%444 = zext i1 %443 to i64
%445 = select i1 %443, i32 -1, i32 0
br label %447
446: ; preds = %423
br label %447
447: ; preds = %446, %441
%448 = phi i32 [ %445, %441 ], [ 1, %446 ]
%449 = icmp eq i32 %408, %448
br i1 %449, label %450, label %458
450: ; preds = %447
%451 = load double*, double** %6
%452 = load double, double* %451
%453 = fptosi double %452 to i64
%454 = load double*, double** %7
%455 = load double, double* %454
%456 = fptosi double %455 to i64
%457 = sub nsw i64 %453, %456
br label %476
458: ; preds = %447
%459 = load double*, double** %6
%460 = load double, double* %459
%461 = load double*, double** %7
%462 = load double, double* %461
%463 = fcmp ole double %460, %462
br i1 %463, label %464, label %472
464: ; preds = %458
%465 = load double*, double** %6
%466 = load double, double* %465
%467 = load double*, double** %7
%468 = load double, double* %467
%469 = fcmp olt double %466, %468
%470 = zext i1 %469 to i64
%471 = select i1 %469, i32 -1, i32 0
br label %473
472: ; preds = %458
br label %473
473: ; preds = %472, %464
%474 = phi i32 [ %471, %464 ], [ 1, %472 ]
%475 = sext i32 %474 to i64
br label %476
476: ; preds = %473, %450
%477 = phi i64 [ %457, %450 ], [ %475, %473 ]
%478 = icmp slt i64 %477, 0
%479 = zext i1 %478 to i64
%480 = select i1 %478, i32 -938409984, i32 0
br label %482
481: ; preds = %383
br label %482
482: ; preds = %481, %476
%483 = phi i32 [ %480, %476 ], [ 938409984, %481 ]
%484 = sext i32 %483 to i64
br label %485
485: ; preds = %482, %291
%486 = phi i64 [ %292, %291 ], [ %484, %482 ]
%487 = trunc i64 %486 to i32
store i32 %487, i32* %4
br label %488
488: ; preds = %485, %13
%489 = load i32, i32* %4
ret i32 %489
}

LLVM IR (-O2):
define i32 @compare_double(i8* nocapture readnone %0, double* %1, double* %2) {
%4 = icmp ne double* %1, null
%5 = icmp ne double* %2, null
%6 = and i1 %4, %5
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 (...) @ordering_err_2()
br label %50
9: ; preds = %3
%10 = load double, double* %1
%11 = fptosi double %10 to i64
%12 = load double, double* %2
%13 = fptosi double %12 to i64
%14 = sub nsw i64 %11, %13
%15 = icmp slt i64 %14, 1
%16 = icmp ne i64 %14, 0
%17 = sext i1 %16 to i32
%18 = select i1 %15, i32 %17, i32 1
%19 = fcmp ugt double %10, %12
%20 = fcmp olt double %10, %12
%21 = sext i1 %20 to i32
%22 = select i1 %19, i32 1, i32 %21
%23 = icmp eq i32 %18, %22
%24 = icmp eq i64 %14, -938278912
%25 = select i1 %23, i1 %24, i1 false
br i1 %25, label %33, label %26
26: ; preds = %9
%27 = icmp eq i64 %14, -938344448
%28 = select i1 %23, i1 %27, i1 false
br i1 %28, label %33, label %29
29: ; preds = %26
br i1 %23, label %47, label %30
30: ; preds = %29
%31 = sext i1 %20 to i64
%32 = select i1 %19, i64 1, i64 %31
br label %47
33: ; preds = %26, %9
br i1 %19, label %34, label %37
34: ; preds = %33
%35 = icmp eq i32 %18, 1
%36 = and i1 %35, %15
br i1 %36, label %40, label %47
37: ; preds = %33
%38 = icmp ne i32 %18, %21
%39 = or i1 %38, %15
br i1 %39, label %40, label %47
40: ; preds = %34, %37
%41 = phi i32 [ %21, %37 ], [ 1, %34 ]
%42 = icmp eq i32 %18, %41
%43 = xor i1 %19, true
%44 = and i1 %20, %43
%45 = select i1 %42, i1 true, i1 %44
%46 = select i1 %45, i64 -938409984, i64 0
br label %47
47: ; preds = %37, %34, %29, %40, %30
%48 = phi i64 [ %32, %30 ], [ %46, %40 ], [ %14, %29 ], [ 938409984, %34 ], [ 938409984, %37 ]
%49 = trunc i64 %48 to i32
br label %50
50: ; preds = %47, %7
%51 = phi i32 [ %49, %47 ], [ %8, %7 ]
ret i32 %51
}