#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 */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
scalar_t__ isnan(double);
double remquo(double x, double y, int *quo) {
  union {
    double f;
    uint64_t i;
  } ux = {x}, uy = {y};
  int ex = ux.i >> 52 & 0x7ff;
  int ey = uy.i >> 52 & 0x7ff;
  int sx = ux.i >> 63;
  int sy = uy.i >> 63;
  uint32_t q;
  uint64_t i;
  uint64_t uxi = ux.i;
  *quo = 0;
  if (uy.i << 1 == 0 || isnan(y) || ex == 0x7ff)
    return (x * y) / (x * y);
  if (ux.i << 1 == 0)
    return x;
  if (!ex) {
    for (i = uxi << 12; i >> 63 == 0; ex--, i <<= 1)
      ;
    uxi <<= -ex + 1;
  } else {
    uxi &= -1ULL >> 12;
    uxi |= 1ULL << 52;
  }
  if (!ey) {
    for (i = uy.i << 12; i >> 63 == 0; ey--, i <<= 1)
      ;
    uy.i <<= -ey + 1;
  } else {
    uy.i &= -1ULL >> 12;
    uy.i |= 1ULL << 52;
  }
  q = 0;
  if (ex < ey) {
    if (ex + 1 == ey)
      goto end;
    return x;
  }
  for (; ex > ey; ex--) {
    i = uxi - uy.i;
    if (i >> 63 == 0) {
      uxi = i;
      q++;
    }
    uxi <<= 1;
    q <<= 1;
  }
  i = uxi - uy.i;
  if (i >> 63 == 0) {
    uxi = i;
    q++;
  }
  if (uxi == 0)
    ex = -60;
  else
    for (; uxi >> 52 == 0; uxi <<= 1, ex--)
      ;
end:
  if (ex > 0) {
    uxi -= 1ULL << 52;
    uxi |= (uint64_t)ex << 52;
  } else {
    uxi >>= -ex + 1;
  }
  ux.i = uxi;
  x = ux.f;
  if (sy)
    y = -y;
  if (ex == ey || (ex + 1 == ey && (2 * x > y || (2 * x == y && q % 2)))) {
    x -= y;
    q++;
  }
  q &= 0x7fffffff;
  *quo = sx ^ sy ? -(int)q : (int)q;
  return sx ? -x : x;
}


x86 assembly (clang, -O0):
<remquo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x28(%rbp),%eax
mov    $0x34,%ecx
sar    %cl,%eax
and    $0x7ff,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%eax
mov    $0x34,%ecx
sar    %cl,%eax
and    $0x7ff,%eax
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%eax
mov    $0x3f,%ecx
sar    %cl,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x30(%rbp),%eax
mov    $0x3f,%ecx
sar    %cl,%eax
mov    %eax,-0x40(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
cmp    $0x0,%eax
je     11b8 <remquo+0xa8>
movsd  -0x18(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    11b8 <remquo+0xa8>
cmpl   $0x7ff,-0x34(%rbp)
jne    11da <remquo+0xca>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1580 <remquo+0x470>
mov    -0x28(%rbp),%eax
shl    $0x1,%eax
cmp    $0x0,%eax
jne    11f8 <remquo+0xe8>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1580 <remquo+0x470>
cmpl   $0x0,-0x34(%rbp)
jne    124f <remquo+0x13f>
mov    -0x4c(%rbp),%eax
shl    $0xc,%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    $0x3f,%ecx
sar    %cl,%eax
cmp    $0x0,%eax
jne    123a <remquo+0x12a>
jmp    1223 <remquo+0x113>
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
mov    -0x48(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    120b <remquo+0xfb>
xor    %ecx,%ecx
sub    -0x34(%rbp),%ecx
add    $0x1,%ecx
mov    -0x4c(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x4c(%rbp)
jmp    1277 <remquo+0x167>
movslq -0x4c(%rbp),%rax
movabs $0xfffffffffffff,%rcx
and    %rcx,%rax
mov    %eax,-0x4c(%rbp)
movslq -0x4c(%rbp),%rax
movabs $0x10000000000000,%rcx
or     %rcx,%rax
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x38(%rbp)
jne    12ce <remquo+0x1be>
mov    -0x30(%rbp),%eax
shl    $0xc,%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    $0x3f,%ecx
sar    %cl,%eax
cmp    $0x0,%eax
jne    12b9 <remquo+0x1a9>
jmp    12a2 <remquo+0x192>
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x38(%rbp)
mov    -0x48(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    128a <remquo+0x17a>
xor    %ecx,%ecx
sub    -0x38(%rbp),%ecx
add    $0x1,%ecx
mov    -0x30(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x30(%rbp)
jmp    12f6 <remquo+0x1e6>
movslq -0x30(%rbp),%rax
movabs $0xfffffffffffff,%rcx
and    %rcx,%rax
mov    %eax,-0x30(%rbp)
movslq -0x30(%rbp),%rax
movabs $0x10000000000000,%rcx
or     %rcx,%rax
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    132c <remquo+0x21c>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
cmp    -0x38(%rbp),%eax
jne    131d <remquo+0x20d>
jmp    1407 <remquo+0x2f7>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1580 <remquo+0x470>
jmp    1331 <remquo+0x221>
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jle    1388 <remquo+0x278>
mov    -0x4c(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    $0x3f,%ecx
sar    %cl,%eax
cmp    $0x0,%eax
jne    1368 <remquo+0x258>
mov    -0x48(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x4c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
jmp    1331 <remquo+0x221>
mov    -0x4c(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    $0x3f,%ecx
sar    %cl,%eax
cmp    $0x0,%eax
jne    13b3 <remquo+0x2a3>
mov    -0x48(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jne    13c9 <remquo+0x2b9>
movl   $0xffffffc4,-0x34(%rbp)
jmp    1402 <remquo+0x2f2>
jmp    13ce <remquo+0x2be>
mov    -0x4c(%rbp),%eax
mov    $0x34,%ecx
sar    %cl,%eax
cmp    $0x0,%eax
jne    13fd <remquo+0x2ed>
jmp    13e6 <remquo+0x2d6>
mov    -0x4c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
jmp    13ce <remquo+0x2be>
jmp    1402 <remquo+0x2f2>
jmp    1407 <remquo+0x2f7>
cmpl   $0x0,-0x34(%rbp)
jle    143a <remquo+0x32a>
movslq -0x4c(%rbp),%rax
movabs $0x10000000000000,%rcx
sub    %rcx,%rax
mov    %eax,-0x4c(%rbp)
mov    -0x34(%rbp),%eax
mov    $0x34,%ecx
shl    %cl,%eax
or     -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    144a <remquo+0x33a>
xor    %ecx,%ecx
sub    -0x34(%rbp),%ecx
add    $0x1,%ecx
mov    -0x4c(%rbp),%eax
sar    %cl,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
cmpl   $0x0,-0x40(%rbp)
je     1485 <remquo+0x375>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
je     14ea <remquo+0x3da>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
cmp    -0x38(%rbp),%eax
jne    1506 <remquo+0x3f6>
movsd  0xb58(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     14ea <remquo+0x3da>
movsd  0xb40(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    1506 <remquo+0x3f6>
jp     1506 <remquo+0x3f6>
mov    -0x44(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1506 <remquo+0x3f6>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%eax
xor    -0x40(%rbp),%eax
cmp    $0x0,%eax
je     152d <remquo+0x41d>
xor    %eax,%eax
sub    -0x44(%rbp),%eax
mov    %eax,-0x50(%rbp)
jmp    1533 <remquo+0x423>
mov    -0x44(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0x3c(%rbp)
je     156c <remquo+0x45c>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1576 <remquo+0x466>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remquo>:
sub    $0x18,%rsp
movq   %xmm1,%rax
movl   $0x0,(%rdi)
test   $0x7fffffff,%eax
je     1147 <remquo+0x37>
movsd  %xmm0,0x10(%rsp)
movdqa %xmm1,%xmm0
movq   %xmm1,0x8(%rsp)
call   1030 <isnan@plt>
movq   0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
divsd  %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%union.anon = type { double }
define double @remquo(double %0, double %1, i32* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32*
%8 = alloca %union.anon
%9 = alloca %union.anon
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store double %0, double* %5
store double %1, double* %6
store i32* %2, i32** %7
%17 = bitcast %union.anon* %8 to double*
%18 = load double, double* %5
store double %18, double* %17
%19 = bitcast %union.anon* %9 to double*
%20 = load double, double* %6
store double %20, double* %19
%21 = bitcast %union.anon* %8 to i32*
%22 = load i32, i32* %21
%23 = ashr i32 %22, 52
%24 = and i32 %23, 2047
store i32 %24, i32* %10
%25 = bitcast %union.anon* %9 to i32*
%26 = load i32, i32* %25
%27 = ashr i32 %26, 52
%28 = and i32 %27, 2047
store i32 %28, i32* %11
%29 = bitcast %union.anon* %8 to i32*
%30 = load i32, i32* %29
%31 = ashr i32 %30, 63
store i32 %31, i32* %12
%32 = bitcast %union.anon* %9 to i32*
%33 = load i32, i32* %32
%34 = ashr i32 %33, 63
store i32 %34, i32* %13
%35 = bitcast %union.anon* %8 to i32*
%36 = load i32, i32* %35
store i32 %36, i32* %16
%37 = load i32*, i32** %7
store i32 0, i32* %37
%38 = bitcast %union.anon* %9 to i32*
%39 = load i32, i32* %38
%40 = shl i32 %39, 1
%41 = icmp eq i32 %40, 0
br i1 %41, label %49, label %42
42: ; preds = %3
%43 = load double, double* %6
%44 = call i64 @isnan(double %43)
%45 = icmp ne i64 %44, 0
br i1 %45, label %49, label %46
46: ; preds = %42
%47 = load i32, i32* %10
%48 = icmp eq i32 %47, 2047
br i1 %48, label %49, label %57
49: ; preds = %46, %42, %3
%50 = load double, double* %5
%51 = load double, double* %6
%52 = fmul double %50, %51
%53 = load double, double* %5
%54 = load double, double* %6
%55 = fmul double %53, %54
%56 = fdiv double %52, %55
store double %56, double* %4
br label %277
57: ; preds = %46
%58 = bitcast %union.anon* %8 to i32*
%59 = load i32, i32* %58
%60 = shl i32 %59, 1
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %57
%63 = load double, double* %5
store double %63, double* %4
br label %277
64: ; preds = %57
%65 = load i32, i32* %10
%66 = icmp ne i32 %65, 0
br i1 %66, label %86, label %67
67: ; preds = %64
%68 = load i32, i32* %16
%69 = shl i32 %68, 12
store i32 %69, i32* %15
br label %70
70: ; preds = %75, %67
%71 = load i32, i32* %15
%72 = ashr i32 %71, 63
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %80
74: ; preds = %70
br label %75
75: ; preds = %74
%76 = load i32, i32* %10
%77 = add nsw i32 %76, -1
store i32 %77, i32* %10
%78 = load i32, i32* %15
%79 = shl i32 %78, 1
store i32 %79, i32* %15
br label %70
80: ; preds = %70
%81 = load i32, i32* %10
%82 = sub nsw i32 0, %81
%83 = add nsw i32 %82, 1
%84 = load i32, i32* %16
%85 = shl i32 %84, %83
store i32 %85, i32* %16
br label %95
86: ; preds = %64
%87 = load i32, i32* %16
%88 = sext i32 %87 to i64
%89 = and i64 %88, 4503599627370495
%90 = trunc i64 %89 to i32
store i32 %90, i32* %16
%91 = load i32, i32* %16
%92 = sext i32 %91 to i64
%93 = or i64 %92, 4503599627370496
%94 = trunc i64 %93 to i32
store i32 %94, i32* %16
br label %95
95: ; preds = %86, %80
%96 = load i32, i32* %11
%97 = icmp ne i32 %96, 0
br i1 %97, label %119, label %98
98: ; preds = %95
%99 = bitcast %union.anon* %9 to i32*
%100 = load i32, i32* %99
%101 = shl i32 %100, 12
store i32 %101, i32* %15
br label %102
102: ; preds = %107, %98
%103 = load i32, i32* %15
%104 = ashr i32 %103, 63
%105 = icmp eq i32 %104, 0
br i1 %105, label %106, label %112
106: ; preds = %102
br label %107
107: ; preds = %106
%108 = load i32, i32* %11
%109 = add nsw i32 %108, -1
store i32 %109, i32* %11
%110 = load i32, i32* %15
%111 = shl i32 %110, 1
store i32 %111, i32* %15
br label %102
112: ; preds = %102
%113 = load i32, i32* %11
%114 = sub nsw i32 0, %113
%115 = add nsw i32 %114, 1
%116 = bitcast %union.anon* %9 to i32*
%117 = load i32, i32* %116
%118 = shl i32 %117, %115
store i32 %118, i32* %116
br label %130
119: ; preds = %95
%120 = bitcast %union.anon* %9 to i32*
%121 = load i32, i32* %120
%122 = sext i32 %121 to i64
%123 = and i64 %122, 4503599627370495
%124 = trunc i64 %123 to i32
store i32 %124, i32* %120
%125 = bitcast %union.anon* %9 to i32*
%126 = load i32, i32* %125
%127 = sext i32 %126 to i64
%128 = or i64 %127, 4503599627370496
%129 = trunc i64 %128 to i32
store i32 %129, i32* %125
br label %130
130: ; preds = %119, %112
store i32 0, i32* %14
%131 = load i32, i32* %10
%132 = load i32, i32* %11
%133 = icmp slt i32 %131, %132
br i1 %133, label %134, label %142
134: ; preds = %130
%135 = load i32, i32* %10
%136 = add nsw i32 %135, 1
%137 = load i32, i32* %11
%138 = icmp eq i32 %136, %137
br i1 %138, label %139, label %140
139: ; preds = %134
br label %196
140: ; preds = %134
%141 = load double, double* %5
store double %141, double* %4
br label %277
142: ; preds = %130
br label %143
143: ; preds = %164, %142
%144 = load i32, i32* %10
%145 = load i32, i32* %11
%146 = icmp sgt i32 %144, %145
br i1 %146, label %147, label %167
147: ; preds = %143
%148 = load i32, i32* %16
%149 = bitcast %union.anon* %9 to i32*
%150 = load i32, i32* %149
%151 = sub nsw i32 %148, %150
store i32 %151, i32* %15
%152 = load i32, i32* %15
%153 = ashr i32 %152, 63
%154 = icmp eq i32 %153, 0
br i1 %154, label %155, label %159
155: ; preds = %147
%156 = load i32, i32* %15
store i32 %156, i32* %16
%157 = load i32, i32* %14
%158 = add nsw i32 %157, 1
store i32 %158, i32* %14
br label %159
159: ; preds = %155, %147
%160 = load i32, i32* %16
%161 = shl i32 %160, 1
store i32 %161, i32* %16
%162 = load i32, i32* %14
%163 = shl i32 %162, 1
store i32 %163, i32* %14
br label %164
164: ; preds = %159
%165 = load i32, i32* %10
%166 = add nsw i32 %165, -1
store i32 %166, i32* %10
br label %143
167: ; preds = %143
%168 = load i32, i32* %16
%169 = bitcast %union.anon* %9 to i32*
%170 = load i32, i32* %169
%171 = sub nsw i32 %168, %170
store i32 %171, i32* %15
%172 = load i32, i32* %15
%173 = ashr i32 %172, 63
%174 = icmp eq i32 %173, 0
br i1 %174, label %175, label %179
175: ; preds = %167
%176 = load i32, i32* %15
store i32 %176, i32* %16
%177 = load i32, i32* %14
%178 = add nsw i32 %177, 1
store i32 %178, i32* %14
br label %179
179: ; preds = %175, %167
%180 = load i32, i32* %16
%181 = icmp eq i32 %180, 0
br i1 %181, label %182, label %183
182: ; preds = %179
store i32 -60, i32* %10
br label %195
183: ; preds = %179
br label %184
184: ; preds = %189, %183
%185 = load i32, i32* %16
%186 = ashr i32 %185, 52
%187 = icmp eq i32 %186, 0
br i1 %187, label %188, label %194
188: ; preds = %184
br label %189
189: ; preds = %188
%190 = load i32, i32* %16
%191 = shl i32 %190, 1
store i32 %191, i32* %16
%192 = load i32, i32* %10
%193 = add nsw i32 %192, -1
store i32 %193, i32* %10
br label %184
194: ; preds = %184
br label %195
195: ; preds = %194, %182
br label %196
196: ; preds = %195, %139
%197 = load i32, i32* %10
%198 = icmp sgt i32 %197, 0
br i1 %198, label %199, label %208
199: ; preds = %196
%200 = load i32, i32* %16
%201 = sext i32 %200 to i64
%202 = sub i64 %201, 4503599627370496
%203 = trunc i64 %202 to i32
store i32 %203, i32* %16
%204 = load i32, i32* %10
%205 = shl i32 %204, 52
%206 = load i32, i32* %16
%207 = or i32 %206, %205
store i32 %207, i32* %16
br label %214
208: ; preds = %196
%209 = load i32, i32* %10
%210 = sub nsw i32 0, %209
%211 = add nsw i32 %210, 1
%212 = load i32, i32* %16
%213 = ashr i32 %212, %211
store i32 %213, i32* %16
br label %214
214: ; preds = %208, %199
%215 = load i32, i32* %16
%216 = bitcast %union.anon* %8 to i32*
store i32 %215, i32* %216
%217 = bitcast %union.anon* %8 to double*
%218 = load double, double* %217
store double %218, double* %5
%219 = load i32, i32* %13
%220 = icmp ne i32 %219, 0
br i1 %220, label %221, label %224
221: ; preds = %214
%222 = load double, double* %6
%223 = fneg double %222
store double %223, double* %6
br label %224
224: ; preds = %221, %214
%225 = load i32, i32* %10
%226 = load i32, i32* %11
%227 = icmp eq i32 %225, %226
br i1 %227, label %247, label %228
228: ; preds = %224
%229 = load i32, i32* %10
%230 = add nsw i32 %229, 1
%231 = load i32, i32* %11
%232 = icmp eq i32 %230, %231
br i1 %232, label %233, label %253
233: ; preds = %228
%234 = load double, double* %5
%235 = fmul double 2.000000e+00, %234
%236 = load double, double* %6
%237 = fcmp ogt double %235, %236
br i1 %237, label %247, label %238
238: ; preds = %233
%239 = load double, double* %5
%240 = fmul double 2.000000e+00, %239
%241 = load double, double* %6
%242 = fcmp oeq double %240, %241
br i1 %242, label %243, label %253
243: ; preds = %238
%244 = load i32, i32* %14
%245 = srem i32 %244, 2
%246 = icmp ne i32 %245, 0
br i1 %246, label %247, label %253
247: ; preds = %243, %233, %224
%248 = load double, double* %6
%249 = load double, double* %5
%250 = fsub double %249, %248
store double %250, double* %5
%251 = load i32, i32* %14
%252 = add nsw i32 %251, 1
store i32 %252, i32* %14
br label %253
253: ; preds = %247, %243, %238, %228
%254 = load i32, i32* %14
%255 = and i32 %254, 2147483647
store i32 %255, i32* %14
%256 = load i32, i32* %12
%257 = load i32, i32* %13
%258 = xor i32 %256, %257
%259 = icmp ne i32 %258, 0
br i1 %259, label %260, label %263
260: ; preds = %253
%261 = load i32, i32* %14
%262 = sub nsw i32 0, %261
br label %265
263: ; preds = %253
%264 = load i32, i32* %14
br label %265
265: ; preds = %263, %260
%266 = phi i32 [ %262, %260 ], [ %264, %263 ]
%267 = load i32*, i32** %7
store i32 %266, i32* %267
%268 = load i32, i32* %12
%269 = icmp ne i32 %268, 0
br i1 %269, label %270, label %273
270: ; preds = %265
%271 = load double, double* %5
%272 = fneg double %271
br label %275
273: ; preds = %265
%274 = load double, double* %5
br label %275
275: ; preds = %273, %270
%276 = phi double [ %272, %270 ], [ %274, %273 ]
store double %276, double* %4
br label %277
277: ; preds = %275, %140, %62, %49
%278 = load double, double* %4
ret double %278
}

LLVM IR (-O2):
define double @remquo(double %0, double %1, i32* nocapture writeonly %2) {
%4 = bitcast double %1 to i64
store i32 0, i32* %2
%5 = and i64 %4, 2147483647
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i64 @isnan(double %1)
br label %9
9: ; preds = %3, %7
%10 = fmul double %0, %1
%11 = fdiv double %10, %10
ret double %11
}