// File: /workspace/github_cpp_makefile_star2_O1/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 0x57cac(%rip), %xmm1    # 0x6e020
xorpd %xmm0, %xmm1
maxsd %xmm0, %xmm1
movsd 0x57cac(%rip), %xmm0    # 0x6e030
ucomisd %xmm1, %xmm0
jbe 0x16427
ucomisd 0x57cf2(%rip), %xmm1    # 0x6e088
jae 0x1646b
ucomisd 0x57c9c(%rip), %xmm1    # 0x6e040
jae 0x16475
ucomisd 0x57c9e(%rip), %xmm1    # 0x6e050
jae 0x16489
ucomisd 0x57ca0(%rip), %xmm1    # 0x6e060
jae 0x1649d
ucomisd 0x57caa(%rip), %xmm1    # 0x6e078
jae 0x164b1
ucomisd 0x57c94(%rip), %xmm1    # 0x6e070
jae 0x164e1
ucomisd 0x57ca6(%rip), %xmm1    # 0x6e090
jae 0x164e9
ucomisd 0x57ca0(%rip), %xmm1    # 0x6e098
jae 0x16519
ucomisd 0x57c9a(%rip), %xmm1    # 0x6e0a0
jae 0x16523
ucomisd 0x57c94(%rip), %xmm1    # 0x6e0a8
jae 0x1652d
movsd 0x57c16(%rip), %xmm0    # 0x6e038
jmp 0x164e9
movsd 0x57c09(%rip), %xmm0    # 0x6e038
ucomisd %xmm1, %xmm0
jbe 0x1650d
ucomisd 0x57c07(%rip), %xmm1    # 0x6e048
jae 0x1647f
ucomisd 0x57c0d(%rip), %xmm1    # 0x6e058
jae 0x16493
ucomisd 0x57c13(%rip), %xmm1    # 0x6e068
jae 0x164a7
ucomisd 0x57bd1(%rip), %xmm1    # 0x6e030
jae 0x164bb
movsd 0x57c07(%rip), %xmm0    # 0x6e070
jmp 0x164c3
movsd 0x57bfd(%rip), %xmm0    # 0x6e070
jmp 0x164e9
movsd 0x57bfb(%rip), %xmm0    # 0x6e078
jmp 0x164e9
movsd 0x57bb9(%rip), %xmm0    # 0x6e040
jmp 0x164c3
movsd 0x57bcf(%rip), %xmm0    # 0x6e060
jmp 0x164e9
movsd 0x57bb5(%rip), %xmm0    # 0x6e050
jmp 0x164c3
movsd 0x57bab(%rip), %xmm0    # 0x6e050
jmp 0x164e9
movsd 0x57bb1(%rip), %xmm0    # 0x6e060
jmp 0x164c3
movsd 0x57b87(%rip), %xmm0    # 0x6e040
jmp 0x164e9
movsd 0x57bb5(%rip), %xmm0    # 0x6e078
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
addsd 0x57bad(%rip), %xmm2    # 0x6e080
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
mulsd %xmm0, %xmm2
jmp 0x16505
movsd 0x57b9f(%rip), %xmm0    # 0x6e088
movapd %xmm1, %xmm2
mulsd %xmm0, %xmm2
addsd 0x57b87(%rip), %xmm2    # 0x6e080
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
divsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jne 0x1650d
jnp 0x16513
movl $0x11, %eax
retq
movl $0x6, %eax
retq
movsd 0x57b47(%rip), %xmm0    # 0x6e068
jmp 0x164e9
movsd 0x57b2d(%rip), %xmm0    # 0x6e058
jmp 0x164e9
movsd 0x57b13(%rip), %xmm0    # 0x6e048
jmp 0x164e9
nop