#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 floor(double);
double log10(double);
double pow(double, double);
void auto_scale_f(double *scale_min, double *scale_max, double *major_interval,
                  int *minor_intervals, double min, double max) {
  double range;
  double log_min;
  double log_max;
  double floor_log_min;
  double floor_log_max;
  double scale_min_sign = 1.0;
  double scale_max_sign = 1.0;
  double increment;
  log_min = -99.0;
  log_max = -99.0;
  floor_log_min = -99.0;
  floor_log_max = -99.0;
  if (min < 0)
    scale_min_sign = -1.0;
  if (max < 0)
    scale_max_sign = -1.0;
  range = max - min;
  if (min > 0) {
    log_min = log10(min);
    floor_log_min = floor(log_min);
    *scale_min = floor_log_min * (pow(10.0, floor_log_min));
  }
  if (max > 0) {
    log_max = log10(max);
    floor_log_max = floor(log_max) + 1;
    *scale_max = floor_log_max * (pow(10.0, floor_log_max));
  }
  if (range > 0.0 && range <= 1.0) {
    increment = 0.1;
    *major_interval = 0.2;
    *minor_intervals = 1;
  } else if (range > 1.0 && range <= 3.0) {
    increment = 0.2;
    *major_interval = 0.2;
    *minor_intervals = 1;
  } else if (range > 3.0 && range <= 5.0) {
    increment = 0.5;
    *major_interval = 0.5;
    *minor_intervals = 4;
  } else if (range > 5.0 && range <= 10.0) {
    increment = 1.0;
    *major_interval = 0.5;
    *minor_intervals = 1;
  } else if (range > 10.0 && range <= 20.0) {
    increment = 2.0;
    *major_interval = 2.0;
    *minor_intervals = 1;
  } else if (range > 20.0 && range <= 50.0) {
    increment = 5.0;
    *major_interval = 10.0;
    *minor_intervals = 1;
  } else if (range > 50.0 && range <= 100.0) {
    increment = 5.0;
    *major_interval = 20.0;
    *minor_intervals = 3;
  } else if (range > 100.0 && range <= 150.0) {
    increment = 10.0;
    *major_interval = 10.0;
    *minor_intervals = 1;
  } else if (range > 150.0 && range <= 200.0) {
    increment = 10.0;
    *major_interval = 20.0;
    *minor_intervals = 1;
  } else if (range > 200.0 && range <= 250.0) {
    increment = 10.0;
    *major_interval = 40.0;
    *minor_intervals = 3;
  } else if (range > 250.0 && range <= 300.0) {
    increment = 10.0;
    *major_interval = 40.0;
    *minor_intervals = 2;
  } else if (range > 300.0 && range <= 400.0) {
    increment = 20.0;
    *major_interval = 50.0;
    *minor_intervals = 1;
  } else if (range > 400.0 && range <= 500.0) {
    increment = 20.0;
    *major_interval = 50.0;
    *minor_intervals = 1;
  } else if (range > 500.0 && range <= 600.0) {
    increment = 20.0;
    *major_interval = 60.0;
    *minor_intervals = 1;
  } else if (range > 600.0 && range <= 800.0) {
    increment = 50.0;
    *major_interval = 100.0;
    *minor_intervals = 1;
  } else if (range > 800.0 && range <= 1000.0) {
    increment = 50.0;
    *major_interval = 200.0;
    *minor_intervals = 1;
  } else if (range > 1000.0 && range <= 1500.0) {
    increment = 50.0;
    *major_interval = 300.0;
    *minor_intervals = 2;
  } else if (range > 1500.0 && range <= 2000.0) {
    increment = 50.0;
    *major_interval = 300.0;
    *minor_intervals = 1;
  } else if (range > 2000.0 && range <= 2500.0) {
    increment = 50.0;
    *major_interval = 400.0;
    *minor_intervals = 1;
  } else if (range > 2500.0 && range <= 3000.0) {
    increment = 50.0;
    *major_interval = 400.0;
    *minor_intervals = 1;
  } else if (range > 3000.0 && range <= 4000.0) {
    increment = 50.0;
    *major_interval = 500.0;
    *minor_intervals = 1;
  } else if (range > 4000.0 && range <= 5000.0) {
    increment = 50.0;
    *major_interval = 500.0;
    *minor_intervals = 1;
  } else if (range > 5000.0 && range <= 6000.0) {
    increment = 50.0;
    *major_interval = 500.0;
    *minor_intervals = 1;
  } else if (range > 6000.0 && range <= 7000.0) {
    increment = 50.0;
    *major_interval = 500.0;
    *minor_intervals = 1;
  } else if (range > 7000.0 && range <= 8000.0) {
    increment = 50.0;
    *major_interval = 500.0;
    *minor_intervals = 1;
  } else if (range > 8000.0 && range <= 10000.0) {
    increment = 50.0;
    *major_interval = 1000.0;
    *minor_intervals = 4;
  } else if (range > 10000.0 && range <= 15000.0) {
    increment = 1000.0;
    *major_interval = 1000.0;
    *minor_intervals = 4;
  } else if (range > 15000.0 && range <= 20000.0) {
    increment = 500.0;
    *major_interval = 1000.0;
    *minor_intervals = 1;
  } else if (range > 20000.0 && range <= 40000.0) {
    increment = 1000.0;
    *major_interval = 2000.0;
    *minor_intervals = 4;
  } else if (range > 40000.0 && range <= 100000.0) {
    increment = 2000.0;
    *major_interval = 4000.0;
    *minor_intervals = 4;
  } else if (range > 100000.0) {
    increment = 5000.0;
    *major_interval = 5000.0;
    *minor_intervals = 1;
  }
  if (max > 0) {
    while (*scale_max > max) {
      *scale_max -= increment;
    }
    if (*scale_max < max)
      *scale_max += increment;
  } else if (max < 0) {
    *scale_max = 0;
    while (*scale_max > max) {
      *scale_max -= increment;
    }
    if (*scale_max < max)
      *scale_max += increment;
  } else {
    *scale_max = 0;
  }
  if (min > 0) {
    while (*scale_min < min) {
      *scale_min += increment;
    }
    if (*scale_min > min)
      *scale_min -= increment;
  } else if (min < 0) {
    *scale_min = 0;
    while (*scale_min > min) {
      *scale_min -= increment;
    }
  } else {
    *scale_min = 0;
  }
}


x86 assembly (clang, -O0):
<auto_scale_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  0xeab(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe9e(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xe89(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe7c(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe6f(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe62(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    11be <auto_scale_f+0x8e>
movsd  0xe57(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    11d9 <auto_scale_f+0xa9>
movsd  0xe3c(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    124c <auto_scale_f+0x11c>
movsd  -0x28(%rbp),%xmm0
call   1040 <log10@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1050 <floor@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  0xde5(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    12b3 <auto_scale_f+0x183>
movsd  -0x30(%rbp),%xmm0
call   1040 <log10@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1050 <floor@plt>
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  0xd7e(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1304 <auto_scale_f+0x1d4>
movsd  0xd3b(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1304 <auto_scale_f+0x1d4>
movsd  0xe48(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xe2f(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d96 <auto_scale_f+0xc66>
movsd  -0x38(%rbp),%xmm0
movsd  0xcf7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    135a <auto_scale_f+0x22a>
movsd  0xcfd(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     135a <auto_scale_f+0x22a>
movsd  0xdea(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xdd9(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d91 <auto_scale_f+0xc61>
movsd  -0x38(%rbp),%xmm0
movsd  0xcb9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13b0 <auto_scale_f+0x280>
movsd  0xcaf(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     13b0 <auto_scale_f+0x280>
movsd  0xd8c(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xd7b(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x4,(%rax)
jmp    1d8c <auto_scale_f+0xc5c>
movsd  -0x38(%rbp),%xmm0
movsd  0xc6b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1406 <auto_scale_f+0x2d6>
movsd  0xc49(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1406 <auto_scale_f+0x2d6>
movsd  0xc26(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xd25(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d87 <auto_scale_f+0xc57>
movsd  -0x38(%rbp),%xmm0
movsd  0xc05(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    145c <auto_scale_f+0x32c>
movsd  0xc0b(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     145c <auto_scale_f+0x32c>
movsd  0xcd8(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xcc7(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d82 <auto_scale_f+0xc52>
movsd  -0x38(%rbp),%xmm0
movsd  0xbc7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14b2 <auto_scale_f+0x382>
movsd  0xbbd(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     14b2 <auto_scale_f+0x382>
movsd  0xb9a(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xb79(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d7d <auto_scale_f+0xc4d>
movsd  -0x38(%rbp),%xmm0
movsd  0xb79(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1508 <auto_scale_f+0x3d8>
movsd  0xb6f(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1508 <auto_scale_f+0x3d8>
movsd  0xb44(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xb3b(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x3,(%rax)
jmp    1d78 <auto_scale_f+0xc48>
movsd  -0x38(%rbp),%xmm0
movsd  0xb2b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    155e <auto_scale_f+0x42e>
movsd  0xb21(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     155e <auto_scale_f+0x42e>
movsd  0xade(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xacd(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d73 <auto_scale_f+0xc43>
movsd  -0x38(%rbp),%xmm0
movsd  0xadd(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15b4 <auto_scale_f+0x484>
movsd  0xad3(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     15b4 <auto_scale_f+0x484>
movsd  0xa88(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xa8f(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d6e <auto_scale_f+0xc3e>
movsd  -0x38(%rbp),%xmm0
movsd  0xa8f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    160a <auto_scale_f+0x4da>
movsd  0xa85(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     160a <auto_scale_f+0x4da>
movsd  0xa32(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xb11(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x3,(%rax)
jmp    1d69 <auto_scale_f+0xc39>
movsd  -0x38(%rbp),%xmm0
movsd  0xa41(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1660 <auto_scale_f+0x530>
movsd  0xa37(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1660 <auto_scale_f+0x530>
movsd  0x9dc(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xabb(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x2,(%rax)
jmp    1d64 <auto_scale_f+0xc34>
movsd  -0x38(%rbp),%xmm0
movsd  0x9f3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    16b6 <auto_scale_f+0x586>
movsd  0x9e9(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     16b6 <auto_scale_f+0x586>
movsd  0x99e(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x995(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d5f <auto_scale_f+0xc2f>
movsd  -0x38(%rbp),%xmm0
movsd  0x9a5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    170c <auto_scale_f+0x5dc>
movsd  0x99b(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     170c <auto_scale_f+0x5dc>
movsd  0x948(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x93f(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d5a <auto_scale_f+0xc2a>
movsd  -0x38(%rbp),%xmm0
movsd  0x957(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1762 <auto_scale_f+0x632>
movsd  0x94d(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1762 <auto_scale_f+0x632>
movsd  0x8f2(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x9b1(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d55 <auto_scale_f+0xc25>
movsd  -0x38(%rbp),%xmm0
movsd  0x909(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    17b8 <auto_scale_f+0x688>
movsd  0x8ff(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     17b8 <auto_scale_f+0x688>
movsd  0x8a4(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x89b(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d50 <auto_scale_f+0xc20>
movsd  -0x38(%rbp),%xmm0
movsd  0x8bb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    180e <auto_scale_f+0x6de>
movsd  0x8b1(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     180e <auto_scale_f+0x6de>
movsd  0x84e(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x855(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d4b <auto_scale_f+0xc1b>
movsd  -0x38(%rbp),%xmm0
movsd  0x86d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1864 <auto_scale_f+0x734>
movsd  0x863(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1864 <auto_scale_f+0x734>
movsd  0x7f8(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x80f(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x2,(%rax)
jmp    1d46 <auto_scale_f+0xc16>
movsd  -0x38(%rbp),%xmm0
movsd  0x81f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    18ba <auto_scale_f+0x78a>
movsd  0x815(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     18ba <auto_scale_f+0x78a>
movsd  0x7a2(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x7b9(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d41 <auto_scale_f+0xc11>
movsd  -0x38(%rbp),%xmm0
movsd  0x7d1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1910 <auto_scale_f+0x7e0>
movsd  0x7c7(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1910 <auto_scale_f+0x7e0>
movsd  0x74c(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x76b(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d3c <auto_scale_f+0xc0c>
movsd  -0x38(%rbp),%xmm0
movsd  0x783(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1966 <auto_scale_f+0x836>
movsd  0x779(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1966 <auto_scale_f+0x836>
movsd  0x6f6(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x715(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d37 <auto_scale_f+0xc07>
movsd  -0x38(%rbp),%xmm0
movsd  0x735(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    19bc <auto_scale_f+0x88c>
movsd  0x72b(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     19bc <auto_scale_f+0x88c>
movsd  0x6a0(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x6c7(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d32 <auto_scale_f+0xc02>
movsd  -0x38(%rbp),%xmm0
movsd  0x6e7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1a12 <auto_scale_f+0x8e2>
movsd  0x6dd(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1a12 <auto_scale_f+0x8e2>
movsd  0x64a(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x671(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d2d <auto_scale_f+0xbfd>
movsd  -0x38(%rbp),%xmm0
movsd  0x699(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1a68 <auto_scale_f+0x938>
movsd  0x68f(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1a68 <auto_scale_f+0x938>
movsd  0x5f4(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x61b(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d28 <auto_scale_f+0xbf8>
movsd  -0x38(%rbp),%xmm0
movsd  0x64b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1abe <auto_scale_f+0x98e>
movsd  0x641(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1abe <auto_scale_f+0x98e>
movsd  0x59e(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x5c5(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d23 <auto_scale_f+0xbf3>
movsd  -0x38(%rbp),%xmm0
movsd  0x5fd(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1b14 <auto_scale_f+0x9e4>
movsd  0x5f3(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1b14 <auto_scale_f+0x9e4>
movsd  0x548(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x56f(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d1e <auto_scale_f+0xbee>
movsd  -0x38(%rbp),%xmm0
movsd  0x5af(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1b6a <auto_scale_f+0xa3a>
movsd  0x5a5(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1b6a <auto_scale_f+0xa3a>
movsd  0x4f2(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x531(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x4,(%rax)
jmp    1d19 <auto_scale_f+0xbe9>
movsd  -0x38(%rbp),%xmm0
movsd  0x561(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1bc0 <auto_scale_f+0xa90>
movsd  0x557(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1bc0 <auto_scale_f+0xa90>
movsd  0x4ec(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x4db(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x4,(%rax)
jmp    1d14 <auto_scale_f+0xbe4>
movsd  -0x38(%rbp),%xmm0
movsd  0x513(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1c16 <auto_scale_f+0xae6>
movsd  0x509(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1c16 <auto_scale_f+0xae6>
movsd  0x47e(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x485(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d0f <auto_scale_f+0xbdf>
movsd  -0x38(%rbp),%xmm0
movsd  0x4c5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1c6c <auto_scale_f+0xb3c>
movsd  0x4bb(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1c6c <auto_scale_f+0xb3c>
movsd  0x440(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x43f(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x4,(%rax)
jmp    1d0a <auto_scale_f+0xbda>
movsd  -0x38(%rbp),%xmm0
movsd  0x477(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1cc2 <auto_scale_f+0xb92>
movsd  0x46d(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     1cc2 <auto_scale_f+0xb92>
movsd  0x3fa(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x401(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x4,(%rax)
jmp    1d05 <auto_scale_f+0xbd5>
movsd  -0x38(%rbp),%xmm0
movsd  0x429(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1d00 <auto_scale_f+0xbd0>
movsd  0x3d7(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x3c6(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    1d05 <auto_scale_f+0xbd5>
jmp    1d0a <auto_scale_f+0xbda>
jmp    1d0f <auto_scale_f+0xbdf>
jmp    1d14 <auto_scale_f+0xbe4>
jmp    1d19 <auto_scale_f+0xbe9>
jmp    1d1e <auto_scale_f+0xbee>
jmp    1d23 <auto_scale_f+0xbf3>
jmp    1d28 <auto_scale_f+0xbf8>
jmp    1d2d <auto_scale_f+0xbfd>
jmp    1d32 <auto_scale_f+0xc02>
jmp    1d37 <auto_scale_f+0xc07>
jmp    1d3c <auto_scale_f+0xc0c>
jmp    1d41 <auto_scale_f+0xc11>
jmp    1d46 <auto_scale_f+0xc16>
jmp    1d4b <auto_scale_f+0xc1b>
jmp    1d50 <auto_scale_f+0xc20>
jmp    1d55 <auto_scale_f+0xc25>
jmp    1d5a <auto_scale_f+0xc2a>
jmp    1d5f <auto_scale_f+0xc2f>
jmp    1d64 <auto_scale_f+0xc34>
jmp    1d69 <auto_scale_f+0xc39>
jmp    1d6e <auto_scale_f+0xc3e>
jmp    1d73 <auto_scale_f+0xc43>
jmp    1d78 <auto_scale_f+0xc48>
jmp    1d7d <auto_scale_f+0xc4d>
jmp    1d82 <auto_scale_f+0xc52>
jmp    1d87 <auto_scale_f+0xc57>
jmp    1d8c <auto_scale_f+0xc5c>
jmp    1d91 <auto_scale_f+0xc61>
jmp    1d96 <auto_scale_f+0xc66>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1e07 <auto_scale_f+0xcd7>
jmp    1dad <auto_scale_f+0xc7d>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1dda <auto_scale_f+0xcaa>
movsd  -0x70(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    1dad <auto_scale_f+0xc7d>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1e02 <auto_scale_f+0xcd2>
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1e8a <auto_scale_f+0xd5a>
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1e7a <auto_scale_f+0xd4a>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1e4d <auto_scale_f+0xd1d>
movsd  -0x70(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    1e20 <auto_scale_f+0xcf0>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1e75 <auto_scale_f+0xd45>
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1e85 <auto_scale_f+0xd55>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    1e8a <auto_scale_f+0xd5a>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1efb <auto_scale_f+0xdcb>
jmp    1ea1 <auto_scale_f+0xd71>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1ece <auto_scale_f+0xd9e>
movsd  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1ea1 <auto_scale_f+0xd71>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1ef6 <auto_scale_f+0xdc6>
movsd  -0x70(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    1f56 <auto_scale_f+0xe26>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1f46 <auto_scale_f+0xe16>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1f41 <auto_scale_f+0xe11>
movsd  -0x70(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    1f14 <auto_scale_f+0xde4>
jmp    1f51 <auto_scale_f+0xe21>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    1f56 <auto_scale_f+0xe26>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<auto_scale_f>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
movapd %xmm0,%xmm3
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,%r14
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
movsd  %xmm3,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
jbe    11a4 <auto_scale_f+0x74>
movapd %xmm3,%xmm0
call   1040 <log10@plt>
call   1050 <floor@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xe7c(%rip),%xmm0
call   1030 <pow@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm3
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r14)
xorpd  %xmm0,%xmm0
movapd %xmm1,%xmm6
subsd  %xmm3,%xmm6
ucomisd %xmm0,%xmm1
jbe    11ff <auto_scale_f+0xcf>
movapd %xmm1,%xmm0
movsd  %xmm6,0x8(%rsp)
call   1040 <log10@plt>
call   1050 <floor@plt>
add    $0x1,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0xe22(%rip),%xmm0
call   1030 <pow@plt>
movsd  0x8(%rsp),%xmm6
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm3
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%rbx)
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm6
mov    $0x1,%eax
jbe    1231 <auto_scale_f+0x101>
movsd  0xe02(%rip),%xmm0
ucomisd %xmm6,%xmm0
jb     1231 <auto_scale_f+0x101>
movsd  0xde4(%rip),%xmm0
movsd  0xde4(%rip),%xmm4
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xddf(%rip),%xmm6
jbe    1253 <auto_scale_f+0x123>
movsd  0xddd(%rip),%xmm0
ucomisd %xmm6,%xmm0
jb     1253 <auto_scale_f+0x123>
movsd  0xdbf(%rip),%xmm4
jmp    12c4 <auto_scale_f+0x194>
ucomisd 0xdc5(%rip),%xmm6
movsd  0xdc5(%rip),%xmm4
jbe    127a <auto_scale_f+0x14a>
movsd  0xdc3(%rip),%xmm0
ucomisd %xmm6,%xmm0
jb     127a <auto_scale_f+0x14a>
mov    $0x4,%eax
jmp    12c4 <auto_scale_f+0x194>
ucomisd 0xdae(%rip),%xmm6
jbe    129c <auto_scale_f+0x16c>
movsd  0xd74(%rip),%xmm0
ucomisd %xmm6,%xmm0
jb     129c <auto_scale_f+0x16c>
movsd  0xd7e(%rip),%xmm0
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xd5c(%rip),%xmm6
jbe    139b <auto_scale_f+0x26b>
movsd  0xd8e(%rip),%xmm0
ucomisd %xmm6,%xmm0
jb     139b <auto_scale_f+0x26b>
movsd  0xd74(%rip),%xmm4
movapd %xmm4,%xmm0
movsd  %xmm4,(%r12)
mov    %eax,(%r15)
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jbe    12fc <auto_scale_f+0x1cc>
movsd  (%rbx),%xmm2
ucomisd %xmm1,%xmm2
jbe    131e <auto_scale_f+0x1ee>
cs nopw 0x0(%rax,%rax,1)
nop
subsd  %xmm0,%xmm2
ucomisd %xmm1,%xmm2
ja     12f0 <auto_scale_f+0x1c0>
jmp    131a <auto_scale_f+0x1ea>
ucomisd %xmm1,%xmm2
jbe    1328 <auto_scale_f+0x1f8>
xorpd  %xmm2,%xmm2
cs nopw 0x0(%rax,%rax,1)
subsd  %xmm0,%xmm2
ucomisd %xmm1,%xmm2
ja     1310 <auto_scale_f+0x1e0>
movsd  %xmm2,(%rbx)
ucomisd %xmm2,%xmm1
jbe    132c <auto_scale_f+0x1fc>
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm3
jbe    136b <auto_scale_f+0x23b>
movsd  (%r14),%xmm1
ucomisd %xmm1,%xmm3
jbe    135f <auto_scale_f+0x22f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addsd  %xmm0,%xmm1
ucomisd %xmm1,%xmm3
ja     1350 <auto_scale_f+0x220>
movsd  %xmm1,(%r14)
ucomisd %xmm3,%xmm1
jbe    138f <auto_scale_f+0x25f>
subsd  %xmm0,%xmm1
jmp    138a <auto_scale_f+0x25a>
ucomisd %xmm3,%xmm1
jbe    138a <auto_scale_f+0x25a>
xorpd  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
nop
subsd  %xmm0,%xmm1
ucomisd %xmm3,%xmm1
ja     1380 <auto_scale_f+0x250>
movsd  %xmm1,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
ucomisd 0xc9d(%rip),%xmm6
movsd  0xc85(%rip),%xmm0
jbe    13c8 <auto_scale_f+0x298>
movsd  0xc93(%rip),%xmm2
ucomisd %xmm6,%xmm2
jb     13c8 <auto_scale_f+0x298>
movsd  0xc3d(%rip),%xmm4
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xc78(%rip),%xmm6
movsd  0xc68(%rip),%xmm4
jbe    13f2 <auto_scale_f+0x2c2>
movsd  0xc6e(%rip),%xmm2
ucomisd %xmm6,%xmm2
jb     13f2 <auto_scale_f+0x2c2>
mov    $0x3,%eax
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xc56(%rip),%xmm6
movsd  0xbfe(%rip),%xmm0
jbe    141b <auto_scale_f+0x2eb>
movsd  0xc4c(%rip),%xmm2
ucomisd %xmm6,%xmm2
jb     141b <auto_scale_f+0x2eb>
movapd %xmm0,%xmm4
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xc35(%rip),%xmm6
jbe    1437 <auto_scale_f+0x307>
movsd  0xc33(%rip),%xmm2
ucomisd %xmm6,%xmm2
jae    12c8 <auto_scale_f+0x198>
ucomisd 0xc21(%rip),%xmm6
movsd  0xc21(%rip),%xmm4
jbe    1457 <auto_scale_f+0x327>
movsd  0xc1f(%rip),%xmm2
ucomisd %xmm6,%xmm2
jae    13e8 <auto_scale_f+0x2b8>
ucomisd 0xc11(%rip),%xmm6
jbe    1479 <auto_scale_f+0x349>
movsd  0xc0f(%rip),%xmm2
ucomisd %xmm6,%xmm2
jb     1479 <auto_scale_f+0x349>
mov    $0x2,%eax
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xbf7(%rip),%xmm6
movsd  0xbb7(%rip),%xmm0
movsd  0xbb7(%rip),%xmm4
jbe    14a5 <auto_scale_f+0x375>
movsd  0xbe5(%rip),%xmm2
ucomisd %xmm6,%xmm2
jae    12c8 <auto_scale_f+0x198>
ucomisd 0xbd3(%rip),%xmm6
jbe    14c1 <auto_scale_f+0x391>
movsd  0xbd1(%rip),%xmm2
ucomisd %xmm6,%xmm2
jae    12c8 <auto_scale_f+0x198>
ucomisd 0xbbf(%rip),%xmm6
jbe    14e6 <auto_scale_f+0x3b6>
movsd  0xbc5(%rip),%xmm2
ucomisd %xmm6,%xmm2
jb     14e6 <auto_scale_f+0x3b6>
movsd  0xbaf(%rip),%xmm4
jmp    12c8 <auto_scale_f+0x198>
movapd %xmm1,%xmm5
ucomisd 0xba6(%rip),%xmm6
movsd  0xb4e(%rip),%xmm0
jbe    151b <auto_scale_f+0x3eb>
movsd  0xb9c(%rip),%xmm1
ucomisd %xmm6,%xmm1
jb     151b <auto_scale_f+0x3eb>
movsd  0xb3e(%rip),%xmm4
movapd %xmm5,%xmm1
jmp    12c8 <auto_scale_f+0x198>
movapd %xmm6,%xmm7
ucomisd 0xb79(%rip),%xmm6
jbe    1548 <auto_scale_f+0x418>
movsd  0xb77(%rip),%xmm1
ucomisd %xmm7,%xmm1
jb     1548 <auto_scale_f+0x418>
movsd  0xb21(%rip),%xmm4
movapd %xmm5,%xmm1
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xb58(%rip),%xmm7
movsd  0xb20(%rip),%xmm4
jbe    1576 <auto_scale_f+0x446>
movsd  0xb4e(%rip),%xmm2
ucomisd %xmm7,%xmm2
jb     1576 <auto_scale_f+0x446>
mov    $0x2,%eax
movapd %xmm5,%xmm1
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xb32(%rip),%xmm7
jbe    1592 <auto_scale_f+0x462>
movsd  0xb30(%rip),%xmm2
ucomisd %xmm7,%xmm2
jae    1652 <auto_scale_f+0x522>
ucomisd 0xb1e(%rip),%xmm7
movsd  0xade(%rip),%xmm4
jbe    15b6 <auto_scale_f+0x486>
movsd  0xb14(%rip),%xmm2
ucomisd %xmm7,%xmm2
jae    1652 <auto_scale_f+0x522>
ucomisd 0xb02(%rip),%xmm7
jbe    15d2 <auto_scale_f+0x4a2>
movsd  0xb00(%rip),%xmm2
ucomisd %xmm7,%xmm2
jae    1652 <auto_scale_f+0x522>
ucomisd 0xaee(%rip),%xmm7
movsd  0xaa6(%rip),%xmm4
jbe    15f2 <auto_scale_f+0x4c2>
movsd  0xae4(%rip),%xmm2
ucomisd %xmm7,%xmm2
jae    1652 <auto_scale_f+0x522>
ucomisd 0xad6(%rip),%xmm7
jbe    160a <auto_scale_f+0x4da>
movsd  0xad4(%rip),%xmm2
ucomisd %xmm7,%xmm2
jae    1652 <auto_scale_f+0x522>
ucomisd 0xac6(%rip),%xmm7
jbe    1622 <auto_scale_f+0x4f2>
movsd  0xac4(%rip),%xmm2
ucomisd %xmm7,%xmm2
jae    1652 <auto_scale_f+0x522>
ucomisd 0xab6(%rip),%xmm7
jbe    163a <auto_scale_f+0x50a>
movsd  0xab4(%rip),%xmm2
ucomisd %xmm7,%xmm2
jae    1652 <auto_scale_f+0x522>
ucomisd 0xaa6(%rip),%xmm7
jbe    165b <auto_scale_f+0x52b>
movsd  0xaa4(%rip),%xmm2
ucomisd %xmm7,%xmm2
jb     165b <auto_scale_f+0x52b>
movapd %xmm5,%xmm1
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xa8d(%rip),%xmm7
jbe    167d <auto_scale_f+0x54d>
movsd  0xa8b(%rip),%xmm1
ucomisd %xmm7,%xmm1
jb     167d <auto_scale_f+0x54d>
movsd  0xa2d(%rip),%xmm4
jmp    16a1 <auto_scale_f+0x571>
ucomisd 0xa73(%rip),%xmm7
movsd  0xa1b(%rip),%xmm0
jbe    16af <auto_scale_f+0x57f>
movsd  0xa69(%rip),%xmm1
ucomisd %xmm7,%xmm1
jb     16af <auto_scale_f+0x57f>
movapd %xmm0,%xmm4
mov    $0x4,%eax
movapd %xmm5,%xmm1
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xa49(%rip),%xmm7
jbe    16dc <auto_scale_f+0x5ac>
movsd  0xa47(%rip),%xmm1
ucomisd %xmm7,%xmm1
jb     16dc <auto_scale_f+0x5ac>
movapd %xmm0,%xmm4
movsd  0x9b5(%rip),%xmm0
movapd %xmm5,%xmm1
jmp    12c8 <auto_scale_f+0x198>
ucomisd 0xa24(%rip),%xmm7
jbe    16fe <auto_scale_f+0x5ce>
movsd  0xa22(%rip),%xmm1
ucomisd %xmm7,%xmm1
jb     16fe <auto_scale_f+0x5ce>
movsd  0x9bc(%rip),%xmm4
jmp    16a1 <auto_scale_f+0x571>
ucomisd 0xa0a(%rip),%xmm7
jbe    172b <auto_scale_f+0x5fb>
movsd  0xa08(%rip),%xmm0
ucomisd %xmm7,%xmm0
jb     172b <auto_scale_f+0x5fb>
movsd  0x99a(%rip),%xmm0
movsd  0x9aa(%rip),%xmm4
jmp    16a1 <auto_scale_f+0x571>
ucomisd 0x9e5(%rip),%xmm7
movapd %xmm5,%xmm1
jbe    12d1 <auto_scale_f+0x1a1>
movsd  0x993(%rip),%xmm4
jmp    12c4 <auto_scale_f+0x194>

LLVM IR (-O0):
define void @auto_scale_f(double* %0, double* %1, double* %2, i32* %3, double %4, double %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32*
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store i32* %3, i32** %10
store double %4, double* %11
store double %5, double* %12
store double 1.000000e+00, double* %18
store double 1.000000e+00, double* %19
store double -9.900000e+01, double* %14
store double -9.900000e+01, double* %15
store double -9.900000e+01, double* %16
store double -9.900000e+01, double* %17
%21 = load double, double* %11
%22 = fcmp olt double %21, 0.000000e+00
br i1 %22, label %23, label %24
23: ; preds = %6
store double -1.000000e+00, double* %18
br label %24
24: ; preds = %23, %6
%25 = load double, double* %12
%26 = fcmp olt double %25, 0.000000e+00
br i1 %26, label %27, label %28
27: ; preds = %24
store double -1.000000e+00, double* %19
br label %28
28: ; preds = %27, %24
%29 = load double, double* %12
%30 = load double, double* %11
%31 = fsub double %29, %30
store double %31, double* %13
%32 = load double, double* %11
%33 = fcmp ogt double %32, 0.000000e+00
br i1 %33, label %34, label %45
34: ; preds = %28
%35 = load double, double* %11
%36 = call double @log10(double %35)
store double %36, double* %14
%37 = load double, double* %14
%38 = call i32 @floor(double %37)
%39 = sitofp i32 %38 to double
store double %39, double* %16
%40 = load double, double* %16
%41 = load double, double* %16
%42 = call double @pow(double 1.000000e+01, double %41)
%43 = fmul double %40, %42
%44 = load double*, double** %7
store double %43, double* %44
br label %45
45: ; preds = %34, %28
%46 = load double, double* %12
%47 = fcmp ogt double %46, 0.000000e+00
br i1 %47, label %48, label %60
48: ; preds = %45
%49 = load double, double* %12
%50 = call double @log10(double %49)
store double %50, double* %15
%51 = load double, double* %15
%52 = call i32 @floor(double %51)
%53 = add nsw i32 %52, 1
%54 = sitofp i32 %53 to double
store double %54, double* %17
%55 = load double, double* %17
%56 = load double, double* %17
%57 = call double @pow(double 1.000000e+01, double %56)
%58 = fmul double %55, %57
%59 = load double*, double** %8
store double %58, double* %59
br label %60
60: ; preds = %48, %45
%61 = load double, double* %13
%62 = fcmp ogt double %61, 0.000000e+00
br i1 %62, label %63, label %69
63: ; preds = %60
%64 = load double, double* %13
%65 = fcmp ole double %64, 1.000000e+00
br i1 %65, label %66, label %69
66: ; preds = %63
store double 1.000000e-01, double* %20
%67 = load double*, double** %9
store double 2.000000e-01, double* %67
%68 = load i32*, i32** %10
store i32 1, i32* %68
br label %366
69: ; preds = %63, %60
%70 = load double, double* %13
%71 = fcmp ogt double %70, 1.000000e+00
br i1 %71, label %72, label %78
72: ; preds = %69
%73 = load double, double* %13
%74 = fcmp ole double %73, 3.000000e+00
br i1 %74, label %75, label %78
75: ; preds = %72
store double 2.000000e-01, double* %20
%76 = load double*, double** %9
store double 2.000000e-01, double* %76
%77 = load i32*, i32** %10
store i32 1, i32* %77
br label %365
78: ; preds = %72, %69
%79 = load double, double* %13
%80 = fcmp ogt double %79, 3.000000e+00
br i1 %80, label %81, label %87
81: ; preds = %78
%82 = load double, double* %13
%83 = fcmp ole double %82, 5.000000e+00
br i1 %83, label %84, label %87
84: ; preds = %81
store double 5.000000e-01, double* %20
%85 = load double*, double** %9
store double 5.000000e-01, double* %85
%86 = load i32*, i32** %10
store i32 4, i32* %86
br label %364
87: ; preds = %81, %78
%88 = load double, double* %13
%89 = fcmp ogt double %88, 5.000000e+00
br i1 %89, label %90, label %96
90: ; preds = %87
%91 = load double, double* %13
%92 = fcmp ole double %91, 1.000000e+01
br i1 %92, label %93, label %96
93: ; preds = %90
store double 1.000000e+00, double* %20
%94 = load double*, double** %9
store double 5.000000e-01, double* %94
%95 = load i32*, i32** %10
store i32 1, i32* %95
br label %363
96: ; preds = %90, %87
%97 = load double, double* %13
%98 = fcmp ogt double %97, 1.000000e+01
br i1 %98, label %99, label %105
99: ; preds = %96
%100 = load double, double* %13
%101 = fcmp ole double %100, 2.000000e+01
br i1 %101, label %102, label %105
102: ; preds = %99
store double 2.000000e+00, double* %20
%103 = load double*, double** %9
store double 2.000000e+00, double* %103
%104 = load i32*, i32** %10
store i32 1, i32* %104
br label %362
105: ; preds = %99, %96
%106 = load double, double* %13
%107 = fcmp ogt double %106, 2.000000e+01
br i1 %107, label %108, label %114
108: ; preds = %105
%109 = load double, double* %13
%110 = fcmp ole double %109, 5.000000e+01
br i1 %110, label %111, label %114
111: ; preds = %108
store double 5.000000e+00, double* %20
%112 = load double*, double** %9
store double 1.000000e+01, double* %112
%113 = load i32*, i32** %10
store i32 1, i32* %113
br label %361
114: ; preds = %108, %105
%115 = load double, double* %13
%116 = fcmp ogt double %115, 5.000000e+01
br i1 %116, label %117, label %123
117: ; preds = %114
%118 = load double, double* %13
%119 = fcmp ole double %118, 1.000000e+02
br i1 %119, label %120, label %123
120: ; preds = %117
store double 5.000000e+00, double* %20
%121 = load double*, double** %9
store double 2.000000e+01, double* %121
%122 = load i32*, i32** %10
store i32 3, i32* %122
br label %360
123: ; preds = %117, %114
%124 = load double, double* %13
%125 = fcmp ogt double %124, 1.000000e+02
br i1 %125, label %126, label %132
126: ; preds = %123
%127 = load double, double* %13
%128 = fcmp ole double %127, 1.500000e+02
br i1 %128, label %129, label %132
129: ; preds = %126
store double 1.000000e+01, double* %20
%130 = load double*, double** %9
store double 1.000000e+01, double* %130
%131 = load i32*, i32** %10
store i32 1, i32* %131
br label %359
132: ; preds = %126, %123
%133 = load double, double* %13
%134 = fcmp ogt double %133, 1.500000e+02
br i1 %134, label %135, label %141
135: ; preds = %132
%136 = load double, double* %13
%137 = fcmp ole double %136, 2.000000e+02
br i1 %137, label %138, label %141
138: ; preds = %135
store double 1.000000e+01, double* %20
%139 = load double*, double** %9
store double 2.000000e+01, double* %139
%140 = load i32*, i32** %10
store i32 1, i32* %140
br label %358
141: ; preds = %135, %132
%142 = load double, double* %13
%143 = fcmp ogt double %142, 2.000000e+02
br i1 %143, label %144, label %150
144: ; preds = %141
%145 = load double, double* %13
%146 = fcmp ole double %145, 2.500000e+02
br i1 %146, label %147, label %150
147: ; preds = %144
store double 1.000000e+01, double* %20
%148 = load double*, double** %9
store double 4.000000e+01, double* %148
%149 = load i32*, i32** %10
store i32 3, i32* %149
br label %357
150: ; preds = %144, %141
%151 = load double, double* %13
%152 = fcmp ogt double %151, 2.500000e+02
br i1 %152, label %153, label %159
153: ; preds = %150
%154 = load double, double* %13
%155 = fcmp ole double %154, 3.000000e+02
br i1 %155, label %156, label %159
156: ; preds = %153
store double 1.000000e+01, double* %20
%157 = load double*, double** %9
store double 4.000000e+01, double* %157
%158 = load i32*, i32** %10
store i32 2, i32* %158
br label %356
159: ; preds = %153, %150
%160 = load double, double* %13
%161 = fcmp ogt double %160, 3.000000e+02
br i1 %161, label %162, label %168
162: ; preds = %159
%163 = load double, double* %13
%164 = fcmp ole double %163, 4.000000e+02
br i1 %164, label %165, label %168
165: ; preds = %162
store double 2.000000e+01, double* %20
%166 = load double*, double** %9
store double 5.000000e+01, double* %166
%167 = load i32*, i32** %10
store i32 1, i32* %167
br label %355
168: ; preds = %162, %159
%169 = load double, double* %13
%170 = fcmp ogt double %169, 4.000000e+02
br i1 %170, label %171, label %177
171: ; preds = %168
%172 = load double, double* %13
%173 = fcmp ole double %172, 5.000000e+02
br i1 %173, label %174, label %177
174: ; preds = %171
store double 2.000000e+01, double* %20
%175 = load double*, double** %9
store double 5.000000e+01, double* %175
%176 = load i32*, i32** %10
store i32 1, i32* %176
br label %354
177: ; preds = %171, %168
%178 = load double, double* %13
%179 = fcmp ogt double %178, 5.000000e+02
br i1 %179, label %180, label %186
180: ; preds = %177
%181 = load double, double* %13
%182 = fcmp ole double %181, 6.000000e+02
br i1 %182, label %183, label %186
183: ; preds = %180
store double 2.000000e+01, double* %20
%184 = load double*, double** %9
store double 6.000000e+01, double* %184
%185 = load i32*, i32** %10
store i32 1, i32* %185
br label %353
186: ; preds = %180, %177
%187 = load double, double* %13
%188 = fcmp ogt double %187, 6.000000e+02
br i1 %188, label %189, label %195
189: ; preds = %186
%190 = load double, double* %13
%191 = fcmp ole double %190, 8.000000e+02
br i1 %191, label %192, label %195
192: ; preds = %189
store double 5.000000e+01, double* %20
%193 = load double*, double** %9
store double 1.000000e+02, double* %193
%194 = load i32*, i32** %10
store i32 1, i32* %194
br label %352
195: ; preds = %189, %186
%196 = load double, double* %13
%197 = fcmp ogt double %196, 8.000000e+02
br i1 %197, label %198, label %204
198: ; preds = %195
%199 = load double, double* %13
%200 = fcmp ole double %199, 1.000000e+03
br i1 %200, label %201, label %204
201: ; preds = %198
store double 5.000000e+01, double* %20
%202 = load double*, double** %9
store double 2.000000e+02, double* %202
%203 = load i32*, i32** %10
store i32 1, i32* %203
br label %351
204: ; preds = %198, %195
%205 = load double, double* %13
%206 = fcmp ogt double %205, 1.000000e+03
br i1 %206, label %207, label %213
207: ; preds = %204
%208 = load double, double* %13
%209 = fcmp ole double %208, 1.500000e+03
br i1 %209, label %210, label %213
210: ; preds = %207
store double 5.000000e+01, double* %20
%211 = load double*, double** %9
store double 3.000000e+02, double* %211
%212 = load i32*, i32** %10
store i32 2, i32* %212
br label %350
213: ; preds = %207, %204
%214 = load double, double* %13
%215 = fcmp ogt double %214, 1.500000e+03
br i1 %215, label %216, label %222
216: ; preds = %213
%217 = load double, double* %13
%218 = fcmp ole double %217, 2.000000e+03
br i1 %218, label %219, label %222
219: ; preds = %216
store double 5.000000e+01, double* %20
%220 = load double*, double** %9
store double 3.000000e+02, double* %220
%221 = load i32*, i32** %10
store i32 1, i32* %221
br label %349
222: ; preds = %216, %213
%223 = load double, double* %13
%224 = fcmp ogt double %223, 2.000000e+03
br i1 %224, label %225, label %231
225: ; preds = %222
%226 = load double, double* %13
%227 = fcmp ole double %226, 2.500000e+03
br i1 %227, label %228, label %231
228: ; preds = %225
store double 5.000000e+01, double* %20
%229 = load double*, double** %9
store double 4.000000e+02, double* %229
%230 = load i32*, i32** %10
store i32 1, i32* %230
br label %348
231: ; preds = %225, %222
%232 = load double, double* %13
%233 = fcmp ogt double %232, 2.500000e+03
br i1 %233, label %234, label %240
234: ; preds = %231
%235 = load double, double* %13
%236 = fcmp ole double %235, 3.000000e+03
br i1 %236, label %237, label %240
237: ; preds = %234
store double 5.000000e+01, double* %20
%238 = load double*, double** %9
store double 4.000000e+02, double* %238
%239 = load i32*, i32** %10
store i32 1, i32* %239
br label %347
240: ; preds = %234, %231
%241 = load double, double* %13
%242 = fcmp ogt double %241, 3.000000e+03
br i1 %242, label %243, label %249
243: ; preds = %240
%244 = load double, double* %13
%245 = fcmp ole double %244, 4.000000e+03
br i1 %245, label %246, label %249
246: ; preds = %243
store double 5.000000e+01, double* %20
%247 = load double*, double** %9
store double 5.000000e+02, double* %247
%248 = load i32*, i32** %10
store i32 1, i32* %248
br label %346
249: ; preds = %243, %240
%250 = load double, double* %13
%251 = fcmp ogt double %250, 4.000000e+03
br i1 %251, label %252, label %258
252: ; preds = %249
%253 = load double, double* %13
%254 = fcmp ole double %253, 5.000000e+03
br i1 %254, label %255, label %258
255: ; preds = %252
store double 5.000000e+01, double* %20
%256 = load double*, double** %9
store double 5.000000e+02, double* %256
%257 = load i32*, i32** %10
store i32 1, i32* %257
br label %345
258: ; preds = %252, %249
%259 = load double, double* %13
%260 = fcmp ogt double %259, 5.000000e+03
br i1 %260, label %261, label %267
261: ; preds = %258
%262 = load double, double* %13
%263 = fcmp ole double %262, 6.000000e+03
br i1 %263, label %264, label %267
264: ; preds = %261
store double 5.000000e+01, double* %20
%265 = load double*, double** %9
store double 5.000000e+02, double* %265
%266 = load i32*, i32** %10
store i32 1, i32* %266
br label %344
267: ; preds = %261, %258
%268 = load double, double* %13
%269 = fcmp ogt double %268, 6.000000e+03
br i1 %269, label %270, label %276
270: ; preds = %267
%271 = load double, double* %13
%272 = fcmp ole double %271, 7.000000e+03
br i1 %272, label %273, label %276
273: ; preds = %270
store double 5.000000e+01, double* %20
%274 = load double*, double** %9
store double 5.000000e+02, double* %274
%275 = load i32*, i32** %10
store i32 1, i32* %275
br label %343
276: ; preds = %270, %267
%277 = load double, double* %13
%278 = fcmp ogt double %277, 7.000000e+03
br i1 %278, label %279, label %285
279: ; preds = %276
%280 = load double, double* %13
%281 = fcmp ole double %280, 8.000000e+03
br i1 %281, label %282, label %285
282: ; preds = %279
store double 5.000000e+01, double* %20
%283 = load double*, double** %9
store double 5.000000e+02, double* %283
%284 = load i32*, i32** %10
store i32 1, i32* %284
br label %342
285: ; preds = %279, %276
%286 = load double, double* %13
%287 = fcmp ogt double %286, 8.000000e+03
br i1 %287, label %288, label %294
288: ; preds = %285
%289 = load double, double* %13
%290 = fcmp ole double %289, 1.000000e+04
br i1 %290, label %291, label %294
291: ; preds = %288
store double 5.000000e+01, double* %20
%292 = load double*, double** %9
store double 1.000000e+03, double* %292
%293 = load i32*, i32** %10
store i32 4, i32* %293
br label %341
294: ; preds = %288, %285
%295 = load double, double* %13
%296 = fcmp ogt double %295, 1.000000e+04
br i1 %296, label %297, label %303
297: ; preds = %294
%298 = load double, double* %13
%299 = fcmp ole double %298, 1.500000e+04
br i1 %299, label %300, label %303
300: ; preds = %297
store double 1.000000e+03, double* %20
%301 = load double*, double** %9
store double 1.000000e+03, double* %301
%302 = load i32*, i32** %10
store i32 4, i32* %302
br label %340
303: ; preds = %297, %294
%304 = load double, double* %13
%305 = fcmp ogt double %304, 1.500000e+04
br i1 %305, label %306, label %312
306: ; preds = %303
%307 = load double, double* %13
%308 = fcmp ole double %307, 2.000000e+04
br i1 %308, label %309, label %312
309: ; preds = %306
store double 5.000000e+02, double* %20
%310 = load double*, double** %9
store double 1.000000e+03, double* %310
%311 = load i32*, i32** %10
store i32 1, i32* %311
br label %339
312: ; preds = %306, %303
%313 = load double, double* %13
%314 = fcmp ogt double %313, 2.000000e+04
br i1 %314, label %315, label %321
315: ; preds = %312
%316 = load double, double* %13
%317 = fcmp ole double %316, 4.000000e+04
br i1 %317, label %318, label %321
318: ; preds = %315
store double 1.000000e+03, double* %20
%319 = load double*, double** %9
store double 2.000000e+03, double* %319
%320 = load i32*, i32** %10
store i32 4, i32* %320
br label %338
321: ; preds = %315, %312
%322 = load double, double* %13
%323 = fcmp ogt double %322, 4.000000e+04
br i1 %323, label %324, label %330
324: ; preds = %321
%325 = load double, double* %13
%326 = fcmp ole double %325, 1.000000e+05
br i1 %326, label %327, label %330
327: ; preds = %324
store double 2.000000e+03, double* %20
%328 = load double*, double** %9
store double 4.000000e+03, double* %328
%329 = load i32*, i32** %10
store i32 4, i32* %329
br label %337
330: ; preds = %324, %321
%331 = load double, double* %13
%332 = fcmp ogt double %331, 1.000000e+05
br i1 %332, label %333, label %336
333: ; preds = %330
store double 5.000000e+03, double* %20
%334 = load double*, double** %9
store double 5.000000e+03, double* %334
%335 = load i32*, i32** %10
store i32 1, i32* %335
br label %336
336: ; preds = %333, %330
br label %337
337: ; preds = %336, %327
br label %338
338: ; preds = %337, %318
br label %339
339: ; preds = %338, %309
br label %340
340: ; preds = %339, %300
br label %341
341: ; preds = %340, %291
br label %342
342: ; preds = %341, %282
br label %343
343: ; preds = %342, %273
br label %344
344: ; preds = %343, %264
br label %345
345: ; preds = %344, %255
br label %346
346: ; preds = %345, %246
br label %347
347: ; preds = %346, %237
br label %348
348: ; preds = %347, %228
br label %349
349: ; preds = %348, %219
br label %350
350: ; preds = %349, %210
br label %351
351: ; preds = %350, %201
br label %352
352: ; preds = %351, %192
br label %353
353: ; preds = %352, %183
br label %354
354: ; preds = %353, %174
br label %355
355: ; preds = %354, %165
br label %356
356: ; preds = %355, %156
br label %357
357: ; preds = %356, %147
br label %358
358: ; preds = %357, %138
br label %359
359: ; preds = %358, %129
br label %360
360: ; preds = %359, %120
br label %361
361: ; preds = %360, %111
br label %362
362: ; preds = %361, %102
br label %363
363: ; preds = %362, %93
br label %364
364: ; preds = %363, %84
br label %365
365: ; preds = %364, %75
br label %366
366: ; preds = %365, %66
%367 = load double, double* %12
%368 = fcmp ogt double %367, 0.000000e+00
br i1 %368, label %369, label %391
369: ; preds = %366
br label %370
370: ; preds = %375, %369
%371 = load double*, double** %8
%372 = load double, double* %371
%373 = load double, double* %12
%374 = fcmp ogt double %372, %373
br i1 %374, label %375, label %380
375: ; preds = %370
%376 = load double, double* %20
%377 = load double*, double** %8
%378 = load double, double* %377
%379 = fsub double %378, %376
store double %379, double* %377
br label %370
380: ; preds = %370
%381 = load double*, double** %8
%382 = load double, double* %381
%383 = load double, double* %12
%384 = fcmp olt double %382, %383
br i1 %384, label %385, label %390
385: ; preds = %380
%386 = load double, double* %20
%387 = load double*, double** %8
%388 = load double, double* %387
%389 = fadd double %388, %386
store double %389, double* %387
br label %390
390: ; preds = %385, %380
br label %420
391: ; preds = %366
%392 = load double, double* %12
%393 = fcmp olt double %392, 0.000000e+00
br i1 %393, label %394, label %417
394: ; preds = %391
%395 = load double*, double** %8
store double 0.000000e+00, double* %395
br label %396
396: ; preds = %401, %394
%397 = load double*, double** %8
%398 = load double, double* %397
%399 = load double, double* %12
%400 = fcmp ogt double %398, %399
br i1 %400, label %401, label %406
401: ; preds = %396
%402 = load double, double* %20
%403 = load double*, double** %8
%404 = load double, double* %403
%405 = fsub double %404, %402
store double %405, double* %403
br label %396
406: ; preds = %396
%407 = load double*, double** %8
%408 = load double, double* %407
%409 = load double, double* %12
%410 = fcmp olt double %408, %409
br i1 %410, label %411, label %416
411: ; preds = %406
%412 = load double, double* %20
%413 = load double*, double** %8
%414 = load double, double* %413
%415 = fadd double %414, %412
store double %415, double* %413
br label %416
416: ; preds = %411, %406
br label %419
417: ; preds = %391
%418 = load double*, double** %8
store double 0.000000e+00, double* %418
br label %419
419: ; preds = %417, %416
br label %420
420: ; preds = %419, %390
%421 = load double, double* %11
%422 = fcmp ogt double %421, 0.000000e+00
br i1 %422, label %423, label %445
423: ; preds = %420
br label %424
424: ; preds = %429, %423
%425 = load double*, double** %7
%426 = load double, double* %425
%427 = load double, double* %11
%428 = fcmp olt double %426, %427
br i1 %428, label %429, label %434
429: ; preds = %424
%430 = load double, double* %20
%431 = load double*, double** %7
%432 = load double, double* %431
%433 = fadd double %432, %430
store double %433, double* %431
br label %424
434: ; preds = %424
%435 = load double*, double** %7
%436 = load double, double* %435
%437 = load double, double* %11
%438 = fcmp ogt double %436, %437
br i1 %438, label %439, label %444
439: ; preds = %434
%440 = load double, double* %20
%441 = load double*, double** %7
%442 = load double, double* %441
%443 = fsub double %442, %440
store double %443, double* %441
br label %444
444: ; preds = %439, %434
br label %464
445: ; preds = %420
%446 = load double, double* %11
%447 = fcmp olt double %446, 0.000000e+00
br i1 %447, label %448, label %461
448: ; preds = %445
%449 = load double*, double** %7
store double 0.000000e+00, double* %449
br label %450
450: ; preds = %455, %448
%451 = load double*, double** %7
%452 = load double, double* %451
%453 = load double, double* %11
%454 = fcmp ogt double %452, %453
br i1 %454, label %455, label %460
455: ; preds = %450
%456 = load double, double* %20
%457 = load double*, double** %7
%458 = load double, double* %457
%459 = fsub double %458, %456
store double %459, double* %457
br label %450
460: ; preds = %450
br label %463
461: ; preds = %445
%462 = load double*, double** %7
store double 0.000000e+00, double* %462
br label %463
463: ; preds = %461, %460
br label %464
464: ; preds = %463, %444
ret void
}

LLVM IR (-O2):
define void @auto_scale_f(double* nocapture %0, double* nocapture %1, double* writeonly %2, i32* writeonly %3, double %4, double %5) {
%7 = fcmp olt double %4, 0.000000e+00
%8 = fcmp olt double %5, 0.000000e+00
%9 = fsub double %5, %4
%10 = fcmp ogt double %4, 0.000000e+00
br i1 %10, label %11, label %17
11: ; preds = %6
%12 = tail call double @log10(double %4)
%13 = tail call i32 @floor(double %12)
%14 = sitofp i32 %13 to double
%15 = tail call double @pow(double 1.000000e+01, double %14)
%16 = fmul double %15, %14
store double %16, double* %0
br label %17
17: ; preds = %11, %6
%18 = fcmp ogt double %5, 0.000000e+00
br i1 %18, label %19, label %26
19: ; preds = %17
%20 = tail call double @log10(double %5)
%21 = tail call i32 @floor(double %20)
%22 = add nsw i32 %21, 1
%23 = sitofp i32 %22 to double
%24 = tail call double @pow(double 1.000000e+01, double %23)
%25 = fmul double %24, %23
store double %25, double* %1
br label %26
26: ; preds = %19, %17
%27 = fcmp ogt double %9, 0.000000e+00
%28 = fcmp ole double %9, 1.000000e+00
%29 = and i1 %27, %28
br i1 %29, label %148, label %30
30: ; preds = %26
%31 = fcmp ogt double %9, 1.000000e+00
%32 = fcmp ole double %9, 3.000000e+00
%33 = and i1 %31, %32
br i1 %33, label %148, label %34
34: ; preds = %30
%35 = fcmp ogt double %9, 3.000000e+00
%36 = fcmp ole double %9, 5.000000e+00
%37 = and i1 %35, %36
br i1 %37, label %148, label %38
38: ; preds = %34
%39 = fcmp ogt double %9, 5.000000e+00
%40 = fcmp ole double %9, 1.000000e+01
%41 = and i1 %39, %40
br i1 %41, label %148, label %42
42: ; preds = %38
%43 = fcmp ogt double %9, 1.000000e+01
%44 = fcmp ole double %9, 2.000000e+01
%45 = and i1 %43, %44
br i1 %45, label %148, label %46
46: ; preds = %42
%47 = fcmp ogt double %9, 2.000000e+01
%48 = fcmp ole double %9, 5.000000e+01
%49 = and i1 %47, %48
br i1 %49, label %148, label %50
50: ; preds = %46
%51 = fcmp ogt double %9, 5.000000e+01
%52 = fcmp ole double %9, 1.000000e+02
%53 = and i1 %51, %52
br i1 %53, label %148, label %54
54: ; preds = %50
%55 = fcmp ogt double %9, 1.000000e+02
%56 = fcmp ole double %9, 1.500000e+02
%57 = and i1 %55, %56
br i1 %57, label %148, label %58
58: ; preds = %54
%59 = fcmp ogt double %9, 1.500000e+02
%60 = fcmp ole double %9, 2.000000e+02
%61 = and i1 %59, %60
br i1 %61, label %148, label %62
62: ; preds = %58
%63 = fcmp ogt double %9, 2.000000e+02
%64 = fcmp ole double %9, 2.500000e+02
%65 = and i1 %63, %64
br i1 %65, label %148, label %66
66: ; preds = %62
%67 = fcmp ogt double %9, 2.500000e+02
%68 = fcmp ole double %9, 3.000000e+02
%69 = and i1 %67, %68
br i1 %69, label %148, label %70
70: ; preds = %66
%71 = fcmp ogt double %9, 3.000000e+02
%72 = fcmp ole double %9, 4.000000e+02
%73 = and i1 %71, %72
br i1 %73, label %148, label %74
74: ; preds = %70
%75 = fcmp ogt double %9, 4.000000e+02
%76 = fcmp ole double %9, 5.000000e+02
%77 = and i1 %75, %76
br i1 %77, label %148, label %78
78: ; preds = %74
%79 = fcmp ogt double %9, 5.000000e+02
%80 = fcmp ole double %9, 6.000000e+02
%81 = and i1 %79, %80
br i1 %81, label %148, label %82
82: ; preds = %78
%83 = fcmp ogt double %9, 6.000000e+02
%84 = fcmp ole double %9, 8.000000e+02
%85 = and i1 %83, %84
br i1 %85, label %148, label %86
86: ; preds = %82
%87 = fcmp ogt double %9, 8.000000e+02
%88 = fcmp ole double %9, 1.000000e+03
%89 = and i1 %87, %88
br i1 %89, label %148, label %90
90: ; preds = %86
%91 = fcmp ogt double %9, 1.000000e+03
%92 = fcmp ole double %9, 1.500000e+03
%93 = and i1 %91, %92
br i1 %93, label %148, label %94
94: ; preds = %90
%95 = fcmp ogt double %9, 1.500000e+03
%96 = fcmp ole double %9, 2.000000e+03
%97 = and i1 %95, %96
br i1 %97, label %148, label %98
98: ; preds = %94
%99 = fcmp ogt double %9, 2.000000e+03
%100 = fcmp ole double %9, 2.500000e+03
%101 = and i1 %99, %100
br i1 %101, label %148, label %102
102: ; preds = %98
%103 = fcmp ogt double %9, 2.500000e+03
%104 = fcmp ole double %9, 3.000000e+03
%105 = and i1 %103, %104
br i1 %105, label %148, label %106
106: ; preds = %102
%107 = fcmp ogt double %9, 3.000000e+03
%108 = fcmp ole double %9, 4.000000e+03
%109 = and i1 %107, %108
br i1 %109, label %148, label %110
110: ; preds = %106
%111 = fcmp ogt double %9, 4.000000e+03
%112 = fcmp ole double %9, 5.000000e+03
%113 = and i1 %111, %112
br i1 %113, label %148, label %114
114: ; preds = %110
%115 = fcmp ogt double %9, 5.000000e+03
%116 = fcmp ole double %9, 6.000000e+03
%117 = and i1 %115, %116
br i1 %117, label %148, label %118
118: ; preds = %114
%119 = fcmp ogt double %9, 6.000000e+03
%120 = fcmp ole double %9, 7.000000e+03
%121 = and i1 %119, %120
br i1 %121, label %148, label %122
122: ; preds = %118
%123 = fcmp ogt double %9, 7.000000e+03
%124 = fcmp ole double %9, 8.000000e+03
%125 = and i1 %123, %124
br i1 %125, label %148, label %126
126: ; preds = %122
%127 = fcmp ogt double %9, 8.000000e+03
%128 = fcmp ole double %9, 1.000000e+04
%129 = and i1 %127, %128
br i1 %129, label %148, label %130
130: ; preds = %126
%131 = fcmp ogt double %9, 1.000000e+04
%132 = fcmp ole double %9, 1.500000e+04
%133 = and i1 %131, %132
br i1 %133, label %148, label %134
134: ; preds = %130
%135 = fcmp ogt double %9, 1.500000e+04
%136 = fcmp ole double %9, 2.000000e+04
%137 = and i1 %135, %136
br i1 %137, label %148, label %138
138: ; preds = %134
%139 = fcmp ogt double %9, 2.000000e+04
%140 = fcmp ole double %9, 4.000000e+04
%141 = and i1 %139, %140
br i1 %141, label %148, label %142
142: ; preds = %138
%143 = fcmp ogt double %9, 4.000000e+04
%144 = fcmp ole double %9, 1.000000e+05
%145 = and i1 %143, %144
br i1 %145, label %148, label %146
146: ; preds = %142
%147 = fcmp ogt double %9, 1.000000e+05
br i1 %147, label %148, label %152
148: ; preds = %146, %142, %138, %134, %130, %126, %122, %118, %114, %110, %106, %102, %98, %94, %90, %86, %82, %78, %74, %70, %66, %62, %58, %54, %50, %46, %42, %38, %34, %30, %26
%149 = phi double [ 2.000000e-01, %26 ], [ 2.000000e-01, %30 ], [ 5.000000e-01, %34 ], [ 5.000000e-01, %38 ], [ 2.000000e+00, %42 ], [ 1.000000e+01, %46 ], [ 2.000000e+01, %50 ], [ 1.000000e+01, %54 ], [ 2.000000e+01, %58 ], [ 4.000000e+01, %62 ], [ 4.000000e+01, %66 ], [ 5.000000e+01, %70 ], [ 5.000000e+01, %74 ], [ 6.000000e+01, %78 ], [ 1.000000e+02, %82 ], [ 2.000000e+02, %86 ], [ 3.000000e+02, %90 ], [ 3.000000e+02, %94 ], [ 4.000000e+02, %98 ], [ 4.000000e+02, %102 ], [ 5.000000e+02, %106 ], [ 5.000000e+02, %110 ], [ 5.000000e+02, %114 ], [ 5.000000e+02, %118 ], [ 5.000000e+02, %122 ], [ 1.000000e+03, %126 ], [ 1.000000e+03, %130 ], [ 1.000000e+03, %134 ], [ 2.000000e+03, %138 ], [ 4.000000e+03, %142 ], [ 5.000000e+03, %146 ]
%150 = phi i32 [ 1, %26 ], [ 1, %30 ], [ 4, %34 ], [ 1, %38 ], [ 1, %42 ], [ 1, %46 ], [ 3, %50 ], [ 1, %54 ], [ 1, %58 ], [ 3, %62 ], [ 2, %66 ], [ 1, %70 ], [ 1, %74 ], [ 1, %78 ], [ 1, %82 ], [ 1, %86 ], [ 2, %90 ], [ 1, %94 ], [ 1, %98 ], [ 1, %102 ], [ 1, %106 ], [ 1, %110 ], [ 1, %114 ], [ 1, %118 ], [ 1, %122 ], [ 4, %126 ], [ 4, %130 ], [ 1, %134 ], [ 4, %138 ], [ 4, %142 ], [ 1, %146 ]
%151 = phi double [ 1.000000e-01, %26 ], [ 2.000000e-01, %30 ], [ 5.000000e-01, %34 ], [ 1.000000e+00, %38 ], [ 2.000000e+00, %42 ], [ 5.000000e+00, %46 ], [ 5.000000e+00, %50 ], [ 1.000000e+01, %54 ], [ 1.000000e+01, %58 ], [ 1.000000e+01, %62 ], [ 1.000000e+01, %66 ], [ 2.000000e+01, %70 ], [ 2.000000e+01, %74 ], [ 2.000000e+01, %78 ], [ 5.000000e+01, %82 ], [ 5.000000e+01, %86 ], [ 5.000000e+01, %90 ], [ 5.000000e+01, %94 ], [ 5.000000e+01, %98 ], [ 5.000000e+01, %102 ], [ 5.000000e+01, %106 ], [ 5.000000e+01, %110 ], [ 5.000000e+01, %114 ], [ 5.000000e+01, %118 ], [ 5.000000e+01, %122 ], [ 5.000000e+01, %126 ], [ 1.000000e+03, %130 ], [ 5.000000e+02, %134 ], [ 1.000000e+03, %138 ], [ 2.000000e+03, %142 ], [ 5.000000e+03, %146 ]
store double %149, double* %2
store i32 %150, i32* %3
br label %152
152: ; preds = %148, %146
%153 = phi double [ undef, %146 ], [ %151, %148 ]
br i1 %18, label %154, label %167
154: ; preds = %152
%155 = load double, double* %1
%156 = fcmp ogt double %155, %5
br i1 %156, label %157, label %162
157: ; preds = %154, %157
%158 = phi double [ %159, %157 ], [ %155, %154 ]
%159 = fsub double %158, %153
%160 = fcmp ogt double %159, %5
br i1 %160, label %157, label %161
161: ; preds = %157
store double %159, double* %1
br label %162
162: ; preds = %161, %154
%163 = phi double [ %159, %161 ], [ %155, %154 ]
%164 = fcmp olt double %163, %5
br i1 %164, label %165, label %178
165: ; preds = %162
%166 = fadd double %153, %163
br label %176
167: ; preds = %152
br i1 %8, label %168, label %176
168: ; preds = %167, %168
%169 = phi double [ %170, %168 ], [ 0.000000e+00, %167 ]
%170 = fsub double %169, %153
%171 = fcmp ogt double %170, %5
br i1 %171, label %168, label %172
172: ; preds = %168
store double %170, double* %1
%173 = fcmp olt double %170, %5
br i1 %173, label %174, label %178
174: ; preds = %172
%175 = fadd double %153, %170
br label %176
176: ; preds = %167, %165, %174
%177 = phi double [ %175, %174 ], [ %166, %165 ], [ 0.000000e+00, %167 ]
store double %177, double* %1
br label %178
178: ; preds = %176, %172, %162
br i1 %10, label %179, label %192
179: ; preds = %178
%180 = load double, double* %0
%181 = fcmp olt double %180, %4
br i1 %181, label %182, label %187
182: ; preds = %179, %182
%183 = phi double [ %184, %182 ], [ %180, %179 ]
%184 = fadd double %153, %183
%185 = fcmp olt double %184, %4
br i1 %185, label %182, label %186
186: ; preds = %182
store double %184, double* %0
br label %187
187: ; preds = %186, %179
%188 = phi double [ %184, %186 ], [ %180, %179 ]
%189 = fcmp ogt double %188, %4
br i1 %189, label %190, label %199
190: ; preds = %187
%191 = fsub double %188, %153
br label %197
192: ; preds = %178
br i1 %7, label %193, label %197
193: ; preds = %192, %193
%194 = phi double [ %195, %193 ], [ 0.000000e+00, %192 ]
%195 = fsub double %194, %153
%196 = fcmp ogt double %195, %4
br i1 %196, label %193, label %197
197: ; preds = %193, %192, %190
%198 = phi double [ %191, %190 ], [ 0.000000e+00, %192 ], [ %195, %193 ]
store double %198, double* %0
br label %199
199: ; preds = %197, %187
ret void
}