#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 EXIT_FAILURE;
int EXIT_SUCCESS;
float atof(char *);
int is_valid(float);
int /*<<< orphan*/ printf(char *, ...);
float sqrt(float);
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char **argv) {
  if (argc == 1 || (argc - 1) % 2 != 0 || argc > 5) {
    printf("Usage: typoratio [-s fontsize] [-l linelength] [-h lineheight]\n\n "
           "Calculate typographical ratios:\n   Specify one or two of the "
           "typographical parameters to calculate the optimal\n   value(s) of "
           "the remaining parameter(s).\n");
    return EXIT_SUCCESS;
  }
  float s = 0.0f;
  float l = 0.0f;
  float h = 0.0f;
  int i;
  for (i = 1; i < argc; i += 2) {
    if (strcmp(argv[i], "-s") != 0 && strcmp(argv[i], "-l") != 0 &&
        strcmp(argv[i], "-h") != 0) {
      printf("Error: Invalid option.\n");
      return EXIT_FAILURE;
    }
    float value = atof(argv[i + 1]);
    int valid = is_valid(value);
    if (valid != 1) {
      char message[39];
      strcpy(message, "Error: ");
      strcat(message, valid == 0 ? "Invalid " : "Negative ");
      strcat(message, "value for ");
      strcat(message, strcmp(argv[i], "-s") == 0
                          ? "font size."
                          : (strcmp(argv[i], "-l") == 0 ? "line length."
                                                        : "line height."));
      printf("%s\n", message);
      return EXIT_FAILURE;
    }
    if (strcmp(argv[i], "-s") == 0 && s == 0.0f)
      s = value;
    else if (strcmp(argv[i], "-l") == 0 && l == 0.0f)
      l = value;
    else if (strcmp(argv[i], "-h") == 0 && h == 0.0f)
      h = value;
    else {
      printf("Error: Value redefined.\n");
      return EXIT_FAILURE;
    }
  }
  double const r = 1.61803398875;
  if (s != 0.0f && l == 0.0f && h == 0.0f) {
    h = r * s;
    l = h * h;
  } else if (s == 0.0f && l != 0.0f && h == 0.0f) {
    h = sqrt(l);
    s = h / r;
  } else if (s == 0.0f && l == 0.0f && h != 0.0f) {
    s = h / r;
    l = h * h;
  } else if (s != 0.0f && l != 0.0f) {
    h = (r - 1.0 / (2.0 * r) * (1.0 - l / (r * r * s * s))) * s;
  } else if (s != 0.0f && h != 0.0f) {
    l = (r * r * s * s) * (1.0 + 2.0 * r * (h / s - r));
  } else {
    double const r2 = r * r;
    s = (sqrt(h * h * r2 * r2 - 2.0 * l * r2 + l) + h * r2) /
        (2.0 * r2 * r - r);
  }
  printf("Font Size:   %f\nLine Length: %f\nLine Height: %f\n", s, l, h);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     11b1 <main+0x41>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b1 <main+0x41>
cmpl   $0x5,-0x8(%rbp)
jle    11d0 <main+0x60>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    186b <main+0x6fb>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14a6 <main+0x336>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xf06(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1280 <main+0x110>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xee7(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1280 <main+0x110>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xec8(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1280 <main+0x110>
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2d6a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    186b <main+0x6fb>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <atof@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
call   1070 <is_valid@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x1,-0x28(%rbp)
je     1392 <main+0x222>
lea    -0x50(%rbp),%rdi
lea    0xe78(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x50(%rbp),%rdi
mov    -0x28(%rbp),%ecx
lea    0xe76(%rip),%rsi
lea    0xe66(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rsi
call   1090 <strcat@plt>
lea    -0x50(%rbp),%rdi
lea    0xe62(%rip),%rsi
call   1090 <strcat@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe06(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    132d <main+0x1bd>
lea    0xe37(%rip),%rax
mov    %rax,-0x70(%rbp)
jmp    1362 <main+0x1f2>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdd7(%rip),%rsi
call   1060 <strcmp@plt>
mov    %rax,%rdx
lea    0xe24(%rip),%rax
lea    0xe10(%rip),%rcx
cmp    $0x0,%rdx
cmove  %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x68(%rbp),%rdi
mov    -0x70(%rbp),%rsi
call   1090 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2c58(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    186b <main+0x6fb>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd6f(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    13da <main+0x26a>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    13da <main+0x26a>
jp     13da <main+0x26a>
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1493 <main+0x323>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd2a(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1422 <main+0x2b2>
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1422 <main+0x2b2>
jp     1422 <main+0x2b2>
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    148e <main+0x31e>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xce5(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    146a <main+0x2fa>
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    146a <main+0x2fa>
jp     146a <main+0x2fa>
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1489 <main+0x319>
lea    0xd13(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2b61(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    186b <main+0x6fb>
jmp    148e <main+0x31e>
jmp    1493 <main+0x323>
jmp    1498 <main+0x328>
mov    -0x20(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x20(%rbp)
jmp    11ef <main+0x7f>
movsd  0xb52(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    14cf <main+0x35f>
jp     14cf <main+0x35f>
jmp    152f <main+0x3bf>
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    152f <main+0x3bf>
jp     152f <main+0x3bf>
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    152f <main+0x3bf>
jp     152f <main+0x3bf>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xaf2(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1836 <main+0x6c6>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    15ab <main+0x43b>
jp     15ab <main+0x43b>
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1562 <main+0x3f2>
jp     1562 <main+0x3f2>
jmp    15ab <main+0x43b>
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    15ab <main+0x43b>
jp     15ab <main+0x43b>
movss  -0x18(%rbp),%xmm0
call   1080 <sqrt@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xa67(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1831 <main+0x6c1>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1627 <main+0x4b7>
jp     1627 <main+0x4b7>
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1627 <main+0x4b7>
jp     1627 <main+0x4b7>
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    15f5 <main+0x485>
jp     15f5 <main+0x485>
jmp    1627 <main+0x4b7>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0x9fa(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    182c <main+0x6bc>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1643 <main+0x4d3>
jp     1643 <main+0x4d3>
jmp    16cd <main+0x55d>
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    165f <main+0x4ef>
jp     165f <main+0x4ef>
jmp    16cd <main+0x55d>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0x997(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x14(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movsd  0x992(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0x98e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x952(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1827 <main+0x6b7>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    16e9 <main+0x579>
jp     16e9 <main+0x579>
jmp    176b <main+0x5fb>
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1705 <main+0x595>
jp     1705 <main+0x595>
jmp    176b <main+0x5fb>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0x8fa(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
divss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0x8c3(%rip),%xmm2
subsd  %xmm2,%xmm1
movsd  0x8d7(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x8d3(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1822 <main+0x6b2>
movsd  0x89d(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0x882(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0x875(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0x861(%rip),%xmm2
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0x83e(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1080 <sqrt@plt>
cvtss2sd %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0x80b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x7f3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1827 <main+0x6b7>
jmp    182c <main+0x6bc>
jmp    1831 <main+0x6c1>
jmp    1836 <main+0x6c6>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x1c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0x945(%rip),%rdi
mov    $0x3,%al
call   1050 <printf@plt>
mov    0x2772(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
cmp    $0x1,%edi
je     11e9 <main+0x69>
mov    %edi,%r13d
cmp    $0x5,%edi
jg     11e9 <main+0x69>
mov    %r13d,%eax
and    $0x1,%eax
je     11e9 <main+0x69>
xorps  %xmm4,%xmm4
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
cmp    $0x2,%r13d
jl     15e4 <main+0x464>
mov    %rsi,%rbx
mov    $0x1,%r12d
lea    0xe7e(%rip),%r14
lea    0xe7a(%rip),%r15
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
jmp    1229 <main+0xa9>
lea    0xf08(%rip),%rdi
call   1040 <puts@plt>
mov    0x2ddc(%rip),%rax
mov    (%rax),%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
nopl   (%rax)
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
add    $0x2,%r12
cmp    %r13d,%r12d
jge    13a6 <main+0x226>
mov    (%rbx,%r12,8),%rdi
mov    %r14,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1264 <main+0xe4>
mov    (%rbx,%r12,8),%rdi
mov    %r15,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1264 <main+0xe4>
mov    (%rbx,%r12,8),%rdi
lea    0xdf4(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1445 <main+0x2c5>
mov    0x8(%rbx,%r12,8),%rdi
call   1050 <atof@plt>
movss  %xmm0,0xc(%rsp)
call   1080 <is_valid@plt>
cmp    $0x1,%eax
jne    1322 <main+0x1a2>
mov    (%rbx,%r12,8),%rdi
mov    %r14,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    12a8 <main+0x128>
movss  0x8(%rsp),%xmm0
ucomiss 0xda0(%rip),%xmm0
jne    12a8 <main+0x128>
jnp    1210 <main+0x90>
mov    (%rbx,%r12,8),%rdi
mov    %r15,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    12e0 <main+0x160>
movss  (%rsp),%xmm0
ucomiss 0xd7b(%rip),%xmm0
jne    12e0 <main+0x160>
jp     12e0 <main+0x160>
movss  0xc(%rsp),%xmm0
movss  %xmm0,(%rsp)
jmp    121c <main+0x9c>
nopl   0x0(%rax)
mov    (%rbx,%r12,8),%rdi
lea    0xd5f(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1316 <main+0x196>
movss  0x4(%rsp),%xmm0
ucomiss 0xd3e(%rip),%xmm0
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
jne    1316 <main+0x196>
jnp    121c <main+0x9c>
lea    0xdac(%rip),%rdi
jmp    1465 <main+0x2e5>
mov    %eax,%ebp
lea    0xd22(%rip),%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
test   %ebp,%ebp
lea    0xd14(%rip),%rax
lea    0xd16(%rip),%rsi
cmove  %rax,%rsi
mov    %r14,%rdi
call   10a0 <strcat@plt>
lea    0xd0d(%rip),%rsi
mov    %r14,%rdi
call   10a0 <strcat@plt>
mov    (%rbx,%r12,8),%rdi
lea    0xcd6(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     144e <main+0x2ce>
mov    (%rbx,%r12,8),%rdi
lea    0xcc0(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
lea    0xce8(%rip),%rax
lea    0xcee(%rip),%rsi
cmove  %rax,%rsi
jmp    1455 <main+0x2d5>
xorps  %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    13b6 <main+0x236>
jnp    13ff <main+0x27f>
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    13ff <main+0x27f>
jp     13ff <main+0x27f>
xorps  %xmm1,%xmm1
movss  0x4(%rsp),%xmm2
ucomiss %xmm1,%xmm2
jne    13ff <main+0x27f>
jp     13ff <main+0x27f>
movss  0x8(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulsd  0xc51(%rip),%xmm0
cvtsd2ss %xmm0,%xmm3
movaps %xmm3,%xmm0
mulss  %xmm3,%xmm0
movss  %xmm0,(%rsp)
movaps %xmm1,%xmm0
jmp    1668 <main+0x4e8>
movss  0x8(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    1476 <main+0x2f6>
jp     1476 <main+0x2f6>
xorps  %xmm0,%xmm0
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    141b <main+0x29b>
jnp    1476 <main+0x2f6>
movss  0x4(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    1476 <main+0x2f6>
jp     1476 <main+0x2f6>
xorps  %xmm0,%xmm0
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
movaps %xmm1,%xmm0
jb     14c3 <main+0x343>
sqrtss %xmm0,%xmm0
jmp    14c8 <main+0x348>
lea    0xc95(%rip),%rdi
jmp    1465 <main+0x2e5>
lea    0xc1e(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   10a0 <strcat@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    0x2b6f(%rip),%rax
jmp    11fc <main+0x7c>
xorps  %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    14e6 <main+0x366>
jp     14e6 <main+0x366>
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    14e6 <main+0x366>
jp     14e6 <main+0x366>
xorps  %xmm1,%xmm1
movss  0x4(%rsp),%xmm2
ucomiss %xmm1,%xmm2
jne    14a2 <main+0x322>
jnp    14e6 <main+0x366>
movss  0x4(%rsp),%xmm3
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
divsd  0xb81(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
jmp    13eb <main+0x26b>
call   1090 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
divsd  0xb61(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
movaps %xmm0,%xmm3
movaps %xmm1,%xmm0
jmp    1668 <main+0x4e8>
movss  0x8(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    14f3 <main+0x373>
jnp    1554 <main+0x3d4>
xorps  %xmm0,%xmm0
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    1502 <main+0x382>
jnp    1554 <main+0x3d4>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x8(%rsp),%xmm4
xorps  %xmm1,%xmm1
cvtss2sd %xmm4,%xmm1
movsd  0xae8(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
addsd  0xaf4(%rip),%xmm0
mulsd  0xaf4(%rip),%xmm0
addsd  0xaf4(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm3
movaps %xmm4,%xmm0
jmp    1668 <main+0x4e8>
xorps  %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    1564 <main+0x3e4>
jnp    15cf <main+0x44f>
movss  0x4(%rsp),%xmm1
ucomiss %xmm0,%xmm1
xorps  %xmm4,%xmm4
jne    1574 <main+0x3f4>
jnp    15df <main+0x45f>
movss  0x8(%rsp),%xmm4
xorps  %xmm0,%xmm0
cvtss2sd %xmm4,%xmm0
movaps %xmm1,%xmm3
movsd  0xa74(%rip),%xmm1
mulsd  %xmm0,%xmm1
movaps %xmm3,%xmm2
divss  %xmm4,%xmm2
cvtss2sd %xmm2,%xmm2
addsd  0xa75(%rip),%xmm2
mulsd  0xa75(%rip),%xmm2
addsd  0xa75(%rip),%xmm2
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  %xmm0,(%rsp)
movaps %xmm4,%xmm0
jmp    1668 <main+0x4e8>
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
xorps  %xmm4,%xmm4
jmp    15e4 <main+0x464>
movss  (%rsp),%xmm0
movaps %xmm0,%xmm2
movss  %xmm1,0x4(%rsp)
movaps %xmm1,%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xa00(%rip),%xmm1
movss  %xmm2,(%rsp)
cvtss2sd %xmm2,%xmm2
movaps %xmm2,%xmm3
addsd  %xmm2,%xmm3
mulsd  0x9f0(%rip),%xmm3
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
ucomiss %xmm4,%xmm0
jb     1637 <main+0x4b7>
sqrtss %xmm0,%xmm0
jmp    163c <main+0x4bc>
call   1090 <sqrt@plt>
cvtss2sd %xmm0,%xmm0
movss  0x4(%rsp),%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
mulsd  0x9ab(%rip),%xmm1
addsd  %xmm0,%xmm1
divsd  0x9af(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm3,%xmm2
lea    0xa15(%rip),%rdi
mov    $0x3,%al
call   1060 <printf@plt>
jmp    11f5 <main+0x75>

LLVM IR (-O0):
@.str = [220 x i8] c"Usage: typoratio [-s fontsize] [-l linelength] [-h lineheight]\0A\0A Calculate typographical ratios:\0A Specify one or two of the typographical parameters to calculate the optimal\0A value(s) of the remaining parameter(s).\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.1 = [3 x i8] c"-s\00"
@.str.2 = [3 x i8] c"-l\00"
@.str.3 = [3 x i8] c"-h\00"
@.str.4 = [24 x i8] c"Error: Invalid option.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.5 = [8 x i8] c"Error: \00"
@.str.6 = [9 x i8] c"Invalid \00"
@.str.7 = [10 x i8] c"Negative \00"
@.str.8 = [11 x i8] c"value for \00"
@.str.9 = [11 x i8] c"font size.\00"
@.str.10 = [13 x i8] c"line length.\00"
@.str.11 = [13 x i8] c"line height.\00"
@.str.12 = [4 x i8] c"%s\0A\00"
@.str.13 = [25 x i8] c"Error: Value redefined.\0A\00"
@.str.14 = [49 x i8] c"Font Size: %f\0ALine Length: %f\0ALine Height: %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca i32
%10 = alloca float
%11 = alloca i32
%12 = alloca [39 x i8]
%13 = alloca double
%14 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* %4
%16 = icmp eq i32 %15, 1
br i1 %16, label %25, label %17
17: ; preds = %2
%18 = load i32, i32* %4
%19 = sub nsw i32 %18, 1
%20 = srem i32 %19, 2
%21 = icmp ne i32 %20, 0
br i1 %21, label %25, label %22
22: ; preds = %17
%23 = load i32, i32* %4
%24 = icmp sgt i32 %23, 5
br i1 %24, label %25, label %28
25: ; preds = %22, %17, %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([220 x i8], [220 x i8]* @.str, i64 0, i64 0))
%27 = load i32, i32* @EXIT_SUCCESS
store i32 %27, i32* %3
br label %285
28: ; preds = %22
store float 0.000000e+00, float* %6
store float 0.000000e+00, float* %7
store float 0.000000e+00, float* %8
store i32 1, i32* %9
br label %29
29: ; preds = %153, %28
%30 = load i32, i32* %9
%31 = load i32, i32* %4
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %156
33: ; preds = %29
%34 = load i8**, i8*** %5
%35 = load i32, i32* %9
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8*, i8** %34, i64 %36
%38 = load i8*, i8** %37
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %60
41: ; preds = %33
%42 = load i8**, i8*** %5
%43 = load i32, i32* %9
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8*, i8** %42, i64 %44
%46 = load i8*, i8** %45
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %60
49: ; preds = %41
%50 = load i8**, i8*** %5
%51 = load i32, i32* %9
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8*, i8** %50, i64 %52
%54 = load i8*, i8** %53
%55 = call i64 @strcmp(i8* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%56 = icmp ne i64 %55, 0
br i1 %56, label %57, label %60
57: ; preds = %49
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%59 = load i32, i32* @EXIT_FAILURE
store i32 %59, i32* %3
br label %285
60: ; preds = %49, %41, %33
%61 = load i8**, i8*** %5
%62 = load i32, i32* %9
%63 = add nsw i32 %62, 1
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8*, i8** %61, i64 %64
%66 = load i8*, i8** %65
%67 = call float @atof(i8* %66)
store float %67, float* %10
%68 = load float, float* %10
%69 = call i32 @is_valid(float %68)
store i32 %69, i32* %11
%70 = load i32, i32* %11
%71 = icmp ne i32 %70, 1
br i1 %71, label %72, label %108
72: ; preds = %60
%73 = getelementptr inbounds [39 x i8], [39 x i8]* %12, i64 0, i64 0
%74 = call i32 @strcpy(i8* %73, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%75 = getelementptr inbounds [39 x i8], [39 x i8]* %12, i64 0, i64 0
%76 = load i32, i32* %11
%77 = icmp eq i32 %76, 0
%78 = zext i1 %77 to i64
%79 = select i1 %77, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0)
%80 = call i32 @strcat(i8* %75, i8* %79)
%81 = getelementptr inbounds [39 x i8], [39 x i8]* %12, i64 0, i64 0
%82 = call i32 @strcat(i8* %81, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%83 = getelementptr inbounds [39 x i8], [39 x i8]* %12, i64 0, i64 0
%84 = load i8**, i8*** %5
%85 = load i32, i32* %9
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8*, i8** %84, i64 %86
%88 = load i8*, i8** %87
%89 = call i64 @strcmp(i8* %88, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%90 = icmp eq i64 %89, 0
br i1 %90, label %91, label %92
91: ; preds = %72
br label %102
92: ; preds = %72
%93 = load i8**, i8*** %5
%94 = load i32, i32* %9
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8*, i8** %93, i64 %95
%97 = load i8*, i8** %96
%98 = call i64 @strcmp(i8* %97, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%99 = icmp eq i64 %98, 0
%100 = zext i1 %99 to i64
%101 = select i1 %99, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0)
br label %102
102: ; preds = %92, %91
%103 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), %91 ], [ %101, %92 ]
%104 = call i32 @strcat(i8* %83, i8* %103)
%105 = getelementptr inbounds [39 x i8], [39 x i8]* %12, i64 0, i64 0
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %105)
%107 = load i32, i32* @EXIT_FAILURE
store i32 %107, i32* %3
br label %285
108: ; preds = %60
%109 = load i8**, i8*** %5
%110 = load i32, i32* %9
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds i8*, i8** %109, i64 %111
%113 = load i8*, i8** %112
%114 = call i64 @strcmp(i8* %113, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%115 = icmp eq i64 %114, 0
br i1 %115, label %116, label %121
116: ; preds = %108
%117 = load float, float* %6
%118 = fcmp oeq float %117, 0.000000e+00
br i1 %118, label %119, label %121
119: ; preds = %116
%120 = load float, float* %10
store float %120, float* %6
br label %152
121: ; preds = %116, %108
%122 = load i8**, i8*** %5
%123 = load i32, i32* %9
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds i8*, i8** %122, i64 %124
%126 = load i8*, i8** %125
%127 = call i64 @strcmp(i8* %126, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%128 = icmp eq i64 %127, 0
br i1 %128, label %129, label %134
129: ; preds = %121
%130 = load float, float* %7
%131 = fcmp oeq float %130, 0.000000e+00
br i1 %131, label %132, label %134
132: ; preds = %129
%133 = load float, float* %10
store float %133, float* %7
br label %151
134: ; preds = %129, %121
%135 = load i8**, i8*** %5
%136 = load i32, i32* %9
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds i8*, i8** %135, i64 %137
%139 = load i8*, i8** %138
%140 = call i64 @strcmp(i8* %139, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%141 = icmp eq i64 %140, 0
br i1 %141, label %142, label %147
142: ; preds = %134
%143 = load float, float* %8
%144 = fcmp oeq float %143, 0.000000e+00
br i1 %144, label %145, label %147
145: ; preds = %142
%146 = load float, float* %10
store float %146, float* %8
br label %150
147: ; preds = %142, %134
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0))
%149 = load i32, i32* @EXIT_FAILURE
store i32 %149, i32* %3
br label %285
150: ; preds = %145
br label %151
151: ; preds = %150, %132
br label %152
152: ; preds = %151, %119
br label %153
153: ; preds = %152
%154 = load i32, i32* %9
%155 = add nsw i32 %154, 2
store i32 %155, i32* %9
br label %29
156: ; preds = %29
store double 0x3FF9E3779B97F681, double* %13
%157 = load float, float* %6
%158 = fcmp une float %157, 0.000000e+00
br i1 %158, label %159, label %173
159: ; preds = %156
%160 = load float, float* %7
%161 = fcmp oeq float %160, 0.000000e+00
br i1 %161, label %162, label %173
162: ; preds = %159
%163 = load float, float* %8
%164 = fcmp oeq float %163, 0.000000e+00
br i1 %164, label %165, label %173
165: ; preds = %162
%166 = load float, float* %6
%167 = fpext float %166 to double
%168 = fmul double 0x3FF9E3779B97F681, %167
%169 = fptrunc double %168 to float
store float %169, float* %8
%170 = load float, float* %8
%171 = load float, float* %8
%172 = fmul float %170, %171
store float %172, float* %7
br label %276
173: ; preds = %162, %159, %156
%174 = load float, float* %6
%175 = fcmp oeq float %174, 0.000000e+00
br i1 %175, label %176, label %189
176: ; preds = %173
%177 = load float, float* %7
%178 = fcmp une float %177, 0.000000e+00
br i1 %178, label %179, label %189
179: ; preds = %176
%180 = load float, float* %8
%181 = fcmp oeq float %180, 0.000000e+00
br i1 %181, label %182, label %189
182: ; preds = %179
%183 = load float, float* %7
%184 = call float @sqrt(float %183)
store float %184, float* %8
%185 = load float, float* %8
%186 = fpext float %185 to double
%187 = fdiv double %186, 0x3FF9E3779B97F681
%188 = fptrunc double %187 to float
store float %188, float* %6
br label %275
189: ; preds = %179, %176, %173
%190 = load float, float* %6
%191 = fcmp oeq float %190, 0.000000e+00
br i1 %191, label %192, label %206
192: ; preds = %189
%193 = load float, float* %7
%194 = fcmp oeq float %193, 0.000000e+00
br i1 %194, label %195, label %206
195: ; preds = %192
%196 = load float, float* %8
%197 = fcmp une float %196, 0.000000e+00
br i1 %197, label %198, label %206
198: ; preds = %195
%199 = load float, float* %8
%200 = fpext float %199 to double
%201 = fdiv double %200, 0x3FF9E3779B97F681
%202 = fptrunc double %201 to float
store float %202, float* %6
%203 = load float, float* %8
%204 = load float, float* %8
%205 = fmul float %203, %204
store float %205, float* %7
br label %274
206: ; preds = %195, %192, %189
%207 = load float, float* %6
%208 = fcmp une float %207, 0.000000e+00
br i1 %208, label %209, label %228
209: ; preds = %206
%210 = load float, float* %7
%211 = fcmp une float %210, 0.000000e+00
br i1 %211, label %212, label %228
212: ; preds = %209
%213 = load float, float* %7
%214 = fpext float %213 to double
%215 = load float, float* %6
%216 = fpext float %215 to double
%217 = fmul double 0x4004F1BBCDCBFD52, %216
%218 = load float, float* %6
%219 = fpext float %218 to double
%220 = fmul double %217, %219
%221 = fdiv double %214, %220
%222 = fsub double 1.000000e+00, %221
%223 = call double @llvm.fmuladd.f64(double 0xBFD3C6EF372FE7E6, double %222, double 0x3FF9E3779B97F681)
%224 = load float, float* %6
%225 = fpext float %224 to double
%226 = fmul double %223, %225
%227 = fptrunc double %226 to float
store float %227, float* %8
br label %273
228: ; preds = %209, %206
%229 = load float, float* %6
%230 = fcmp une float %229, 0.000000e+00
br i1 %230, label %231, label %249
231: ; preds = %228
%232 = load float, float* %8
%233 = fcmp une float %232, 0.000000e+00
br i1 %233, label %234, label %249
234: ; preds = %231
%235 = load float, float* %6
%236 = fpext float %235 to double
%237 = fmul double 0x4004F1BBCDCBFD52, %236
%238 = load float, float* %6
%239 = fpext float %238 to double
%240 = fmul double %237, %239
%241 = load float, float* %8
%242 = load float, float* %6
%243 = fdiv float %241, %242
%244 = fpext float %243 to double
%245 = fsub double %244, 0x3FF9E3779B97F681
%246 = call double @llvm.fmuladd.f64(double 0x4009E3779B97F681, double %245, double 1.000000e+00)
%247 = fmul double %240, %246
%248 = fptrunc double %247 to float
store float %248, float* %7
br label %272
249: ; preds = %231, %228
store double 0x4004F1BBCDCBFD52, double* %14
%250 = load float, float* %8
%251 = load float, float* %8
%252 = fmul float %250, %251
%253 = fpext float %252 to double
%254 = fmul double %253, 0x4004F1BBCDCBFD52
%255 = load float, float* %7
%256 = fpext float %255 to double
%257 = fmul double 2.000000e+00, %256
%258 = fmul double %257, 0x4004F1BBCDCBFD52
%259 = fneg double %258
%260 = call double @llvm.fmuladd.f64(double %254, double 0x4004F1BBCDCBFD52, double %259)
%261 = load float, float* %7
%262 = fpext float %261 to double
%263 = fadd double %260, %262
%264 = fptrunc double %263 to float
%265 = call float @sqrt(float %264)
%266 = fpext float %265 to double
%267 = load float, float* %8
%268 = fpext float %267 to double
%269 = call double @llvm.fmuladd.f64(double %268, double 0x4004F1BBCDCBFD52, double %266)
%270 = fdiv double %269, 0x401B6A99B4B1FE4A
%271 = fptrunc double %270 to float
store float %271, float* %6
br label %272
272: ; preds = %249, %234
br label %273
273: ; preds = %272, %212
br label %274
274: ; preds = %273, %198
br label %275
275: ; preds = %274, %182
br label %276
276: ; preds = %275, %165
%277 = load float, float* %6
%278 = fpext float %277 to double
%279 = load float, float* %7
%280 = fpext float %279 to double
%281 = load float, float* %8
%282 = fpext float %281 to double
%283 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0), double %278, double %280, double %282)
%284 = load i32, i32* @EXIT_SUCCESS
store i32 %284, i32* %3
br label %285
285: ; preds = %276, %147, %102, %57, %25
%286 = load i32, i32* %3
ret i32 %286
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@.str.1 = [3 x i8] c"-s\00"
@.str.2 = [3 x i8] c"-l\00"
@.str.3 = [3 x i8] c"-h\00"
@EXIT_FAILURE = global i32 0
@.str.5 = [8 x i8] c"Error: \00"
@.str.6 = [9 x i8] c"Invalid \00"
@.str.7 = [10 x i8] c"Negative \00"
@.str.8 = [11 x i8] c"value for \00"
@.str.9 = [11 x i8] c"font size.\00"
@.str.10 = [13 x i8] c"line length.\00"
@.str.11 = [13 x i8] c"line height.\00"
@.str.14 = [49 x i8] c"Font Size: %f\0ALine Length: %f\0ALine Height: %f\0A\00"
@str = [24 x i8] c"Error: Value redefined.\00"
@str.15 = [23 x i8] c"Error: Invalid option.\00"
@str.16 = [219 x i8] c"Usage: typoratio [-s fontsize] [-l linelength] [-h lineheight]\0A\0A Calculate typographical ratios:\0A Specify one or two of the typographical parameters to calculate the optimal\0A value(s) of the remaining parameter(s).\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [39 x i8]
%4 = icmp eq i32 %0, 1
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = and i32 %0, 1
%7 = icmp eq i32 %6, 0
%8 = icmp sgt i32 %0, 5
%9 = or i1 %8, %7
br i1 %9, label %12, label %10
10: ; preds = %5
%11 = icmp sgt i32 %0, 1
br i1 %11, label %15, label %144
12: ; preds = %5, %2
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([219 x i8], [219 x i8]* @str.16, i64 0, i64 0))
%14 = load i32, i32* @EXIT_SUCCESS
br label %171
15: ; preds = %10, %83
%16 = phi i64 [ %87, %83 ], [ 1, %10 ]
%17 = phi float [ %86, %83 ], [ 0.000000e+00, %10 ]
%18 = phi float [ %85, %83 ], [ 0.000000e+00, %10 ]
%19 = phi float [ %84, %83 ], [ 0.000000e+00, %10 ]
%20 = getelementptr inbounds i8*, i8** %1, i64 %16
%21 = load i8*, i8** %20
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %35, label %24
24: ; preds = %15
%25 = load i8*, i8** %20
%26 = tail call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %35, label %28
28: ; preds = %24
%29 = load i8*, i8** %20
%30 = tail call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %35, label %32
32: ; preds = %28
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.15, i64 0, i64 0))
%34 = load i32, i32* @EXIT_FAILURE
br label %171
35: ; preds = %28, %24, %15
%36 = add nuw nsw i64 %16, 1
%37 = getelementptr inbounds i8*, i8** %1, i64 %36
%38 = load i8*, i8** %37
%39 = tail call float @atof(i8* %38)
%40 = tail call i32 @is_valid(float %39)
%41 = icmp eq i32 %40, 1
br i1 %41, label %62, label %42
42: ; preds = %35
%43 = getelementptr inbounds [39 x i8], [39 x i8]* %3, i64 0, i64 0
%44 = call i32 @strcpy(i8* %43, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%45 = icmp eq i32 %40, 0
%46 = select i1 %45, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0)
%47 = call i32 @strcat(i8* %43, i8* %46)
%48 = call i32 @strcat(i8* %43, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%49 = load i8*, i8** %20
%50 = call i64 @strcmp(i8* %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %57, label %52
52: ; preds = %42
%53 = load i8*, i8** %20
%54 = call i64 @strcmp(i8* %53, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
%56 = select i1 %55, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0)
br label %57
57: ; preds = %42, %52
%58 = phi i8* [ %56, %52 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), %42 ]
%59 = call i32 @strcat(i8* %43, i8* %58)
%60 = call i32 @puts(i8* %43)
%61 = load i32, i32* @EXIT_FAILURE
br label %171
62: ; preds = %35
%63 = load i8*, i8** %20
%64 = tail call i64 @strcmp(i8* %63, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
%66 = fcmp oeq float %17, 0.000000e+00
%67 = select i1 %65, i1 %66, i1 false
br i1 %67, label %83, label %68
68: ; preds = %62
%69 = load i8*, i8** %20
%70 = tail call i64 @strcmp(i8* %69, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%71 = icmp eq i64 %70, 0
%72 = fcmp oeq float %18, 0.000000e+00
%73 = select i1 %71, i1 %72, i1 false
br i1 %73, label %83, label %74
74: ; preds = %68
%75 = load i8*, i8** %20
%76 = tail call i64 @strcmp(i8* %75, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%77 = icmp eq i64 %76, 0
%78 = fcmp oeq float %19, 0.000000e+00
%79 = select i1 %77, i1 %78, i1 false
br i1 %79, label %83, label %80
80: ; preds = %74
%81 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%82 = load i32, i32* @EXIT_FAILURE
br label %171
83: ; preds = %74, %68, %62
%84 = phi float [ %39, %74 ], [ %19, %68 ], [ %19, %62 ]
%85 = phi float [ %18, %74 ], [ %39, %68 ], [ %18, %62 ]
%86 = phi float [ %17, %74 ], [ %17, %68 ], [ %39, %62 ]
%87 = add nuw i64 %16, 2
%88 = trunc i64 %87 to i32
%89 = icmp slt i32 %88, %0
br i1 %89, label %15, label %90
90: ; preds = %83
%91 = fcmp une float %86, 0.000000e+00
%92 = fcmp oeq float %85, 0.000000e+00
%93 = select i1 %91, i1 %92, i1 false
%94 = fcmp oeq float %84, 0.000000e+00
%95 = select i1 %93, i1 %94, i1 false
br i1 %95, label %96, label %101
96: ; preds = %90
%97 = fpext float %86 to double
%98 = fmul double %97, 0x3FF9E3779B97F681
%99 = fptrunc double %98 to float
%100 = fmul float %99, %99
br label %162
101: ; preds = %90
%102 = fcmp oeq float %86, 0.000000e+00
%103 = fcmp une float %85, 0.000000e+00
%104 = select i1 %102, i1 %103, i1 false
%105 = select i1 %104, i1 %94, i1 false
br i1 %105, label %106, label %111
106: ; preds = %101
%107 = tail call float @sqrt(float %85)
%108 = fpext float %107 to double
%109 = fdiv double %108, 0x3FF9E3779B97F681
%110 = fptrunc double %109 to float
br label %162
111: ; preds = %101
%112 = select i1 %102, i1 %92, i1 false
%113 = fcmp une float %84, 0.000000e+00
%114 = select i1 %112, i1 %113, i1 false
br i1 %114, label %115, label %120
115: ; preds = %111
%116 = fpext float %84 to double
%117 = fdiv double %116, 0x3FF9E3779B97F681
%118 = fptrunc double %117 to float
%119 = fmul float %84, %84
br label %162
120: ; preds = %111
%121 = select i1 %91, i1 %103, i1 false
br i1 %121, label %122, label %132
122: ; preds = %120
%123 = fpext float %85 to double
%124 = fpext float %86 to double
%125 = fmul double %124, 0x4004F1BBCDCBFD52
%126 = fmul double %125, %124
%127 = fdiv double %123, %126
%128 = fsub double 1.000000e+00, %127
%129 = tail call double @llvm.fmuladd.f64(double %128, double 0xBFD3C6EF372FE7E6, double 0x3FF9E3779B97F681)
%130 = fmul double %129, %124
%131 = fptrunc double %130 to float
br label %162
132: ; preds = %120
%133 = select i1 %91, i1 %113, i1 false
br i1 %133, label %134, label %144
134: ; preds = %132
%135 = fpext float %86 to double
%136 = fmul double %135, 0x4004F1BBCDCBFD52
%137 = fmul double %136, %135
%138 = fdiv float %84, %86
%139 = fpext float %138 to double
%140 = fadd double %139, 0xBFF9E3779B97F681
%141 = tail call double @llvm.fmuladd.f64(double %140, double 0x4009E3779B97F681, double 1.000000e+00)
%142 = fmul double %137, %141
%143 = fptrunc double %142 to float
br label %162
144: ; preds = %10, %132
%145 = phi float [ %85, %132 ], [ 0.000000e+00, %10 ]
%146 = phi float [ %84, %132 ], [ 0.000000e+00, %10 ]
%147 = fmul float %146, %146
%148 = fpext float %147 to double
%149 = fmul double %148, 0x4004F1BBCDCBFD52
%150 = fpext float %145 to double
%151 = fmul double %150, 2.000000e+00
%152 = fmul double %151, 0xC004F1BBCDCBFD52
%153 = tail call double @llvm.fmuladd.f64(double %149, double 0x4004F1BBCDCBFD52, double %152)
%154 = fadd double %153, %150
%155 = fptrunc double %154 to float
%156 = tail call float @sqrt(float %155)
%157 = fpext float %156 to double
%158 = fpext float %146 to double
%159 = tail call double @llvm.fmuladd.f64(double %158, double 0x4004F1BBCDCBFD52, double %157)
%160 = fdiv double %159, 0x401B6A99B4B1FE4A
%161 = fptrunc double %160 to float
br label %162
162: ; preds = %106, %122, %144, %134, %115, %96
%163 = phi float [ %99, %96 ], [ %107, %106 ], [ %84, %115 ], [ %131, %122 ], [ %84, %134 ], [ %146, %144 ]
%164 = phi float [ %100, %96 ], [ %85, %106 ], [ %119, %115 ], [ %85, %122 ], [ %143, %134 ], [ %145, %144 ]
%165 = phi float [ %86, %96 ], [ %110, %106 ], [ %118, %115 ], [ %86, %122 ], [ %86, %134 ], [ %161, %144 ]
%166 = fpext float %165 to double
%167 = fpext float %164 to double
%168 = fpext float %163 to double
%169 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0), double %166, double %167, double %168)
%170 = load i32, i32* @EXIT_SUCCESS
br label %171
171: ; preds = %57, %80, %32, %162, %12
%172 = phi i32 [ %14, %12 ], [ %34, %32 ], [ %170, %162 ], [ %82, %80 ], [ %61, %57 ]
ret i32 %172
}