#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*/ buff;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ adjust_time(char *, int);
int /*<<< orphan*/ assert(char const *);
double atof(char *);
int atoi(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
double fmod(double, int);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ memcmp(char *, char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
char *strchr(char *, char);
char *strstr(char *, char *);
int main(const int argc, const char **argv) {
  int i;
  printf("# Generated from NEAT pointing logs by 'neat_xvt.c' (q.v.)\n");
  printf("# Version %s\n", "Sat Jan 22 23:03:10 2022");
  for (i = 1; i < argc; i++) {
    FILE *ifile = fopen(argv[i], "rb");
    double exposure = 0.;
    if (ifile) {
      char buff[200];
      printf("# Fields from '%s'\n", argv[i]);
      while (fgets(buff, sizeof(buff), ifile))
        if (atoi(buff) <= 24) {
          const double ra = fmod(atof(buff + 26), 360.);
          const double dec = atof(buff + 38);
          const double new_exposure = atof(buff + 53);
          char *filename = buff + 61, *tptr;
          const char *mpc_code = NULL;
          if (!memcmp(buff + 132, "GEODSS", 6))
            mpc_code = "566";
          if (!memcmp(buff + 132, "Tri-Cam", 7))
            mpc_code = "644";
          assert(mpc_code);
          if (exposure != new_exposure) {
            exposure = new_exposure;
            printf("# Exposure: %.2f\n", exposure);
          }
          while (*filename == ' ')
            filename++;
          tptr = strstr(filename, ".fit");
          if (!tptr)
            tptr = strstr(filename, ",fit");
          if (!tptr)
            fprintf(stderr, "No .fit\n%s", buff);
          assert(tptr);
          *tptr = '\0';
          tptr = strchr(filename, '/');
          if (!tptr)
            fprintf(stderr, "No /: \n%s", buff);
          *tptr = ',';
          adjust_time(buff + 107, (int)(exposure / 2.));
          printf("%.3f,%.3f,%.19s,%3s,%s\n", ra, dec, buff + 107, mpc_code,
                 filename);
        }
      fclose(ifile);
    } else
      fprintf(stderr, "Couldn't open %s\n", argv[i]);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe46(%rip),%rdi
lea    0xe4d(%rip),%rsi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1561 <main+0x391>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe39(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     152d <main+0x35d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0xc8,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     151f <main+0x34f>
lea    -0xf0(%rbp),%rdi
call   10e0 <atoi@plt>
cmp    $0x18,%eax
jg     151a <main+0x34a>
lea    -0xf0(%rbp),%rdi
add    $0x1a,%rdi
call   1030 <atof@plt>
mov    $0x168,%edi
call   1070 <fmod@plt>
movsd  %xmm0,-0xf8(%rbp)
ff
lea    -0xf0(%rbp),%rdi
add    $0x26,%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x100(%rbp)
ff
lea    -0xf0(%rbp),%rdi
add    $0x35,%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x108(%rbp)
ff
lea    -0xf0(%rbp),%rax
add    $0x3d,%rax
mov    %rax,-0x110(%rbp)
movq   $0x0,-0x120(%rbp)
lea    -0xf0(%rbp),%rdi
add    $0x84,%rdi
lea    0xd62(%rip),%rsi
mov    $0x6,%edx
call   1080 <memcmp@plt>
cmp    $0x0,%eax
jne    1341 <main+0x171>
lea    0xd4f(%rip),%rax
mov    %rax,-0x120(%rbp)
lea    -0xf0(%rbp),%rdi
add    $0x84,%rdi
lea    0xd37(%rip),%rsi
mov    $0x7,%edx
call   1080 <memcmp@plt>
cmp    $0x0,%eax
jne    1377 <main+0x1a7>
lea    0xd25(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rdi
call   10a0 <assert@plt>
movsd  -0x28(%rbp),%xmm0
ucomisd -0x108(%rbp),%xmm0
ff
jne    13a1 <main+0x1d1>
jp     13a1 <main+0x1d1>
jmp    13c1 <main+0x1f1>
movsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xcdf(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    13c6 <main+0x1f6>
mov    -0x110(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    13f0 <main+0x220>
mov    -0x110(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x110(%rbp)
jmp    13c6 <main+0x1f6>
mov    -0x110(%rbp),%rdi
lea    0xcad(%rip),%rsi
call   10f0 <strstr@plt>
mov    %rax,-0x118(%rbp)
cmpq   $0x0,-0x118(%rbp)
jne    1432 <main+0x262>
mov    -0x110(%rbp),%rdi
lea    0xc8a(%rip),%rsi
call   10f0 <strstr@plt>
mov    %rax,-0x118(%rbp)
cmpq   $0x0,-0x118(%rbp)
jne    145c <main+0x28c>
mov    0x2b99(%rip),%rax
mov    (%rax),%edi
lea    -0xf0(%rbp),%rdx
lea    0xc5e(%rip),%rsi
call   10b0 <fprintf@plt>
mov    -0x118(%rbp),%rdi
call   10a0 <assert@plt>
mov    -0x118(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x110(%rbp),%rdi
mov    $0x2f,%esi
call   1050 <strchr@plt>
mov    %rax,-0x118(%rbp)
cmpq   $0x0,-0x118(%rbp)
jne    14b4 <main+0x2e4>
mov    0x2b41(%rip),%rax
mov    (%rax),%edi
lea    -0xf0(%rbp),%rdx
lea    0xc11(%rip),%rsi
call   10b0 <fprintf@plt>
mov    -0x118(%rbp),%rax
movb   $0x2c,(%rax)
lea    -0xf0(%rbp),%rdi
add    $0x6b,%rdi
movsd  -0x28(%rbp),%xmm0
movsd  0xb2a(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
call   10c0 <adjust_time@plt>
movsd  -0xf8(%rbp),%xmm0
ff
movsd  -0x100(%rbp),%xmm1
ff
lea    -0xf0(%rbp),%rsi
add    $0x6b,%rsi
mov    -0x120(%rbp),%rdx
mov    -0x110(%rbp),%rcx
lea    0xbb7(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
jmp    1268 <main+0x98>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
jmp    154e <main+0x37e>
mov    0x2aac(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xb99(%rip),%rsi
call   10b0 <fprintf@plt>
jmp    1553 <main+0x383>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1213 <main+0x43>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %rsi,%rbx
mov    %edi,%r14d
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xdfe(%rip),%rdi
lea    0xe05(%rip),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
cmp    $0x2,%r14d
jl     14be <main+0x2de>
mov    %r14d,%eax
mov    %rax,0x18(%rsp)
mov    $0x1,%ebp
lea    0x30(%rsp),%r14
mov    %rbx,0x10(%rsp)
jmp    125c <main+0x7c>
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1050 <fclose@plt>
mov    0x10(%rsp),%rbx
add    $0x1,%rbp
cmp    0x18(%rsp),%rbp
je     14be <main+0x2de>
mov    (%rbx,%rbp,8),%rdi
lea    0xdc8(%rip),%rsi
call   10e0 <fopen@plt>
test   %rax,%rax
je     14a0 <main+0x2c0>
mov    %rax,%r12
mov    (%rbx,%rbp,8),%rsi
lea    0xdaf(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
mov    $0xc8,%esi
mov    %r12,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1240 <main+0x60>
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
jmp    1310 <main+0x130>
nopw   0x0(%rax,%rax,1)
movb   $0x2c,(%rbx)
movsd  (%rsp),%xmm0
mulsd  0xd40(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0x9b(%rsp),%rbx
mov    %rbx,%rdi
call   10d0 <adjust_time@plt>
lea    0xdb3(%rip),%rdi
movsd  0x28(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
mov    $0x2,%al
call   1070 <printf@plt>
mov    %r14,%rdi
mov    $0xc8,%esi
mov    %r12,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1240 <main+0x60>
mov    %r14,%rdi
call   10f0 <atoi@plt>
cmp    $0x18,%eax
jg     12f7 <main+0x117>
lea    0x4a(%rsp),%rdi
call   1040 <atof@plt>
mov    $0x168,%edi
call   1080 <fmod@plt>
movsd  %xmm0,0x28(%rsp)
lea    0x56(%rsp),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x20(%rsp)
lea    0x65(%rsp),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x8(%rsp)
lea    0xb4(%rsp),%rbx
mov    %rbx,%rdi
lea    0xcdd(%rip),%rsi
mov    $0x6,%edx
call   1090 <memcmp@plt>
test   %eax,%eax
mov    $0x0,%r13d
lea    0xccb(%rip),%rax
cmove  %rax,%r13
mov    %rbx,%rdi
lea    0xcc1(%rip),%rsi
mov    $0x7,%edx
call   1090 <memcmp@plt>
test   %eax,%eax
lea    0xcb6(%rip),%rax
cmove  %rax,%r13
mov    %r13,%rdi
call   10b0 <assert@plt>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
ucomisd %xmm2,%xmm0
jne    13c2 <main+0x1e2>
jnp    13df <main+0x1ff>
lea    0xc94(%rip),%rdi
movapd %xmm2,%xmm0
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
lea    0x6c(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x20,0x1(%r15)
lea    0x1(%r15),%r15
je     13f0 <main+0x210>
mov    %r15,%rdi
lea    0xc6a(%rip),%rsi
call   1100 <strstr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1450 <main+0x270>
mov    %r15,%rdi
lea    0xc58(%rip),%rsi
call   1100 <strstr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1450 <main+0x270>
mov    0x2bb0(%rip),%rax
mov    (%rax),%edi
lea    0xc40(%rip),%rsi
mov    %r14,%rdx
call   10c0 <fprintf@plt>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   10b0 <assert@plt>
movb   $0x0,(%rbx)
mov    %r15,%rdi
mov    $0x2f,%esi
call   1060 <strchr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    12b0 <main+0xd0>
mov    0x2b65(%rip),%rax
mov    (%rax),%edi
lea    0xc00(%rip),%rsi
mov    %r14,%rdx
call   10c0 <fprintf@plt>
jmp    12b0 <main+0xd0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x2b39(%rip),%rax
mov    (%rax),%edi
mov    (%rbx,%rbp,8),%rdx
lea    0xbf2(%rip),%rsi
call   10c0 <fprintf@plt>
jmp    124d <main+0x6d>
xor    %eax,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [60 x i8] c"# Generated from NEAT pointing logs by 'neat_xvt.c' (q.v.)\0A\00"
@.str.1 = [14 x i8] c"# Version %s\0A\00"
@.str.2 = [25 x i8] c"Sat Jan 22 23:03:10 2022\00"
@.str.3 = [3 x i8] c"rb\00"
@.str.4 = [20 x i8] c"# Fields from '%s'\0A\00"
@.str.5 = [7 x i8] c"GEODSS\00"
@.str.6 = [4 x i8] c"566\00"
@.str.7 = [8 x i8] c"Tri-Cam\00"
@.str.8 = [4 x i8] c"644\00"
@.str.9 = [18 x i8] c"# Exposure: %.2f\0A\00"
@.str.10 = [5 x i8] c".fit\00"
@.str.11 = [5 x i8] c",fit\00"
@stderr = global i32 0
@.str.12 = [11 x i8] c"No .fit\0A%s\00"
@.str.13 = [10 x i8] c"No /: \0A%s\00"
@.str.14 = [24 x i8] c"%.3f,%.3f,%.19s,%3s,%s\0A\00"
@.str.15 = [18 x i8] c"Couldn't open %s\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 double
%9 = alloca [200 x i8]
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %6
br label %18
18: ; preds = %145, %2
%19 = load i32, i32* %6
%20 = load i32, i32* %4
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %148
22: ; preds = %18
%23 = load i8**, i8*** %5
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %23, i64 %25
%27 = load i8*, i8** %26
%28 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %28, i32** %7
store double 0.000000e+00, double* %8
%29 = load i32*, i32** %7
%30 = icmp ne i32* %29, null
br i1 %30, label %31, label %136
31: ; preds = %22
%32 = load i8**, i8*** %5
%33 = load i32, i32* %6
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
%36 = load i8*, i8** %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* %36)
br label %38
38: ; preds = %132, %31
%39 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%40 = load i32*, i32** %7
%41 = call i64 @fgets(i8* %39, i32 200, i32* %40)
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %133
43: ; preds = %38
%44 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%45 = call i32 @atoi(i8* %44)
%46 = icmp sle i32 %45, 24
br i1 %46, label %47, label %132
47: ; preds = %43
%48 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%49 = getelementptr inbounds i8, i8* %48, i64 26
%50 = call double @atof(i8* %49)
%51 = call double @fmod(double %50, i32 360)
store double %51, double* %10
%52 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%53 = getelementptr inbounds i8, i8* %52, i64 38
%54 = call double @atof(i8* %53)
store double %54, double* %11
%55 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%56 = getelementptr inbounds i8, i8* %55, i64 53
%57 = call double @atof(i8* %56)
store double %57, double* %12
%58 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%59 = getelementptr inbounds i8, i8* %58, i64 61
store i8* %59, i8** %13
store i8* null, i8** %15
%60 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%61 = getelementptr inbounds i8, i8* %60, i64 132
%62 = call i32 @memcmp(i8* %61, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 6)
%63 = icmp ne i32 %62, 0
br i1 %63, label %65, label %64
64: ; preds = %47
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8** %15
br label %65
65: ; preds = %64, %47
%66 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%67 = getelementptr inbounds i8, i8* %66, i64 132
%68 = call i32 @memcmp(i8* %67, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 7)
%69 = icmp ne i32 %68, 0
br i1 %69, label %71, label %70
70: ; preds = %65
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8** %15
br label %71
71: ; preds = %70, %65
%72 = load i8*, i8** %15
%73 = call i32 @assert(i8* %72)
%74 = load double, double* %8
%75 = load double, double* %12
%76 = fcmp une double %74, %75
br i1 %76, label %77, label %81
77: ; preds = %71
%78 = load double, double* %12
store double %78, double* %8
%79 = load double, double* %8
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), double %79)
br label %81
81: ; preds = %77, %71
br label %82
82: ; preds = %87, %81
%83 = load i8*, i8** %13
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp eq i32 %85, 32
br i1 %86, label %87, label %90
87: ; preds = %82
%88 = load i8*, i8** %13
%89 = getelementptr inbounds i8, i8* %88, i32 1
store i8* %89, i8** %13
br label %82
90: ; preds = %82
%91 = load i8*, i8** %13
%92 = call i8* @strstr(i8* %91, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
store i8* %92, i8** %14
%93 = load i8*, i8** %14
%94 = icmp ne i8* %93, null
br i1 %94, label %98, label %95
95: ; preds = %90
%96 = load i8*, i8** %13
%97 = call i8* @strstr(i8* %96, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
store i8* %97, i8** %14
br label %98
98: ; preds = %95, %90
%99 = load i8*, i8** %14
%100 = icmp ne i8* %99, null
br i1 %100, label %105, label %101
101: ; preds = %98
%102 = load i32, i32* @stderr
%103 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%104 = call i32 @fprintf(i32 %102, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8* %103)
br label %105
105: ; preds = %101, %98
%106 = load i8*, i8** %14
%107 = call i32 @assert(i8* %106)
%108 = load i8*, i8** %14
store i8 0, i8* %108
%109 = load i8*, i8** %13
%110 = call i8* @strchr(i8* %109, i8 signext 47)
store i8* %110, i8** %14
%111 = load i8*, i8** %14
%112 = icmp ne i8* %111, null
br i1 %112, label %117, label %113
113: ; preds = %105
%114 = load i32, i32* @stderr
%115 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%116 = call i32 @fprintf(i32 %114, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i8* %115)
br label %117
117: ; preds = %113, %105
%118 = load i8*, i8** %14
store i8 44, i8* %118
%119 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%120 = getelementptr inbounds i8, i8* %119, i64 107
%121 = load double, double* %8
%122 = fdiv double %121, 2.000000e+00
%123 = fptosi double %122 to i32
%124 = call i32 @adjust_time(i8* %120, i32 %123)
%125 = load double, double* %10
%126 = load double, double* %11
%127 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%128 = getelementptr inbounds i8, i8* %127, i64 107
%129 = load i8*, i8** %15
%130 = load i8*, i8** %13
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0), double %125, double %126, i8* %128, i8* %129, i8* %130)
br label %132
132: ; preds = %117, %43
br label %38
133: ; preds = %38
%134 = load i32*, i32** %7
%135 = call i32 @fclose(i32* %134)
br label %144
136: ; preds = %22
%137 = load i32, i32* @stderr
%138 = load i8**, i8*** %5
%139 = load i32, i32* %6
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i8*, i8** %138, i64 %140
%142 = load i8*, i8** %141
%143 = call i32 @fprintf(i32 %137, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0), i8* %142)
br label %144
144: ; preds = %136, %133
br label %145
145: ; preds = %144
%146 = load i32, i32* %6
%147 = add nsw i32 %146, 1
store i32 %147, i32* %6
br label %18
148: ; preds = %18
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"# Version %s\0A\00"
@.str.2 = [25 x i8] c"Sat Jan 22 23:03:10 2022\00"
@.str.3 = [3 x i8] c"rb\00"
@.str.4 = [20 x i8] c"# Fields from '%s'\0A\00"
@.str.5 = [7 x i8] c"GEODSS\00"
@.str.6 = [4 x i8] c"566\00"
@.str.7 = [8 x i8] c"Tri-Cam\00"
@.str.8 = [4 x i8] c"644\00"
@.str.9 = [18 x i8] c"# Exposure: %.2f\0A\00"
@.str.10 = [5 x i8] c".fit\00"
@.str.11 = [5 x i8] c",fit\00"
@stderr = global i32 0
@.str.12 = [11 x i8] c"No .fit\0A%s\00"
@.str.13 = [10 x i8] c"No /: \0A%s\00"
@.str.14 = [24 x i8] c"%.3f,%.3f,%.19s,%3s,%s\0A\00"
@.str.15 = [18 x i8] c"Couldn't open %s\0A\00"
@str = [59 x i8] c"# Generated from NEAT pointing logs by 'neat_xvt.c' (q.v.)\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [200 x i8]
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%6 = icmp sgt i32 %0, 1
br i1 %6, label %7, label %88
7: ; preds = %2
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 26
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 38
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 53
%12 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 61
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 132
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 107
%15 = zext i32 %0 to i64
br label %16
16: ; preds = %7, %85
%17 = phi i64 [ 1, %7 ], [ %86, %85 ]
%18 = getelementptr inbounds i8*, i8** %1, i64 %17
%19 = load i8*, i8** %18
%20 = call i32* @fopen(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp eq i32* %20, null
br i1 %21, label %81, label %22
22: ; preds = %16
%23 = load i8*, i8** %18
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* %23)
%25 = call i64 @fgets(i8* %8, i32 200, i32* %20)
%26 = icmp eq i64 %25, 0
br i1 %26, label %79, label %27
27: ; preds = %22, %75
%28 = phi double [ %76, %75 ], [ 0.000000e+00, %22 ]
%29 = call i32 @atoi(i8* %8)
%30 = icmp slt i32 %29, 25
br i1 %30, label %31, label %75
31: ; preds = %27
%32 = call double @atof(i8* %9)
%33 = call double @fmod(double %32, i32 360)
%34 = call double @atof(i8* %10)
%35 = call double @atof(i8* %11)
%36 = call i32 @memcmp(i8* %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 6)
%37 = icmp eq i32 %36, 0
%38 = select i1 %37, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* null
%39 = call i32 @memcmp(i8* %13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 7)
%40 = icmp eq i32 %39, 0
%41 = select i1 %40, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %38
%42 = call i32 @assert(i8* %41)
%43 = fcmp une double %28, %35
br i1 %43, label %44, label %46
44: ; preds = %31
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), double %35)
br label %46
46: ; preds = %44, %31
%47 = phi double [ %35, %44 ], [ %28, %31 ]
br label %48
48: ; preds = %48, %46
%49 = phi i8* [ %12, %46 ], [ %52, %48 ]
%50 = load i8, i8* %49
%51 = icmp eq i8 %50, 32
%52 = getelementptr inbounds i8, i8* %49, i64 1
br i1 %51, label %48, label %53
53: ; preds = %48
%54 = call i8* @strstr(i8* %49, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%55 = icmp eq i8* %54, null
br i1 %55, label %56, label %62
56: ; preds = %53
%57 = call i8* @strstr(i8* %49, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
%58 = icmp eq i8* %57, null
br i1 %58, label %59, label %62
59: ; preds = %56
%60 = load i32, i32* @stderr
%61 = call i32 @fprintf(i32 %60, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8* %8)
br label %62
62: ; preds = %53, %59, %56
%63 = phi i8* [ null, %59 ], [ %57, %56 ], [ %54, %53 ]
%64 = call i32 @assert(i8* %63)
store i8 0, i8* %63
%65 = call i8* @strchr(i8* %49, i8 signext 47)
%66 = icmp eq i8* %65, null
br i1 %66, label %67, label %70
67: ; preds = %62
%68 = load i32, i32* @stderr
%69 = call i32 @fprintf(i32 %68, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i8* %8)
br label %70
70: ; preds = %67, %62
store i8 44, i8* %65
%71 = fmul double %47, 5.000000e-01
%72 = fptosi double %71 to i32
%73 = call i32 @adjust_time(i8* %14, i32 %72)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0), double %33, double %34, i8* %14, i8* %41, i8* %49)
br label %75
75: ; preds = %70, %27
%76 = phi double [ %47, %70 ], [ %28, %27 ]
%77 = call i64 @fgets(i8* %8, i32 200, i32* %20)
%78 = icmp eq i64 %77, 0
br i1 %78, label %79, label %27
79: ; preds = %75, %22
%80 = call i32 @fclose(i32* %20)
br label %85
81: ; preds = %16
%82 = load i32, i32* @stderr
%83 = load i8*, i8** %18
%84 = call i32 @fprintf(i32 %82, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0), i8* %83)
br label %85
85: ; preds = %81, %79
%86 = add nuw nsw i64 %17, 1
%87 = icmp eq i64 %86, %15
br i1 %87, label %88, label %16
88: ; preds = %85, %2
ret i32 0
}