#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 Atomic_Number(char *);
int /*<<< orphan*/ Set_Atom_Symbol();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  int i, j, k, ns, na;
  int nline, atomnum, numsnapshot;
  FILE *fp1, *fp0;
  char read_str[600];
  double tv[4][4], tmp, x, y, z;
  Set_Atom_Symbol();
  if ((fp1 = fopen(argv[1], "r")) != NULL) {
    nline = 0;
    while (fgets(read_str, 600, fp1) != NULL) {
      nline++;
    }
    fclose(fp1);
  } else {
    printf("could not find %s\n", argv[1]);
  }
  if ((fp1 = fopen(argv[1], "r")) != NULL) {
    fscanf(fp1, "%ld", &atomnum);
    fclose(fp1);
  } else {
    printf("could not find %s\n", argv[1]);
  }
  numsnapshot = nline / (atomnum + 2);
  if ((fp0 = fopen(argv[2], "w")) != NULL) {
    fprintf(fp0, "ANIMSTEPS %d\n", numsnapshot);
    fprintf(fp0, "CRYSTAL\n");
    if ((fp1 = fopen(argv[1], "r")) != NULL) {
      for (ns = 1; ns <= numsnapshot; ns++) {
        fscanf(fp1, "%s", read_str);
        fscanf(fp1, "%s", read_str);
        fscanf(fp1, "%s", read_str);
        fscanf(fp1, "%s", read_str);
        fscanf(fp1, "%s", read_str);
        fscanf(fp1, "%s", read_str);
        fscanf(fp1, "%s", read_str);
        fscanf(fp1, "%s", read_str);
        fscanf(fp1, "%lf", &tv[1][1]);
        fscanf(fp1, "%lf", &tv[1][2]);
        fscanf(fp1, "%lf", &tv[1][3]);
        fscanf(fp1, "%lf", &tv[2][1]);
        fscanf(fp1, "%lf", &tv[2][2]);
        fscanf(fp1, "%lf", &tv[2][3]);
        fscanf(fp1, "%lf", &tv[3][1]);
        fscanf(fp1, "%lf", &tv[3][2]);
        fscanf(fp1, "%lf", &tv[3][3]);
        fprintf(fp0, "PRIMVEC %d\n", ns);
        for (i = 1; i <= 3; i++) {
          for (j = 1; j <= 3; j++) {
            fprintf(fp0, " %15.7f ", tv[i][j]);
          }
          fprintf(fp0, "\n");
        }
        fprintf(fp0, "PRIMCOORD %d\n", ns);
        fprintf(fp0, "  %d %d\n", atomnum, 1);
        for (na = 1; na <= atomnum; na++) {
          fscanf(fp1, "%s", read_str);
          fscanf(fp1, "%lf", &x);
          fscanf(fp1, "%lf", &y);
          fscanf(fp1, "%lf", &z);
          fscanf(fp1, "%lf", &tmp);
          fscanf(fp1, "%lf", &tmp);
          fscanf(fp1, "%lf", &tmp);
          fscanf(fp1, "%lf", &tmp);
          fscanf(fp1, "%lf", &tmp);
          fscanf(fp1, "%lf", &tmp);
          fscanf(fp1, "%lf", &tmp);
          fscanf(fp1, "%lf", &tmp);
          fscanf(fp1, "%lf", &tmp);
          fscanf(fp1, "%lf", &tmp);
          fprintf(fp0, "  %3d ", Atomic_Number(read_str));
          fprintf(fp0, "%15.7f", x);
          fprintf(fp0, "%15.7f", y);
          fprintf(fp0, "%15.7f\n", z);
        }
      }
      fclose(fp1);
    } else {
      printf("could not find %s\n", argv[1]);
    }
    fclose(fp0);
  } else {
    printf("could not find %s\n", argv[2]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x350,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1090 <Set_Atom_Symbol@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe51(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
je     1204 <main+0x84>
movl   $0x0,-0x28(%rbp)
lea    -0x2a0(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    $0x258,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     11f6 <main+0x76>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11c9 <main+0x49>
mov    -0x38(%rbp),%rdi
call   1030 <fclose@plt>
jmp    1218 <main+0x98>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xdef(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdd9(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
je     125e <main+0xde>
mov    -0x38(%rbp),%rdi
lea    0xdd0(%rip),%rsi
lea    -0x2c(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <fclose@plt>
jmp    1272 <main+0xf2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xd95(%rip),%rdi
call   1050 <printf@plt>
mov    -0x28(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xd89(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
je     17ef <main+0x66f>
mov    -0x40(%rbp),%rdi
mov    -0x30(%rbp),%edx
lea    0xd6a(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x40(%rbp),%rdi
lea    0xd66(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd27(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
je     17cd <main+0x64d>
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x30(%rbp),%eax
jg     17bf <main+0x63f>
mov    -0x38(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0xd21(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0xd08(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0xcef(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0xcd6(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0xcbd(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0xca4(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0xc8b(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0xc72(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x320(%rbp),%rdx
add    $0x20,%rdx
add    $0x8,%rdx
lea    0xc54(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x320(%rbp),%rdx
add    $0x20,%rdx
add    $0x10,%rdx
lea    0xc33(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x320(%rbp),%rdx
add    $0x20,%rdx
add    $0x18,%rdx
lea    0xc12(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x320(%rbp),%rdx
add    $0x40,%rdx
add    $0x8,%rdx
lea    0xbf1(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x320(%rbp),%rdx
add    $0x40,%rdx
add    $0x10,%rdx
lea    0xbd0(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x320(%rbp),%rdx
add    $0x40,%rdx
add    $0x18,%rdx
lea    0xbaf(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x320(%rbp),%rdx
add    $0x60,%rdx
add    $0x8,%rdx
lea    0xb8e(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x320(%rbp),%rdx
add    $0x60,%rdx
add    $0x10,%rdx
lea    0xb6d(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x320(%rbp),%rdx
add    $0x60,%rdx
add    $0x18,%rdx
lea    0xb4c(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%edx
lea    0xb3b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jg     1582 <main+0x402>
movl   $0x1,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jg     1562 <main+0x3e2>
mov    -0x40(%rbp),%rdi
movslq -0x14(%rbp),%rcx
lea    -0x320(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xaf8(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    151d <main+0x39d>
mov    -0x40(%rbp),%rdi
lea    0xac3(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    150c <main+0x38c>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%edx
lea    0xabe(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x40(%rbp),%rdi
mov    -0x2c(%rbp),%edx
lea    0xab7(%rip),%rsi
mov    $0x1,%ecx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     17ac <main+0x62c>
mov    -0x38(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0xa5c(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0xa4d(%rip),%rsi
lea    -0x330(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0xa34(%rip),%rsi
lea    -0x338(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0xa1b(%rip),%rsi
lea    -0x340(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0xa02(%rip),%rsi
lea    -0x328(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0x9e9(%rip),%rsi
lea    -0x328(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0x9d0(%rip),%rsi
lea    -0x328(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0x9b7(%rip),%rsi
lea    -0x328(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0x99e(%rip),%rsi
lea    -0x328(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0x985(%rip),%rsi
lea    -0x328(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0x96c(%rip),%rsi
lea    -0x328(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0x953(%rip),%rsi
lea    -0x328(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0x93a(%rip),%rsi
lea    -0x328(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0x921(%rip),%rsi
lea    -0x328(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x348(%rbp)
lea    -0x2a0(%rbp),%rdi
call   1040 <Atomic_Number@plt>
mov    -0x348(%rbp),%rdi
mov    %eax,%edx
lea    0x91c(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x40(%rbp),%rdi
movsd  -0x330(%rbp),%xmm0
ff
lea    0x909(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x40(%rbp),%rdi
movsd  -0x338(%rbp),%xmm0
ff
lea    0x8ef(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x40(%rbp),%rdi
movsd  -0x340(%rbp),%xmm0
ff
lea    0x8dc(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    15b8 <main+0x438>
jmp    17b1 <main+0x631>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12f3 <main+0x173>
mov    -0x38(%rbp),%rdi
call   1030 <fclose@plt>
jmp    17e1 <main+0x661>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0x826(%rip),%rdi
call   1050 <printf@plt>
mov    -0x40(%rbp),%rdi
call   1030 <fclose@plt>
jmp    1803 <main+0x683>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0x804(%rip),%rdi
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x350,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x318,%rsp
mov    %rsi,%r13
xor    %eax,%eax
call   10a0 <Set_Atom_Symbol@plt>
mov    0x8(%r13),%rdi
lea    0xe3a(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1202 <main+0x62>
mov    %rax,%rbp
mov    $0xffffffff,%ebx
lea    0xc0(%rsp),%r15
mov    %r15,%rdi
mov    $0x258,%esi
mov    %rbp,%rdx
call   1080 <fgets@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    11e0 <main+0x40>
mov    %rbp,%rdi
call   1030 <fclose@plt>
jmp    1212 <main+0x72>
mov    0x8(%r13),%rsi
lea    0xdf5(%rip),%rdi
call   1050 <printf@plt>
mov    0x8(%r13),%rdi
lea    0xde3(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1251 <main+0xb1>
mov    %rax,%rbp
lea    0xde4(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rax,%rdi
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %rbp,%rdi
call   1030 <fclose@plt>
mov    0xc(%rsp),%ecx
add    $0x2,%ecx
jmp    1261 <main+0xc1>
mov    0x8(%r13),%rsi
lea    0xda6(%rip),%rdi
call   1050 <printf@plt>
mov    %ebx,%eax
cltd
idiv   %ecx
mov    %eax,%r12d
mov    0x10(%r13),%rdi
lea    0xda5(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1714 <main+0x574>
mov    %rax,%rbx
lea    0xd8f(%rip),%rsi
mov    %rax,%rdi
mov    %r12d,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xd89(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10c0 <fwrite@plt>
mov    0x8(%r13),%rdi
lea    0xd43(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1726 <main+0x586>
mov    %rax,%r14
test   %r12d,%r12d
jle    170a <main+0x56a>
mov    $0x1,%eax
lea    0xd4f(%rip),%rcx
lea    0xc0(%rsp),%r13
lea    0xd43(%rip),%r15
lea    0x38(%rsp),%rbp
mov    %r12d,0x18(%rsp)
jmp    131d <main+0x17d>
xchg   %ax,%ax
mov    0x10(%rsp),%rcx
lea    0x1(%rcx),%eax
mov    0x18(%rsp),%r12d
cmp    %r12d,%ecx
lea    0xd1b(%rip),%rcx
je     170a <main+0x56a>
mov    %rax,0x10(%rsp)
mov    %r14,%rdi
mov    %rcx,%r12
mov    %rcx,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0x68(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0x70(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0x78(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0x88(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0x90(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0x98(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0xa8(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0xb0(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0xb8(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %rbx,%rdi
lea    0xbd6(%rip),%rsi
mov    0x10(%rsp),%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
movsd  0x68(%rsp),%xmm0
mov    %rbx,%rdi
lea    0xbc6(%rip),%r12
mov    %r12,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
movsd  0x70(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
movsd  0x78(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1070 <fputc@plt>
movsd  0x88(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
movsd  0x90(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
movsd  0x98(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1070 <fputc@plt>
movsd  0xa8(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
movsd  0xb0(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
movsd  0xb8(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1070 <fputc@plt>
mov    %rbx,%rdi
lea    0xaea(%rip),%rsi
mov    0x10(%rsp),%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
lea    0xade(%rip),%rsi
mov    $0x1,%ecx
xor    %eax,%eax
call   1090 <fprintf@plt>
cmpl   $0x0,0xc(%rsp)
lea    0xadd(%rip),%r12
jle    1300 <main+0x160>
xor    %eax,%eax
xchg   %ax,%ax
mov    %eax,0x1c(%rsp)
mov    %r14,%rdi
lea    0xa84(%rip),%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0x30(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0x28(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0x20(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r13,%rdi
call   1040 <Atomic_Number@plt>
mov    %rbx,%rdi
lea    0x9c5(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
movsd  0x30(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r13,%rbp
lea    0x9b0(%rip),%r13
mov    %r13,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
movsd  0x28(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rbp,%r13
lea    0x38(%rsp),%rbp
mov    $0x1,%al
call   1090 <fprintf@plt>
movsd  0x20(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
mov    0x1c(%rsp),%eax
add    $0x1,%eax
cmp    0xc(%rsp),%eax
jl     15a0 <main+0x400>
jmp    1300 <main+0x160>
mov    %r14,%rdi
call   1030 <fclose@plt>
jmp    1736 <main+0x596>
mov    0x10(%r13),%rsi
lea    0x8e3(%rip),%rdi
call   1050 <printf@plt>
jmp    173e <main+0x59e>
mov    0x8(%r13),%rsi
lea    0x8d1(%rip),%rdi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x318,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [19 x i8] c"could not find %s\0A\00"
@.str.2 = [4 x i8] c"%ld\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [14 x i8] c"ANIMSTEPS %d\0A\00"
@.str.5 = [9 x i8] c"CRYSTAL\0A\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.7 = [4 x i8] c"%lf\00"
@.str.8 = [12 x i8] c"PRIMVEC %d\0A\00"
@.str.9 = [9 x i8] c" %15.7f \00"
@.str.10 = [2 x i8] c"\0A\00"
@.str.11 = [14 x i8] c"PRIMCOORD %d\0A\00"
@.str.12 = [9 x i8] c" %d %d\0A\00"
@.str.13 = [7 x i8] c" %3d \00"
@.str.14 = [7 x i8] c"%15.7f\00"
@.str.15 = [8 x i8] c"%15.7f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%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 [600 x i8]
%17 = alloca [4 x [4 x double]]
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%22 = call i32 (...) @Set_Atom_Symbol()
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32* @fopen(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %26, i32** %14
%27 = icmp ne i32* %26, null
br i1 %27, label %28, label %40
28: ; preds = %2
store i32 0, i32* %11
br label %29
29: ; preds = %34, %28
%30 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%31 = load i32*, i32** %14
%32 = call i32* @fgets(i8* %30, i32 600, i32* %31)
%33 = icmp ne i32* %32, null
br i1 %33, label %34, label %37
34: ; preds = %29
%35 = load i32, i32* %11
%36 = add nsw i32 %35, 1
store i32 %36, i32* %11
br label %29
37: ; preds = %29
%38 = load i32*, i32** %14
%39 = call i32 @fclose(i32* %38)
br label %45
40: ; preds = %2
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 1
%43 = load i8*, i8** %42
%44 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %43)
br label %45
45: ; preds = %40, %37
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 1
%48 = load i8*, i8** %47
%49 = call i32* @fopen(i8* %48, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %49, i32** %14
%50 = icmp ne i32* %49, null
br i1 %50, label %51, label %56
51: ; preds = %45
%52 = load i32*, i32** %14
%53 = call i32 (i32*, i8*, ...) @fscanf(i32* %52, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %12)
%54 = load i32*, i32** %14
%55 = call i32 @fclose(i32* %54)
br label %61
56: ; preds = %45
%57 = load i8**, i8*** %5
%58 = getelementptr inbounds i8*, i8** %57, i64 1
%59 = load i8*, i8** %58
%60 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %59)
br label %61
61: ; preds = %56, %51
%62 = load i32, i32* %11
%63 = load i32, i32* %12
%64 = add nsw i32 %63, 2
%65 = sdiv i32 %62, %64
store i32 %65, i32* %13
%66 = load i8**, i8*** %5
%67 = getelementptr inbounds i8*, i8** %66, i64 2
%68 = load i8*, i8** %67
%69 = call i32* @fopen(i8* %68, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %69, i32** %15
%70 = icmp ne i32* %69, null
br i1 %70, label %71, label %249
71: ; preds = %61
%72 = load i32*, i32** %15
%73 = load i32, i32* %13
%74 = call i32 (i32*, i8*, ...) @fprintf(i32* %72, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %73)
%75 = load i32*, i32** %15
%76 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%77 = load i8**, i8*** %5
%78 = getelementptr inbounds i8*, i8** %77, i64 1
%79 = load i8*, i8** %78
%80 = call i32* @fopen(i8* %79, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %80, i32** %14
%81 = icmp ne i32* %80, null
br i1 %81, label %82, label %241
82: ; preds = %71
store i32 1, i32* %9
br label %83
83: ; preds = %235, %82
%84 = load i32, i32* %9
%85 = load i32, i32* %13
%86 = icmp sle i32 %84, %85
br i1 %86, label %87, label %238
87: ; preds = %83
%88 = load i32*, i32** %14
%89 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%90 = call i32 (i32*, i8*, ...) @fscanf(i32* %88, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %89)
%91 = load i32*, i32** %14
%92 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%93 = call i32 (i32*, i8*, ...) @fscanf(i32* %91, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %92)
%94 = load i32*, i32** %14
%95 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%96 = call i32 (i32*, i8*, ...) @fscanf(i32* %94, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %95)
%97 = load i32*, i32** %14
%98 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%99 = call i32 (i32*, i8*, ...) @fscanf(i32* %97, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %98)
%100 = load i32*, i32** %14
%101 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%102 = call i32 (i32*, i8*, ...) @fscanf(i32* %100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %101)
%103 = load i32*, i32** %14
%104 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%105 = call i32 (i32*, i8*, ...) @fscanf(i32* %103, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %104)
%106 = load i32*, i32** %14
%107 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%108 = call i32 (i32*, i8*, ...) @fscanf(i32* %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %107)
%109 = load i32*, i32** %14
%110 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%111 = call i32 (i32*, i8*, ...) @fscanf(i32* %109, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %110)
%112 = load i32*, i32** %14
%113 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %17, i64 0, i64 1
%114 = getelementptr inbounds [4 x double], [4 x double]* %113, i64 0, i64 1
%115 = call i32 (i32*, i8*, ...) @fscanf(i32* %112, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %114)
%116 = load i32*, i32** %14
%117 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %17, i64 0, i64 1
%118 = getelementptr inbounds [4 x double], [4 x double]* %117, i64 0, i64 2
%119 = call i32 (i32*, i8*, ...) @fscanf(i32* %116, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %118)
%120 = load i32*, i32** %14
%121 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %17, i64 0, i64 1
%122 = getelementptr inbounds [4 x double], [4 x double]* %121, i64 0, i64 3
%123 = call i32 (i32*, i8*, ...) @fscanf(i32* %120, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %122)
%124 = load i32*, i32** %14
%125 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %17, i64 0, i64 2
%126 = getelementptr inbounds [4 x double], [4 x double]* %125, i64 0, i64 1
%127 = call i32 (i32*, i8*, ...) @fscanf(i32* %124, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %126)
%128 = load i32*, i32** %14
%129 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %17, i64 0, i64 2
%130 = getelementptr inbounds [4 x double], [4 x double]* %129, i64 0, i64 2
%131 = call i32 (i32*, i8*, ...) @fscanf(i32* %128, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %130)
%132 = load i32*, i32** %14
%133 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %17, i64 0, i64 2
%134 = getelementptr inbounds [4 x double], [4 x double]* %133, i64 0, i64 3
%135 = call i32 (i32*, i8*, ...) @fscanf(i32* %132, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %134)
%136 = load i32*, i32** %14
%137 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %17, i64 0, i64 3
%138 = getelementptr inbounds [4 x double], [4 x double]* %137, i64 0, i64 1
%139 = call i32 (i32*, i8*, ...) @fscanf(i32* %136, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %138)
%140 = load i32*, i32** %14
%141 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %17, i64 0, i64 3
%142 = getelementptr inbounds [4 x double], [4 x double]* %141, i64 0, i64 2
%143 = call i32 (i32*, i8*, ...) @fscanf(i32* %140, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %142)
%144 = load i32*, i32** %14
%145 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %17, i64 0, i64 3
%146 = getelementptr inbounds [4 x double], [4 x double]* %145, i64 0, i64 3
%147 = call i32 (i32*, i8*, ...) @fscanf(i32* %144, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %146)
%148 = load i32*, i32** %15
%149 = load i32, i32* %9
%150 = call i32 (i32*, i8*, ...) @fprintf(i32* %148, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 %149)
store i32 1, i32* %6
br label %151
151: ; preds = %174, %87
%152 = load i32, i32* %6
%153 = icmp sle i32 %152, 3
br i1 %153, label %154, label %177
154: ; preds = %151
store i32 1, i32* %7
br label %155
155: ; preds = %168, %154
%156 = load i32, i32* %7
%157 = icmp sle i32 %156, 3
br i1 %157, label %158, label %171
158: ; preds = %155
%159 = load i32*, i32** %15
%160 = load i32, i32* %6
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %17, i64 0, i64 %161
%163 = load i32, i32* %7
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [4 x double], [4 x double]* %162, i64 0, i64 %164
%166 = load double, double* %165
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %159, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %166)
br label %168
168: ; preds = %158
%169 = load i32, i32* %7
%170 = add nsw i32 %169, 1
store i32 %170, i32* %7
br label %155
171: ; preds = %155
%172 = load i32*, i32** %15
%173 = call i32 (i32*, i8*, ...) @fprintf(i32* %172, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %174
174: ; preds = %171
%175 = load i32, i32* %6
%176 = add nsw i32 %175, 1
store i32 %176, i32* %6
br label %151
177: ; preds = %151
%178 = load i32*, i32** %15
%179 = load i32, i32* %9
%180 = call i32 (i32*, i8*, ...) @fprintf(i32* %178, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %179)
%181 = load i32*, i32** %15
%182 = load i32, i32* %12
%183 = call i32 (i32*, i8*, ...) @fprintf(i32* %181, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i32 %182, i32 1)
store i32 1, i32* %10
br label %184
184: ; preds = %231, %177
%185 = load i32, i32* %10
%186 = load i32, i32* %12
%187 = icmp sle i32 %185, %186
br i1 %187, label %188, label %234
188: ; preds = %184
%189 = load i32*, i32** %14
%190 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%191 = call i32 (i32*, i8*, ...) @fscanf(i32* %189, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %190)
%192 = load i32*, i32** %14
%193 = call i32 (i32*, i8*, ...) @fscanf(i32* %192, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %19)
%194 = load i32*, i32** %14
%195 = call i32 (i32*, i8*, ...) @fscanf(i32* %194, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %20)
%196 = load i32*, i32** %14
%197 = call i32 (i32*, i8*, ...) @fscanf(i32* %196, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %21)
%198 = load i32*, i32** %14
%199 = call i32 (i32*, i8*, ...) @fscanf(i32* %198, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %18)
%200 = load i32*, i32** %14
%201 = call i32 (i32*, i8*, ...) @fscanf(i32* %200, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %18)
%202 = load i32*, i32** %14
%203 = call i32 (i32*, i8*, ...) @fscanf(i32* %202, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %18)
%204 = load i32*, i32** %14
%205 = call i32 (i32*, i8*, ...) @fscanf(i32* %204, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %18)
%206 = load i32*, i32** %14
%207 = call i32 (i32*, i8*, ...) @fscanf(i32* %206, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %18)
%208 = load i32*, i32** %14
%209 = call i32 (i32*, i8*, ...) @fscanf(i32* %208, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %18)
%210 = load i32*, i32** %14
%211 = call i32 (i32*, i8*, ...) @fscanf(i32* %210, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %18)
%212 = load i32*, i32** %14
%213 = call i32 (i32*, i8*, ...) @fscanf(i32* %212, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %18)
%214 = load i32*, i32** %14
%215 = call i32 (i32*, i8*, ...) @fscanf(i32* %214, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %18)
%216 = load i32*, i32** %14
%217 = call i32 (i32*, i8*, ...) @fscanf(i32* %216, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %18)
%218 = load i32*, i32** %15
%219 = getelementptr inbounds [600 x i8], [600 x i8]* %16, i64 0, i64 0
%220 = call i32 @Atomic_Number(i8* %219)
%221 = call i32 (i32*, i8*, ...) @fprintf(i32* %218, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 %220)
%222 = load i32*, i32** %15
%223 = load double, double* %19
%224 = call i32 (i32*, i8*, ...) @fprintf(i32* %222, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), double %223)
%225 = load i32*, i32** %15
%226 = load double, double* %20
%227 = call i32 (i32*, i8*, ...) @fprintf(i32* %225, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), double %226)
%228 = load i32*, i32** %15
%229 = load double, double* %21
%230 = call i32 (i32*, i8*, ...) @fprintf(i32* %228, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), double %229)
br label %231
231: ; preds = %188
%232 = load i32, i32* %10
%233 = add nsw i32 %232, 1
store i32 %233, i32* %10
br label %184
234: ; preds = %184
br label %235
235: ; preds = %234
%236 = load i32, i32* %9
%237 = add nsw i32 %236, 1
store i32 %237, i32* %9
br label %83
238: ; preds = %83
%239 = load i32*, i32** %14
%240 = call i32 @fclose(i32* %239)
br label %246
241: ; preds = %71
%242 = load i8**, i8*** %5
%243 = getelementptr inbounds i8*, i8** %242, i64 1
%244 = load i8*, i8** %243
%245 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %244)
br label %246
246: ; preds = %241, %238
%247 = load i32*, i32** %15
%248 = call i32 @fclose(i32* %247)
br label %254
249: ; preds = %61
%250 = load i8**, i8*** %5
%251 = getelementptr inbounds i8*, i8** %250, i64 2
%252 = load i8*, i8** %251
%253 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %252)
br label %254
254: ; preds = %249, %246
%255 = load i32, i32* %3
ret i32 %255
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [19 x i8] c"could not find %s\0A\00"
@.str.2 = [4 x i8] c"%ld\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [14 x i8] c"ANIMSTEPS %d\0A\00"
@.str.5 = [9 x i8] c"CRYSTAL\0A\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.7 = [4 x i8] c"%lf\00"
@.str.8 = [12 x i8] c"PRIMVEC %d\0A\00"
@.str.9 = [9 x i8] c" %15.7f \00"
@.str.11 = [14 x i8] c"PRIMCOORD %d\0A\00"
@.str.12 = [9 x i8] c" %d %d\0A\00"
@.str.13 = [7 x i8] c" %3d \00"
@.str.14 = [7 x i8] c"%15.7f\00"
@.str.15 = [8 x i8] c"%15.7f\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca [600 x i8]
%5 = alloca [4 x [4 x double]]
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = bitcast i32* %3 to i8*
%11 = getelementptr inbounds [600 x i8], [600 x i8]* %4, i64 0, i64 0
%12 = bitcast [4 x [4 x double]]* %5 to i8*
%13 = bitcast double* %6 to i8*
%14 = bitcast double* %7 to i8*
%15 = bitcast double* %8 to i8*
%16 = bitcast double* %9 to i8*
%17 = tail call i32 (...) @Set_Atom_Symbol()
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = tail call i32* @fopen(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%21 = icmp eq i32* %20, null
br i1 %21, label %29, label %22
22: ; preds = %2, %22
%23 = phi i32 [ %26, %22 ], [ 0, %2 ]
%24 = call i32* @fgets(i8* %11, i32 600, i32* %20)
%25 = icmp eq i32* %24, null
%26 = add nuw nsw i32 %23, 1
br i1 %25, label %27, label %22
27: ; preds = %22
%28 = call i32 @fclose(i32* %20)
br label %32
29: ; preds = %2
%30 = load i8*, i8** %18
%31 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %30)
br label %32
32: ; preds = %29, %27
%33 = phi i32 [ %23, %27 ], [ undef, %29 ]
%34 = load i8*, i8** %18
%35 = call i32* @fopen(i8* %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%36 = icmp eq i32* %35, null
br i1 %36, label %42, label %37
37: ; preds = %32
%38 = call i32 (i32*, i8*, ...) @fscanf(i32* %35, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%39 = call i32 @fclose(i32* %35)
%40 = load i32, i32* %3
%41 = add i32 %40, 2
br label %45
42: ; preds = %32
%43 = load i8*, i8** %18
%44 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %43)
br label %45
45: ; preds = %42, %37
%46 = phi i32 [ undef, %42 ], [ %41, %37 ]
%47 = sdiv i32 %33, %46
%48 = getelementptr inbounds i8*, i8** %1, i64 2
%49 = load i8*, i8** %48
%50 = call i32* @fopen(i8* %49, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%51 = icmp eq i32* %50, null
br i1 %51, label %153, label %52
52: ; preds = %45
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %47)
%54 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i64 8, i64 1, i32* %50)
%55 = load i8*, i8** %18
%56 = call i32* @fopen(i8* %55, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%57 = icmp eq i32* %56, null
br i1 %57, label %148, label %58
58: ; preds = %52
%59 = icmp slt i32 %47, 1
br i1 %59, label %146, label %60
60: ; preds = %58
%61 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 1, i64 1
%62 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 1, i64 2
%63 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 1, i64 3
%64 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 2, i64 1
%65 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 2, i64 2
%66 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 2, i64 3
%67 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 3, i64 1
%68 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 3, i64 2
%69 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 3, i64 3
br label %70
70: ; preds = %60, %143
%71 = phi i32 [ 1, %60 ], [ %144, %143 ]
%72 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%73 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%74 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%75 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%76 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%77 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%78 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%79 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%80 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %61)
%81 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %62)
%82 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %63)
%83 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %64)
%84 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %65)
%85 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %66)
%86 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %67)
%87 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %68)
%88 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %69)
%89 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 %71)
%90 = load double, double* %61
%91 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %90)
%92 = load double, double* %62
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %92)
%94 = load double, double* %63
%95 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %94)
%96 = call i32 @fputc(i32 10, i32* %50)
%97 = load double, double* %64
%98 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %97)
%99 = load double, double* %65
%100 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %99)
%101 = load double, double* %66
%102 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %101)
%103 = call i32 @fputc(i32 10, i32* %50)
%104 = load double, double* %67
%105 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %104)
%106 = load double, double* %68
%107 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %106)
%108 = load double, double* %69
%109 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %108)
%110 = call i32 @fputc(i32 10, i32* %50)
%111 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %71)
%112 = load i32, i32* %3
%113 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i32 %112, i32 1)
%114 = load i32, i32* %3
%115 = icmp slt i32 %114, 1
br i1 %115, label %143, label %116
116: ; preds = %70, %116
%117 = phi i32 [ %140, %116 ], [ 1, %70 ]
%118 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%119 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %7)
%120 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %8)
%121 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %9)
%122 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %6)
%123 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %6)
%124 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %6)
%125 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %6)
%126 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %6)
%127 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %6)
%128 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %6)
%129 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %6)
%130 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %6)
%131 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %6)
%132 = call i32 @Atomic_Number(i8* %11)
%133 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 %132)
%134 = load double, double* %7
%135 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), double %134)
%136 = load double, double* %8
%137 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), double %136)
%138 = load double, double* %9
%139 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), double %138)
%140 = add nuw nsw i32 %117, 1
%141 = load i32, i32* %3
%142 = icmp slt i32 %117, %141
br i1 %142, label %116, label %143
143: ; preds = %116, %70
%144 = add nuw i32 %71, 1
%145 = icmp eq i32 %71, %47
br i1 %145, label %146, label %70
146: ; preds = %143, %58
%147 = call i32 @fclose(i32* %56)
br label %151
148: ; preds = %52
%149 = load i8*, i8** %18
%150 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %149)
br label %151
151: ; preds = %148, %146
%152 = call i32 @fclose(i32* %50)
br label %156
153: ; preds = %45
%154 = load i8*, i8** %48
%155 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %154)
br label %156
156: ; preds = %153, %151
ret i32 0
}