#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_ldouble(void *context, const long double *check,
                    const long 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_ldouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x240,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     113d <compare_ldouble+0x2d>
cmpq   $0x0,-0x20(%rbp)
jne    114c <compare_ldouble+0x3c>
mov    $0x0,%al
call   1030 <ordering_err_2@plt>
mov    %eax,-0x4(%rbp)
jmp    2047 <compare_ldouble+0xf37>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x112(%rbp)
movzwl -0x112(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x114(%rbp)
fldcw  -0x114(%rbp)
fistpll -0x30(%rbp)
fldcw  -0x112(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x20(%rbp),%rcx
fldt   (%rcx)
fnstcw -0x116(%rbp)
movzwl -0x116(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x118(%rbp)
fldcw  -0x118(%rbp)
fistpll -0x28(%rbp)
fldcw  -0x116(%rbp)
mov    -0x28(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jg     123e <compare_ldouble+0x12e>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x11a(%rbp)
movzwl -0x11a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x11c(%rbp)
fldcw  -0x11c(%rbp)
fistpll -0x40(%rbp)
fldcw  -0x11a(%rbp)
mov    -0x40(%rbp),%rdx
mov    -0x20(%rbp),%rax
fldt   (%rax)
fnstcw -0x11e(%rbp)
movzwl -0x11e(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x120(%rbp)
fldcw  -0x120(%rbp)
fistpll -0x38(%rbp)
fldcw  -0x11e(%rbp)
mov    -0x38(%rbp),%rax
sub    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x18c(%rbp)
jmp    124e <compare_ldouble+0x13e>
mov    $0x1,%eax
mov    %eax,-0x18c(%rbp)
jmp    124e <compare_ldouble+0x13e>
mov    -0x18c(%rbp),%eax
mov    %eax,-0x190(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     1298 <compare_ldouble+0x188>
jmp    1275 <compare_ldouble+0x165>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x194(%rbp)
jmp    12a8 <compare_ldouble+0x198>
mov    $0x1,%eax
mov    %eax,-0x194(%rbp)
jmp    12a8 <compare_ldouble+0x198>
mov    -0x194(%rbp),%eax
cmp    $0x0,%eax
jg     1323 <compare_ldouble+0x213>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     12f5 <compare_ldouble+0x1e5>
jmp    12d2 <compare_ldouble+0x1c2>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x198(%rbp)
jmp    1305 <compare_ldouble+0x1f5>
mov    $0x1,%eax
mov    %eax,-0x198(%rbp)
jmp    1305 <compare_ldouble+0x1f5>
mov    -0x198(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x19c(%rbp)
jmp    1333 <compare_ldouble+0x223>
mov    $0x1,%eax
mov    %eax,-0x19c(%rbp)
jmp    1333 <compare_ldouble+0x223>
mov    -0x190(%rbp),%eax
mov    -0x19c(%rbp),%ecx
cmp    %ecx,%eax
jne    13bb <compare_ldouble+0x2ab>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x122(%rbp)
movzwl -0x122(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x124(%rbp)
fldcw  -0x124(%rbp)
fistpll -0x50(%rbp)
fldcw  -0x122(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x20(%rbp),%rcx
fldt   (%rcx)
fnstcw -0x126(%rbp)
movzwl -0x126(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x128(%rbp)
fldcw  -0x128(%rbp)
fistpll -0x48(%rbp)
fldcw  -0x126(%rbp)
mov    -0x48(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x1a8(%rbp)
jmp    1418 <compare_ldouble+0x308>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     13f9 <compare_ldouble+0x2e9>
jmp    13d6 <compare_ldouble+0x2c6>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x1ac(%rbp)
jmp    1409 <compare_ldouble+0x2f9>
mov    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    1409 <compare_ldouble+0x2f9>
mov    -0x1ac(%rbp),%eax
cltq
mov    %rax,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%rax
cmp    $0xffffffffc8130000,%rax
je     1a0d <compare_ldouble+0x8fd>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x12a(%rbp)
movzwl -0x12a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x12c(%rbp)
fldcw  -0x12c(%rbp)
fistpll -0x60(%rbp)
fldcw  -0x12a(%rbp)
mov    -0x60(%rbp),%rax
mov    -0x20(%rbp),%rcx
fldt   (%rcx)
fnstcw -0x12e(%rbp)
movzwl -0x12e(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x130(%rbp)
fldcw  -0x130(%rbp)
fistpll -0x58(%rbp)
fldcw  -0x12e(%rbp)
mov    -0x58(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jg     151d <compare_ldouble+0x40d>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x132(%rbp)
movzwl -0x132(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x134(%rbp)
fldcw  -0x134(%rbp)
fistpll -0x70(%rbp)
fldcw  -0x132(%rbp)
mov    -0x70(%rbp),%rdx
mov    -0x20(%rbp),%rax
fldt   (%rax)
fnstcw -0x136(%rbp)
movzwl -0x136(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x138(%rbp)
fldcw  -0x138(%rbp)
fistpll -0x68(%rbp)
fldcw  -0x136(%rbp)
mov    -0x68(%rbp),%rax
sub    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x1b0(%rbp)
jmp    152d <compare_ldouble+0x41d>
mov    $0x1,%eax
mov    %eax,-0x1b0(%rbp)
jmp    152d <compare_ldouble+0x41d>
mov    -0x1b0(%rbp),%eax
mov    %eax,-0x1b4(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     1577 <compare_ldouble+0x467>
jmp    1554 <compare_ldouble+0x444>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x1b8(%rbp)
jmp    1587 <compare_ldouble+0x477>
mov    $0x1,%eax
mov    %eax,-0x1b8(%rbp)
jmp    1587 <compare_ldouble+0x477>
mov    -0x1b8(%rbp),%eax
cmp    $0x0,%eax
jg     1602 <compare_ldouble+0x4f2>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     15d4 <compare_ldouble+0x4c4>
jmp    15b1 <compare_ldouble+0x4a1>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x1bc(%rbp)
jmp    15e4 <compare_ldouble+0x4d4>
mov    $0x1,%eax
mov    %eax,-0x1bc(%rbp)
jmp    15e4 <compare_ldouble+0x4d4>
mov    -0x1bc(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x1c0(%rbp)
jmp    1612 <compare_ldouble+0x502>
mov    $0x1,%eax
mov    %eax,-0x1c0(%rbp)
jmp    1612 <compare_ldouble+0x502>
mov    -0x1b4(%rbp),%eax
mov    -0x1c0(%rbp),%ecx
cmp    %ecx,%eax
jne    169a <compare_ldouble+0x58a>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x13a(%rbp)
movzwl -0x13a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x13c(%rbp)
fldcw  -0x13c(%rbp)
fistpll -0x80(%rbp)
fldcw  -0x13a(%rbp)
mov    -0x80(%rbp),%rax
mov    -0x20(%rbp),%rcx
fldt   (%rcx)
fnstcw -0x13e(%rbp)
movzwl -0x13e(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x140(%rbp)
fldcw  -0x140(%rbp)
fistpll -0x78(%rbp)
fldcw  -0x13e(%rbp)
mov    -0x78(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x1c8(%rbp)
jmp    16f7 <compare_ldouble+0x5e7>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     16d8 <compare_ldouble+0x5c8>
jmp    16b5 <compare_ldouble+0x5a5>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x1cc(%rbp)
jmp    16e8 <compare_ldouble+0x5d8>
mov    $0x1,%eax
mov    %eax,-0x1cc(%rbp)
jmp    16e8 <compare_ldouble+0x5d8>
mov    -0x1cc(%rbp),%eax
cltq
mov    %rax,-0x1c8(%rbp)
mov    -0x1c8(%rbp),%rax
cmp    $0xffffffffc8120000,%rax
je     1a0d <compare_ldouble+0x8fd>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x142(%rbp)
movzwl -0x142(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x144(%rbp)
fldcw  -0x144(%rbp)
fistpll -0xf0(%rbp)
fldcw  -0x142(%rbp)
mov    -0xf0(%rbp),%rax
mov    -0x20(%rbp),%rcx
fldt   (%rcx)
fnstcw -0x146(%rbp)
movzwl -0x146(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x148(%rbp)
fldcw  -0x148(%rbp)
fistpll -0xe8(%rbp)
fldcw  -0x146(%rbp)
mov    -0xe8(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jg     1814 <compare_ldouble+0x704>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x14a(%rbp)
movzwl -0x14a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x14c(%rbp)
fldcw  -0x14c(%rbp)
fistpll -0x100(%rbp)
fldcw  -0x14a(%rbp)
mov    -0x100(%rbp),%rdx
mov    -0x20(%rbp),%rax
fldt   (%rax)
fnstcw -0x14e(%rbp)
movzwl -0x14e(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x150(%rbp)
fldcw  -0x150(%rbp)
fistpll -0xf8(%rbp)
fldcw  -0x14e(%rbp)
mov    -0xf8(%rbp),%rax
sub    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x1d0(%rbp)
jmp    1824 <compare_ldouble+0x714>
mov    $0x1,%eax
mov    %eax,-0x1d0(%rbp)
jmp    1824 <compare_ldouble+0x714>
mov    -0x1d0(%rbp),%eax
mov    %eax,-0x1d4(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     186e <compare_ldouble+0x75e>
jmp    184b <compare_ldouble+0x73b>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x1d8(%rbp)
jmp    187e <compare_ldouble+0x76e>
mov    $0x1,%eax
mov    %eax,-0x1d8(%rbp)
jmp    187e <compare_ldouble+0x76e>
mov    -0x1d8(%rbp),%eax
cmp    $0x0,%eax
jg     18f9 <compare_ldouble+0x7e9>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     18cb <compare_ldouble+0x7bb>
jmp    18a8 <compare_ldouble+0x798>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x1dc(%rbp)
jmp    18db <compare_ldouble+0x7cb>
mov    $0x1,%eax
mov    %eax,-0x1dc(%rbp)
jmp    18db <compare_ldouble+0x7cb>
mov    -0x1dc(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x1e0(%rbp)
jmp    1909 <compare_ldouble+0x7f9>
mov    $0x1,%eax
mov    %eax,-0x1e0(%rbp)
jmp    1909 <compare_ldouble+0x7f9>
mov    -0x1d4(%rbp),%eax
mov    -0x1e0(%rbp),%ecx
cmp    %ecx,%eax
jne    199d <compare_ldouble+0x88d>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x152(%rbp)
movzwl -0x152(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x154(%rbp)
fldcw  -0x154(%rbp)
fistpll -0x110(%rbp)
fldcw  -0x152(%rbp)
mov    -0x110(%rbp),%rax
mov    -0x20(%rbp),%rcx
fldt   (%rcx)
fnstcw -0x156(%rbp)
movzwl -0x156(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x158(%rbp)
fldcw  -0x158(%rbp)
fistpll -0x108(%rbp)
fldcw  -0x156(%rbp)
mov    -0x108(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x1e8(%rbp)
jmp    19fa <compare_ldouble+0x8ea>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     19db <compare_ldouble+0x8cb>
jmp    19b8 <compare_ldouble+0x8a8>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x1ec(%rbp)
jmp    19eb <compare_ldouble+0x8db>
mov    $0x1,%eax
mov    %eax,-0x1ec(%rbp)
jmp    19eb <compare_ldouble+0x8db>
mov    -0x1ec(%rbp),%eax
cltq
mov    %rax,-0x1e8(%rbp)
mov    -0x1e8(%rbp),%rax
mov    %rax,-0x1f8(%rbp)
jmp    203d <compare_ldouble+0xf2d>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x15a(%rbp)
movzwl -0x15a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x15c(%rbp)
fldcw  -0x15c(%rbp)
fistpll -0x90(%rbp)
fldcw  -0x15a(%rbp)
mov    -0x90(%rbp),%rax
mov    -0x20(%rbp),%rcx
fldt   (%rcx)
fnstcw -0x15e(%rbp)
movzwl -0x15e(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x160(%rbp)
fldcw  -0x160(%rbp)
fistpll -0x88(%rbp)
fldcw  -0x15e(%rbp)
mov    -0x88(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jg     1b17 <compare_ldouble+0xa07>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x162(%rbp)
movzwl -0x162(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x164(%rbp)
fldcw  -0x164(%rbp)
fistpll -0xa0(%rbp)
fldcw  -0x162(%rbp)
mov    -0xa0(%rbp),%rdx
mov    -0x20(%rbp),%rax
fldt   (%rax)
fnstcw -0x166(%rbp)
movzwl -0x166(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x168(%rbp)
fldcw  -0x168(%rbp)
fistpll -0x98(%rbp)
fldcw  -0x166(%rbp)
mov    -0x98(%rbp),%rax
sub    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x1fc(%rbp)
jmp    1b27 <compare_ldouble+0xa17>
mov    $0x1,%eax
mov    %eax,-0x1fc(%rbp)
jmp    1b27 <compare_ldouble+0xa17>
mov    -0x1fc(%rbp),%eax
mov    %eax,-0x200(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     1b71 <compare_ldouble+0xa61>
jmp    1b4e <compare_ldouble+0xa3e>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x204(%rbp)
jmp    1b81 <compare_ldouble+0xa71>
mov    $0x1,%eax
mov    %eax,-0x204(%rbp)
jmp    1b81 <compare_ldouble+0xa71>
mov    -0x204(%rbp),%eax
cmp    $0x0,%eax
jg     1bfc <compare_ldouble+0xaec>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     1bce <compare_ldouble+0xabe>
jmp    1bab <compare_ldouble+0xa9b>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x208(%rbp)
jmp    1bde <compare_ldouble+0xace>
mov    $0x1,%eax
mov    %eax,-0x208(%rbp)
jmp    1bde <compare_ldouble+0xace>
mov    -0x208(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x20c(%rbp)
jmp    1c0c <compare_ldouble+0xafc>
mov    $0x1,%eax
mov    %eax,-0x20c(%rbp)
jmp    1c0c <compare_ldouble+0xafc>
mov    -0x200(%rbp),%eax
mov    -0x20c(%rbp),%ecx
cmp    %ecx,%eax
jne    1ca0 <compare_ldouble+0xb90>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x16a(%rbp)
movzwl -0x16a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x16c(%rbp)
fldcw  -0x16c(%rbp)
fistpll -0xb0(%rbp)
fldcw  -0x16a(%rbp)
mov    -0xb0(%rbp),%rax
mov    -0x20(%rbp),%rcx
fldt   (%rcx)
fnstcw -0x16e(%rbp)
movzwl -0x16e(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x170(%rbp)
fldcw  -0x170(%rbp)
fistpll -0xa8(%rbp)
fldcw  -0x16e(%rbp)
mov    -0xa8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x218(%rbp)
jmp    1cfd <compare_ldouble+0xbed>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     1cde <compare_ldouble+0xbce>
jmp    1cbb <compare_ldouble+0xbab>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x21c(%rbp)
jmp    1cee <compare_ldouble+0xbde>
mov    $0x1,%eax
mov    %eax,-0x21c(%rbp)
jmp    1cee <compare_ldouble+0xbde>
mov    -0x21c(%rbp),%eax
cltq
mov    %rax,-0x218(%rbp)
mov    -0x218(%rbp),%rax
cmp    $0x0,%rax
jg     201e <compare_ldouble+0xf0e>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x172(%rbp)
movzwl -0x172(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x174(%rbp)
fldcw  -0x174(%rbp)
fistpll -0xc0(%rbp)
fldcw  -0x172(%rbp)
mov    -0xc0(%rbp),%rax
mov    -0x20(%rbp),%rcx
fldt   (%rcx)
fnstcw -0x176(%rbp)
movzwl -0x176(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x178(%rbp)
fldcw  -0x178(%rbp)
fistpll -0xb8(%rbp)
fldcw  -0x176(%rbp)
mov    -0xb8(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jg     1e18 <compare_ldouble+0xd08>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x17a(%rbp)
movzwl -0x17a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x17c(%rbp)
fldcw  -0x17c(%rbp)
fistpll -0xd0(%rbp)
fldcw  -0x17a(%rbp)
mov    -0xd0(%rbp),%rdx
mov    -0x20(%rbp),%rax
fldt   (%rax)
fnstcw -0x17e(%rbp)
movzwl -0x17e(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x180(%rbp)
fldcw  -0x180(%rbp)
fistpll -0xc8(%rbp)
fldcw  -0x17e(%rbp)
mov    -0xc8(%rbp),%rax
sub    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x220(%rbp)
jmp    1e28 <compare_ldouble+0xd18>
mov    $0x1,%eax
mov    %eax,-0x220(%rbp)
jmp    1e28 <compare_ldouble+0xd18>
mov    -0x220(%rbp),%eax
mov    %eax,-0x224(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     1e72 <compare_ldouble+0xd62>
jmp    1e4f <compare_ldouble+0xd3f>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x228(%rbp)
jmp    1e82 <compare_ldouble+0xd72>
mov    $0x1,%eax
mov    %eax,-0x228(%rbp)
jmp    1e82 <compare_ldouble+0xd72>
mov    -0x228(%rbp),%eax
cmp    $0x0,%eax
jg     1efd <compare_ldouble+0xded>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     1ecf <compare_ldouble+0xdbf>
jmp    1eac <compare_ldouble+0xd9c>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x22c(%rbp)
jmp    1edf <compare_ldouble+0xdcf>
mov    $0x1,%eax
mov    %eax,-0x22c(%rbp)
jmp    1edf <compare_ldouble+0xdcf>
mov    -0x22c(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x230(%rbp)
jmp    1f0d <compare_ldouble+0xdfd>
mov    $0x1,%eax
mov    %eax,-0x230(%rbp)
jmp    1f0d <compare_ldouble+0xdfd>
mov    -0x224(%rbp),%eax
mov    -0x230(%rbp),%ecx
cmp    %ecx,%eax
jne    1fa1 <compare_ldouble+0xe91>
mov    -0x18(%rbp),%rax
fldt   (%rax)
fnstcw -0x182(%rbp)
movzwl -0x182(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x184(%rbp)
fldcw  -0x184(%rbp)
fistpll -0xe0(%rbp)
fldcw  -0x182(%rbp)
mov    -0xe0(%rbp),%rax
mov    -0x20(%rbp),%rcx
fldt   (%rcx)
fnstcw -0x186(%rbp)
movzwl -0x186(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x188(%rbp)
fldcw  -0x188(%rbp)
fistpll -0xd8(%rbp)
fldcw  -0x186(%rbp)
mov    -0xd8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x238(%rbp)
jmp    1ffe <compare_ldouble+0xeee>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jb     1fdf <compare_ldouble+0xecf>
jmp    1fbc <compare_ldouble+0xeac>
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    -0x20(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%eax
neg    %eax
mov    %eax,-0x23c(%rbp)
jmp    1fef <compare_ldouble+0xedf>
mov    $0x1,%eax
mov    %eax,-0x23c(%rbp)
jmp    1fef <compare_ldouble+0xedf>
mov    -0x23c(%rbp),%eax
cltq
mov    %rax,-0x238(%rbp)
mov    -0x238(%rbp),%rdx
xor    %eax,%eax
mov    $0xc8110000,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x240(%rbp)
jmp    202e <compare_ldouble+0xf1e>
mov    $0x37ef0000,%eax
mov    %eax,-0x240(%rbp)
jmp    202e <compare_ldouble+0xf1e>
mov    -0x240(%rbp),%eax
cltq
mov    %rax,-0x1f8(%rbp)
mov    -0x1f8(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x240,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_ldouble>:
test   %rsi,%rsi
je     11d0 <compare_ldouble+0xc0>
test   %rdx,%rdx
je     11d0 <compare_ldouble+0xc0>
fldt   (%rsi)
fldt   (%rdx)
xor    %ecx,%ecx
fucomi %st(1),%st
seta   %cl
neg    %ecx
fucomi %st(1),%st
mov    $0x1,%r8d
mov    %ecx,%edi
cmovb  %r8d,%edi
fnstcw -0x16(%rsp)
movzwl -0x16(%rsp),%edx
or     $0xc00,%edx
mov    %dx,-0x12(%rsp)
fldcw  -0x12(%rsp)
fld    %st(1)
fistpll -0x10(%rsp)
fldcw  -0x16(%rsp)
mov    -0x10(%rsp),%rsi
fnstcw -0x18(%rsp)
movzwl -0x18(%rsp),%edx
or     $0xc00,%edx
mov    %dx,-0x14(%rsp)
fldcw  -0x14(%rsp)
fld    %st(0)
fistpll -0x8(%rsp)
fldcw  -0x18(%rsp)
mov    -0x8(%rsp),%rax
xor    %edx,%edx
cmp    %rax,%rsi
setne  %dl
neg    %edx
sub    %rax,%rsi
cmovg  %r8d,%edx
cmp    %edi,%edx
jne    11a9 <compare_ldouble+0x99>
cmp    $0xffffffffc8130000,%rsi
je     11b6 <compare_ldouble+0xa6>
cmp    %edi,%edx
jne    1209 <compare_ldouble+0xf9>
cmp    $0xffffffffc8120000,%rsi
jne    1209 <compare_ldouble+0xf9>
fucomi %st(1),%st
jae    11d7 <compare_ldouble+0xc7>
mov    $0x37ef0000,%eax
cmp    $0x1,%edx
jne    1229 <compare_ldouble+0x119>
mov    $0x1,%ecx
test   %rsi,%rsi
jle    11e5 <compare_ldouble+0xd5>
jmp    1231 <compare_ldouble+0x121>
xor    %eax,%eax
jmp    1030 <ordering_err_2@plt>
cmp    %ecx,%edx
jne    11e5 <compare_ldouble+0xd5>
mov    $0x37ef0000,%eax
test   %rsi,%rsi
jg     1231 <compare_ldouble+0x121>
xor    %esi,%esi
fucomip %st(1),%st
fstp   %st(0)
mov    $0xffffffffc8110000,%rax
cmovb  %rsi,%rax
cmovbe %rsi,%rax
mov    $0xffffffffc8110000,%rsi
cmp    %ecx,%edx
cmove  %rsi,%rax
jmp    122d <compare_ldouble+0x11d>
mov    %rsi,%rax
cmp    %edi,%edx
je     1231 <compare_ldouble+0x121>
xor    %ecx,%ecx
fucomi %st(1),%st
seta   %cl
neg    %rcx
fucomip %st(1),%st
fstp   %st(0)
mov    $0x1,%eax
cmovae %rcx,%rax
jmp    122d <compare_ldouble+0x11d>
fstp   %st(1)
fstp   %st(0)
fldz
fldz
fstp   %st(1)
fstp   %st(0)
ret

LLVM IR (-O0):
define i32 @compare_ldouble(i8* %0, x86_fp80* %1, x86_fp80* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca x86_fp80*
%7 = alloca x86_fp80*
store i8* %0, i8** %5
store x86_fp80* %1, x86_fp80** %6
store x86_fp80* %2, x86_fp80** %7
%8 = load x86_fp80*, x86_fp80** %6
%9 = icmp ne x86_fp80* %8, null
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load x86_fp80*, x86_fp80** %7
%12 = icmp ne x86_fp80* %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 x86_fp80*, x86_fp80** %6
%17 = load x86_fp80, x86_fp80* %16
%18 = fptosi x86_fp80 %17 to i64
%19 = load x86_fp80*, x86_fp80** %7
%20 = load x86_fp80, x86_fp80* %19
%21 = fptosi x86_fp80 %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 x86_fp80*, x86_fp80** %6
%26 = load x86_fp80, x86_fp80* %25
%27 = fptosi x86_fp80 %26 to i64
%28 = load x86_fp80*, x86_fp80** %7
%29 = load x86_fp80, x86_fp80* %28
%30 = fptosi x86_fp80 %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 x86_fp80*, x86_fp80** %6
%39 = load x86_fp80, x86_fp80* %38
%40 = load x86_fp80*, x86_fp80** %7
%41 = load x86_fp80, x86_fp80* %40
%42 = fcmp ole x86_fp80 %39, %41
br i1 %42, label %43, label %51
43: ; preds = %36
%44 = load x86_fp80*, x86_fp80** %6
%45 = load x86_fp80, x86_fp80* %44
%46 = load x86_fp80*, x86_fp80** %7
%47 = load x86_fp80, x86_fp80* %46
%48 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%57 = load x86_fp80, x86_fp80* %56
%58 = load x86_fp80*, x86_fp80** %7
%59 = load x86_fp80, x86_fp80* %58
%60 = fcmp ole x86_fp80 %57, %59
br i1 %60, label %61, label %69
61: ; preds = %55
%62 = load x86_fp80*, x86_fp80** %6
%63 = load x86_fp80, x86_fp80* %62
%64 = load x86_fp80*, x86_fp80** %7
%65 = load x86_fp80, x86_fp80* %64
%66 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%81 = load x86_fp80, x86_fp80* %80
%82 = fptosi x86_fp80 %81 to i64
%83 = load x86_fp80*, x86_fp80** %7
%84 = load x86_fp80, x86_fp80* %83
%85 = fptosi x86_fp80 %84 to i64
%86 = sub nsw i64 %82, %85
br label %105
87: ; preds = %76
%88 = load x86_fp80*, x86_fp80** %6
%89 = load x86_fp80, x86_fp80* %88
%90 = load x86_fp80*, x86_fp80** %7
%91 = load x86_fp80, x86_fp80* %90
%92 = fcmp ole x86_fp80 %89, %91
br i1 %92, label %93, label %101
93: ; preds = %87
%94 = load x86_fp80*, x86_fp80** %6
%95 = load x86_fp80, x86_fp80* %94
%96 = load x86_fp80*, x86_fp80** %7
%97 = load x86_fp80, x86_fp80* %96
%98 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%110 = load x86_fp80, x86_fp80* %109
%111 = fptosi x86_fp80 %110 to i64
%112 = load x86_fp80*, x86_fp80** %7
%113 = load x86_fp80, x86_fp80* %112
%114 = fptosi x86_fp80 %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 x86_fp80*, x86_fp80** %6
%119 = load x86_fp80, x86_fp80* %118
%120 = fptosi x86_fp80 %119 to i64
%121 = load x86_fp80*, x86_fp80** %7
%122 = load x86_fp80, x86_fp80* %121
%123 = fptosi x86_fp80 %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 x86_fp80*, x86_fp80** %6
%132 = load x86_fp80, x86_fp80* %131
%133 = load x86_fp80*, x86_fp80** %7
%134 = load x86_fp80, x86_fp80* %133
%135 = fcmp ole x86_fp80 %132, %134
br i1 %135, label %136, label %144
136: ; preds = %129
%137 = load x86_fp80*, x86_fp80** %6
%138 = load x86_fp80, x86_fp80* %137
%139 = load x86_fp80*, x86_fp80** %7
%140 = load x86_fp80, x86_fp80* %139
%141 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%150 = load x86_fp80, x86_fp80* %149
%151 = load x86_fp80*, x86_fp80** %7
%152 = load x86_fp80, x86_fp80* %151
%153 = fcmp ole x86_fp80 %150, %152
br i1 %153, label %154, label %162
154: ; preds = %148
%155 = load x86_fp80*, x86_fp80** %6
%156 = load x86_fp80, x86_fp80* %155
%157 = load x86_fp80*, x86_fp80** %7
%158 = load x86_fp80, x86_fp80* %157
%159 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%174 = load x86_fp80, x86_fp80* %173
%175 = fptosi x86_fp80 %174 to i64
%176 = load x86_fp80*, x86_fp80** %7
%177 = load x86_fp80, x86_fp80* %176
%178 = fptosi x86_fp80 %177 to i64
%179 = sub nsw i64 %175, %178
br label %198
180: ; preds = %169
%181 = load x86_fp80*, x86_fp80** %6
%182 = load x86_fp80, x86_fp80* %181
%183 = load x86_fp80*, x86_fp80** %7
%184 = load x86_fp80, x86_fp80* %183
%185 = fcmp ole x86_fp80 %182, %184
br i1 %185, label %186, label %194
186: ; preds = %180
%187 = load x86_fp80*, x86_fp80** %6
%188 = load x86_fp80, x86_fp80* %187
%189 = load x86_fp80*, x86_fp80** %7
%190 = load x86_fp80, x86_fp80* %189
%191 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%203 = load x86_fp80, x86_fp80* %202
%204 = fptosi x86_fp80 %203 to i64
%205 = load x86_fp80*, x86_fp80** %7
%206 = load x86_fp80, x86_fp80* %205
%207 = fptosi x86_fp80 %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 x86_fp80*, x86_fp80** %6
%212 = load x86_fp80, x86_fp80* %211
%213 = fptosi x86_fp80 %212 to i64
%214 = load x86_fp80*, x86_fp80** %7
%215 = load x86_fp80, x86_fp80* %214
%216 = fptosi x86_fp80 %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 x86_fp80*, x86_fp80** %6
%225 = load x86_fp80, x86_fp80* %224
%226 = load x86_fp80*, x86_fp80** %7
%227 = load x86_fp80, x86_fp80* %226
%228 = fcmp ole x86_fp80 %225, %227
br i1 %228, label %229, label %237
229: ; preds = %222
%230 = load x86_fp80*, x86_fp80** %6
%231 = load x86_fp80, x86_fp80* %230
%232 = load x86_fp80*, x86_fp80** %7
%233 = load x86_fp80, x86_fp80* %232
%234 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%243 = load x86_fp80, x86_fp80* %242
%244 = load x86_fp80*, x86_fp80** %7
%245 = load x86_fp80, x86_fp80* %244
%246 = fcmp ole x86_fp80 %243, %245
br i1 %246, label %247, label %255
247: ; preds = %241
%248 = load x86_fp80*, x86_fp80** %6
%249 = load x86_fp80, x86_fp80* %248
%250 = load x86_fp80*, x86_fp80** %7
%251 = load x86_fp80, x86_fp80* %250
%252 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%267 = load x86_fp80, x86_fp80* %266
%268 = fptosi x86_fp80 %267 to i64
%269 = load x86_fp80*, x86_fp80** %7
%270 = load x86_fp80, x86_fp80* %269
%271 = fptosi x86_fp80 %270 to i64
%272 = sub nsw i64 %268, %271
br label %291
273: ; preds = %262
%274 = load x86_fp80*, x86_fp80** %6
%275 = load x86_fp80, x86_fp80* %274
%276 = load x86_fp80*, x86_fp80** %7
%277 = load x86_fp80, x86_fp80* %276
%278 = fcmp ole x86_fp80 %275, %277
br i1 %278, label %279, label %287
279: ; preds = %273
%280 = load x86_fp80*, x86_fp80** %6
%281 = load x86_fp80, x86_fp80* %280
%282 = load x86_fp80*, x86_fp80** %7
%283 = load x86_fp80, x86_fp80* %282
%284 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%295 = load x86_fp80, x86_fp80* %294
%296 = fptosi x86_fp80 %295 to i64
%297 = load x86_fp80*, x86_fp80** %7
%298 = load x86_fp80, x86_fp80* %297
%299 = fptosi x86_fp80 %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 x86_fp80*, x86_fp80** %6
%304 = load x86_fp80, x86_fp80* %303
%305 = fptosi x86_fp80 %304 to i64
%306 = load x86_fp80*, x86_fp80** %7
%307 = load x86_fp80, x86_fp80* %306
%308 = fptosi x86_fp80 %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 x86_fp80*, x86_fp80** %6
%317 = load x86_fp80, x86_fp80* %316
%318 = load x86_fp80*, x86_fp80** %7
%319 = load x86_fp80, x86_fp80* %318
%320 = fcmp ole x86_fp80 %317, %319
br i1 %320, label %321, label %329
321: ; preds = %314
%322 = load x86_fp80*, x86_fp80** %6
%323 = load x86_fp80, x86_fp80* %322
%324 = load x86_fp80*, x86_fp80** %7
%325 = load x86_fp80, x86_fp80* %324
%326 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%335 = load x86_fp80, x86_fp80* %334
%336 = load x86_fp80*, x86_fp80** %7
%337 = load x86_fp80, x86_fp80* %336
%338 = fcmp ole x86_fp80 %335, %337
br i1 %338, label %339, label %347
339: ; preds = %333
%340 = load x86_fp80*, x86_fp80** %6
%341 = load x86_fp80, x86_fp80* %340
%342 = load x86_fp80*, x86_fp80** %7
%343 = load x86_fp80, x86_fp80* %342
%344 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%359 = load x86_fp80, x86_fp80* %358
%360 = fptosi x86_fp80 %359 to i64
%361 = load x86_fp80*, x86_fp80** %7
%362 = load x86_fp80, x86_fp80* %361
%363 = fptosi x86_fp80 %362 to i64
%364 = sub nsw i64 %360, %363
br label %383
365: ; preds = %354
%366 = load x86_fp80*, x86_fp80** %6
%367 = load x86_fp80, x86_fp80* %366
%368 = load x86_fp80*, x86_fp80** %7
%369 = load x86_fp80, x86_fp80* %368
%370 = fcmp ole x86_fp80 %367, %369
br i1 %370, label %371, label %379
371: ; preds = %365
%372 = load x86_fp80*, x86_fp80** %6
%373 = load x86_fp80, x86_fp80* %372
%374 = load x86_fp80*, x86_fp80** %7
%375 = load x86_fp80, x86_fp80* %374
%376 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%388 = load x86_fp80, x86_fp80* %387
%389 = fptosi x86_fp80 %388 to i64
%390 = load x86_fp80*, x86_fp80** %7
%391 = load x86_fp80, x86_fp80* %390
%392 = fptosi x86_fp80 %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 x86_fp80*, x86_fp80** %6
%397 = load x86_fp80, x86_fp80* %396
%398 = fptosi x86_fp80 %397 to i64
%399 = load x86_fp80*, x86_fp80** %7
%400 = load x86_fp80, x86_fp80* %399
%401 = fptosi x86_fp80 %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 x86_fp80*, x86_fp80** %6
%410 = load x86_fp80, x86_fp80* %409
%411 = load x86_fp80*, x86_fp80** %7
%412 = load x86_fp80, x86_fp80* %411
%413 = fcmp ole x86_fp80 %410, %412
br i1 %413, label %414, label %422
414: ; preds = %407
%415 = load x86_fp80*, x86_fp80** %6
%416 = load x86_fp80, x86_fp80* %415
%417 = load x86_fp80*, x86_fp80** %7
%418 = load x86_fp80, x86_fp80* %417
%419 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%428 = load x86_fp80, x86_fp80* %427
%429 = load x86_fp80*, x86_fp80** %7
%430 = load x86_fp80, x86_fp80* %429
%431 = fcmp ole x86_fp80 %428, %430
br i1 %431, label %432, label %440
432: ; preds = %426
%433 = load x86_fp80*, x86_fp80** %6
%434 = load x86_fp80, x86_fp80* %433
%435 = load x86_fp80*, x86_fp80** %7
%436 = load x86_fp80, x86_fp80* %435
%437 = fcmp olt x86_fp80 %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 x86_fp80*, x86_fp80** %6
%452 = load x86_fp80, x86_fp80* %451
%453 = fptosi x86_fp80 %452 to i64
%454 = load x86_fp80*, x86_fp80** %7
%455 = load x86_fp80, x86_fp80* %454
%456 = fptosi x86_fp80 %455 to i64
%457 = sub nsw i64 %453, %456
br label %476
458: ; preds = %447
%459 = load x86_fp80*, x86_fp80** %6
%460 = load x86_fp80, x86_fp80* %459
%461 = load x86_fp80*, x86_fp80** %7
%462 = load x86_fp80, x86_fp80* %461
%463 = fcmp ole x86_fp80 %460, %462
br i1 %463, label %464, label %472
464: ; preds = %458
%465 = load x86_fp80*, x86_fp80** %6
%466 = load x86_fp80, x86_fp80* %465
%467 = load x86_fp80*, x86_fp80** %7
%468 = load x86_fp80, x86_fp80* %467
%469 = fcmp olt x86_fp80 %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_ldouble(i8* nocapture readnone %0, x86_fp80* %1, x86_fp80* %2) {
%4 = icmp ne x86_fp80* %1, null
%5 = icmp ne x86_fp80* %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 x86_fp80, x86_fp80* %1
%11 = fptosi x86_fp80 %10 to i64
%12 = load x86_fp80, x86_fp80* %2
%13 = fptosi x86_fp80 %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 x86_fp80 %10, %12
%20 = fcmp olt x86_fp80 %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
}