#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 /*<<< orphan*/ lf4;
typedef int /*<<< orphan*/ lf3;
typedef int /*<<< orphan*/ lf2;
typedef int /*<<< orphan*/ lf1;

/* Variables and functions */
int /*<<< orphan*/ dispF(float *, int, int, int, int, int, float, char *,
                         double);
int /*<<< orphan*/ draw_rectangle(float *, int, int, int, int, int, int,
                                  double);
int /*<<< orphan*/ draw_sweep_1(float *, int, int, int, int, int, int, float,
                                float, float, int, int);
int /*<<< orphan*/ draw_sweep_2(float *, int, int, int, int, int, int, float,
                                float, float, int, int);
void sweep_h(float *sl, int w, int h, int a, float amp, int lps, float ar,
             float sf, float ef) {
  float xl, nf;
  float lf1[] = {0.05, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7};
  float lf2[] = {0.05, 0.07, 0.1, 0.15, 0.3, 0.7};
  float lf3[] = {100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 900.0};
  float lf4[] = {10.0, 25.0, 50.0, 100.0, 200.0, 400.0, 800.0};
  int i, x, y;
  for (x = 0; x < w * h; x++)
    sl[x] = 0.0;
  if ((w == 0) || (h == 0))
    return;
  if (ef == 0.0)
    ef = 1.0E-12;
  if (sf == 0.0)
    sf = 1.0E-12;
  if (ef == sf)
    ef = ef + 1E-12;
  if (a == 0)
    draw_sweep_2(sl, w, h, w / 16, h / 8, 14 * w / 16, 6 * h / 8, sf, ef, amp,
                 1, lps);
  else
    draw_sweep_1(sl, w, h, w / 16, h / 8, 14 * w / 16, 6 * h / 8, sf, ef, amp,
                 1, lps);
  if (lps == 0) {
    for (i = 0; i < sizeof(lf1) / sizeof(float); i++) {
      xl = (lf1[i] - sf) / (ef - sf);
      if ((xl >= 0.0) && (xl <= 1.0)) {
        y = 7 * h / 8 + 25;
        x = w / 16 + xl * (14 * w / 16);
        draw_rectangle(sl, w, h, x, y - 20, 3, 10, 0.9);
        dispF(sl, w, h, x - 20, y + 6, 6, lf1[i], "%5.2f", 0.9);
      }
    }
    for (i = 0; i < sizeof(lf3) / sizeof(float); i++) {
      nf = lf3[i] / (float)h;
      if (a == 0)
        nf = nf * ar;
      xl = (nf - sf) / (ef - sf);
      if ((xl >= 0.0) && (xl <= 1.0)) {
        y = h / 8 - 25;
        x = w / 16 + xl * (14 * w / 16);
        draw_rectangle(sl, w, h, x, y + 8, 3, 10, 0.9);
        dispF(sl, w, h, x - 20, y + 2, 6, lf3[i], "%4.0f", 0.9);
      }
    }
  } else {
    for (i = 0; i < sizeof(lf2) / sizeof(float); i++) {
      xl = (1.0 / lf2[i] - 1.0 / sf) / (1.0 / ef - 1.0 / sf);
      if ((xl >= 0.0) && (xl <= 1.0)) {
        y = 7 * h / 8 + 25;
        x = w / 16 + xl * (14 * w / 16);
        draw_rectangle(sl, w, h, x, y - 20, 3, 10, 0.9);
        dispF(sl, w, h, x - 20, y + 6, 6, lf2[i], "%5.2f", 0.9);
      }
    }
    for (i = 0; i < sizeof(lf4) / sizeof(float); i++) {
      nf = lf4[i] / (float)h;
      if (a == 0)
        nf = nf * ar;
      xl = (1.0 / nf - 1.0 / sf) / (1.0 / ef - 1.0 / sf);
      if ((xl >= 0.0) && (xl <= 1.0)) {
        y = h / 8 - 25;
        x = w / 16 + xl * (14 * w / 16);
        draw_rectangle(sl, w, h, x, y + 8, 3, 10, 0.9);
        dispF(sl, w, h, x - 20, y + 2, 6, lf4[i], "%4.0f", 0.9);
      }
    }
  }
}


x86 assembly (clang, -O0):
<sweep_h>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movss  %xmm0,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
movss  %xmm1,-0x20(%rbp)
movss  %xmm2,-0x24(%rbp)
movss  %xmm3,-0x28(%rbp)
mov    0xe99(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe96(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe93(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe91(%rip),%eax
mov    %eax,-0x38(%rbp)
mov    0xe8f(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe8c(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xe89(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xe87(%rip),%rsi
mov    $0x24,%edx
call   1060 <memcpy@plt>
mov    0xea6(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0xea0(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    0xe9a(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xe95(%rip),%eax
mov    %eax,-0xa8(%rbp)
movl   $0x0,-0xc8(%rbp)
mov    -0xc8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    125f <sweep_h+0x10f>
mov    -0x8(%rbp),%rax
movslq -0xc8(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
jmp    1223 <sweep_h+0xd3>
cmpl   $0x0,-0xc(%rbp)
je     1273 <sweep_h+0x123>
cmpl   $0x0,-0x10(%rbp)
jne    1278 <sweep_h+0x128>
jmp    1a5e <sweep_h+0x90e>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12a1 <sweep_h+0x151>
jp     12a1 <sweep_h+0x151>
movss  0xd64(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12ca <sweep_h+0x17a>
jp     12ca <sweep_h+0x17a>
movss  0xd3b(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x28(%rbp),%xmm0
ucomiss -0x24(%rbp),%xmm0
jne    12fd <sweep_h+0x1ad>
jp     12fd <sweep_h+0x1ad>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd18(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1388 <sweep_h+0x238>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%eax
mov    %eax,-0xd0(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
mov    $0x8,%r8d
cltd
idiv   %r8d
mov    %eax,%r8d
imul   $0xe,-0xc(%rbp),%eax
mov    $0x10,%r9d
cltd
idiv   %r9d
mov    %eax,%r9d
imul   $0x6,-0x10(%rbp),%eax
mov    $0x8,%r10d
cltd
idiv   %r10d
mov    -0xd0(%rbp),%edx
mov    %eax,%r10d
movss  -0x24(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
mov    -0x1c(%rbp),%eax
mov    %r10d,(%rsp)
movl   $0x1,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1070 <draw_sweep_2@plt>
jmp    1404 <sweep_h+0x2b4>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
mov    $0x8,%r8d
cltd
idiv   %r8d
mov    %eax,%r8d
imul   $0xe,-0xc(%rbp),%eax
mov    $0x10,%r9d
cltd
idiv   %r9d
mov    %eax,%r9d
imul   $0x6,-0x10(%rbp),%eax
mov    $0x8,%r10d
cltd
idiv   %r10d
mov    -0xd4(%rbp),%edx
mov    %eax,%r10d
movss  -0x24(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
mov    -0x1c(%rbp),%eax
mov    %r10d,(%rsp)
movl   $0x1,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1050 <draw_sweep_1@plt>
cmpl   $0x0,-0x1c(%rbp)
jne    16ea <sweep_h+0x59a>
movl   $0x0,-0xc4(%rbp)
movslq -0xc4(%rbp),%rax
cmp    $0x7,%rax
jae    1561 <sweep_h+0x411>
movslq -0xc4(%rbp),%rax
movss  -0x50(%rbp,%rax,4),%xmm0
subss  -0x24(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
subss  -0x24(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1548 <sweep_h+0x3f8>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xb9b(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1548 <sweep_h+0x3f8>
imul   $0x7,-0x10(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
add    $0x19,%eax
mov    %eax,-0xcc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm1
movss  -0x2c(%rbp),%xmm0
imul   $0xe,-0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc8(%rbp),%ecx
mov    -0xcc(%rbp),%r8d
sub    $0x14,%r8d
mov    $0x3,%r9d
movsd  0xb25(%rip),%xmm0
movl   $0xa,(%rsp)
call   1030 <draw_rectangle@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc8(%rbp),%ecx
sub    $0x14,%ecx
mov    -0xcc(%rbp),%r8d
add    $0x6,%r8d
movslq -0xc4(%rbp),%rax
movss  -0x50(%rbp,%rax,4),%xmm0
mov    $0x6,%r9d
lea    0xb75(%rip),%rax
movsd  0xad9(%rip),%xmm1
mov    %rax,(%rsp)
call   1040 <dispF@plt>
jmp    154d <sweep_h+0x3fd>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    1418 <sweep_h+0x2c8>
movl   $0x0,-0xc4(%rbp)
movslq -0xc4(%rbp),%rax
cmp    $0x9,%rax
jae    16e5 <sweep_h+0x595>
movslq -0xc4(%rbp),%rax
movss  -0xa0(%rbp,%rax,4),%xmm0
ff ff
cvtsi2ssl -0x10(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    15b3 <sweep_h+0x463>
movss  -0x30(%rbp),%xmm0
mulss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm0
subss  -0x24(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
subss  -0x24(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     16cc <sweep_h+0x57c>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xa19(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     16cc <sweep_h+0x57c>
mov    -0x10(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
sub    $0x19,%eax
mov    %eax,-0xcc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm1
movss  -0x2c(%rbp),%xmm0
imul   $0xe,-0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc8(%rbp),%ecx
mov    -0xcc(%rbp),%r8d
add    $0x8,%r8d
mov    $0x3,%r9d
movsd  0x9a4(%rip),%xmm0
movl   $0xa,(%rsp)
call   1030 <draw_rectangle@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc8(%rbp),%ecx
sub    $0x14,%ecx
mov    -0xcc(%rbp),%r8d
add    $0x2,%r8d
movslq -0xc4(%rbp),%rax
movss  -0xa0(%rbp,%rax,4),%xmm0
ff ff
mov    $0x6,%r9d
lea    0x9f7(%rip),%rax
movsd  0x955(%rip),%xmm1
mov    %rax,(%rsp)
call   1040 <dispF@plt>
jmp    16d1 <sweep_h+0x581>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    156b <sweep_h+0x41b>
jmp    1a5e <sweep_h+0x90e>
movl   $0x0,-0xc4(%rbp)
movslq -0xc4(%rbp),%rax
cmp    $0x6,%rax
jae    1889 <sweep_h+0x739>
movslq -0xc4(%rbp),%rax
movss  -0x70(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0x8f2(%rip),%xmm0
divsd  %xmm1,%xmm0
movss  -0x24(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0x8dd(%rip),%xmm1
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movss  -0x28(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0x8c4(%rip),%xmm1
divsd  %xmm2,%xmm1
movss  -0x24(%rbp),%xmm2
cvtss2sd %xmm2,%xmm3
movsd  0x8af(%rip),%xmm2
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1870 <sweep_h+0x720>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0x873(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1870 <sweep_h+0x720>
imul   $0x7,-0x10(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
add    $0x19,%eax
mov    %eax,-0xcc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm1
movss  -0x2c(%rbp),%xmm0
imul   $0xe,-0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc8(%rbp),%ecx
mov    -0xcc(%rbp),%r8d
sub    $0x14,%r8d
mov    $0x3,%r9d
movsd  0x7fd(%rip),%xmm0
movl   $0xa,(%rsp)
call   1030 <draw_rectangle@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc8(%rbp),%ecx
sub    $0x14,%ecx
mov    -0xcc(%rbp),%r8d
add    $0x6,%r8d
movslq -0xc4(%rbp),%rax
movss  -0x70(%rbp,%rax,4),%xmm0
mov    $0x6,%r9d
lea    0x84d(%rip),%rax
movsd  0x7b1(%rip),%xmm1
mov    %rax,(%rsp)
call   1040 <dispF@plt>
jmp    1875 <sweep_h+0x725>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    16f4 <sweep_h+0x5a4>
movl   $0x0,-0xc4(%rbp)
movslq -0xc4(%rbp),%rax
cmp    $0x7,%rax
jae    1a59 <sweep_h+0x909>
movslq -0xc4(%rbp),%rax
movss  -0xc0(%rbp,%rax,4),%xmm0
ff ff
cvtsi2ssl -0x10(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    18db <sweep_h+0x78b>
movss  -0x30(%rbp),%xmm0
mulss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0x724(%rip),%xmm0
divsd  %xmm1,%xmm0
movss  -0x24(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0x70f(%rip),%xmm1
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movss  -0x28(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0x6f6(%rip),%xmm1
divsd  %xmm2,%xmm1
movss  -0x24(%rbp),%xmm2
cvtss2sd %xmm2,%xmm3
movsd  0x6e1(%rip),%xmm2
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1a40 <sweep_h+0x8f0>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0x6a5(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1a40 <sweep_h+0x8f0>
mov    -0x10(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
sub    $0x19,%eax
mov    %eax,-0xcc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm1
movss  -0x2c(%rbp),%xmm0
imul   $0xe,-0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc8(%rbp),%ecx
mov    -0xcc(%rbp),%r8d
add    $0x8,%r8d
mov    $0x3,%r9d
movsd  0x630(%rip),%xmm0
movl   $0xa,(%rsp)
call   1030 <draw_rectangle@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc8(%rbp),%ecx
sub    $0x14,%ecx
mov    -0xcc(%rbp),%r8d
add    $0x2,%r8d
movslq -0xc4(%rbp),%rax
movss  -0xc0(%rbp,%rax,4),%xmm0
ff ff
mov    $0x6,%r9d
lea    0x683(%rip),%rax
movsd  0x5e1(%rip),%xmm1
mov    %rax,(%rsp)
call   1040 <dispF@plt>
jmp    1a45 <sweep_h+0x8f5>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    1893 <sweep_h+0x743>
jmp    1a5e <sweep_h+0x90e>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_h>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
movss  %xmm1,0x24(%rsp)
mov    %r8d,%r12d
movaps %xmm0,%xmm5
mov    %ecx,%ebx
mov    %edx,%r13d
mov    %esi,%r14d
mov    %rdi,%r15
mov    %edx,%eax
imul   %esi,%eax
test   %eax,%eax
jle    11ae <sweep_h+0x5e>
mov    %eax,%edx
shl    $0x2,%rdx
mov    %r15,%rdi
xor    %esi,%esi
movss  %xmm5,0x50(%rsp)
movaps %xmm2,0x60(%rsp)
movaps %xmm3,0x40(%rsp)
call   1060 <memset@plt>
movaps 0x40(%rsp),%xmm3
movaps 0x60(%rsp),%xmm2
movss  0x50(%rsp),%xmm5
test   %r14d,%r14d
je     17fa <sweep_h+0x6aa>
test   %r13d,%r13d
je     17fa <sweep_h+0x6aa>
xorps  %xmm0,%xmm0
movaps %xmm3,%xmm6
cmpeqss %xmm0,%xmm6
movss  0xe2d(%rip),%xmm1
movaps %xmm6,%xmm4
andps  %xmm1,%xmm4
andnps %xmm3,%xmm6
orps   %xmm4,%xmm6
cmpeqss %xmm2,%xmm0
andps  %xmm0,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm6,%xmm1
addsd  0xe0c(%rip),%xmm1
xorps  %xmm4,%xmm4
cvtsd2ss %xmm1,%xmm4
movaps %xmm0,%xmm1
cmpeqss %xmm6,%xmm1
movaps %xmm1,%xmm2
andnps %xmm6,%xmm2
andps  %xmm4,%xmm1
orps   %xmm2,%xmm1
lea    0xf(%r14),%eax
test   %r14d,%r14d
mov    %r14d,%ecx
mov    %eax,0x40(%rsp)
cmovs  %eax,%ecx
sar    $0x4,%ecx
lea    0x7(%r13),%eax
test   %r13d,%r13d
mov    %r13d,%r8d
mov    %rax,0x30(%rsp)
cmovs  %eax,%r8d
sar    $0x3,%r8d
mov    %ebx,%esi
mov    %r14d,%ebx
shl    $0x4,%ebx
sub    %r14d,%ebx
sub    %r14d,%ebx
lea    0xf(%rbx),%edi
test   %ebx,%ebx
mov    %ebx,%r9d
cmovs  %edi,%r9d
sar    $0x4,%r9d
lea    0x0(%r13,%r13,1),%eax
lea    (%rax,%rax,2),%edx
lea    (%rax,%rax,2),%eax
add    $0x7,%eax
test   %edx,%edx
cmovns %edx,%eax
sar    $0x3,%eax
mov    %esi,0x3c(%rsp)
test   %esi,%esi
movaps %xmm0,0x60(%rsp)
movaps %xmm1,0x50(%rsp)
je     1577 <sweep_h+0x427>
mov    %r12d,0x10(%rsp)
mov    %eax,(%rsp)
movl   $0x1,0x8(%rsp)
mov    %edi,%ebp
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
movaps %xmm5,%xmm2
call   1050 <draw_sweep_1@plt>
mov    %ebp,%edx
test   %r12d,%r12d
je     15a9 <sweep_h+0x459>
movaps 0x60(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd45(%rip),%xmm2
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
movaps 0x50(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movapd %xmm2,%xmm4
divsd  %xmm0,%xmm4
lea    0x0(,%r13,8),%eax
sub    %r13d,%eax
mov    0x40(%rsp),%ecx
lea    0x7(%rax),%esi
test   %eax,%eax
cmovns %eax,%esi
sar    $0x3,%esi
test   %r14d,%r14d
cmovns %r14d,%ecx
sar    $0x4,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
movss  %xmm0,0x40(%rsp)
subsd  %xmm3,%xmm4
test   %ebx,%ebx
cmovns %ebx,%edx
sar    $0x4,%edx
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
movss  %xmm0,0x20(%rsp)
lea    0x5(%rsi),%eax
mov    %eax,0x18(%rsp)
add    $0x1f,%esi
mov    %rsi,0x28(%rsp)
xor    %ebx,%ebx
lea    0xcfa(%rip),%r12
xorps  %xmm5,%xmm5
movsd  %xmm3,0x50(%rsp)
movsd  %xmm4,0x60(%rsp)
jmp    136e <sweep_h+0x21e>
nopw   0x0(%rax,%rax,1)
add    $0x4,%rbx
cmp    $0x18,%rbx
je     1437 <sweep_h+0x2e7>
movss  (%rbx,%r12,1),%xmm6
xorps  %xmm0,%xmm0
cvtss2sd %xmm6,%xmm0
movapd %xmm2,%xmm1
divsd  %xmm0,%xmm1
subsd  %xmm3,%xmm1
divsd  %xmm4,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ucomiss %xmm5,%xmm0
jb     1360 <sweep_h+0x210>
movss  0xc65(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     1360 <sweep_h+0x210>
mulss  0x20(%rsp),%xmm0
addss  0x40(%rsp),%xmm0
cvttss2si %xmm0,%ebp
movl   $0xa,(%rsp)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %ebp,%ecx
mov    0x18(%rsp),%r8d
mov    $0x3,%r9d
movsd  0xc3f(%rip),%xmm0
movss  %xmm6,0x1c(%rsp)
call   1030 <draw_rectangle@plt>
add    $0xffffffec,%ebp
lea    0xcbe(%rip),%rax
mov    %rax,(%rsp)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %ebp,%ecx
mov    0x28(%rsp),%r8
mov    $0x6,%r9d
movss  0x1c(%rsp),%xmm0
movsd  0xc02(%rip),%xmm1
call   1040 <dispF@plt>
xorps  %xmm5,%xmm5
movsd  0x60(%rsp),%xmm4
movsd  0x50(%rsp),%xmm3
movsd  0xbde(%rip),%xmm2
jmp    1360 <sweep_h+0x210>
cmpl   $0x0,0x3c(%rsp)
je     144c <sweep_h+0x2fc>
movss  0xbbe(%rip),%xmm0
movss  %xmm0,0x24(%rsp)
xorps  %xmm5,%xmm5
cvtsi2ss %r13d,%xmm5
test   %r13d,%r13d
mov    0x30(%rsp),%rcx
cmovns %r13d,%ecx
sar    $0x3,%ecx
lea    -0x11(%rcx),%eax
mov    %eax,0x28(%rsp)
add    $0xffffffe9,%ecx
mov    %rcx,0x30(%rsp)
xor    %ebx,%ebx
lea    0xc15(%rip),%r12
xorps  %xmm6,%xmm6
movss  %xmm5,0x18(%rsp)
jmp    149e <sweep_h+0x34e>
cs nopw 0x0(%rax,%rax,1)
add    $0x4,%rbx
cmp    $0x1c,%rbx
je     17fa <sweep_h+0x6aa>
movss  (%rbx,%r12,1),%xmm7
movaps %xmm7,%xmm0
divss  %xmm5,%xmm0
mulss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movapd %xmm2,%xmm1
divsd  %xmm0,%xmm1
subsd  %xmm3,%xmm1
divsd  %xmm4,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ucomiss %xmm6,%xmm0
jb     1490 <sweep_h+0x340>
movss  0xb2b(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     1490 <sweep_h+0x340>
mulss  0x20(%rsp),%xmm0
addss  0x40(%rsp),%xmm0
cvttss2si %xmm0,%ebp
movl   $0xa,(%rsp)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %ebp,%ecx
mov    0x28(%rsp),%r8d
mov    $0x3,%r9d
movsd  0xb05(%rip),%xmm0
movss  %xmm7,0x1c(%rsp)
call   1030 <draw_rectangle@plt>
add    $0xffffffec,%ebp
lea    0xb8a(%rip),%rax
mov    %rax,(%rsp)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %ebp,%ecx
mov    0x30(%rsp),%r8
mov    $0x6,%r9d
movss  0x1c(%rsp),%xmm0
movsd  0xac8(%rip),%xmm1
call   1040 <dispF@plt>
xorps  %xmm6,%xmm6
movss  0x18(%rsp),%xmm5
movsd  0x60(%rsp),%xmm4
movsd  0x50(%rsp),%xmm3
movsd  0xa9e(%rip),%xmm2
jmp    1490 <sweep_h+0x340>
mov    %r12d,0x10(%rsp)
mov    %eax,(%rsp)
movl   $0x1,0x8(%rsp)
mov    %edi,0x20(%rsp)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
movaps %xmm5,%xmm2
call   1070 <draw_sweep_2@plt>
mov    0x20(%rsp),%edx
test   %r12d,%r12d
jne    12ba <sweep_h+0x16a>
lea    0x0(,%r13,8),%eax
sub    %r13d,%eax
lea    0x7(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
sar    $0x3,%ecx
test   %r14d,%r14d
mov    0x40(%rsp),%eax
cmovns %r14d,%eax
sar    $0x4,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x40(%rsp)
movaps 0x60(%rsp),%xmm1
movaps 0x50(%rsp),%xmm2
subss  %xmm1,%xmm2
test   %ebx,%ebx
cmovns %ebx,%edx
sar    $0x4,%edx
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
movss  %xmm0,0x20(%rsp)
lea    0x5(%rcx),%eax
mov    %eax,0x18(%rsp)
add    $0x1f,%ecx
mov    %rcx,0x28(%rsp)
xor    %ebx,%ebx
lea    0xa0e(%rip),%rbp
xorps  %xmm4,%xmm4
movaps %xmm2,0x50(%rsp)
jmp    162e <sweep_h+0x4de>
nopl   0x0(%rax)
add    $0x4,%rbx
cmp    $0x1c,%rbx
je     16dd <sweep_h+0x58d>
movss  (%rbx,%rbp,1),%xmm5
movaps %xmm5,%xmm0
subss  %xmm1,%xmm0
divss  %xmm2,%xmm0
ucomiss %xmm4,%xmm0
jb     1620 <sweep_h+0x4d0>
movss  0x9b9(%rip),%xmm3
ucomiss %xmm0,%xmm3
jb     1620 <sweep_h+0x4d0>
mulss  0x20(%rsp),%xmm0
addss  0x40(%rsp),%xmm0
cvttss2si %xmm0,%r12d
movl   $0xa,(%rsp)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %r12d,%ecx
mov    0x18(%rsp),%r8d
mov    $0x3,%r9d
movsd  0x991(%rip),%xmm0
movss  %xmm5,0x1c(%rsp)
call   1030 <draw_rectangle@plt>
add    $0xffffffec,%r12d
lea    0xa0f(%rip),%rax
mov    %rax,(%rsp)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %r12d,%ecx
mov    0x28(%rsp),%r8
mov    $0x6,%r9d
movss  0x1c(%rsp),%xmm0
movsd  0x952(%rip),%xmm1
call   1040 <dispF@plt>
xorps  %xmm4,%xmm4
movaps 0x50(%rsp),%xmm2
movaps 0x60(%rsp),%xmm1
jmp    1620 <sweep_h+0x4d0>
cmpl   $0x0,0x3c(%rsp)
je     16f2 <sweep_h+0x5a2>
movss  0x918(%rip),%xmm0
movss  %xmm0,0x24(%rsp)
xorps  %xmm4,%xmm4
cvtsi2ss %r13d,%xmm4
test   %r13d,%r13d
mov    0x30(%rsp),%rcx
cmovns %r13d,%ecx
sar    $0x3,%ecx
lea    -0x11(%rcx),%eax
mov    %eax,0x28(%rsp)
add    $0xffffffe9,%ecx
mov    %rcx,0x30(%rsp)
xor    %ebx,%ebx
lea    0x93f(%rip),%r12
xorps  %xmm5,%xmm5
movss  %xmm4,0x18(%rsp)
jmp    173e <sweep_h+0x5ee>
nopl   0x0(%rax)
add    $0x4,%rbx
cmp    $0x24,%rbx
je     17fa <sweep_h+0x6aa>
movss  (%rbx,%r12,1),%xmm6
movaps %xmm6,%xmm0
divss  %xmm4,%xmm0
mulss  0x24(%rsp),%xmm0
subss  %xmm1,%xmm0
divss  %xmm2,%xmm0
ucomiss %xmm5,%xmm0
jb     1730 <sweep_h+0x5e0>
movss  0x89e(%rip),%xmm3
ucomiss %xmm0,%xmm3
jb     1730 <sweep_h+0x5e0>
mulss  0x20(%rsp),%xmm0
addss  0x40(%rsp),%xmm0
cvttss2si %xmm0,%ebp
movl   $0xa,(%rsp)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %ebp,%ecx
mov    0x28(%rsp),%r8d
mov    $0x3,%r9d
movsd  0x878(%rip),%xmm0
movss  %xmm6,0x1c(%rsp)
call   1030 <draw_rectangle@plt>
add    $0xffffffec,%ebp
lea    0x8fd(%rip),%rax
mov    %rax,(%rsp)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %ebp,%ecx
mov    0x30(%rsp),%r8
mov    $0x6,%r9d
movss  0x1c(%rsp),%xmm0
movsd  0x83b(%rip),%xmm1
call   1040 <dispF@plt>
xorps  %xmm5,%xmm5
movss  0x18(%rsp),%xmm4
movaps 0x50(%rsp),%xmm2
movaps 0x60(%rsp),%xmm1
jmp    1730 <sweep_h+0x5e0>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.sweep_h.lf1 = [7 x float] [float 0x3FA99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000]
@__const.sweep_h.lf2 = [6 x float] [float 0x3FA99999A0000000, float 0x3FB1EB8520000000, float 0x3FB99999A0000000, float 0x3FC3333340000000, float 0x3FD3333340000000, float 0x3FE6666660000000]
@__const.sweep_h.lf3 = [9 x float] [float 1.000000e+02, float 2.000000e+02, float 3.000000e+02, float 4.000000e+02, float 5.000000e+02, float 6.000000e+02, float 7.000000e+02, float 8.000000e+02, float 9.000000e+02]
@__const.sweep_h.lf4 = [7 x float] [float 1.000000e+01, float 2.500000e+01, float 5.000000e+01, float 1.000000e+02, float 2.000000e+02, float 4.000000e+02, float 8.000000e+02]
@.str = [6 x i8] c"%5.2f\00"
@.str.1 = [6 x i8] c"%4.0f\00"
define void @sweep_h(float* %0, i32 %1, i32 %2, i32 %3, float %4, i32 %5, float %6, float %7, float %8) {
%10 = alloca float*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca float
%15 = alloca i32
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
%21 = alloca [7 x float]
%22 = alloca [6 x float]
%23 = alloca [9 x float]
%24 = alloca [7 x float]
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
store float* %0, float** %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store float %4, float* %14
store i32 %5, i32* %15
store float %6, float* %16
store float %7, float* %17
store float %8, float* %18
%28 = bitcast [7 x float]* %21 to i8*
%29 = bitcast [6 x float]* %22 to i8*
%30 = bitcast [9 x float]* %23 to i8*
%31 = bitcast [7 x float]* %24 to i8*
store i32 0, i32* %26
br label %32
32: ; preds = %43, %9
%33 = load i32, i32* %26
%34 = load i32, i32* %11
%35 = load i32, i32* %12
%36 = mul nsw i32 %34, %35
%37 = icmp slt i32 %33, %36
br i1 %37, label %38, label %46
38: ; preds = %32
%39 = load float*, float** %10
%40 = load i32, i32* %26
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds float, float* %39, i64 %41
store float 0.000000e+00, float* %42
br label %43
43: ; preds = %38
%44 = load i32, i32* %26
%45 = add nsw i32 %44, 1
store i32 %45, i32* %26
br label %32
46: ; preds = %32
%47 = load i32, i32* %11
%48 = icmp eq i32 %47, 0
br i1 %48, label %52, label %49
49: ; preds = %46
%50 = load i32, i32* %12
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %53
52: ; preds = %49, %46
br label %400
53: ; preds = %49
%54 = load float, float* %18
%55 = fpext float %54 to double
%56 = fcmp oeq double %55, 0.000000e+00
br i1 %56, label %57, label %58
57: ; preds = %53
store float 0x3D71979980000000, float* %18
br label %58
58: ; preds = %57, %53
%59 = load float, float* %17
%60 = fpext float %59 to double
%61 = fcmp oeq double %60, 0.000000e+00
br i1 %61, label %62, label %63
62: ; preds = %58
store float 0x3D71979980000000, float* %17
br label %63
63: ; preds = %62, %58
%64 = load float, float* %18
%65 = load float, float* %17
%66 = fcmp oeq float %64, %65
br i1 %66, label %67, label %72
67: ; preds = %63
%68 = load float, float* %18
%69 = fpext float %68 to double
%70 = fadd double %69, 0x3D719799812DEA11
%71 = fptrunc double %70 to float
store float %71, float* %18
br label %72
72: ; preds = %67, %63
%73 = load i32, i32* %13
%74 = icmp eq i32 %73, 0
br i1 %74, label %75, label %94
75: ; preds = %72
%76 = load float*, float** %10
%77 = load i32, i32* %11
%78 = load i32, i32* %12
%79 = load i32, i32* %11
%80 = sdiv i32 %79, 16
%81 = load i32, i32* %12
%82 = sdiv i32 %81, 8
%83 = load i32, i32* %11
%84 = mul nsw i32 14, %83
%85 = sdiv i32 %84, 16
%86 = load i32, i32* %12
%87 = mul nsw i32 6, %86
%88 = sdiv i32 %87, 8
%89 = load float, float* %17
%90 = load float, float* %18
%91 = load float, float* %14
%92 = load i32, i32* %15
%93 = call i32 @draw_sweep_2(float* %76, i32 %77, i32 %78, i32 %80, i32 %82, i32 %85, i32 %88, float %89, float %90, float %91, i32 1, i32 %92)
br label %113
94: ; preds = %72
%95 = load float*, float** %10
%96 = load i32, i32* %11
%97 = load i32, i32* %12
%98 = load i32, i32* %11
%99 = sdiv i32 %98, 16
%100 = load i32, i32* %12
%101 = sdiv i32 %100, 8
%102 = load i32, i32* %11
%103 = mul nsw i32 14, %102
%104 = sdiv i32 %103, 16
%105 = load i32, i32* %12
%106 = mul nsw i32 6, %105
%107 = sdiv i32 %106, 8
%108 = load float, float* %17
%109 = load float, float* %18
%110 = load float, float* %14
%111 = load i32, i32* %15
%112 = call i32 @draw_sweep_1(float* %95, i32 %96, i32 %97, i32 %99, i32 %101, i32 %104, i32 %107, float %108, float %109, float %110, i32 1, i32 %111)
br label %113
113: ; preds = %94, %75
%114 = load i32, i32* %15
%115 = icmp eq i32 %114, 0
br i1 %115, label %116, label %249
116: ; preds = %113
store i32 0, i32* %25
br label %117
117: ; preds = %174, %116
%118 = load i32, i32* %25
%119 = sext i32 %118 to i64
%120 = icmp ult i64 %119, 7
br i1 %120, label %121, label %177
121: ; preds = %117
%122 = load i32, i32* %25
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [7 x float], [7 x float]* %21, i64 0, i64 %123
%125 = load float, float* %124
%126 = load float, float* %17
%127 = fsub float %125, %126
%128 = load float, float* %18
%129 = load float, float* %17
%130 = fsub float %128, %129
%131 = fdiv float %127, %130
store float %131, float* %19
%132 = load float, float* %19
%133 = fpext float %132 to double
%134 = fcmp oge double %133, 0.000000e+00
br i1 %134, label %135, label %173
135: ; preds = %121
%136 = load float, float* %19
%137 = fpext float %136 to double
%138 = fcmp ole double %137, 1.000000e+00
br i1 %138, label %139, label %173
139: ; preds = %135
%140 = load i32, i32* %12
%141 = mul nsw i32 7, %140
%142 = sdiv i32 %141, 8
%143 = add nsw i32 %142, 25
store i32 %143, i32* %27
%144 = load i32, i32* %11
%145 = sdiv i32 %144, 16
%146 = sitofp i32 %145 to float
%147 = load float, float* %19
%148 = load i32, i32* %11
%149 = mul nsw i32 14, %148
%150 = sdiv i32 %149, 16
%151 = sitofp i32 %150 to float
%152 = call float @llvm.fmuladd.f32(float %147, float %151, float %146)
%153 = fptosi float %152 to i32
store i32 %153, i32* %26
%154 = load float*, float** %10
%155 = load i32, i32* %11
%156 = load i32, i32* %12
%157 = load i32, i32* %26
%158 = load i32, i32* %27
%159 = sub nsw i32 %158, 20
%160 = call i32 @draw_rectangle(float* %154, i32 %155, i32 %156, i32 %157, i32 %159, i32 3, i32 10, double 9.000000e-01)
%161 = load float*, float** %10
%162 = load i32, i32* %11
%163 = load i32, i32* %12
%164 = load i32, i32* %26
%165 = sub nsw i32 %164, 20
%166 = load i32, i32* %27
%167 = add nsw i32 %166, 6
%168 = load i32, i32* %25
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds [7 x float], [7 x float]* %21, i64 0, i64 %169
%171 = load float, float* %170
%172 = call i32 @dispF(float* %161, i32 %162, i32 %163, i32 %165, i32 %167, i32 6, float %171, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double 9.000000e-01)
br label %173
173: ; preds = %139, %135, %121
br label %174
174: ; preds = %173
%175 = load i32, i32* %25
%176 = add nsw i32 %175, 1
store i32 %176, i32* %25
br label %117
177: ; preds = %117
store i32 0, i32* %25
br label %178
178: ; preds = %245, %177
%179 = load i32, i32* %25
%180 = sext i32 %179 to i64
%181 = icmp ult i64 %180, 9
br i1 %181, label %182, label %248
182: ; preds = %178
%183 = load i32, i32* %25
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [9 x float], [9 x float]* %23, i64 0, i64 %184
%186 = load float, float* %185
%187 = load i32, i32* %12
%188 = sitofp i32 %187 to float
%189 = fdiv float %186, %188
store float %189, float* %20
%190 = load i32, i32* %13
%191 = icmp eq i32 %190, 0
br i1 %191, label %192, label %196
192: ; preds = %182
%193 = load float, float* %20
%194 = load float, float* %16
%195 = fmul float %193, %194
store float %195, float* %20
br label %196
196: ; preds = %192, %182
%197 = load float, float* %20
%198 = load float, float* %17
%199 = fsub float %197, %198
%200 = load float, float* %18
%201 = load float, float* %17
%202 = fsub float %200, %201
%203 = fdiv float %199, %202
store float %203, float* %19
%204 = load float, float* %19
%205 = fpext float %204 to double
%206 = fcmp oge double %205, 0.000000e+00
br i1 %206, label %207, label %244
207: ; preds = %196
%208 = load float, float* %19
%209 = fpext float %208 to double
%210 = fcmp ole double %209, 1.000000e+00
br i1 %210, label %211, label %244
211: ; preds = %207
%212 = load i32, i32* %12
%213 = sdiv i32 %212, 8
%214 = sub nsw i32 %213, 25
store i32 %214, i32* %27
%215 = load i32, i32* %11
%216 = sdiv i32 %215, 16
%217 = sitofp i32 %216 to float
%218 = load float, float* %19
%219 = load i32, i32* %11
%220 = mul nsw i32 14, %219
%221 = sdiv i32 %220, 16
%222 = sitofp i32 %221 to float
%223 = call float @llvm.fmuladd.f32(float %218, float %222, float %217)
%224 = fptosi float %223 to i32
store i32 %224, i32* %26
%225 = load float*, float** %10
%226 = load i32, i32* %11
%227 = load i32, i32* %12
%228 = load i32, i32* %26
%229 = load i32, i32* %27
%230 = add nsw i32 %229, 8
%231 = call i32 @draw_rectangle(float* %225, i32 %226, i32 %227, i32 %228, i32 %230, i32 3, i32 10, double 9.000000e-01)
%232 = load float*, float** %10
%233 = load i32, i32* %11
%234 = load i32, i32* %12
%235 = load i32, i32* %26
%236 = sub nsw i32 %235, 20
%237 = load i32, i32* %27
%238 = add nsw i32 %237, 2
%239 = load i32, i32* %25
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds [9 x float], [9 x float]* %23, i64 0, i64 %240
%242 = load float, float* %241
%243 = call i32 @dispF(float* %232, i32 %233, i32 %234, i32 %236, i32 %238, i32 6, float %242, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 9.000000e-01)
br label %244
244: ; preds = %211, %207, %196
br label %245
245: ; preds = %244
%246 = load i32, i32* %25
%247 = add nsw i32 %246, 1
store i32 %247, i32* %25
br label %178
248: ; preds = %178
br label %400
249: ; preds = %113
store i32 0, i32* %25
br label %250
250: ; preds = %316, %249
%251 = load i32, i32* %25
%252 = sext i32 %251 to i64
%253 = icmp ult i64 %252, 6
br i1 %253, label %254, label %319
254: ; preds = %250
%255 = load i32, i32* %25
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds [6 x float], [6 x float]* %22, i64 0, i64 %256
%258 = load float, float* %257
%259 = fpext float %258 to double
%260 = fdiv double 1.000000e+00, %259
%261 = load float, float* %17
%262 = fpext float %261 to double
%263 = fdiv double 1.000000e+00, %262
%264 = fsub double %260, %263
%265 = load float, float* %18
%266 = fpext float %265 to double
%267 = fdiv double 1.000000e+00, %266
%268 = load float, float* %17
%269 = fpext float %268 to double
%270 = fdiv double 1.000000e+00, %269
%271 = fsub double %267, %270
%272 = fdiv double %264, %271
%273 = fptrunc double %272 to float
store float %273, float* %19
%274 = load float, float* %19
%275 = fpext float %274 to double
%276 = fcmp oge double %275, 0.000000e+00
br i1 %276, label %277, label %315
277: ; preds = %254
%278 = load float, float* %19
%279 = fpext float %278 to double
%280 = fcmp ole double %279, 1.000000e+00
br i1 %280, label %281, label %315
281: ; preds = %277
%282 = load i32, i32* %12
%283 = mul nsw i32 7, %282
%284 = sdiv i32 %283, 8
%285 = add nsw i32 %284, 25
store i32 %285, i32* %27
%286 = load i32, i32* %11
%287 = sdiv i32 %286, 16
%288 = sitofp i32 %287 to float
%289 = load float, float* %19
%290 = load i32, i32* %11
%291 = mul nsw i32 14, %290
%292 = sdiv i32 %291, 16
%293 = sitofp i32 %292 to float
%294 = call float @llvm.fmuladd.f32(float %289, float %293, float %288)
%295 = fptosi float %294 to i32
store i32 %295, i32* %26
%296 = load float*, float** %10
%297 = load i32, i32* %11
%298 = load i32, i32* %12
%299 = load i32, i32* %26
%300 = load i32, i32* %27
%301 = sub nsw i32 %300, 20
%302 = call i32 @draw_rectangle(float* %296, i32 %297, i32 %298, i32 %299, i32 %301, i32 3, i32 10, double 9.000000e-01)
%303 = load float*, float** %10
%304 = load i32, i32* %11
%305 = load i32, i32* %12
%306 = load i32, i32* %26
%307 = sub nsw i32 %306, 20
%308 = load i32, i32* %27
%309 = add nsw i32 %308, 6
%310 = load i32, i32* %25
%311 = sext i32 %310 to i64
%312 = getelementptr inbounds [6 x float], [6 x float]* %22, i64 0, i64 %311
%313 = load float, float* %312
%314 = call i32 @dispF(float* %303, i32 %304, i32 %305, i32 %307, i32 %309, i32 6, float %313, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double 9.000000e-01)
br label %315
315: ; preds = %281, %277, %254
br label %316
316: ; preds = %315
%317 = load i32, i32* %25
%318 = add nsw i32 %317, 1
store i32 %318, i32* %25
br label %250
319: ; preds = %250
store i32 0, i32* %25
br label %320
320: ; preds = %396, %319
%321 = load i32, i32* %25
%322 = sext i32 %321 to i64
%323 = icmp ult i64 %322, 7
br i1 %323, label %324, label %399
324: ; preds = %320
%325 = load i32, i32* %25
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds [7 x float], [7 x float]* %24, i64 0, i64 %326
%328 = load float, float* %327
%329 = load i32, i32* %12
%330 = sitofp i32 %329 to float
%331 = fdiv float %328, %330
store float %331, float* %20
%332 = load i32, i32* %13
%333 = icmp eq i32 %332, 0
br i1 %333, label %334, label %338
334: ; preds = %324
%335 = load float, float* %20
%336 = load float, float* %16
%337 = fmul float %335, %336
store float %337, float* %20
br label %338
338: ; preds = %334, %324
%339 = load float, float* %20
%340 = fpext float %339 to double
%341 = fdiv double 1.000000e+00, %340
%342 = load float, float* %17
%343 = fpext float %342 to double
%344 = fdiv double 1.000000e+00, %343
%345 = fsub double %341, %344
%346 = load float, float* %18
%347 = fpext float %346 to double
%348 = fdiv double 1.000000e+00, %347
%349 = load float, float* %17
%350 = fpext float %349 to double
%351 = fdiv double 1.000000e+00, %350
%352 = fsub double %348, %351
%353 = fdiv double %345, %352
%354 = fptrunc double %353 to float
store float %354, float* %19
%355 = load float, float* %19
%356 = fpext float %355 to double
%357 = fcmp oge double %356, 0.000000e+00
br i1 %357, label %358, label %395
358: ; preds = %338
%359 = load float, float* %19
%360 = fpext float %359 to double
%361 = fcmp ole double %360, 1.000000e+00
br i1 %361, label %362, label %395
362: ; preds = %358
%363 = load i32, i32* %12
%364 = sdiv i32 %363, 8
%365 = sub nsw i32 %364, 25
store i32 %365, i32* %27
%366 = load i32, i32* %11
%367 = sdiv i32 %366, 16
%368 = sitofp i32 %367 to float
%369 = load float, float* %19
%370 = load i32, i32* %11
%371 = mul nsw i32 14, %370
%372 = sdiv i32 %371, 16
%373 = sitofp i32 %372 to float
%374 = call float @llvm.fmuladd.f32(float %369, float %373, float %368)
%375 = fptosi float %374 to i32
store i32 %375, i32* %26
%376 = load float*, float** %10
%377 = load i32, i32* %11
%378 = load i32, i32* %12
%379 = load i32, i32* %26
%380 = load i32, i32* %27
%381 = add nsw i32 %380, 8
%382 = call i32 @draw_rectangle(float* %376, i32 %377, i32 %378, i32 %379, i32 %381, i32 3, i32 10, double 9.000000e-01)
%383 = load float*, float** %10
%384 = load i32, i32* %11
%385 = load i32, i32* %12
%386 = load i32, i32* %26
%387 = sub nsw i32 %386, 20
%388 = load i32, i32* %27
%389 = add nsw i32 %388, 2
%390 = load i32, i32* %25
%391 = sext i32 %390 to i64
%392 = getelementptr inbounds [7 x float], [7 x float]* %24, i64 0, i64 %391
%393 = load float, float* %392
%394 = call i32 @dispF(float* %383, i32 %384, i32 %385, i32 %387, i32 %389, i32 6, float %393, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 9.000000e-01)
br label %395
395: ; preds = %362, %358, %338
br label %396
396: ; preds = %395
%397 = load i32, i32* %25
%398 = add nsw i32 %397, 1
store i32 %398, i32* %25
br label %320
399: ; preds = %320
br label %400
400: ; preds = %52, %399, %248
ret void
}

LLVM IR (-O2):
@__const.sweep_h.lf1 = [7 x float] [float 0x3FA99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000]
@__const.sweep_h.lf2 = [6 x float] [float 0x3FA99999A0000000, float 0x3FB1EB8520000000, float 0x3FB99999A0000000, float 0x3FC3333340000000, float 0x3FD3333340000000, float 0x3FE6666660000000]
@__const.sweep_h.lf3 = [9 x float] [float 1.000000e+02, float 2.000000e+02, float 3.000000e+02, float 4.000000e+02, float 5.000000e+02, float 6.000000e+02, float 7.000000e+02, float 8.000000e+02, float 9.000000e+02]
@__const.sweep_h.lf4 = [7 x float] [float 1.000000e+01, float 2.500000e+01, float 5.000000e+01, float 1.000000e+02, float 2.000000e+02, float 4.000000e+02, float 8.000000e+02]
@.str = [6 x i8] c"%5.2f\00"
@.str.1 = [6 x i8] c"%4.0f\00"
define void @sweep_h(float* %0, i32 %1, i32 %2, i32 %3, float %4, i32 %5, float %6, float %7, float %8) {
%10 = mul i32 %2, %1
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = bitcast float* %0 to i8*
%14 = zext i32 %10 to i64
%15 = shl nuw nsw i64 %14, 2
br label %16
16: ; preds = %12, %9
%17 = icmp eq i32 %1, 0
%18 = icmp eq i32 %2, 0
%19 = or i1 %17, %18
br i1 %19, label %163, label %20
20: ; preds = %16
%21 = fcmp oeq float %8, 0.000000e+00
%22 = select i1 %21, float 0x3D71979980000000, float %8
%23 = fcmp oeq float %7, 0.000000e+00
%24 = select i1 %23, float 0x3D71979980000000, float %7
%25 = fcmp oeq float %22, %24
%26 = fpext float %22 to double
%27 = fadd double %26, 0x3D719799812DEA11
%28 = fptrunc double %27 to float
%29 = select i1 %25, float %28, float %22
%30 = icmp eq i32 %3, 0
%31 = sdiv i32 %1, 16
%32 = sdiv i32 %2, 8
%33 = mul nsw i32 %1, 14
%34 = sdiv i32 %33, 16
%35 = mul nsw i32 %2, 6
%36 = sdiv i32 %35, 8
br i1 %30, label %37, label %39
37: ; preds = %20
%38 = tail call i32 @draw_sweep_2(float* %0, i32 %1, i32 %2, i32 %31, i32 %32, i32 %34, i32 %36, float %24, float %29, float %4, i32 1, i32 %5)
br label %41
39: ; preds = %20
%40 = tail call i32 @draw_sweep_1(float* %0, i32 %1, i32 %2, i32 %31, i32 %32, i32 %34, i32 %36, float %24, float %29, float %4, i32 1, i32 %5)
br label %41
41: ; preds = %39, %37
%42 = icmp eq i32 %5, 0
br i1 %42, label %58, label %43
43: ; preds = %41
%44 = fpext float %24 to double
%45 = fdiv double 1.000000e+00, %44
%46 = fpext float %29 to double
%47 = fdiv double 1.000000e+00, %46
%48 = fsub double %47, %45
%49 = mul nsw i32 %2, 7
%50 = sdiv i32 %49, 8
%51 = sdiv i32 %1, 16
%52 = sitofp i32 %51 to float
%53 = mul nsw i32 %1, 14
%54 = sdiv i32 %53, 16
%55 = sitofp i32 %54 to float
%56 = add nsw i32 %50, 5
%57 = add nsw i32 %50, 31
br label %119
58: ; preds = %41
%59 = fsub float %29, %24
%60 = mul nsw i32 %2, 7
%61 = sdiv i32 %60, 8
%62 = sdiv i32 %1, 16
%63 = sitofp i32 %62 to float
%64 = mul nsw i32 %1, 14
%65 = sdiv i32 %64, 16
%66 = sitofp i32 %65 to float
%67 = add nsw i32 %61, 5
%68 = add nsw i32 %61, 31
br label %75
69: ; preds = %90
%70 = sitofp i32 %2 to float
%71 = select i1 %30, float %6, float 1.000000e+00
%72 = sdiv i32 %2, 8
%73 = add nsw i32 %72, -17
%74 = add nsw i32 %72, -23
br label %93
75: ; preds = %58, %90
%76 = phi i64 [ 0, %58 ], [ %91, %90 ]
%77 = getelementptr inbounds [7 x float], [7 x float]* @__const.sweep_h.lf1, i64 0, i64 %76
%78 = load float, float* %77
%79 = fsub float %78, %24
%80 = fdiv float %79, %59
%81 = fcmp ult float %80, 0.000000e+00
%82 = fcmp ugt float %80, 1.000000e+00
%83 = or i1 %81, %82
br i1 %83, label %90, label %84
84: ; preds = %75
%85 = tail call float @llvm.fmuladd.f32(float %80, float %66, float %63)
%86 = fptosi float %85 to i32
%87 = tail call i32 @draw_rectangle(float* %0, i32 %1, i32 %2, i32 %86, i32 %67, i32 3, i32 10, double 9.000000e-01)
%88 = add nsw i32 %86, -20
%89 = tail call i32 @dispF(float* %0, i32 %1, i32 %2, i32 %88, i32 %68, i32 6, float %78, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double 9.000000e-01)
br label %90
90: ; preds = %75, %84
%91 = add nuw nsw i64 %76, 1
%92 = icmp eq i64 %91, 7
br i1 %92, label %69, label %75
93: ; preds = %69, %110
%94 = phi i64 [ 0, %69 ], [ %111, %110 ]
%95 = getelementptr inbounds [9 x float], [9 x float]* @__const.sweep_h.lf3, i64 0, i64 %94
%96 = load float, float* %95
%97 = fdiv float %96, %70
%98 = fmul float %71, %97
%99 = fsub float %98, %24
%100 = fdiv float %99, %59
%101 = fcmp ult float %100, 0.000000e+00
%102 = fcmp ugt float %100, 1.000000e+00
%103 = or i1 %101, %102
br i1 %103, label %110, label %104
104: ; preds = %93
%105 = tail call float @llvm.fmuladd.f32(float %100, float %66, float %63)
%106 = fptosi float %105 to i32
%107 = tail call i32 @draw_rectangle(float* %0, i32 %1, i32 %2, i32 %106, i32 %73, i32 3, i32 10, double 9.000000e-01)
%108 = add nsw i32 %106, -20
%109 = tail call i32 @dispF(float* %0, i32 %1, i32 %2, i32 %108, i32 %74, i32 6, float %96, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 9.000000e-01)
br label %110
110: ; preds = %93, %104
%111 = add nuw nsw i64 %94, 1
%112 = icmp eq i64 %111, 9
br i1 %112, label %163, label %93
113: ; preds = %137
%114 = sitofp i32 %2 to float
%115 = select i1 %30, float %6, float 1.000000e+00
%116 = sdiv i32 %2, 8
%117 = add nsw i32 %116, -17
%118 = add nsw i32 %116, -23
br label %140
119: ; preds = %43, %137
%120 = phi i64 [ 0, %43 ], [ %138, %137 ]
%121 = getelementptr inbounds [6 x float], [6 x float]* @__const.sweep_h.lf2, i64 0, i64 %120
%122 = load float, float* %121
%123 = fpext float %122 to double
%124 = fdiv double 1.000000e+00, %123
%125 = fsub double %124, %45
%126 = fdiv double %125, %48
%127 = fptrunc double %126 to float
%128 = fcmp ult float %127, 0.000000e+00
%129 = fcmp ugt float %127, 1.000000e+00
%130 = or i1 %128, %129
br i1 %130, label %137, label %131
131: ; preds = %119
%132 = tail call float @llvm.fmuladd.f32(float %127, float %55, float %52)
%133 = fptosi float %132 to i32
%134 = tail call i32 @draw_rectangle(float* %0, i32 %1, i32 %2, i32 %133, i32 %56, i32 3, i32 10, double 9.000000e-01)
%135 = add nsw i32 %133, -20
%136 = tail call i32 @dispF(float* %0, i32 %1, i32 %2, i32 %135, i32 %57, i32 6, float %122, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double 9.000000e-01)
br label %137
137: ; preds = %119, %131
%138 = add nuw nsw i64 %120, 1
%139 = icmp eq i64 %138, 6
br i1 %139, label %113, label %119
140: ; preds = %113, %160
%141 = phi i64 [ 0, %113 ], [ %161, %160 ]
%142 = getelementptr inbounds [7 x float], [7 x float]* @__const.sweep_h.lf4, i64 0, i64 %141
%143 = load float, float* %142
%144 = fdiv float %143, %114
%145 = fmul float %115, %144
%146 = fpext float %145 to double
%147 = fdiv double 1.000000e+00, %146
%148 = fsub double %147, %45
%149 = fdiv double %148, %48
%150 = fptrunc double %149 to float
%151 = fcmp ult float %150, 0.000000e+00
%152 = fcmp ugt float %150, 1.000000e+00
%153 = or i1 %151, %152
br i1 %153, label %160, label %154
154: ; preds = %140
%155 = tail call float @llvm.fmuladd.f32(float %150, float %55, float %52)
%156 = fptosi float %155 to i32
%157 = tail call i32 @draw_rectangle(float* %0, i32 %1, i32 %2, i32 %156, i32 %117, i32 3, i32 10, double 9.000000e-01)
%158 = add nsw i32 %156, -20
%159 = tail call i32 @dispF(float* %0, i32 %1, i32 %2, i32 %158, i32 %118, i32 6, float %143, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 9.000000e-01)
br label %160
160: ; preds = %140, %154
%161 = add nuw nsw i64 %141, 1
%162 = icmp eq i64 %161, 7
br i1 %162, label %163, label %140
163: ; preds = %160, %110, %16
ret void
}