// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/include/gtest/gtest-printers.h
// Function: int testing::internal::AppropriateResolution<double>(double)
int AppropriateResolution(FloatType val) {
  int full = std::numeric_limits<FloatType>::max_digits10;
  if (val < 0) val = -val;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  if (val < 1000000) {
    FloatType mulfor6 = 1e10;
    // Without these static casts, the template instantiation for float would
    // fail to compile when -Wdouble-promotion is enabled, as the arithmetic and
    // comparison logic would promote floats to doubles.
    if (val >= static_cast<FloatType>(100000.0)) {  // 100,000 to 999,999
      mulfor6 = 1.0;
    } else if (val >= static_cast<FloatType>(10000.0)) {
      mulfor6 = 1e1;
    } else if (val >= static_cast<FloatType>(1000.0)) {
      mulfor6 = 1e2;
    } else if (val >= static_cast<FloatType>(100.0)) {
      mulfor6 = 1e3;
    } else if (val >= static_cast<FloatType>(10.0)) {
      mulfor6 = 1e4;
    } else if (val >= static_cast<FloatType>(1.0)) {
      mulfor6 = 1e5;
    } else if (val >= static_cast<FloatType>(0.1)) {
      mulfor6 = 1e6;
    } else if (val >= static_cast<FloatType>(0.01)) {
      mulfor6 = 1e7;
    } else if (val >= static_cast<FloatType>(0.001)) {
      mulfor6 = 1e8;
    } else if (val >= static_cast<FloatType>(0.0001)) {
      mulfor6 = 1e9;
    }
    if (static_cast<FloatType>(static_cast<int32_t>(
            val * mulfor6 + (static_cast<FloatType>(0.5)))) /
            mulfor6 ==
        val)
      return 6;
  } else if (val < static_cast<FloatType>(1e10)) {
    FloatType divfor6 = static_cast<FloatType>(1.0);
    if (val >= static_cast<FloatType>(1e9)) {  // 1,000,000,000 to 9,999,999,999
      divfor6 = 10000;
    } else if (val >=
               static_cast<FloatType>(1e8)) {  // 100,000,000 to 999,999,999
      divfor6 = 1000;
    } else if (val >=
               static_cast<FloatType>(1e7)) {  // 10,000,000 to 99,999,999
      divfor6 = 100;
    } else if (val >= static_cast<FloatType>(1e6)) {  // 1,000,000 to 9,999,999
      divfor6 = 10;
    }
    if (static_cast<FloatType>(static_cast<int32_t>(
            val / divfor6 + (static_cast<FloatType>(0.5)))) *
            divfor6 ==
        val)
      return 6;
  }
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
  return full;
}

// Assembly:
movapd 0x41db6(%rip), %xmm1    # 0x56020
xorpd %xmm0, %xmm1
maxsd %xmm0, %xmm1
movsd 0x41db6(%rip), %xmm0    # 0x56030
ucomisd %xmm1, %xmm0
jbe 0x1431d
ucomisd 0x41dfc(%rip), %xmm1    # 0x56088
jae 0x14361
ucomisd 0x41da6(%rip), %xmm1    # 0x56040
jae 0x1436b
ucomisd 0x41da8(%rip), %xmm1    # 0x56050
jae 0x1437f
ucomisd 0x41daa(%rip), %xmm1    # 0x56060
jae 0x14393
ucomisd 0x41db4(%rip), %xmm1    # 0x56078
jae 0x143a7
ucomisd 0x41d9e(%rip), %xmm1    # 0x56070
jae 0x143d7
ucomisd 0x41db0(%rip), %xmm1    # 0x56090
jae 0x143df
ucomisd 0x41daa(%rip), %xmm1    # 0x56098
jae 0x1440b
ucomisd 0x41da4(%rip), %xmm1    # 0x560a0
jae 0x14415
ucomisd 0x41d9e(%rip), %xmm1    # 0x560a8
jae 0x1441f
movsd 0x41d20(%rip), %xmm0    # 0x56038
jmp 0x143df
movsd 0x41d13(%rip), %xmm0    # 0x56038
ucomisd %xmm1, %xmm0
jbe 0x14403
ucomisd 0x41d11(%rip), %xmm1    # 0x56048
jae 0x14375
ucomisd 0x41d17(%rip), %xmm1    # 0x56058
jae 0x14389
ucomisd 0x41d1d(%rip), %xmm1    # 0x56068
jae 0x1439d
ucomisd 0x41cdb(%rip), %xmm1    # 0x56030
jae 0x143b1
movsd 0x41d11(%rip), %xmm0    # 0x56070
jmp 0x143b9
movsd 0x41d07(%rip), %xmm0    # 0x56070
jmp 0x143df
movsd 0x41d05(%rip), %xmm0    # 0x56078
jmp 0x143df
movsd 0x41cc3(%rip), %xmm0    # 0x56040
jmp 0x143b9
movsd 0x41cd9(%rip), %xmm0    # 0x56060
jmp 0x143df
movsd 0x41cbf(%rip), %xmm0    # 0x56050
jmp 0x143b9
movsd 0x41cb5(%rip), %xmm0    # 0x56050
jmp 0x143df
movsd 0x41cbb(%rip), %xmm0    # 0x56060
jmp 0x143b9
movsd 0x41c91(%rip), %xmm0    # 0x56040
jmp 0x143df
movsd 0x41cbf(%rip), %xmm0    # 0x56078
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
addsd 0x41cb7(%rip), %xmm2    # 0x56080
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
mulsd %xmm0, %xmm2
jmp 0x143fb
movsd 0x41ca9(%rip), %xmm0    # 0x56088
movapd %xmm1, %xmm2
mulsd %xmm0, %xmm2
addsd 0x41c91(%rip), %xmm2    # 0x56080
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
divsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jne 0x14403
jnp 0x14407
pushq $0x11
jmp 0x14409
pushq $0x6
popq %rax
retq
movsd 0x41c55(%rip), %xmm0    # 0x56068
jmp 0x143df
movsd 0x41c3b(%rip), %xmm0    # 0x56058
jmp 0x143df
movsd 0x41c21(%rip), %xmm0    # 0x56048
jmp 0x143df
nop