#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*/ FILE;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int readline(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ substring(char *, char *, int /*<<< orphan*/, int);
void creapdb(float *prepsout, int *pnumbmol) {
  FILE *fid, *fidout;
  int objecttype, distrtype, link, kind;
  int ii, cont, cont1, mediacont = 0, flag, tmp;
  float medeps[80], repsin, charge;
  char filename[10], line[160], str[7], ans, choice, c;
  for (ii = 0; ii < 159; ii++)
    line[ii] = ' ';
  line[159] = '\0';
  *pnumbmol = 0;
  medeps[mediacont] = *prepsout;
  printf("External Dielectric Constant %8.3f\n", medeps[mediacont]);
  printf("\nDo you want to overwrite file fort.13, if present? [y/n]:");
  ans = getchar();
  c = getchar();
  if (ans != 'y')
    return;
  fidout = fopen("fort.13", "w");
  if (fidout == NULL)
    printf("\n can't open objectfile\n");
  fprintf(fidout, "                                                            "
                  "             \n");
  cont = 1;
  do {
    flag = 0;
    kind = 0;
    fprintf(fidout, "OBJECT %3d ", cont);
    printf("\nInput objecttype number : ");
    printf("\n  molecule from pdb file [0], ");
    printf("sphere [1], cylinder [2], cone [3], box [4] ");
    printf("\n");
    scanf("%d", &objecttype);
    fprintf(fidout, "%3d ", objecttype);
    tmp = -1;
    printf("\nInput internal dielectric constant : ");
    scanf("%f", &repsin);
    for (cont1 = 1; cont1 <= mediacont; cont1++)
      if (repsin == medeps[cont1])
        tmp = cont1;
    if (tmp == -1) {
      mediacont++;
      medeps[mediacont] = repsin;
      tmp = mediacont;
    }
    fprintf(fidout, "%3d ", tmp);
    fprintf(fidout, "%8.3f\n", repsin);
    for (ii = 0; ii < 159; ii++)
      line[ii] = ' ';
    line[159] = '\0';
    switch (objecttype) {
    case 0: {
      (*pnumbmol)++;
      printf("\ninsert filename of object %d : ", cont);
      scanf("%s", filename);
      c = getchar();
      fid = fopen(filename, "r");
      if (fid == NULL)
        printf("\n can't open this file\n");
      while (flag != EOF) {
        flag = readline(fid, line);
        substring(line, str, 0, 5);
        if ((strcmp(str, "ATOM  ") == 0) || (strcmp(str, "HETATM") == 0))
          fprintf(fidout, "%s\n", line);
      }
      fclose(fid);
      break;
    }
    default: {
      printf("\nInsert data of object %d (spaced by commas): ", cont);
      scanf("%s", line);
      c = getchar();
      fprintf(fidout, "DATA   %3d %3d %3d %s\n", objecttype, tmp, kind, line);
      if ((kind == 2) && (objecttype == 2)) {
        cont++;
        fprintf(fidout, "OBJECT %3d %3d %3d %8.3f\n", cont, 20, tmp, repsin);
        fprintf(fidout, "DATA   %3d %3d %3d %s\n", 10, tmp, 3, line);
        cont++;
        fprintf(fidout, "OBJECT %3d %3d %3d %8.3f\n", cont, 20, tmp, repsin);
        fprintf(fidout, "DATA   %3d %3d %3d %s\n", 10, tmp, 3, line);
      }
      break;
    }
    }
    printf("\n Are you going to insert a new object?(y/n):");
    ans = getchar();
    c = getchar();
    cont++;
  } while ((ans == 'y') || (ans == 'Y'));
  printf("\n Are you going to insert charge distributions?(y/n):");
  ans = getchar();
  c = getchar();
  if ((ans == 'y') || (ans == 'Y')) {
    cont = 1;
    do {
      fprintf(fidout, "CRGDST %3d ", cont);
      printf("\nInput distrtype number : ");
      printf("\nShape: sphere [1], cylinder [2], cone [3], box [4], ");
      printf("\npoint charge [8], segment [9], disk [10], rectangular plate "
             "[11] ");
      printf("\n");
      scanf("%d", &distrtype);
      c = getchar();
      printf("\nIs it a volumic (v) or surfacial (s) charge? : ");
      choice = getchar();
      c = getchar();
      printf("\nInput objectnumber to which this distribution is linked (0 if "
             "is free) : ");
      scanf("%d", &link);
      printf("\nInput total charge in this distribution : ");
      scanf("%f", &charge);
      for (ii = 0; ii < 159; ii++)
        line[ii] = ' ';
      line[159] = '\0';
      printf("\nInsert data of distribution %d : ", cont);
      scanf("%s", line);
      c = getchar();
      fprintf(fidout, "\nDATA   %3d %c %3d %8.3f %s\n", distrtype, choice, link,
              charge, line);
      printf("\n Are you going to insert a new distribution?(y/n):");
      ans = getchar();
      c = getchar();
      cont++;
    } while ((ans == 'y') || (ans == 'Y'));
  }
  rewind(fidout);
  fprintf(fidout, "MEDIA  %3d ", mediacont);
  fclose(fidout);
  return;
}


x86 assembly (clang, -O0):
<creapdb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x9f,-0x34(%rbp)
jge    11e8 <creapdb+0x48>
movslq -0x34(%rbp),%rax
movb   $0x20,-0x250(%rbp,%rax,1)
20
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11c1 <creapdb+0x21>
movb   $0x0,-0x1b1(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movslq -0x40(%rbp),%rax
movss  %xmm0,-0x190(%rbp,%rax,4)
ff ff
movslq -0x40(%rbp),%rax
movss  -0x190(%rbp,%rax,4),%xmm0
ff ff
cvtss2sd %xmm0,%xmm0
lea    0xdda(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x258(%rbp)
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x25a(%rbp)
movsbl -0x258(%rbp),%eax
cmp    $0x79,%eax
je     126a <creapdb+0xca>
jmp    194b <creapdb+0x7ab>
lea    0xdee(%rip),%rdi
lea    0xdef(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    129a <creapdb+0xfa>
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
lea    0xddd(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x38(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xdfe(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe2d(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   10b0 <scanf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0x1114(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0xffffffff,-0x48(%rbp)
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe1b(%rip),%rdi
lea    -0x194(%rbp),%rsi
mov    $0x0,%al
call   10b0 <scanf@plt>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jg     13ab <creapdb+0x20b>
movss  -0x194(%rbp),%xmm0
ff
movslq -0x3c(%rbp),%rax
ucomiss -0x190(%rbp,%rax,4),%xmm0
ff
jne    1398 <creapdb+0x1f8>
jp     1398 <creapdb+0x1f8>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    139d <creapdb+0x1fd>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1366 <creapdb+0x1c6>
cmpl   $0xffffffff,-0x48(%rbp)
jne    13d9 <creapdb+0x239>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
movss  -0x194(%rbp),%xmm0
ff
movslq -0x40(%rbp),%rax
movss  %xmm0,-0x190(%rbp,%rax,4)
ff ff
mov    -0x40(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x48(%rbp),%edx
lea    0x105b(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
movss  -0x194(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xe0f(%rip),%rsi
mov    $0x1,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x9f,-0x34(%rbp)
jge    143a <creapdb+0x29a>
movslq -0x34(%rbp),%rax
movb   $0x20,-0x250(%rbp,%rax,1)
20
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1413 <creapdb+0x273>
movb   $0x0,-0x1b1(%rbp)
mov    -0x24(%rbp),%eax
test   %eax,%eax
jne    1567 <creapdb+0x3c7>
jmp    1451 <creapdb+0x2b1>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x38(%rbp),%esi
lea    0xd09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x1a2(%rbp),%rsi
lea    0xd15(%rip),%rdi
mov    $0x0,%al
call   10b0 <scanf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x25a(%rbp)
lea    -0x1a2(%rbp),%rdi
lea    0xcf6(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    14bf <creapdb+0x31f>
lea    0xcdd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14c4 <creapdb+0x324>
mov    -0x44(%rbp),%eax
mov    0x2b1a(%rip),%rcx
cmp    (%rcx),%eax
je     1559 <creapdb+0x3b9>
mov    -0x18(%rbp),%rdi
lea    -0x250(%rbp),%rsi
call   1070 <readline@plt>
mov    %eax,-0x44(%rbp)
lea    -0x250(%rbp),%rdi
lea    -0x257(%rbp),%rsi
xor    %edx,%edx
mov    $0x5,%ecx
call   1060 <substring@plt>
lea    -0x257(%rbp),%rdi
lea    0xc9c(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
je     153b <creapdb+0x39b>
lea    -0x257(%rbp),%rdi
lea    0xc87(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1554 <creapdb+0x3b4>
mov    -0x20(%rbp),%rdi
lea    -0x250(%rbp),%rdx
lea    0xcb0(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    14c4 <creapdb+0x324>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
jmp    168a <creapdb+0x4ea>
mov    -0x38(%rbp),%esi
lea    0xc4a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x250(%rbp),%rsi
lea    0xc0a(%rip),%rdi
mov    $0x0,%al
call   10b0 <scanf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x25a(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    -0x48(%rbp),%ecx
mov    -0x30(%rbp),%r8d
lea    -0x250(%rbp),%r9
lea    0xc34(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
cmpl   $0x2,-0x30(%rbp)
jne    1685 <creapdb+0x4e5>
cmpl   $0x2,-0x24(%rbp)
jne    1685 <creapdb+0x4e5>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%edx
mov    -0x48(%rbp),%r8d
movss  -0x194(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xc09(%rip),%rsi
mov    $0x14,%ecx
mov    $0x1,%al
call   10a0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x48(%rbp),%ecx
lea    -0x250(%rbp),%r9
lea    0xbd1(%rip),%rsi
mov    $0xa,%edx
mov    $0x3,%r8d
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%edx
mov    -0x48(%rbp),%r8d
movss  -0x194(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xbaf(%rip),%rsi
mov    $0x14,%ecx
mov    $0x1,%al
call   10a0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x48(%rbp),%ecx
lea    -0x250(%rbp),%r9
lea    0xb77(%rip),%rsi
mov    $0xa,%edx
mov    $0x3,%r8d
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    168a <creapdb+0x4ea>
lea    0xb8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x258(%rbp)
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x25a(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
movsbl -0x258(%rbp),%ecx
mov    $0x1,%al
cmp    $0x79,%ecx
mov    %al,-0x25b(%rbp)
je     16e6 <creapdb+0x546>
movsbl -0x258(%rbp),%eax
cmp    $0x59,%eax
sete   %al
mov    %al,-0x25b(%rbp)
mov    -0x25b(%rbp),%al
test   $0x1,%al
jne    12b3 <creapdb+0x113>
lea    0xb4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x258(%rbp)
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x25a(%rbp)
movsbl -0x258(%rbp),%eax
cmp    $0x79,%eax
je     173c <creapdb+0x59c>
movsbl -0x258(%rbp),%eax
cmp    $0x59,%eax
jne    1924 <creapdb+0x784>
movl   $0x1,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xb2e(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
lea    0xb2c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xb39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xb61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x942(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x9ab(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   10b0 <scanf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x25a(%rbp)
lea    0xb69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x259(%rbp)
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x25a(%rbp)
lea    0xb72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x956(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   10b0 <scanf@plt>
lea    0xb9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x960(%rip),%rdi
lea    -0x198(%rbp),%rsi
mov    $0x0,%al
call   10b0 <scanf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x9f,-0x34(%rbp)
jge    1848 <creapdb+0x6a8>
movslq -0x34(%rbp),%rax
movb   $0x20,-0x250(%rbp,%rax,1)
20
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1821 <creapdb+0x681>
movb   $0x0,-0x1b1(%rbp)
mov    -0x38(%rbp),%esi
lea    0xb6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x250(%rbp),%rsi
lea    0x922(%rip),%rdi
mov    $0x0,%al
call   10b0 <scanf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x25a(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%edx
movsbl -0x259(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
movss  -0x198(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    -0x250(%rbp),%r9
lea    0xb3c(%rip),%rsi
mov    $0x1,%al
call   10a0 <fprintf@plt>
lea    0xb4b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x258(%rbp)
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x25a(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
movsbl -0x258(%rbp),%ecx
mov    $0x1,%al
cmp    $0x79,%ecx
mov    %al,-0x25c(%rbp)
je     1911 <creapdb+0x771>
movsbl -0x258(%rbp),%eax
cmp    $0x59,%eax
sete   %al
mov    %al,-0x25c(%rbp)
mov    -0x25c(%rbp),%al
test   $0x1,%al
jne    1743 <creapdb+0x5a3>
jmp    1924 <creapdb+0x784>
mov    -0x20(%rbp),%rdi
call   1050 <rewind@plt>
mov    -0x20(%rbp),%rdi
mov    -0x40(%rbp),%edx
lea    0xb00(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creapdb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x228,%rsp
movaps 0xe28(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0xb0(%rsp)
movups %xmm0,0xbf(%rsp)
movb   $0x0,0xcf(%rsp)
mov    %rsi,0x18(%rsp)
movl   $0x0,(%rsi)
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd5(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xdeb(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   10a0 <getchar@plt>
cmp    $0x79,%bl
jne    1829 <creapdb+0x669>
lea    0xdff(%rip),%rdi
lea    0xe00(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%r12
test   %rax,%rax
jne    1290 <creapdb+0xd0>
lea    0x1198(%rip),%rdi
call   1040 <puts@plt>
lea    0xde2(%rip),%rdi
mov    $0x4a,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    $0x1,%r13d
lea    0x30(%rsp),%r14
xor    %ebp,%ebp
jmp    1335 <creapdb+0x175>
nopl   0x0(%rax,%rax,1)
lea    0xed3(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xeaf(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    0xc(%rsp),%edx
mov    %r12,%rdi
lea    0xed2(%rip),%rsi
mov    %r15d,%ecx
xor    %r8d,%r8d
mov    %r14,%r9
xor    %eax,%eax
call   10b0 <fprintf@plt>
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   10a0 <getchar@plt>
add    $0x1,%r13d
and    $0xdf,%bl
cmp    $0x59,%bl
jne    1636 <creapdb+0x476>
mov    %r12,%rdi
lea    0xd85(%rip),%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   10b0 <fprintf@plt>
lea    0xd80(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd8e(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xda0(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdb5(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
mov    0xc(%rsp),%edx
mov    %r12,%rdi
lea    0x1069(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
lea    0xd90(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xda9(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
test   %ebp,%ebp
jle    1494 <creapdb+0x2d4>
movss  0x8(%rsp),%xmm0
mov    %ebp,%ebx
mov    %ebp,%edx
lea    -0x1(%rdx),%rcx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0x3,%rcx
jae    1400 <creapdb+0x240>
mov    $0xffffffff,%r15d
mov    $0x1,%ecx
jmp    1465 <creapdb+0x2a5>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
and    $0xfffffffc,%edx
mov    $0xffffffff,%r15d
mov    $0x1,%ecx
xor    %esi,%esi
ucomiss 0xe0(%rsp,%rcx,4),%xmm0
mov    %ecx,%edi
cmovne %r15d,%edi
cmovp  %r15d,%edi
lea    0x1(%rcx),%ebp
ucomiss 0xe4(%rsp,%rcx,4),%xmm0
cmovne %edi,%ebp
cmovp  %edi,%ebp
lea    0x2(%rcx),%edi
ucomiss 0xe8(%rsp,%rcx,4),%xmm0
cmovne %ebp,%edi
cmovp  %ebp,%edi
lea    0x3(%rcx),%r15d
ucomiss 0xec(%rsp,%rcx,4),%xmm0
cmovne %edi,%r15d
cmovp  %edi,%r15d
add    $0x4,%rcx
add    $0x4,%rsi
cmp    %rdx,%rsi
jne    1410 <creapdb+0x250>
test   %rax,%rax
je     148c <creapdb+0x2cc>
nopw   0x0(%rax,%rax,1)
ucomiss 0xe0(%rsp,%rcx,4),%xmm0
mov    %ecx,%edx
cmovne %r15d,%edx
cmovnp %edx,%r15d
add    $0x1,%rcx
add    $0xffffffffffffffff,%rax
jne    1470 <creapdb+0x2b0>
cmp    $0xffffffff,%r15d
mov    %ebx,%ebp
jne    14ac <creapdb+0x2ec>
movss  0x8(%rsp),%xmm0
movslq %ebp,%rax
add    $0x1,%ebp
movss  %xmm0,0xe4(%rsp,%rax,4)
mov    %ebp,%r15d
mov    %r12,%rdi
lea    0xf51(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   10b0 <fprintf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
lea    0xb59(%rip),%rsi
mov    $0x1,%al
call   10b0 <fprintf@plt>
movaps 0xb1e(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0xb0(%rsp)
movups %xmm0,0xbf(%rsp)
movb   $0x0,0xcf(%rsp)
cmpl   $0x0,0xc(%rsp)
jne    12c0 <creapdb+0x100>
mov    %ebp,%r15d
mov    0x18(%rsp),%rax
addl   $0x1,(%rax)
lea    0xc1e(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc2e(%rip),%rdi
lea    0xd6(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    %rbx,%rdi
lea    0xc0e(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1595 <creapdb+0x3d5>
lea    0xe7c(%rip),%rdi
call   1040 <puts@plt>
mov    0x2a4c(%rip),%rax
cmpl   $0x0,(%rax)
jne    15df <creapdb+0x41f>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    %r15d,%ebp
jmp    1307 <creapdb+0x147>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
lea    0xc12(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    0x2a0d(%rip),%rax
cmp    (%rax),%ebp
je     15a1 <creapdb+0x3e1>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1090 <readline@plt>
mov    %eax,%ebp
mov    %r14,%rdi
lea    0x11(%rsp),%rsi
xor    %edx,%edx
mov    $0x5,%ecx
call   1080 <substring@plt>
mov    0x11(%rsp),%eax
mov    $0x4d4f5441,%ecx
xor    %ecx,%eax
mov    0x14(%rsp),%ecx
mov    $0x20204d,%edx
xor    %edx,%ecx
or     %eax,%ecx
je     15c0 <creapdb+0x400>
mov    0x11(%rsp),%eax
mov    $0x41544548,%ecx
xor    %ecx,%eax
mov    0x14(%rsp),%ecx
mov    $0x4d5441,%edx
xor    %edx,%ecx
or     %eax,%ecx
jne    15d4 <creapdb+0x414>
jmp    15c0 <creapdb+0x400>
mov    %ebp,0x18(%rsp)
lea    0xbcd(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   10a0 <getchar@plt>
and    $0xdf,%bl
cmp    $0x59,%bl
jne    1804 <creapdb+0x644>
mov    $0x1,%ebp
lea    0xac9(%rip),%r15
lea    0x30(%rsp),%r14
lea    0xd50(%rip),%r13
nopl   0x0(%rax)
mov    %r12,%rdi
lea    0xbba(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   10b0 <fprintf@plt>
lea    0xbb6(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xbc3(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xbeb(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
lea    0x2c(%rsp),%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
lea    0xc00(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   10a0 <getchar@plt>
lea    0xc13(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
lea    0x28(%rsp),%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
lea    0xc41(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xa36(%rip),%rdi
lea    0x24(%rsp),%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
movaps 0x8c0(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0xb0(%rsp)
movups %xmm0,0xbf(%rsp)
movb   $0x0,0xcf(%rsp)
lea    0xbfc(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x9e7(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    0x2c(%rsp),%edx
movsbl %bl,%ecx
mov    0x28(%rsp),%r8d
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
lea    0xbde(%rip),%rsi
mov    %r14,%r9
mov    $0x1,%al
call   10b0 <fprintf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   10a0 <getchar@plt>
add    $0x1,%ebp
and    $0xdf,%bl
cmp    $0x59,%bl
je     1680 <creapdb+0x4c0>
mov    %r12,%rdi
call   1070 <rewind@plt>
lea    0xbed(%rip),%rsi
mov    %r12,%rdi
mov    0x18(%rsp),%edx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    %r12,%rdi
call   1050 <fclose@plt>
add    $0x228,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"External Dielectric Constant %8.3f\0A\00"
@.str.1 = [59 x i8] c"\0ADo you want to overwrite file fort.13, if present? [y/n]:\00"
@.str.2 = [8 x i8] c"fort.13\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [25 x i8] c"\0A can't open objectfile\0A\00"
@.str.5 = [75 x i8] c" \0A\00"
@.str.6 = [12 x i8] c"OBJECT %3d \00"
@.str.7 = [28 x i8] c"\0AInput objecttype number : \00"
@.str.8 = [32 x i8] c"\0A molecule from pdb file [0], \00"
@.str.9 = [45 x i8] c"sphere [1], cylinder [2], cone [3], box [4] \00"
@.str.10 = [2 x i8] c"\0A\00"
@.str.11 = [3 x i8] c"%d\00"
@.str.12 = [5 x i8] c"%3d \00"
@.str.13 = [39 x i8] c"\0AInput internal dielectric constant : \00"
@.str.14 = [3 x i8] c"%f\00"
@.str.15 = [7 x i8] c"%8.3f\0A\00"
@.str.16 = [33 x i8] c"\0Ainsert filename of object %d : \00"
@.str.17 = [3 x i8] c"%s\00"
@.str.18 = [2 x i8] c"r\00"
@.str.19 = [24 x i8] c"\0A can't open this file\0A\00"
@EOF = global i32 0
@.str.20 = [7 x i8] c"ATOM \00"
@.str.21 = [7 x i8] c"HETATM\00"
@.str.22 = [4 x i8] c"%s\0A\00"
@.str.23 = [47 x i8] c"\0AInsert data of object %d (spaced by commas): \00"
@.str.24 = [23 x i8] c"DATA %3d %3d %3d %s\0A\00"
@.str.25 = [26 x i8] c"OBJECT %3d %3d %3d %8.3f\0A\00"
@.str.26 = [46 x i8] c"\0A Are you going to insert a new object?(y/n):\00"
@.str.27 = [54 x i8] c"\0A Are you going to insert charge distributions?(y/n):\00"
@.str.28 = [12 x i8] c"CRGDST %3d \00"
@.str.29 = [27 x i8] c"\0AInput distrtype number : \00"
@.str.30 = [54 x i8] c"\0AShape: sphere [1], cylinder [2], cone [3], box [4], \00"
@.str.31 = [67 x i8] c"\0Apoint charge [8], segment [9], disk [10], rectangular plate [11] \00"
@.str.32 = [49 x i8] c"\0AIs it a volumic (v) or surfacial (s) charge? : \00"
@.str.33 = [75 x i8] c"\0AInput objectnumber to which this distribution is linked (0 if is free) : \00"
@.str.34 = [44 x i8] c"\0AInput total charge in this distribution : \00"
@.str.35 = [35 x i8] c"\0AInsert data of distribution %d : \00"
@.str.36 = [29 x i8] c"\0ADATA %3d %c %3d %8.3f %s\0A\00"
@.str.37 = [52 x i8] c"\0A Are you going to insert a new distribution?(y/n):\00"
@.str.38 = [12 x i8] c"MEDIA %3d \00"
define void @creapdb(float* %0, i32* %1) {
%3 = alloca float*
%4 = alloca i32*
%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 i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [80 x float]
%18 = alloca float
%19 = alloca float
%20 = alloca [10 x i8]
%21 = alloca [160 x i8]
%22 = alloca [7 x i8]
%23 = alloca i8
%24 = alloca i8
%25 = alloca i8
store float* %0, float** %3
store i32* %1, i32** %4
store i32 0, i32* %14
store i32 0, i32* %11
br label %26
26: ; preds = %33, %2
%27 = load i32, i32* %11
%28 = icmp slt i32 %27, 159
br i1 %28, label %29, label %36
29: ; preds = %26
%30 = load i32, i32* %11
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 %31
store i8 32, i8* %32
br label %33
33: ; preds = %29
%34 = load i32, i32* %11
%35 = add nsw i32 %34, 1
store i32 %35, i32* %11
br label %26
36: ; preds = %26
%37 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 159
store i8 0, i8* %37
%38 = load i32*, i32** %4
store i32 0, i32* %38
%39 = load float*, float** %3
%40 = load float, float* %39
%41 = load i32, i32* %14
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [80 x float], [80 x float]* %17, i64 0, i64 %42
store float %40, float* %43
%44 = load i32, i32* %14
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [80 x float], [80 x float]* %17, i64 0, i64 %45
%47 = load float, float* %46
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %48)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%51 = call signext i8 (...) @getchar()
store i8 %51, i8* %23
%52 = call signext i8 (...) @getchar()
store i8 %52, i8* %25
%53 = load i8, i8* %23
%54 = sext i8 %53 to i32
%55 = icmp ne i32 %54, 121
br i1 %55, label %56, label %57
56: ; preds = %36
br label %309
57: ; preds = %36
%58 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %58, i32** %6
%59 = load i32*, i32** %6
%60 = icmp eq i32* %59, null
br i1 %60, label %61, label %63
61: ; preds = %57
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %63
63: ; preds = %61, %57
%64 = load i32*, i32** %6
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %12
br label %66
66: ; preds = %228, %63
store i32 0, i32* %15
store i32 0, i32* %10
%67 = load i32*, i32** %6
%68 = load i32, i32* %12
%69 = call i32 (i32*, i8*, ...) @fprintf(i32* %67, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %68)
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0))
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%74 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %7)
%75 = load i32*, i32** %6
%76 = load i32, i32* %7
%77 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i32 %76)
store i32 -1, i32* %16
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0))
%79 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), float* %18)
store i32 1, i32* %13
br label %80
80: ; preds = %94, %66
%81 = load i32, i32* %13
%82 = load i32, i32* %14
%83 = icmp sle i32 %81, %82
br i1 %83, label %84, label %97
84: ; preds = %80
%85 = load float, float* %18
%86 = load i32, i32* %13
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [80 x float], [80 x float]* %17, i64 0, i64 %87
%89 = load float, float* %88
%90 = fcmp oeq float %85, %89
br i1 %90, label %91, label %93
91: ; preds = %84
%92 = load i32, i32* %13
store i32 %92, i32* %16
br label %93
93: ; preds = %91, %84
br label %94
94: ; preds = %93
%95 = load i32, i32* %13
%96 = add nsw i32 %95, 1
store i32 %96, i32* %13
br label %80
97: ; preds = %80
%98 = load i32, i32* %16
%99 = icmp eq i32 %98, -1
br i1 %99, label %100, label %108
100: ; preds = %97
%101 = load i32, i32* %14
%102 = add nsw i32 %101, 1
store i32 %102, i32* %14
%103 = load float, float* %18
%104 = load i32, i32* %14
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [80 x float], [80 x float]* %17, i64 0, i64 %105
store float %103, float* %106
%107 = load i32, i32* %14
store i32 %107, i32* %16
br label %108
108: ; preds = %100, %97
%109 = load i32*, i32** %6
%110 = load i32, i32* %16
%111 = call i32 (i32*, i8*, ...) @fprintf(i32* %109, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i32 %110)
%112 = load i32*, i32** %6
%113 = load float, float* %18
%114 = fpext float %113 to double
%115 = call i32 (i32*, i8*, ...) @fprintf(i32* %112, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %114)
store i32 0, i32* %11
br label %116
116: ; preds = %123, %108
%117 = load i32, i32* %11
%118 = icmp slt i32 %117, 159
br i1 %118, label %119, label %126
119: ; preds = %116
%120 = load i32, i32* %11
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 %121
store i8 32, i8* %122
br label %123
123: ; preds = %119
%124 = load i32, i32* %11
%125 = add nsw i32 %124, 1
store i32 %125, i32* %11
br label %116
126: ; preds = %116
%127 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 159
store i8 0, i8* %127
%128 = load i32, i32* %7
switch i32 %128, label %171 [
i32 0, label %129
]
129: ; preds = %126
%130 = load i32*, i32** %4
%131 = load i32, i32* %130
%132 = add nsw i32 %131, 1
store i32 %132, i32* %130
%133 = load i32, i32* %12
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0), i32 %133)
%135 = getelementptr inbounds [10 x i8], [10 x i8]* %20, i64 0, i64 0
%136 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8* %135)
%137 = call signext i8 (...) @getchar()
store i8 %137, i8* %25
%138 = getelementptr inbounds [10 x i8], [10 x i8]* %20, i64 0, i64 0
%139 = call i32* @fopen(i8* %138, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
store i32* %139, i32** %5
%140 = load i32*, i32** %5
%141 = icmp eq i32* %140, null
br i1 %141, label %142, label %144
142: ; preds = %129
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.19, i64 0, i64 0))
br label %144
144: ; preds = %142, %129
br label %145
145: ; preds = %167, %144
%146 = load i32, i32* %15
%147 = load i32, i32* @EOF
%148 = icmp ne i32 %146, %147
br i1 %148, label %149, label %168
149: ; preds = %145
%150 = load i32*, i32** %5
%151 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 0
%152 = call i32 @readline(i32* %150, i8* %151)
store i32 %152, i32* %15
%153 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 0
%154 = getelementptr inbounds [7 x i8], [7 x i8]* %22, i64 0, i64 0
%155 = call i32 @substring(i8* %153, i8* %154, i32 0, i32 5)
%156 = getelementptr inbounds [7 x i8], [7 x i8]* %22, i64 0, i64 0
%157 = call i32 @strcmp(i8* %156, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0))
%158 = icmp eq i32 %157, 0
br i1 %158, label %163, label %159
159: ; preds = %149
%160 = getelementptr inbounds [7 x i8], [7 x i8]* %22, i64 0, i64 0
%161 = call i32 @strcmp(i8* %160, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0))
%162 = icmp eq i32 %161, 0
br i1 %162, label %163, label %167
163: ; preds = %159, %149
%164 = load i32*, i32** %6
%165 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 0
%166 = call i32 (i32*, i8*, ...) @fprintf(i32* %164, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* %165)
br label %167
167: ; preds = %163, %159
br label %145
168: ; preds = %145
%169 = load i32*, i32** %5
%170 = call i32 @fclose(i32* %169)
br label %214
171: ; preds = %126
%172 = load i32, i32* %12
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.23, i64 0, i64 0), i32 %172)
%174 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 0
%175 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8* %174)
%176 = call signext i8 (...) @getchar()
store i8 %176, i8* %25
%177 = load i32*, i32** %6
%178 = load i32, i32* %7
%179 = load i32, i32* %16
%180 = load i32, i32* %10
%181 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 0
%182 = call i32 (i32*, i8*, ...) @fprintf(i32* %177, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.24, i64 0, i64 0), i32 %178, i32 %179, i32 %180, i8* %181)
%183 = load i32, i32* %10
%184 = icmp eq i32 %183, 2
br i1 %184, label %185, label %213
185: ; preds = %171
%186 = load i32, i32* %7
%187 = icmp eq i32 %186, 2
br i1 %187, label %188, label %213
188: ; preds = %185
%189 = load i32, i32* %12
%190 = add nsw i32 %189, 1
store i32 %190, i32* %12
%191 = load i32*, i32** %6
%192 = load i32, i32* %12
%193 = load i32, i32* %16
%194 = load float, float* %18
%195 = fpext float %194 to double
%196 = call i32 (i32*, i8*, ...) @fprintf(i32* %191, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.25, i64 0, i64 0), i32 %192, i32 20, i32 %193, double %195)
%197 = load i32*, i32** %6
%198 = load i32, i32* %16
%199 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 0
%200 = call i32 (i32*, i8*, ...) @fprintf(i32* %197, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.24, i64 0, i64 0), i32 10, i32 %198, i32 3, i8* %199)
%201 = load i32, i32* %12
%202 = add nsw i32 %201, 1
store i32 %202, i32* %12
%203 = load i32*, i32** %6
%204 = load i32, i32* %12
%205 = load i32, i32* %16
%206 = load float, float* %18
%207 = fpext float %206 to double
%208 = call i32 (i32*, i8*, ...) @fprintf(i32* %203, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.25, i64 0, i64 0), i32 %204, i32 20, i32 %205, double %207)
%209 = load i32*, i32** %6
%210 = load i32, i32* %16
%211 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 0
%212 = call i32 (i32*, i8*, ...) @fprintf(i32* %209, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.24, i64 0, i64 0), i32 10, i32 %210, i32 3, i8* %211)
br label %213
213: ; preds = %188, %185, %171
br label %214
214: ; preds = %213, %168
%215 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.26, i64 0, i64 0))
%216 = call signext i8 (...) @getchar()
store i8 %216, i8* %23
%217 = call signext i8 (...) @getchar()
store i8 %217, i8* %25
%218 = load i32, i32* %12
%219 = add nsw i32 %218, 1
store i32 %219, i32* %12
br label %220
220: ; preds = %214
%221 = load i8, i8* %23
%222 = sext i8 %221 to i32
%223 = icmp eq i32 %222, 121
br i1 %223, label %228, label %224
224: ; preds = %220
%225 = load i8, i8* %23
%226 = sext i8 %225 to i32
%227 = icmp eq i32 %226, 89
br label %228
228: ; preds = %224, %220
%229 = phi i1 [ true, %220 ], [ %227, %224 ]
br i1 %229, label %66, label %230
230: ; preds = %228
%231 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.27, i64 0, i64 0))
%232 = call signext i8 (...) @getchar()
store i8 %232, i8* %23
%233 = call signext i8 (...) @getchar()
store i8 %233, i8* %25
%234 = load i8, i8* %23
%235 = sext i8 %234 to i32
%236 = icmp eq i32 %235, 121
br i1 %236, label %241, label %237
237: ; preds = %230
%238 = load i8, i8* %23
%239 = sext i8 %238 to i32
%240 = icmp eq i32 %239, 89
br i1 %240, label %241, label %301
241: ; preds = %237, %230
store i32 1, i32* %12
br label %242
242: ; preds = %298, %241
%243 = load i32*, i32** %6
%244 = load i32, i32* %12
%245 = call i32 (i32*, i8*, ...) @fprintf(i32* %243, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.28, i64 0, i64 0), i32 %244)
%246 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.29, i64 0, i64 0))
%247 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.30, i64 0, i64 0))
%248 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.31, i64 0, i64 0))
%249 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%250 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %8)
%251 = call signext i8 (...) @getchar()
store i8 %251, i8* %25
%252 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.32, i64 0, i64 0))
%253 = call signext i8 (...) @getchar()
store i8 %253, i8* %24
%254 = call signext i8 (...) @getchar()
store i8 %254, i8* %25
%255 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.33, i64 0, i64 0))
%256 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %9)
%257 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.34, i64 0, i64 0))
%258 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), float* %19)
store i32 0, i32* %11
br label %259
259: ; preds = %266, %242
%260 = load i32, i32* %11
%261 = icmp slt i32 %260, 159
br i1 %261, label %262, label %269
262: ; preds = %259
%263 = load i32, i32* %11
%264 = sext i32 %263 to i64
%265 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 %264
store i8 32, i8* %265
br label %266
266: ; preds = %262
%267 = load i32, i32* %11
%268 = add nsw i32 %267, 1
store i32 %268, i32* %11
br label %259
269: ; preds = %259
%270 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 159
store i8 0, i8* %270
%271 = load i32, i32* %12
%272 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.35, i64 0, i64 0), i32 %271)
%273 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 0
%274 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8* %273)
%275 = call signext i8 (...) @getchar()
store i8 %275, i8* %25
%276 = load i32*, i32** %6
%277 = load i32, i32* %8
%278 = load i8, i8* %24
%279 = sext i8 %278 to i32
%280 = load i32, i32* %9
%281 = load float, float* %19
%282 = fpext float %281 to double
%283 = getelementptr inbounds [160 x i8], [160 x i8]* %21, i64 0, i64 0
%284 = call i32 (i32*, i8*, ...) @fprintf(i32* %276, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.36, i64 0, i64 0), i32 %277, i32 %279, i32 %280, double %282, i8* %283)
%285 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.37, i64 0, i64 0))
%286 = call signext i8 (...) @getchar()
store i8 %286, i8* %23
%287 = call signext i8 (...) @getchar()
store i8 %287, i8* %25
%288 = load i32, i32* %12
%289 = add nsw i32 %288, 1
store i32 %289, i32* %12
br label %290
290: ; preds = %269
%291 = load i8, i8* %23
%292 = sext i8 %291 to i32
%293 = icmp eq i32 %292, 121
br i1 %293, label %298, label %294
294: ; preds = %290
%295 = load i8, i8* %23
%296 = sext i8 %295 to i32
%297 = icmp eq i32 %296, 89
br label %298
298: ; preds = %294, %290
%299 = phi i1 [ true, %290 ], [ %297, %294 ]
br i1 %299, label %242, label %300
300: ; preds = %298
br label %301
301: ; preds = %300, %237
%302 = load i32*, i32** %6
%303 = call i32 @rewind(i32* %302)
%304 = load i32*, i32** %6
%305 = load i32, i32* %14
%306 = call i32 (i32*, i8*, ...) @fprintf(i32* %304, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.38, i64 0, i64 0), i32 %305)
%307 = load i32*, i32** %6
%308 = call i32 @fclose(i32* %307)
br label %309
309: ; preds = %301, %56
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"External Dielectric Constant %8.3f\0A\00"
@.str.1 = [59 x i8] c"\0ADo you want to overwrite file fort.13, if present? [y/n]:\00"
@.str.2 = [8 x i8] c"fort.13\00"
@.str.3 = [2 x i8] c"w\00"
@.str.5 = [75 x i8] c" \0A\00"
@.str.6 = [12 x i8] c"OBJECT %3d \00"
@.str.7 = [28 x i8] c"\0AInput objecttype number : \00"
@.str.8 = [32 x i8] c"\0A molecule from pdb file [0], \00"
@.str.9 = [45 x i8] c"sphere [1], cylinder [2], cone [3], box [4] \00"
@.str.11 = [3 x i8] c"%d\00"
@.str.12 = [5 x i8] c"%3d \00"
@.str.13 = [39 x i8] c"\0AInput internal dielectric constant : \00"
@.str.14 = [3 x i8] c"%f\00"
@.str.15 = [7 x i8] c"%8.3f\0A\00"
@.str.16 = [33 x i8] c"\0Ainsert filename of object %d : \00"
@.str.17 = [3 x i8] c"%s\00"
@.str.18 = [2 x i8] c"r\00"
@EOF = global i32 0
@.str.20 = [7 x i8] c"ATOM \00"
@.str.21 = [7 x i8] c"HETATM\00"
@.str.22 = [4 x i8] c"%s\0A\00"
@.str.23 = [47 x i8] c"\0AInsert data of object %d (spaced by commas): \00"
@.str.24 = [23 x i8] c"DATA %3d %3d %3d %s\0A\00"
@.str.26 = [46 x i8] c"\0A Are you going to insert a new object?(y/n):\00"
@.str.27 = [54 x i8] c"\0A Are you going to insert charge distributions?(y/n):\00"
@.str.28 = [12 x i8] c"CRGDST %3d \00"
@.str.29 = [27 x i8] c"\0AInput distrtype number : \00"
@.str.30 = [54 x i8] c"\0AShape: sphere [1], cylinder [2], cone [3], box [4], \00"
@.str.31 = [67 x i8] c"\0Apoint charge [8], segment [9], disk [10], rectangular plate [11] \00"
@.str.32 = [49 x i8] c"\0AIs it a volumic (v) or surfacial (s) charge? : \00"
@.str.33 = [75 x i8] c"\0AInput objectnumber to which this distribution is linked (0 if is free) : \00"
@.str.34 = [44 x i8] c"\0AInput total charge in this distribution : \00"
@.str.35 = [35 x i8] c"\0AInsert data of distribution %d : \00"
@.str.36 = [29 x i8] c"\0ADATA %3d %c %3d %8.3f %s\0A\00"
@.str.37 = [52 x i8] c"\0A Are you going to insert a new distribution?(y/n):\00"
@.str.38 = [12 x i8] c"MEDIA %3d \00"
@str = [23 x i8] c"\0A can't open this file\00"
@str.39 = [24 x i8] c"\0A can't open objectfile\00"
define void @creapdb(float* nocapture %0, i32* nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [80 x float]
%7 = alloca float
%8 = alloca float
%9 = alloca [10 x i8]
%10 = alloca [160 x i8]
%11 = getelementptr inbounds [160 x i8], [160 x i8]* %10, i64 0, i64 0
%12 = alloca [7 x i8]
%13 = bitcast i32* %3 to i8*
%14 = bitcast i32* %4 to i8*
%15 = bitcast i32* %5 to i8*
%16 = bitcast [80 x float]* %6 to i8*
%17 = bitcast float* %7 to i8*
%18 = bitcast float* %8 to i8*
%19 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%20 = getelementptr inbounds [160 x i8], [160 x i8]* %10, i64 0, i64 0
%21 = getelementptr inbounds [7 x i8], [7 x i8]* %12, i64 0, i64 0
%22 = getelementptr inbounds [160 x i8], [160 x i8]* %10, i64 0, i64 159
store i8 0, i8* %22
store i32 0, i32* %1
%23 = load float, float* %0
%24 = fpext float %23 to double
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %24)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%27 = tail call signext i8 (...) @getchar()
%28 = tail call signext i8 (...) @getchar()
%29 = icmp eq i8 %27, 121
br i1 %29, label %30, label %207
30: ; preds = %2
%31 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.39, i64 0, i64 0))
br label %35
35: ; preds = %33, %30
%36 = tail call i64 @fwrite(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.5, i64 0, i64 0), i64 74, i64 1, i32* %31)
br label %37
37: ; preds = %159, %35
%38 = phi i32 [ 1, %35 ], [ %163, %159 ]
%39 = phi i32 [ 0, %35 ], [ %117, %159 ]
%40 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %38)
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0))
%44 = call i32 @putchar(i32 10)
%45 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %3)
%46 = load i32, i32* %3
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i32 %46)
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0))
%49 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), float* %7)
%50 = icmp slt i32 %39, 1
br i1 %50, label %111, label %51
51: ; preds = %37
%52 = load float, float* %7
%53 = add nuw i32 %39, 1
%54 = zext i32 %53 to i64
%55 = add nsw i64 %54, -1
%56 = add nsw i64 %54, -2
%57 = and i64 %55, 3
%58 = icmp ult i64 %56, 3
br i1 %58, label %91, label %59
59: ; preds = %51
%60 = and i64 %55, -4
br label %61
61: ; preds = %61, %59
%62 = phi i64 [ 1, %59 ], [ %88, %61 ]
%63 = phi i32 [ -1, %59 ], [ %87, %61 ]
%64 = phi i64 [ 0, %59 ], [ %89, %61 ]
%65 = getelementptr inbounds [80 x float], [80 x float]* %6, i64 0, i64 %62
%66 = load float, float* %65
%67 = fcmp oeq float %52, %66
%68 = trunc i64 %62 to i32
%69 = select i1 %67, i32 %68, i32 %63
%70 = add nuw nsw i64 %62, 1
%71 = getelementptr inbounds [80 x float], [80 x float]* %6, i64 0, i64 %70
%72 = load float, float* %71
%73 = fcmp oeq float %52, %72
%74 = trunc i64 %70 to i32
%75 = select i1 %73, i32 %74, i32 %69
%76 = add nuw nsw i64 %62, 2
%77 = getelementptr inbounds [80 x float], [80 x float]* %6, i64 0, i64 %76
%78 = load float, float* %77
%79 = fcmp oeq float %52, %78
%80 = trunc i64 %76 to i32
%81 = select i1 %79, i32 %80, i32 %75
%82 = add nuw nsw i64 %62, 3
%83 = getelementptr inbounds [80 x float], [80 x float]* %6, i64 0, i64 %82
%84 = load float, float* %83
%85 = fcmp oeq float %52, %84
%86 = trunc i64 %82 to i32
%87 = select i1 %85, i32 %86, i32 %81
%88 = add nuw nsw i64 %62, 4
%89 = add i64 %64, 4
%90 = icmp eq i64 %89, %60
br i1 %90, label %91, label %61
91: ; preds = %61, %51
%92 = phi i32 [ undef, %51 ], [ %87, %61 ]
%93 = phi i64 [ 1, %51 ], [ %88, %61 ]
%94 = phi i32 [ -1, %51 ], [ %87, %61 ]
%95 = icmp eq i64 %57, 0
br i1 %95, label %108, label %96
96: ; preds = %91, %96
%97 = phi i64 [ %105, %96 ], [ %93, %91 ]
%98 = phi i32 [ %104, %96 ], [ %94, %91 ]
%99 = phi i64 [ %106, %96 ], [ 0, %91 ]
%100 = getelementptr inbounds [80 x float], [80 x float]* %6, i64 0, i64 %97
%101 = load float, float* %100
%102 = fcmp oeq float %52, %101
%103 = trunc i64 %97 to i32
%104 = select i1 %102, i32 %103, i32 %98
%105 = add nuw nsw i64 %97, 1
%106 = add i64 %99, 1
%107 = icmp eq i64 %106, %57
br i1 %107, label %108, label %96
108: ; preds = %96, %91
%109 = phi i32 [ %92, %91 ], [ %104, %96 ]
%110 = icmp eq i32 %109, -1
br i1 %110, label %111, label %116
111: ; preds = %37, %108
%112 = add nsw i32 %39, 1
%113 = load float, float* %7
%114 = sext i32 %112 to i64
%115 = getelementptr inbounds [80 x float], [80 x float]* %6, i64 0, i64 %114
store float %113, float* %115
br label %116
116: ; preds = %111, %108
%117 = phi i32 [ %112, %111 ], [ %39, %108 ]
%118 = phi i32 [ %112, %111 ], [ %109, %108 ]
%119 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i32 %118)
%120 = load float, float* %7
%121 = fpext float %120 to double
%122 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %121)
store i8 0, i8* %22
%123 = load i32, i32* %3
%124 = icmp eq i32 %123, 0
br i1 %124, label %125, label %153
125: ; preds = %116
%126 = load i32, i32* %1
%127 = add nsw i32 %126, 1
store i32 %127, i32* %1
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0), i32 %38)
%129 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8* %19)
%130 = call signext i8 (...) @getchar()
%131 = call i32* @fopen(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
%132 = icmp eq i32* %131, null
br i1 %132, label %133, label %135
133: ; preds = %125
%134 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %135
135: ; preds = %133, %125
%136 = load i32, i32* @EOF
%137 = icmp eq i32 %136, 0
br i1 %137, label %151, label %138
138: ; preds = %135, %148
%139 = call i32 @readline(i32* %131, i8* %20)
%140 = call i32 @substring(i8* %20, i8* %21, i32 0, i32 5)
%141 = call i32 @bcmp(i8* dereferenceable(7) %21, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i64 7)
%142 = icmp eq i32 %141, 0
br i1 %142, label %146, label %143
143: ; preds = %138
%144 = call i32 @bcmp(i8* dereferenceable(7) %21, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0), i64 7)
%145 = icmp eq i32 %144, 0
br i1 %145, label %146, label %148
146: ; preds = %143, %138
%147 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* %20)
br label %148
148: ; preds = %146, %143
%149 = load i32, i32* @EOF
%150 = icmp eq i32 %139, %149
br i1 %150, label %151, label %138
151: ; preds = %148, %135
%152 = call i32 @fclose(i32* %131)
br label %159
153: ; preds = %116
%154 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.23, i64 0, i64 0), i32 %38)
%155 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8* %20)
%156 = call signext i8 (...) @getchar()
%157 = load i32, i32* %3
%158 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.24, i64 0, i64 0), i32 %157, i32 %118, i32 0, i8* %20)
br label %159
159: ; preds = %153, %151
%160 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.26, i64 0, i64 0))
%161 = call signext i8 (...) @getchar()
%162 = call signext i8 (...) @getchar()
%163 = add nuw nsw i32 %38, 1
%164 = and i8 %161, -33
%165 = icmp eq i8 %164, 89
br i1 %165, label %37, label %166
166: ; preds = %159
%167 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.27, i64 0, i64 0))
%168 = call signext i8 (...) @getchar()
%169 = call signext i8 (...) @getchar()
%170 = and i8 %168, -33
%171 = icmp eq i8 %170, 89
br i1 %171, label %172, label %203
172: ; preds = %166, %172
%173 = phi i32 [ %200, %172 ], [ 1, %166 ]
%174 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.28, i64 0, i64 0), i32 %173)
%175 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.29, i64 0, i64 0))
%176 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.30, i64 0, i64 0))
%177 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.31, i64 0, i64 0))
%178 = call i32 @putchar(i32 10)
%179 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %4)
%180 = call signext i8 (...) @getchar()
%181 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.32, i64 0, i64 0))
%182 = call signext i8 (...) @getchar()
%183 = call signext i8 (...) @getchar()
%184 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @.str.33, i64 0, i64 0))
%185 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %5)
%186 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.34, i64 0, i64 0))
%187 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), float* %8)
store i8 0, i8* %22
%188 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.35, i64 0, i64 0), i32 %173)
%189 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8* %20)
%190 = call signext i8 (...) @getchar()
%191 = load i32, i32* %4
%192 = sext i8 %182 to i32
%193 = load i32, i32* %5
%194 = load float, float* %8
%195 = fpext float %194 to double
%196 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.36, i64 0, i64 0), i32 %191, i32 %192, i32 %193, double %195, i8* %20)
%197 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.37, i64 0, i64 0))
%198 = call signext i8 (...) @getchar()
%199 = call signext i8 (...) @getchar()
%200 = add nuw nsw i32 %173, 1
%201 = and i8 %198, -33
%202 = icmp eq i8 %201, 89
br i1 %202, label %172, label %203
203: ; preds = %172, %166
%204 = call i32 @rewind(i32* %31)
%205 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.38, i64 0, i64 0), i32 %117)
%206 = call i32 @fclose(i32* %31)
br label %207
207: ; preds = %2, %203
ret void
}