#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 */
double atof(char *);
int atoi(char *);
int /*<<< orphan*/ exit(int);
double floor(double);
double logtwo(double);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int input_data(int argc, char *argv[]) {
  int C, B, A, ERP, EWP, RWP, NSER, NSubbanks, fully_assoc;
  double tech;
  double logbanks, assoc;
  double logbanksfloor, assocfloor;
  int bits_output = 64;
  if ((argc != 6) && (argc != 9) && (argc != 15)) {
    printf("Cmd-line parameters: C B A TECH NSubbanks\n");
    printf("                 OR: C B A TECH RWP ERP EWP NSubbanks\n");
    exit(1);
  }
  B = atoi(argv[2]);
  if ((B < 1)) {
    printf("Block size must >=1\n");
    exit(1);
  }
  if (argc == 9) {
    if ((B * 8 < bits_output)) {
      printf("Block size must be at least %d\n", bits_output / 8);
      exit(1);
    }
    tech = atof(argv[4]);
    if ((tech <= 0)) {
      printf("Feature size must be > 0\n");
      exit(1);
    }
    if ((tech > 0.8)) {
      printf("Feature size must be <= 0.80 (um)\n");
      exit(1);
    }
    RWP = atoi(argv[5]);
    ERP = atoi(argv[6]);
    EWP = atoi(argv[7]);
    NSER = 0;
    if ((RWP < 0) || (EWP < 0) || (ERP < 0)) {
      printf("Ports must >=0\n");
      exit(1);
    }
    if (RWP > 2) {
      printf("Maximum of 2 read/write ports\n");
      exit(1);
    }
    if ((RWP + ERP + EWP) < 1) {
      printf("Must have at least one port\n");
      exit(1);
    }
    NSubbanks = atoi(argv[8]);
    if (NSubbanks < 1) {
      printf("Number of subbanks should be greater than or equal to 1 and "
             "should be a power of 2\n");
      exit(1);
    }
    logbanks = logtwo((double)(NSubbanks));
    logbanksfloor = floor(logbanks);
    if (logbanks > logbanksfloor) {
      printf("Number of subbanks should be greater than or equal to 1 and "
             "should be a power of 2\n");
      exit(1);
    }
  } else if (argc == 6) {
    if ((B * 8 < bits_output)) {
      printf("Block size must be at least %d\n", bits_output / 8);
      exit(1);
    }
    tech = atof(argv[4]);
    if ((tech <= 0)) {
      printf("Feature size must be > 0\n");
      exit(1);
    }
    if ((tech > 0.8)) {
      printf("Feature size must be <= 0.80 (um)\n");
      exit(1);
    }
    RWP = 1;
    ERP = 0;
    EWP = 0;
    NSER = 0;
    NSubbanks = atoi(argv[5]);
    if (NSubbanks < 1) {
      printf("Number of subbanks should be greater than or equal to 1 and "
             "should be a power of 2\n");
      exit(1);
    }
    logbanks = logtwo((double)(NSubbanks));
    logbanksfloor = floor(logbanks);
    if (logbanks > logbanksfloor) {
      printf("Number of subbanks should be greater than or equal to 1 and "
             "should be a power of 2\n");
      exit(1);
    }
  } else {
    tech = atof(argv[9]);
    NSubbanks = atoi(argv[8]);
    if ((tech <= 0)) {
      printf("Feature size must be > 0\n");
      exit(1);
    }
    if ((tech > 0.8)) {
      printf("Feature size must be <= 0.80 (um)\n");
      exit(1);
    }
  }
  C = atoi(argv[1]) / ((int)(NSubbanks));
  if (atoi(argv[1]) < 64) {
    printf("Cache size must be greater than 32!\n");
    exit(1);
  }
  if ((strcmp(argv[3], "FA") == 0) || (argv[3][0] == '0')) {
    A = C / B;
    fully_assoc = 1;
  } else {
    if (strcmp(argv[3], "DM") == 0) {
      A = 1;
      fully_assoc = 0;
    } else {
      fully_assoc = 0;
      A = atoi(argv[3]);
      if ((A < 0) || (A > 16)) {
        printf("Associativity must be  1,2,4,8,16 or 0(fully associative)\n");
        exit(1);
      }
      assoc = logtwo((double)(A));
      assocfloor = floor(assoc);
      if (assoc > assocfloor) {
        printf("Associativity should be a power of 2\n");
        exit(1);
      }
    }
  }
  if (!fully_assoc && C / (B * A) < 1) {
    printf("Number of sets is less than 1:\n  Need to either increase cache "
           "size, or decrease associativity or block size\n  (or use fully "
           "associative cache)\n");
    exit(1);
  }
  return (1);
}


x86 assembly (clang, -O0):
<input_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x40,-0x64(%rbp)
cmpl   $0x6,-0x4(%rbp)
je     11ca <input_data+0x5a>
cmpl   $0x9,-0x4(%rbp)
je     11ca <input_data+0x5a>
cmpl   $0xf,-0x4(%rbp)
je     11ca <input_data+0x5a>
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jge    11fc <input_data+0x8c>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
cmpl   $0x9,-0x4(%rbp)
jne    13d7 <input_data+0x267>
mov    -0x18(%rbp),%eax
shl    $0x3,%eax
cmp    -0x64(%rbp),%eax
jge    123a <input_data+0xca>
mov    -0x64(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe56(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
jb     1272 <input_data+0x102>
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
movsd  -0x40(%rbp),%xmm0
movsd  0xd81(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12a1 <input_data+0x131>
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x0,-0x28(%rbp)
jl     12f6 <input_data+0x186>
cmpl   $0x0,-0x24(%rbp)
jl     12f6 <input_data+0x186>
cmpl   $0x0,-0x20(%rbp)
jge    130e <input_data+0x19e>
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
cmpl   $0x2,-0x28(%rbp)
jle    1330 <input_data+0x1c0>
lea    0xdcd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x28(%rbp),%eax
add    -0x20(%rbp),%eax
add    -0x24(%rbp),%eax
cmp    $0x1,%eax
jge    135a <input_data+0x1ea>
lea    0xdc2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x1,-0x30(%rbp)
jge    138c <input_data+0x21c>
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
cvtsi2sdl -0x30(%rbp),%xmm0
call   1060 <logtwo@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1090 <floor@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    13d2 <input_data+0x262>
lea    0xd67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    1596 <input_data+0x426>
cmpl   $0x6,-0x4(%rbp)
jne    1515 <input_data+0x3a5>
mov    -0x18(%rbp),%eax
shl    $0x3,%eax
cmp    -0x64(%rbp),%eax
jge    1415 <input_data+0x2a5>
mov    -0x64(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xc7b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
jb     144d <input_data+0x2dd>
lea    0xc63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
movsd  -0x40(%rbp),%xmm0
movsd  0xba6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    147c <input_data+0x30c>
lea    0xc4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
movl   $0x1,-0x28(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x1,-0x30(%rbp)
jge    14ca <input_data+0x35a>
lea    0xc6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
cvtsi2sdl -0x30(%rbp),%xmm0
call   1060 <logtwo@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1090 <floor@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    1510 <input_data+0x3a0>
lea    0xc29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    1591 <input_data+0x421>
mov    -0x10(%rbp),%rax
mov    0x48(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
jb     155d <input_data+0x3ed>
lea    0xb53(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
movsd  -0x40(%rbp),%xmm0
movsd  0xa96(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    158c <input_data+0x41c>
lea    0xb3e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    1591 <input_data+0x421>
jmp    1596 <input_data+0x426>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
cltd
idivl  -0x30(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
cmp    $0x40,%eax
jge    15d8 <input_data+0x468>
lea    0xbb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xbba(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     160a <input_data+0x49a>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1620 <input_data+0x4b0>
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %eax,-0x1c(%rbp)
movl   $0x1,-0x34(%rbp)
jmp    16e4 <input_data+0x574>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xb75(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1651 <input_data+0x4e1>
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x34(%rbp)
jmp    16df <input_data+0x56f>
movl   $0x0,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     167c <input_data+0x50c>
cmpl   $0x10,-0x1c(%rbp)
jle    1694 <input_data+0x524>
lea    0xb24(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
cvtsi2sdl -0x1c(%rbp),%xmm0
call   1060 <logtwo@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1090 <floor@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    16da <input_data+0x56a>
lea    0xb19(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    16df <input_data+0x56f>
jmp    16e4 <input_data+0x574>
cmpl   $0x0,-0x34(%rbp)
jne    171c <input_data+0x5ac>
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
cltd
idiv   %ecx
cmp    $0x1,%eax
jge    171c <input_data+0x5ac>
lea    0xafd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    $0x1,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<input_data>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0xf,%edi
ja     13e1 <input_data+0x261>
mov    %edi,%ebp
mov    $0x8240,%eax
bt     %edi,%eax
jae    13e1 <input_data+0x261>
mov    %rsi,%rbx
mov    0x10(%rsi),%rdi
call   1080 <atoi@plt>
test   %eax,%eax
jle    13a0 <input_data+0x220>
mov    %eax,%r14d
cmp    $0x6,%ebp
je     124c <input_data+0xcc>
cmp    $0x9,%ebp
jne    12b7 <input_data+0x137>
cmp    $0x7,%r14d
jbe    13c4 <input_data+0x244>
mov    0x20(%rbx),%rdi
call   1040 <atof@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    13a9 <input_data+0x229>
ucomisd 0xe0e(%rip),%xmm0
ja     13b2 <input_data+0x232>
mov    0x28(%rbx),%rdi
call   1080 <atoi@plt>
mov    %eax,%r15d
mov    0x30(%rbx),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebp
mov    0x38(%rbx),%rdi
call   1080 <atoi@plt>
test   %r15d,%r15d
js     13f6 <input_data+0x276>
test   %eax,%eax
js     13f6 <input_data+0x276>
test   %ebp,%ebp
js     13f6 <input_data+0x276>
cmp    $0x3,%r15d
jae    13ff <input_data+0x27f>
add    %r15d,%ebp
add    %eax,%ebp
je     1408 <input_data+0x288>
mov    0x40(%rbx),%rdi
jmp    127f <input_data+0xff>
cmp    $0x7,%r14d
jbe    13c4 <input_data+0x244>
mov    0x20(%rbx),%rdi
call   1040 <atof@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    13a9 <input_data+0x229>
ucomisd 0xd8b(%rip),%xmm0
ja     13b2 <input_data+0x232>
mov    0x28(%rbx),%rdi
call   1080 <atoi@plt>
test   %eax,%eax
jle    12ab <input_data+0x12b>
mov    %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
call   1070 <logtwo@plt>
movsd  %xmm0,(%rsp)
call   10a0 <floor@plt>
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    12f1 <input_data+0x171>
lea    0xe8f(%rip),%rdi
jmp    1421 <input_data+0x2a1>
mov    0x48(%rbx),%rdi
call   1040 <atof@plt>
xorpd  %xmm1,%xmm1
movsd  %xmm0,(%rsp)
ucomisd %xmm0,%xmm1
jae    13a9 <input_data+0x229>
mov    0x40(%rbx),%rdi
call   1080 <atoi@plt>
movsd  (%rsp),%xmm0
ucomisd 0xd17(%rip),%xmm0
ja     13b2 <input_data+0x232>
mov    %eax,%ebp
mov    0x8(%rbx),%rdi
call   1080 <atoi@plt>
mov    %eax,%ecx
cltd
idiv   %ebp
cmp    $0x3f,%ecx
jle    13bb <input_data+0x23b>
mov    %eax,%ebp
mov    0x18(%rbx),%rdi
lea    0xd13(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1390 <input_data+0x210>
mov    0x18(%rbx),%rdi
cmpb   $0x30,(%rdi)
je     1390 <input_data+0x210>
lea    0xcfc(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     137a <input_data+0x1fa>
mov    0x18(%rbx),%rdi
call   1080 <atoi@plt>
cmp    $0x11,%eax
jae    141a <input_data+0x29a>
mov    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
call   1070 <logtwo@plt>
movsd  %xmm0,(%rsp)
call   10a0 <floor@plt>
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    137f <input_data+0x1ff>
lea    0xd49(%rip),%rdi
jmp    1421 <input_data+0x2a1>
mov    $0x1,%ebx
imul   %r14d,%ebx
mov    %ebp,%eax
cltd
idiv   %ebx
test   %eax,%eax
jle    1411 <input_data+0x291>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe71(%rip),%rdi
jmp    1421 <input_data+0x2a1>
lea    0xe4f(%rip),%rdi
jmp    1421 <input_data+0x2a1>
lea    0xe24(%rip),%rdi
jmp    1421 <input_data+0x2a1>
lea    0xd5b(%rip),%rdi
jmp    1421 <input_data+0x2a1>
lea    0xc3d(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
lea    0xe44(%rip),%rdi
call   1030 <puts@plt>
lea    0xe62(%rip),%rdi
jmp    1421 <input_data+0x2a1>
lea    0xdd1(%rip),%rdi
jmp    1421 <input_data+0x2a1>
lea    0xdaa(%rip),%rdi
jmp    1421 <input_data+0x2a1>
lea    0xd85(%rip),%rdi
jmp    1421 <input_data+0x2a1>
lea    0xc16(%rip),%rdi
jmp    1421 <input_data+0x2a1>
lea    0xcc2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Cmd-line parameters: C B A TECH NSubbanks\0A\00"
@.str.1 = [55 x i8] c" OR: C B A TECH RWP ERP EWP NSubbanks\0A\00"
@.str.2 = [21 x i8] c"Block size must >=1\0A\00"
@.str.3 = [32 x i8] c"Block size must be at least %d\0A\00"
@.str.4 = [26 x i8] c"Feature size must be > 0\0A\00"
@.str.5 = [35 x i8] c"Feature size must be <= 0.80 (um)\0A\00"
@.str.6 = [16 x i8] c"Ports must >=0\0A\00"
@.str.7 = [31 x i8] c"Maximum of 2 read/write ports\0A\00"
@.str.8 = [29 x i8] c"Must have at least one port\0A\00"
@.str.9 = [84 x i8] c"Number of subbanks should be greater than or equal to 1 and should be a power of 2\0A\00"
@.str.10 = [37 x i8] c"Cache size must be greater than 32!\0A\00"
@.str.11 = [3 x i8] c"FA\00"
@.str.12 = [3 x i8] c"DM\00"
@.str.13 = [59 x i8] c"Associativity must be 1,2,4,8,16 or 0(fully associative)\0A\00"
@.str.14 = [38 x i8] c"Associativity should be a power of 2\0A\00"
@.str.15 = [145 x i8] c"Number of sets is less than 1:\0A Need to either increase cache size, or decrease associativity or block size\0A (or use fully associative cache)\0A\00"
define i32 @input_data(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 64, i32* %19
%20 = load i32, i32* %3
%21 = icmp ne i32 %20, 6
br i1 %21, label %22, label %32
22: ; preds = %2
%23 = load i32, i32* %3
%24 = icmp ne i32 %23, 9
br i1 %24, label %25, label %32
25: ; preds = %22
%26 = load i32, i32* %3
%27 = icmp ne i32 %26, 15
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%31 = call i32 @exit(i32 1)
unreachable
32: ; preds = %25, %22, %2
%33 = load i8**, i8*** %4
%34 = getelementptr inbounds i8*, i8** %33, i64 2
%35 = load i8*, i8** %34
%36 = call i32 @atoi(i8* %35)
store i32 %36, i32* %6
%37 = load i32, i32* %6
%38 = icmp slt i32 %37, 1
br i1 %38, label %39, label %42
39: ; preds = %32
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%41 = call i32 @exit(i32 1)
unreachable
42: ; preds = %32
%43 = load i32, i32* %3
%44 = icmp eq i32 %43, 9
br i1 %44, label %45, label %134
45: ; preds = %42
%46 = load i32, i32* %6
%47 = mul nsw i32 %46, 8
%48 = load i32, i32* %19
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %55
50: ; preds = %45
%51 = load i32, i32* %19
%52 = sdiv i32 %51, 8
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %52)
%54 = call i32 @exit(i32 1)
unreachable
55: ; preds = %45
%56 = load i8**, i8*** %4
%57 = getelementptr inbounds i8*, i8** %56, i64 4
%58 = load i8*, i8** %57
%59 = call double @atof(i8* %58)
store double %59, double* %14
%60 = load double, double* %14
%61 = fcmp ole double %60, 0.000000e+00
br i1 %61, label %62, label %65
62: ; preds = %55
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%64 = call i32 @exit(i32 1)
unreachable
65: ; preds = %55
%66 = load double, double* %14
%67 = fcmp ogt double %66, 8.000000e-01
br i1 %67, label %68, label %71
68: ; preds = %65
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%70 = call i32 @exit(i32 1)
unreachable
71: ; preds = %65
%72 = load i8**, i8*** %4
%73 = getelementptr inbounds i8*, i8** %72, i64 5
%74 = load i8*, i8** %73
%75 = call i32 @atoi(i8* %74)
store i32 %75, i32* %10
%76 = load i8**, i8*** %4
%77 = getelementptr inbounds i8*, i8** %76, i64 6
%78 = load i8*, i8** %77
%79 = call i32 @atoi(i8* %78)
store i32 %79, i32* %8
%80 = load i8**, i8*** %4
%81 = getelementptr inbounds i8*, i8** %80, i64 7
%82 = load i8*, i8** %81
%83 = call i32 @atoi(i8* %82)
store i32 %83, i32* %9
store i32 0, i32* %11
%84 = load i32, i32* %10
%85 = icmp slt i32 %84, 0
br i1 %85, label %92, label %86
86: ; preds = %71
%87 = load i32, i32* %9
%88 = icmp slt i32 %87, 0
br i1 %88, label %92, label %89
89: ; preds = %86
%90 = load i32, i32* %8
%91 = icmp slt i32 %90, 0
br i1 %91, label %92, label %95
92: ; preds = %89, %86, %71
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%94 = call i32 @exit(i32 1)
unreachable
95: ; preds = %89
%96 = load i32, i32* %10
%97 = icmp sgt i32 %96, 2
br i1 %97, label %98, label %101
98: ; preds = %95
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%100 = call i32 @exit(i32 1)
unreachable
101: ; preds = %95
%102 = load i32, i32* %10
%103 = load i32, i32* %8
%104 = add nsw i32 %102, %103
%105 = load i32, i32* %9
%106 = add nsw i32 %104, %105
%107 = icmp slt i32 %106, 1
br i1 %107, label %108, label %111
108: ; preds = %101
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%110 = call i32 @exit(i32 1)
unreachable
111: ; preds = %101
%112 = load i8**, i8*** %4
%113 = getelementptr inbounds i8*, i8** %112, i64 8
%114 = load i8*, i8** %113
%115 = call i32 @atoi(i8* %114)
store i32 %115, i32* %12
%116 = load i32, i32* %12
%117 = icmp slt i32 %116, 1
br i1 %117, label %118, label %121
118: ; preds = %111
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.9, i64 0, i64 0))
%120 = call i32 @exit(i32 1)
unreachable
121: ; preds = %111
%122 = load i32, i32* %12
%123 = sitofp i32 %122 to double
%124 = call double @logtwo(double %123)
store double %124, double* %15
%125 = load double, double* %15
%126 = call double @llvm.floor.f64(double %125)
store double %126, double* %17
%127 = load double, double* %15
%128 = load double, double* %17
%129 = fcmp ogt double %127, %128
br i1 %129, label %130, label %133
130: ; preds = %121
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.9, i64 0, i64 0))
%132 = call i32 @exit(i32 1)
unreachable
133: ; preds = %121
br label %208
134: ; preds = %42
%135 = load i32, i32* %3
%136 = icmp eq i32 %135, 6
br i1 %136, label %137, label %186
137: ; preds = %134
%138 = load i32, i32* %6
%139 = mul nsw i32 %138, 8
%140 = load i32, i32* %19
%141 = icmp slt i32 %139, %140
br i1 %141, label %142, label %147
142: ; preds = %137
%143 = load i32, i32* %19
%144 = sdiv i32 %143, 8
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %144)
%146 = call i32 @exit(i32 1)
unreachable
147: ; preds = %137
%148 = load i8**, i8*** %4
%149 = getelementptr inbounds i8*, i8** %148, i64 4
%150 = load i8*, i8** %149
%151 = call double @atof(i8* %150)
store double %151, double* %14
%152 = load double, double* %14
%153 = fcmp ole double %152, 0.000000e+00
br i1 %153, label %154, label %157
154: ; preds = %147
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%156 = call i32 @exit(i32 1)
unreachable
157: ; preds = %147
%158 = load double, double* %14
%159 = fcmp ogt double %158, 8.000000e-01
br i1 %159, label %160, label %163
160: ; preds = %157
%161 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%162 = call i32 @exit(i32 1)
unreachable
163: ; preds = %157
store i32 1, i32* %10
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %11
%164 = load i8**, i8*** %4
%165 = getelementptr inbounds i8*, i8** %164, i64 5
%166 = load i8*, i8** %165
%167 = call i32 @atoi(i8* %166)
store i32 %167, i32* %12
%168 = load i32, i32* %12
%169 = icmp slt i32 %168, 1
br i1 %169, label %170, label %173
170: ; preds = %163
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.9, i64 0, i64 0))
%172 = call i32 @exit(i32 1)
unreachable
173: ; preds = %163
%174 = load i32, i32* %12
%175 = sitofp i32 %174 to double
%176 = call double @logtwo(double %175)
store double %176, double* %15
%177 = load double, double* %15
%178 = call double @llvm.floor.f64(double %177)
store double %178, double* %17
%179 = load double, double* %15
%180 = load double, double* %17
%181 = fcmp ogt double %179, %180
br i1 %181, label %182, label %185
182: ; preds = %173
%183 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.9, i64 0, i64 0))
%184 = call i32 @exit(i32 1)
unreachable
185: ; preds = %173
br label %207
186: ; preds = %134
%187 = load i8**, i8*** %4
%188 = getelementptr inbounds i8*, i8** %187, i64 9
%189 = load i8*, i8** %188
%190 = call double @atof(i8* %189)
store double %190, double* %14
%191 = load i8**, i8*** %4
%192 = getelementptr inbounds i8*, i8** %191, i64 8
%193 = load i8*, i8** %192
%194 = call i32 @atoi(i8* %193)
store i32 %194, i32* %12
%195 = load double, double* %14
%196 = fcmp ole double %195, 0.000000e+00
br i1 %196, label %197, label %200
197: ; preds = %186
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%199 = call i32 @exit(i32 1)
unreachable
200: ; preds = %186
%201 = load double, double* %14
%202 = fcmp ogt double %201, 8.000000e-01
br i1 %202, label %203, label %206
203: ; preds = %200
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%205 = call i32 @exit(i32 1)
unreachable
206: ; preds = %200
br label %207
207: ; preds = %206, %185
br label %208
208: ; preds = %207, %133
%209 = load i8**, i8*** %4
%210 = getelementptr inbounds i8*, i8** %209, i64 1
%211 = load i8*, i8** %210
%212 = call i32 @atoi(i8* %211)
%213 = load i32, i32* %12
%214 = sdiv i32 %212, %213
store i32 %214, i32* %5
%215 = load i8**, i8*** %4
%216 = getelementptr inbounds i8*, i8** %215, i64 1
%217 = load i8*, i8** %216
%218 = call i32 @atoi(i8* %217)
%219 = icmp slt i32 %218, 64
br i1 %219, label %220, label %223
220: ; preds = %208
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
%222 = call i32 @exit(i32 1)
unreachable
223: ; preds = %208
%224 = load i8**, i8*** %4
%225 = getelementptr inbounds i8*, i8** %224, i64 3
%226 = load i8*, i8** %225
%227 = call i64 @strcmp(i8* %226, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%228 = icmp eq i64 %227, 0
br i1 %228, label %237, label %229
229: ; preds = %223
%230 = load i8**, i8*** %4
%231 = getelementptr inbounds i8*, i8** %230, i64 3
%232 = load i8*, i8** %231
%233 = getelementptr inbounds i8, i8* %232, i64 0
%234 = load i8, i8* %233
%235 = sext i8 %234 to i32
%236 = icmp eq i32 %235, 48
br i1 %236, label %237, label %241
237: ; preds = %229, %223
%238 = load i32, i32* %5
%239 = load i32, i32* %6
%240 = sdiv i32 %238, %239
store i32 %240, i32* %7
store i32 1, i32* %13
br label %275
241: ; preds = %229
%242 = load i8**, i8*** %4
%243 = getelementptr inbounds i8*, i8** %242, i64 3
%244 = load i8*, i8** %243
%245 = call i64 @strcmp(i8* %244, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%246 = icmp eq i64 %245, 0
br i1 %246, label %247, label %248
247: ; preds = %241
store i32 1, i32* %7
store i32 0, i32* %13
br label %274
248: ; preds = %241
store i32 0, i32* %13
%249 = load i8**, i8*** %4
%250 = getelementptr inbounds i8*, i8** %249, i64 3
%251 = load i8*, i8** %250
%252 = call i32 @atoi(i8* %251)
store i32 %252, i32* %7
%253 = load i32, i32* %7
%254 = icmp slt i32 %253, 0
br i1 %254, label %258, label %255
255: ; preds = %248
%256 = load i32, i32* %7
%257 = icmp sgt i32 %256, 16
br i1 %257, label %258, label %261
258: ; preds = %255, %248
%259 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.13, i64 0, i64 0))
%260 = call i32 @exit(i32 1)
unreachable
261: ; preds = %255
%262 = load i32, i32* %7
%263 = sitofp i32 %262 to double
%264 = call double @logtwo(double %263)
store double %264, double* %16
%265 = load double, double* %16
%266 = call double @llvm.floor.f64(double %265)
store double %266, double* %18
%267 = load double, double* %16
%268 = load double, double* %18
%269 = fcmp ogt double %267, %268
br i1 %269, label %270, label %273
270: ; preds = %261
%271 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.14, i64 0, i64 0))
%272 = call i32 @exit(i32 1)
unreachable
273: ; preds = %261
br label %274
274: ; preds = %273, %247
br label %275
275: ; preds = %274, %237
%276 = load i32, i32* %13
%277 = icmp ne i32 %276, 0
br i1 %277, label %288, label %278
278: ; preds = %275
%279 = load i32, i32* %5
%280 = load i32, i32* %6
%281 = load i32, i32* %7
%282 = mul nsw i32 %280, %281
%283 = sdiv i32 %279, %282
%284 = icmp slt i32 %283, 1
br i1 %284, label %285, label %288
285: ; preds = %278
%286 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.15, i64 0, i64 0))
%287 = call i32 @exit(i32 1)
unreachable
288: ; preds = %278, %275
ret i32 1
}

LLVM IR (-O2):
@.str.3 = [32 x i8] c"Block size must be at least %d\0A\00"
@.str.11 = [3 x i8] c"FA\00"
@.str.12 = [3 x i8] c"DM\00"
@str = [144 x i8] c"Number of sets is less than 1:\0A Need to either increase cache size, or decrease associativity or block size\0A (or use fully associative cache)\00"
@str.16 = [37 x i8] c"Associativity should be a power of 2\00"
@str.17 = [58 x i8] c"Associativity must be 1,2,4,8,16 or 0(fully associative)\00"
@str.18 = [36 x i8] c"Cache size must be greater than 32!\00"
@str.26 = [83 x i8] c"Number of subbanks should be greater than or equal to 1 and should be a power of 2\00"
@str.27 = [28 x i8] c"Must have at least one port\00"
@str.28 = [30 x i8] c"Maximum of 2 read/write ports\00"
@str.29 = [15 x i8] c"Ports must >=0\00"
@str.30 = [34 x i8] c"Feature size must be <= 0.80 (um)\00"
@str.31 = [25 x i8] c"Feature size must be > 0\00"
@str.32 = [20 x i8] c"Block size must >=1\00"
@str.33 = [42 x i8] c"Cmd-line parameters: C B A TECH NSubbanks\00"
@str.34 = [54 x i8] c" OR: C B A TECH RWP ERP EWP NSubbanks\00"
define i32 @input_data(i32 %0, i8** nocapture %1) {
switch i32 %0, label %3 [
i32 15, label %7
i32 9, label %7
i32 6, label %7
]
3: ; preds = %2
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.33, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.34, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2, %2, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = icmp slt i32 %10, 1
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.32, i64 0, i64 0))
%14 = tail call i32 @exit(i32 1)
unreachable
15: ; preds = %7
switch i32 %0, label %114 [
i32 9, label %16
i32 6, label %80
]
16: ; preds = %15
%17 = icmp ult i32 %10, 8
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 8)
%20 = tail call i32 @exit(i32 1)
unreachable
21: ; preds = %16
%22 = getelementptr inbounds i8*, i8** %1, i64 4
%23 = load i8*, i8** %22
%24 = tail call double @atof(i8* %23)
%25 = fcmp ugt double %24, 0.000000e+00
br i1 %25, label %29, label %26
26: ; preds = %21
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.31, i64 0, i64 0))
%28 = tail call i32 @exit(i32 1)
unreachable
29: ; preds = %21
%30 = fcmp ogt double %24, 8.000000e-01
br i1 %30, label %31, label %34
31: ; preds = %29
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.30, i64 0, i64 0))
%33 = tail call i32 @exit(i32 1)
unreachable
34: ; preds = %29
%35 = getelementptr inbounds i8*, i8** %1, i64 5
%36 = load i8*, i8** %35
%37 = tail call i32 @atoi(i8* %36)
%38 = getelementptr inbounds i8*, i8** %1, i64 6
%39 = load i8*, i8** %38
%40 = tail call i32 @atoi(i8* %39)
%41 = getelementptr inbounds i8*, i8** %1, i64 7
%42 = load i8*, i8** %41
%43 = tail call i32 @atoi(i8* %42)
%44 = icmp slt i32 %37, 0
%45 = icmp slt i32 %43, 0
%46 = select i1 %44, i1 true, i1 %45
%47 = icmp slt i32 %40, 0
%48 = select i1 %46, i1 true, i1 %47
br i1 %48, label %49, label %52
49: ; preds = %34
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.29, i64 0, i64 0))
%51 = tail call i32 @exit(i32 1)
unreachable
52: ; preds = %34
%53 = icmp ugt i32 %37, 2
br i1 %53, label %54, label %57
54: ; preds = %52
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.28, i64 0, i64 0))
%56 = tail call i32 @exit(i32 1)
unreachable
57: ; preds = %52
%58 = add nuw nsw i32 %40, %37
%59 = sub nsw i32 0, %43
%60 = icmp eq i32 %58, %59
br i1 %60, label %61, label %64
61: ; preds = %57
%62 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.27, i64 0, i64 0))
%63 = tail call i32 @exit(i32 1)
unreachable
64: ; preds = %57
%65 = getelementptr inbounds i8*, i8** %1, i64 8
%66 = load i8*, i8** %65
%67 = tail call i32 @atoi(i8* %66)
%68 = icmp slt i32 %67, 1
br i1 %68, label %69, label %72
69: ; preds = %64
%70 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str.26, i64 0, i64 0))
%71 = tail call i32 @exit(i32 1)
unreachable
72: ; preds = %64
%73 = sitofp i32 %67 to double
%74 = tail call double @logtwo(double %73)
%75 = tail call double @llvm.floor.f64(double %74)
%76 = fcmp ogt double %74, %75
br i1 %76, label %77, label %130
77: ; preds = %72
%78 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str.26, i64 0, i64 0))
%79 = tail call i32 @exit(i32 1)
unreachable
80: ; preds = %15
%81 = icmp ult i32 %10, 8
br i1 %81, label %82, label %85
82: ; preds = %80
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 8)
%84 = tail call i32 @exit(i32 1)
unreachable
85: ; preds = %80
%86 = getelementptr inbounds i8*, i8** %1, i64 4
%87 = load i8*, i8** %86
%88 = tail call double @atof(i8* %87)
%89 = fcmp ugt double %88, 0.000000e+00
br i1 %89, label %93, label %90
90: ; preds = %85
%91 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.31, i64 0, i64 0))
%92 = tail call i32 @exit(i32 1)
unreachable
93: ; preds = %85
%94 = fcmp ogt double %88, 8.000000e-01
br i1 %94, label %95, label %98
95: ; preds = %93
%96 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.30, i64 0, i64 0))
%97 = tail call i32 @exit(i32 1)
unreachable
98: ; preds = %93
%99 = getelementptr inbounds i8*, i8** %1, i64 5
%100 = load i8*, i8** %99
%101 = tail call i32 @atoi(i8* %100)
%102 = icmp slt i32 %101, 1
br i1 %102, label %103, label %106
103: ; preds = %98
%104 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str.26, i64 0, i64 0))
%105 = tail call i32 @exit(i32 1)
unreachable
106: ; preds = %98
%107 = sitofp i32 %101 to double
%108 = tail call double @logtwo(double %107)
%109 = tail call double @llvm.floor.f64(double %108)
%110 = fcmp ogt double %108, %109
br i1 %110, label %111, label %130
111: ; preds = %106
%112 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str.26, i64 0, i64 0))
%113 = tail call i32 @exit(i32 1)
unreachable
114: ; preds = %15
%115 = getelementptr inbounds i8*, i8** %1, i64 9
%116 = load i8*, i8** %115
%117 = tail call double @atof(i8* %116)
%118 = fcmp ugt double %117, 0.000000e+00
br i1 %118, label %122, label %119
119: ; preds = %114
%120 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.31, i64 0, i64 0))
%121 = tail call i32 @exit(i32 1)
unreachable
122: ; preds = %114
%123 = getelementptr inbounds i8*, i8** %1, i64 8
%124 = load i8*, i8** %123
%125 = tail call i32 @atoi(i8* %124)
%126 = fcmp ogt double %117, 8.000000e-01
br i1 %126, label %127, label %130
127: ; preds = %122
%128 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.30, i64 0, i64 0))
%129 = tail call i32 @exit(i32 1)
unreachable
130: ; preds = %106, %122, %72
%131 = phi i32 [ %67, %72 ], [ %101, %106 ], [ %125, %122 ]
%132 = getelementptr inbounds i8*, i8** %1, i64 1
%133 = load i8*, i8** %132
%134 = tail call i32 @atoi(i8* %133)
%135 = sdiv i32 %134, %131
%136 = icmp slt i32 %134, 64
br i1 %136, label %137, label %140
137: ; preds = %130
%138 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.18, i64 0, i64 0))
%139 = tail call i32 @exit(i32 1)
unreachable
140: ; preds = %130
%141 = getelementptr inbounds i8*, i8** %1, i64 3
%142 = load i8*, i8** %141
%143 = tail call i64 @strcmp(i8* %142, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%144 = icmp eq i64 %143, 0
br i1 %144, label %175, label %145
145: ; preds = %140
%146 = load i8*, i8** %141
%147 = load i8, i8* %146
%148 = icmp eq i8 %147, 48
br i1 %148, label %175, label %149
149: ; preds = %145
%150 = tail call i64 @strcmp(i8* %146, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%151 = icmp eq i64 %150, 0
br i1 %151, label %167, label %152
152: ; preds = %149
%153 = load i8*, i8** %141
%154 = tail call i32 @atoi(i8* %153)
%155 = icmp ugt i32 %154, 16
br i1 %155, label %156, label %159
156: ; preds = %152
%157 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.17, i64 0, i64 0))
%158 = tail call i32 @exit(i32 1)
unreachable
159: ; preds = %152
%160 = sitofp i32 %154 to double
%161 = tail call double @logtwo(double %160)
%162 = tail call double @llvm.floor.f64(double %161)
%163 = fcmp ogt double %161, %162
br i1 %163, label %164, label %167
164: ; preds = %159
%165 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.16, i64 0, i64 0))
%166 = tail call i32 @exit(i32 1)
unreachable
167: ; preds = %159, %149
%168 = phi i32 [ 1, %149 ], [ %154, %159 ]
%169 = mul nsw i32 %168, %10
%170 = sdiv i32 %135, %169
%171 = icmp slt i32 %170, 1
br i1 %171, label %172, label %175
172: ; preds = %167
%173 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([144 x i8], [144 x i8]* @str, i64 0, i64 0))
%174 = tail call i32 @exit(i32 1)
unreachable
175: ; preds = %145, %140, %167
ret i32 1
}