// File: /workspace/github_cpp_makefile_star2_O3/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 0x56000(%rip), %xmm1    # 0x6c020
xorpd %xmm0, %xmm1
maxsd %xmm0, %xmm1
movsd 0x56000(%rip), %xmm0    # 0x6c030
ucomisd %xmm1, %xmm0
jbe 0x160d3
ucomisd 0x56046(%rip), %xmm1    # 0x6c088
jae 0x16117
ucomisd 0x55ff0(%rip), %xmm1    # 0x6c040
jae 0x16121
ucomisd 0x55ff2(%rip), %xmm1    # 0x6c050
jae 0x16135
ucomisd 0x55ff4(%rip), %xmm1    # 0x6c060
jae 0x16149
ucomisd 0x55ffe(%rip), %xmm1    # 0x6c078
jae 0x1615d
ucomisd 0x55fe8(%rip), %xmm1    # 0x6c070
jae 0x1618d
ucomisd 0x55ffa(%rip), %xmm1    # 0x6c090
jae 0x16195
ucomisd 0x55ff4(%rip), %xmm1    # 0x6c098
jae 0x161c5
ucomisd 0x55fee(%rip), %xmm1    # 0x6c0a0
jae 0x161cf
ucomisd 0x55fe8(%rip), %xmm1    # 0x6c0a8
jae 0x161d9
movsd 0x55f6a(%rip), %xmm0    # 0x6c038
jmp 0x16195
movsd 0x55f5d(%rip), %xmm0    # 0x6c038
ucomisd %xmm1, %xmm0
jbe 0x161b9
ucomisd 0x55f5b(%rip), %xmm1    # 0x6c048
jae 0x1612b
ucomisd 0x55f61(%rip), %xmm1    # 0x6c058
jae 0x1613f
ucomisd 0x55f67(%rip), %xmm1    # 0x6c068
jae 0x16153
ucomisd 0x55f25(%rip), %xmm1    # 0x6c030
jae 0x16167
movsd 0x55f5b(%rip), %xmm0    # 0x6c070
jmp 0x1616f
movsd 0x55f51(%rip), %xmm0    # 0x6c070
jmp 0x16195
movsd 0x55f4f(%rip), %xmm0    # 0x6c078
jmp 0x16195
movsd 0x55f0d(%rip), %xmm0    # 0x6c040
jmp 0x1616f
movsd 0x55f23(%rip), %xmm0    # 0x6c060
jmp 0x16195
movsd 0x55f09(%rip), %xmm0    # 0x6c050
jmp 0x1616f
movsd 0x55eff(%rip), %xmm0    # 0x6c050
jmp 0x16195
movsd 0x55f05(%rip), %xmm0    # 0x6c060
jmp 0x1616f
movsd 0x55edb(%rip), %xmm0    # 0x6c040
jmp 0x16195
movsd 0x55f09(%rip), %xmm0    # 0x6c078
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
addsd 0x55f01(%rip), %xmm2    # 0x6c080
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
mulsd %xmm0, %xmm2
jmp 0x161b1
movsd 0x55ef3(%rip), %xmm0    # 0x6c088
movapd %xmm1, %xmm2
mulsd %xmm0, %xmm2
addsd 0x55edb(%rip), %xmm2    # 0x6c080
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
divsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jne 0x161b9
jnp 0x161bf
movl $0x11, %eax
retq
movl $0x6, %eax
retq
movsd 0x55e9b(%rip), %xmm0    # 0x6c068
jmp 0x16195
movsd 0x55e81(%rip), %xmm0    # 0x6c058
jmp 0x16195
movsd 0x55e67(%rip), %xmm0    # 0x6c048
jmp 0x16195
nop