#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 */
double atoi(char *);
double ceil(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sscanf(char *, char *, int *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *strstr(char *, char *);
int main(int argc, char *argv[]) {
  FILE *fin;
  char *ptr;
  char str[100], id[100];
  double einheit = 0, gpreis = 0;
  int amon, atag, astd, amin, asek;
  int bmon, btag, bstd, bmin, bsek;
  int anz, stat, geschw = 0, ende = 0, endeerk = 1;
  if (argc > 1) {
    einheit = atoi(argv[1]);
    if ((!einheit) || (argc > 2)) {
      fprintf(stderr, "usage: %s [Dauer einer Einheit]\n\n", argv[0]);
      exit(1);
    }
  }
  if (!einheit)
    einheit = 360;
  if (!(fin = fopen("/var/spool/fax/Faxlog", "r"))) {
    fprintf(stderr, "Logdatei nicht gefunden!\n\n");
    exit(2);
  }
  printf("Dauer einer Telefoneinheit: %1.0f Sekunden\n", einheit);
  printf("empfangene ID\t\tDatum\t\tSeiten Dauer Kosten Geschw. OK=0\n");
  while (fgets(str, 100, fin)) {
    if (strstr(str, "+FCON")) {
      sscanf(str, "%d/%d %d:%d:%d", &amon, &atag, &astd, &amin, &asek);
      if (!endeerk)
        fprintf(stderr, "Fehler: FCON ohne vorheriges hangup!\n");
      endeerk = 0;
    } else if ((ptr = strstr(str, "fax_id: '+FCSI: "))) {
      strcpy(id, ptr + 17);
      id[strlen(id) - 3] = 0;
    } else if ((ptr = strstr(str, "checking f"))) {
      sscanf(ptr + 10, "%d", &anz);
    } else if ((ptr = strstr(str, "transmission par"))) {
      sscanf(ptr + 29, "%d", &geschw);
    } else if (!endeerk && (ptr = strstr(str, "hangup: '+FHNG:"))) {
      sscanf(str, "%d/%d %d:%d:%d", &bmon, &btag, &bstd, &bmin, &bsek);
      sscanf(ptr + 16, "%d", &stat);
      ende = endeerk = 1;
    } else if (!endeerk && strstr(str, "##### failed transmitting")) {
      sscanf(str, "%d/%d %d:%d:%d", &bmon, &btag, &bstd, &bmin, &bsek);
      ptr = strstr(str, "+FHS:");
      sscanf(ptr + 5, "%d", &stat);
      ende = endeerk = 1;
    }
    if (ende) {
      double preis;
      int atime, btime;
      if (amon != bmon) {
        switch (amon) {
        case 1:
        case 3:
        case 5:
        case 7:
        case 8:
        case 10:
        case 12:
          btag += 31;
          break;
        default:
          btag += 30;
        }
      }
      atime = atag * 24 * 3600 + astd * 3600 + amin * 60 + asek;
      btime = btag * 24 * 3600 + bstd * 3600 + bmin * 60 + bsek;
      preis = ceil((btime - atime) / einheit) * 0.23;
      gpreis += preis;
      printf("%s\t%2d.%2d %2d:%2d:%2d\t%2d S,%3d Sek,%5.2f DM, G.%d,St %d\n",
             id, atag, amon, astd, amin, asek, anz, btime - atime, preis,
             geschw, stat);
      ende = anz = geschw = 0;
      strcpy(id, "(FEHLER!)           ");
    }
  }
  printf("Gesamtkosten: %1.2f DM\n", gpreis);
  fclose(fin);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x190,%rsp
movl   $0x0,-0x14(%rbp)
mov    %edi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movl   $0x0,-0x154(%rbp)
movl   $0x0,-0x158(%rbp)
movl   $0x1,-0x15c(%rbp)
cmpl   $0x1,-0x18(%rbp)
jle    1286 <main+0xc6>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rdi
call   10c0 <atoi@plt>
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x118(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    124f <main+0x8f>
jp     124f <main+0x8f>
jmp    1259 <main+0x99>
cmpl   $0x2,-0x18(%rbp)
jle    1281 <main+0xc1>
mov    0x2d80(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
lea    0xda0(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
jmp    1286 <main+0xc6>
movsd  -0x118(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12b1 <main+0xf1>
jp     12b1 <main+0xf1>
movsd  0xd57(%rip),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
lea    0xd7a(%rip),%rdi
lea    0xe6e(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    12f3 <main+0x133>
mov    0x2d07(%rip),%rax
mov    (%rax),%edi
lea    0xd66(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x2,%edi
call   10d0 <exit@plt>
movsd  -0x118(%rbp),%xmm0
ff
lea    0xd61(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
lea    0xd7f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x64,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     181e <main+0x65e>
lea    -0xa0(%rbp),%rdi
lea    0xd83(%rip),%rsi
call   10e0 <strstr@plt>
cmp    $0x0,%rax
je     13c2 <main+0x202>
lea    -0xa0(%rbp),%rdi
lea    0xd6c(%rip),%rsi
lea    -0x124(%rbp),%rdx
lea    -0x128(%rbp),%rcx
lea    -0x12c(%rbp),%r8
lea    -0x130(%rbp),%r9
lea    -0x134(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   10a0 <sscanf@plt>
cmpl   $0x0,-0x15c(%rbp)
jne    13b3 <main+0x1f3>
mov    0x2c3d(%rip),%rax
mov    (%rax),%edi
lea    0xd30(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x0,-0x15c(%rbp)
jmp    1602 <main+0x442>
lea    -0xa0(%rbp),%rdi
lea    0xd32(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
je     1415 <main+0x255>
lea    -0x110(%rbp),%rdi
mov    -0x30(%rbp),%rsi
add    $0x11,%rsi
call   1030 <strcpy@plt>
lea    -0x110(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x3,%eax
cltq
movb   $0x0,-0x110(%rbp,%rax,1)
jmp    15fd <main+0x43d>
lea    -0xa0(%rbp),%rdi
lea    0xcf0(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
je     1458 <main+0x298>
mov    -0x30(%rbp),%rdi
add    $0xa,%rdi
lea    0xc94(%rip),%rsi
lea    -0x14c(%rbp),%rdx
mov    $0x0,%al
call   10a0 <sscanf@plt>
jmp    15f8 <main+0x438>
lea    -0xa0(%rbp),%rdi
lea    0xcb8(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
je     149b <main+0x2db>
mov    -0x30(%rbp),%rdi
add    $0x1d,%rdi
lea    0xc51(%rip),%rsi
lea    -0x154(%rbp),%rdx
mov    $0x0,%al
call   10a0 <sscanf@plt>
jmp    15f3 <main+0x433>
cmpl   $0x0,-0x15c(%rbp)
jne    153b <main+0x37b>
lea    -0xa0(%rbp),%rdi
lea    0xc79(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
je     153b <main+0x37b>
lea    -0xa0(%rbp),%rdi
lea    0xbf6(%rip),%rsi
lea    -0x138(%rbp),%rdx
lea    -0x13c(%rbp),%rcx
lea    -0x140(%rbp),%r8
lea    -0x144(%rbp),%r9
lea    -0x148(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   10a0 <sscanf@plt>
mov    -0x30(%rbp),%rdi
add    $0x10,%rdi
lea    0xbc5(%rip),%rsi
lea    -0x150(%rbp),%rdx
mov    $0x0,%al
call   10a0 <sscanf@plt>
movl   $0x1,-0x15c(%rbp)
movl   $0x1,-0x158(%rbp)
jmp    15ee <main+0x42e>
cmpl   $0x0,-0x15c(%rbp)
jne    15e9 <main+0x429>
lea    -0xa0(%rbp),%rdi
lea    0xbe9(%rip),%rsi
call   10e0 <strstr@plt>
cmp    $0x0,%rax
je     15e9 <main+0x429>
lea    -0xa0(%rbp),%rdi
lea    0xb5a(%rip),%rsi
lea    -0x138(%rbp),%rdx
lea    -0x13c(%rbp),%rcx
lea    -0x140(%rbp),%r8
lea    -0x144(%rbp),%r9
lea    -0x148(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   10a0 <sscanf@plt>
lea    -0xa0(%rbp),%rdi
lea    0xbaa(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
add    $0x5,%rdi
lea    0xb12(%rip),%rsi
lea    -0x150(%rbp),%rdx
mov    $0x0,%al
call   10a0 <sscanf@plt>
movl   $0x1,-0x15c(%rbp)
movl   $0x1,-0x158(%rbp)
jmp    15ee <main+0x42e>
jmp    15f3 <main+0x433>
jmp    15f8 <main+0x438>
jmp    15fd <main+0x43d>
jmp    1602 <main+0x442>
cmpl   $0x0,-0x158(%rbp)
je     1819 <main+0x659>
mov    -0x124(%rbp),%eax
cmp    -0x138(%rbp),%eax
je     16ca <main+0x50a>
mov    -0x124(%rbp),%eax
mov    %eax,-0x174(%rbp)
sub    $0x1,%eax
je     16a2 <main+0x4e2>
jmp    163b <main+0x47b>
mov    -0x174(%rbp),%eax
sub    $0x3,%eax
je     16a2 <main+0x4e2>
jmp    164f <main+0x48f>
mov    -0x174(%rbp),%eax
sub    $0x5,%eax
je     16a2 <main+0x4e2>
jmp    1663 <main+0x4a3>
mov    -0x174(%rbp),%eax
add    $0xfffffff9,%eax
sub    $0x2,%eax
jb     16a2 <main+0x4e2>
jmp    167a <main+0x4ba>
mov    -0x174(%rbp),%eax
sub    $0xa,%eax
je     16a2 <main+0x4e2>
jmp    168e <main+0x4ce>
mov    -0x174(%rbp),%eax
sub    $0xc,%eax
jne    16b6 <main+0x4f6>
jmp    16a2 <main+0x4e2>
mov    -0x13c(%rbp),%eax
add    $0x1f,%eax
mov    %eax,-0x13c(%rbp)
jmp    16c5 <main+0x505>
mov    -0x13c(%rbp),%eax
add    $0x1e,%eax
mov    %eax,-0x13c(%rbp)
jmp    16ca <main+0x50a>
imul   $0x18,-0x128(%rbp),%eax
imul   $0xe10,%eax,%eax
imul   $0xe10,-0x12c(%rbp),%ecx
add    %ecx,%eax
imul   $0x3c,-0x130(%rbp),%ecx
add    %ecx,%eax
add    -0x134(%rbp),%eax
mov    %eax,-0x16c(%rbp)
imul   $0x18,-0x13c(%rbp),%eax
imul   $0xe10,%eax,%eax
imul   $0xe10,-0x140(%rbp),%ecx
add    %ecx,%eax
imul   $0x3c,-0x144(%rbp),%ecx
add    %ecx,%eax
add    -0x148(%rbp),%eax
mov    %eax,-0x170(%rbp)
mov    -0x170(%rbp),%eax
sub    -0x16c(%rbp),%eax
cvtsi2sd %eax,%xmm0
divsd  -0x118(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1040 <ceil@plt>
movsd  0x8b9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x168(%rbp),%xmm0
ff
addsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
lea    -0x110(%rbp),%rsi
mov    -0x128(%rbp),%edx
mov    -0x124(%rbp),%ecx
mov    -0x12c(%rbp),%r8d
mov    -0x130(%rbp),%r9d
mov    -0x134(%rbp),%r14d
mov    -0x14c(%rbp),%ebx
mov    -0x170(%rbp),%r11d
sub    -0x16c(%rbp),%r11d
movsd  -0x168(%rbp),%xmm0
ff
mov    -0x154(%rbp),%r10d
mov    -0x150(%rbp),%eax
lea    0x994(%rip),%rdi
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
mov    $0x1,%al
call   1070 <printf@plt>
movl   $0x0,-0x154(%rbp)
movl   $0x0,-0x14c(%rbp)
movl   $0x0,-0x158(%rbp)
lea    -0x110(%rbp),%rdi
lea    0x986(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1317 <main+0x157>
movsd  -0x120(%rbp),%xmm0
ff
lea    0x982(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
movl   $0x0,0x10(%rsp)
xorpd  %xmm0,%xmm0
cmp    $0x2,%edi
jl     1219 <main+0x49>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
call   10d0 <atoi@plt>
cmp    $0x2,%ebp
jne    1635 <main+0x465>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1219 <main+0x49>
jnp    1635 <main+0x465>
movapd %xmm0,0x40(%rsp)
lea    0xe0c(%rip),%rdi
lea    0xec8(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1614 <main+0x444>
mov    %rax,%r15
xorpd  %xmm0,%xmm0
movapd 0x40(%rsp),%xmm2
cmpneqsd %xmm2,%xmm0
andpd  %xmm0,%xmm2
movsd  0xda7(%rip),%xmm1
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
lea    0xdfb(%rip),%rdi
movapd %xmm0,0x60(%rsp)
mov    $0x1,%al
call   1080 <printf@plt>
lea    0xf13(%rip),%rdi
call   1040 <puts@plt>
lea    0xe0(%rsp),%rdi
mov    $0x64,%esi
mov    %r15,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     15da <main+0x40a>
mov    $0x1,%r12d
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x40(%rsp)
lea    0xe0(%rsp),%r13
lea    0xdd7(%rip),%r14
jmp    131a <main+0x14a>
mov    %r13,%rdi
lea    0xe00(%rip),%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     1382 <main+0x1b2>
add    $0x11,%rax
lea    0x70(%rsp),%rbp
mov    %rbp,%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
cltq
movb   $0x0,-0x3(%rax,%rbp,1)
mov    %r12d,%ebp
mov    %r13,%rdi
mov    $0x64,%esi
mov    %r15,%rdx
call   1090 <fgets@plt>
mov    %ebp,%r12d
test   %rax,%rax
je     15e4 <main+0x414>
mov    %r13,%rdi
lea    0xd6b(%rip),%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     12c0 <main+0xf0>
sub    $0x8,%rsp
xor    %ebp,%ebp
mov    %r13,%rdi
mov    %r14,%rsi
lea    0x40(%rsp),%rdx
lea    0x3c(%rsp),%rcx
lea    0x38(%rsp),%r8
lea    0x34(%rsp),%r9
xor    %eax,%eax
lea    0x30(%rsp),%rbx
push   %rbx
call   10b0 <sscanf@plt>
add    $0x10,%rsp
test   %r12d,%r12d
jne    12fe <main+0x12e>
mov    0x2c75(%rip),%rax
mov    (%rax),%edi
xor    %ebp,%ebp
lea    0xd2e(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    12fe <main+0x12e>
mov    %r13,%rdi
lea    0xd4f(%rip),%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     13ab <main+0x1db>
add    $0xa,%rax
mov    %rax,%rdi
lea    0xcfd(%rip),%rsi
lea    0x14(%rsp),%rdx
jmp    13d2 <main+0x202>
mov    %r13,%rdi
lea    0xd31(%rip),%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     13de <main+0x20e>
add    $0x1d,%rax
mov    %rax,%rdi
lea    0xcd4(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
jmp    12fb <main+0x12b>
mov    $0x1,%ebp
test   %r12d,%r12d
jne    12fe <main+0x12e>
mov    %r13,%rdi
lea    0xd01(%rip),%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     143e <main+0x26e>
sub    $0x8,%rsp
mov    %r13,%rdi
mov    %r14,%r12
mov    %r14,%rsi
lea    0x2c(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x28(%rsp),%r8
lea    0x24(%rsp),%r9
mov    %rax,%r14
xor    %eax,%eax
lea    0x20(%rsp),%rbx
push   %rbx
call   10b0 <sscanf@plt>
mov    %r14,%rdi
add    $0x10,%rsp
add    $0x10,%rdi
jmp    149e <main+0x2ce>
mov    %r13,%rdi
lea    0xcbf(%rip),%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     15c7 <main+0x3f7>
sub    $0x8,%rsp
mov    %r13,%rdi
mov    %r14,%r12
mov    %r14,%rsi
lea    0x2c(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x28(%rsp),%r8
lea    0x24(%rsp),%r9
xor    %eax,%eax
lea    0x20(%rsp),%rbx
push   %rbx
call   10b0 <sscanf@plt>
add    $0x10,%rsp
mov    %r13,%rdi
lea    0xc8f(%rip),%rsi
call   10f0 <strstr@plt>
mov    %rax,%rdi
add    $0x5,%rdi
lea    0xbfc(%rip),%rsi
lea    0x3c(%rsp),%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
mov    0x38(%rsp),%eax
cmp    0x24(%rsp),%eax
mov    %r12,%r14
jne    14c4 <main+0x2f4>
mov    0xc(%rsp),%eax
jmp    14e6 <main+0x316>
cmp    $0xc,%eax
ja     15ce <main+0x3fe>
mov    $0x15aa,%ecx
bt     %eax,%ecx
jae    15ce <main+0x3fe>
mov    0xc(%rsp),%eax
add    $0x1f,%eax
mov    %eax,0xc(%rsp)
mov    0x1c(%rsp),%ecx
sub    0x2c(%rsp),%ecx
mov    0x20(%rsp),%edx
imul   $0x3c,%ecx,%ecx
sub    0x30(%rsp),%edx
imul   $0xe10,%edx,%edx
sub    0x34(%rsp),%eax
imul   $0x15180,%eax,%r12d
sub    0x28(%rsp),%r12d
add    0x18(%rsp),%r12d
add    %edx,%r12d
add    %ecx,%r12d
cvtsi2sd %r12d,%xmm0
divsd  0x60(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <ceil@plt>
mulsd  0xad2(%rip),%xmm0
movsd  0x40(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rsp)
mov    0x34(%rsp),%edx
mov    0x38(%rsp),%ecx
mov    0x30(%rsp),%r8d
mov    0x2c(%rsp),%r9d
mov    0x28(%rsp),%eax
mov    %rax,0x58(%rsp)
mov    0x14(%rsp),%eax
mov    %rax,0x50(%rsp)
mov    0x10(%rsp),%r10d
mov    0x3c(%rsp),%r11d
sub    $0x8,%rsp
lea    0xba8(%rip),%rdi
lea    0x78(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x1,%al
push   %r11
push   %r10
push   %r12
push   0x70(%rsp)
push   0x80(%rsp)
call   1080 <printf@plt>
add    $0x30,%rsp
movl   $0x0,0x10(%rsp)
movl   $0x0,0x14(%rsp)
mov    %rbx,%rdi
lea    0xba5(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12fe <main+0x12e>
xor    %ebp,%ebp
jmp    12fe <main+0x12e>
mov    0xc(%rsp),%eax
add    $0x1e,%eax
jmp    14e2 <main+0x312>
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x40(%rsp)
lea    0xb8c(%rip),%rdi
movsd  0x40(%rsp),%xmm0
mov    $0x1,%al
call   1080 <printf@plt>
mov    %r15,%rdi
call   1060 <fclose@plt>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x29c5(%rip),%rax
mov    (%rax),%edi
lea    0xa24(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x2,%edi
call   10e0 <exit@plt>
mov    0x29a4(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0x9c8(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"usage: %s [Dauer einer Einheit]\0A\0A\00"
@.str.1 = [22 x i8] c"/var/spool/fax/Faxlog\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [27 x i8] c"Logdatei nicht gefunden!\0A\0A\00"
@.str.4 = [44 x i8] c"Dauer einer Telefoneinheit: %1.0f Sekunden\0A\00"
@.str.5 = [56 x i8] c"empfangene ID\09\09Datum\09\09Seiten Dauer Kosten Geschw. OK=0\0A\00"
@.str.6 = [6 x i8] c"+FCON\00"
@.str.7 = [15 x i8] c"%d/%d %d:%d:%d\00"
@.str.8 = [38 x i8] c"Fehler: FCON ohne vorheriges hangup!\0A\00"
@.str.9 = [17 x i8] c"fax_id: '+FCSI: \00"
@.str.10 = [11 x i8] c"checking f\00"
@.str.11 = [3 x i8] c"%d\00"
@.str.12 = [17 x i8] c"transmission par\00"
@.str.13 = [16 x i8] c"hangup: '+FHNG:\00"
@.str.14 = [26 x i8] c"##### failed transmitting\00"
@.str.15 = [6 x i8] c"+FHS:\00"
@.str.16 = [59 x i8] c"%s\09%2d.%2d %2d:%2d:%2d\09%2d S,%3d Sek,%5.2f DM, G.%d,St %d\0A\00"
@.str.17 = [21 x i8] c"(FEHLER!) \00"
@.str.18 = [24 x i8] c"Gesamtkosten: %1.2f DM\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca [100 x i8]
%9 = alloca [100 x i8]
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca double
%28 = alloca i32
%29 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %11
store i32 0, i32* %24
store i32 0, i32* %25
store i32 1, i32* %26
%30 = load i32, i32* %4
%31 = icmp sgt i32 %30, 1
br i1 %31, label %32, label %50
32: ; preds = %2
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call double @atoi(i8* %35)
store double %36, double* %10
%37 = load double, double* %10
%38 = fcmp une double %37, 0.000000e+00
br i1 %38, label %39, label %42
39: ; preds = %32
%40 = load i32, i32* %4
%41 = icmp sgt i32 %40, 2
br i1 %41, label %42, label %49
42: ; preds = %39, %32
%43 = load i32, i32* @stderr
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 0
%46 = load i8*, i8** %45
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %46)
%48 = call i32 @exit(i32 1)
unreachable
49: ; preds = %39
br label %50
50: ; preds = %49, %2
%51 = load double, double* %10
%52 = fcmp une double %51, 0.000000e+00
br i1 %52, label %54, label %53
53: ; preds = %50
store double 3.600000e+02, double* %10
br label %54
54: ; preds = %53, %50
%55 = call i32* @fopen(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %55, i32** %6
%56 = icmp ne i32* %55, null
br i1 %56, label %61, label %57
57: ; preds = %54
%58 = load i32, i32* @stderr
%59 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%60 = call i32 @exit(i32 2)
unreachable
61: ; preds = %54
%62 = load double, double* %10
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), double %62)
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
br label %65
65: ; preds = %213, %61
%66 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%67 = load i32*, i32** %6
%68 = call i64 @fgets(i8* %66, i32 100, i32* %67)
%69 = icmp ne i64 %68, 0
br i1 %69, label %70, label %214
70: ; preds = %65
%71 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%72 = call i8* @strstr(i8* %71, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%73 = icmp ne i8* %72, null
br i1 %73, label %74, label %83
74: ; preds = %70
%75 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%76 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %75, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32* %12, i32* %13, i32* %14, i32* %15, i32* %16)
%77 = load i32, i32* %26
%78 = icmp ne i32 %77, 0
br i1 %78, label %82, label %79
79: ; preds = %74
%80 = load i32, i32* @stderr
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
br label %82
82: ; preds = %79, %74
store i32 0, i32* %26
br label %146
83: ; preds = %70
%84 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%85 = call i8* @strstr(i8* %84, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
store i8* %85, i8** %7
%86 = icmp ne i8* %85, null
br i1 %86, label %87, label %97
87: ; preds = %83
%88 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%89 = load i8*, i8** %7
%90 = getelementptr inbounds i8, i8* %89, i64 17
%91 = call i32 @strcpy(i8* %88, i8* %90)
%92 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%93 = call i32 @strlen(i8* %92)
%94 = sub nsw i32 %93, 3
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 %95
store i8 0, i8* %96
br label %145
97: ; preds = %83
%98 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%99 = call i8* @strstr(i8* %98, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
store i8* %99, i8** %7
%100 = icmp ne i8* %99, null
br i1 %100, label %101, label %105
101: ; preds = %97
%102 = load i8*, i8** %7
%103 = getelementptr inbounds i8, i8* %102, i64 10
%104 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %103, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %22)
br label %144
105: ; preds = %97
%106 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%107 = call i8* @strstr(i8* %106, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
store i8* %107, i8** %7
%108 = icmp ne i8* %107, null
br i1 %108, label %109, label %113
109: ; preds = %105
%110 = load i8*, i8** %7
%111 = getelementptr inbounds i8, i8* %110, i64 29
%112 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %111, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %24)
br label %143
113: ; preds = %105
%114 = load i32, i32* %26
%115 = icmp ne i32 %114, 0
br i1 %115, label %126, label %116
116: ; preds = %113
%117 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%118 = call i8* @strstr(i8* %117, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0))
store i8* %118, i8** %7
%119 = icmp ne i8* %118, null
br i1 %119, label %120, label %126
120: ; preds = %116
%121 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%122 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %121, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32* %17, i32* %18, i32* %19, i32* %20, i32* %21)
%123 = load i8*, i8** %7
%124 = getelementptr inbounds i8, i8* %123, i64 16
%125 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %124, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %23)
store i32 1, i32* %26
store i32 1, i32* %25
br label %142
126: ; preds = %116, %113
%127 = load i32, i32* %26
%128 = icmp ne i32 %127, 0
br i1 %128, label %141, label %129
129: ; preds = %126
%130 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%131 = call i8* @strstr(i8* %130, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0))
%132 = icmp ne i8* %131, null
br i1 %132, label %133, label %141
133: ; preds = %129
%134 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%135 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %134, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32* %17, i32* %18, i32* %19, i32* %20, i32* %21)
%136 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%137 = call i8* @strstr(i8* %136, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
store i8* %137, i8** %7
%138 = load i8*, i8** %7
%139 = getelementptr inbounds i8, i8* %138, i64 5
%140 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %139, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %23)
store i32 1, i32* %26
store i32 1, i32* %25
br label %141
141: ; preds = %133, %129, %126
br label %142
142: ; preds = %141, %120
br label %143
143: ; preds = %142, %109
br label %144
144: ; preds = %143, %101
br label %145
145: ; preds = %144, %87
br label %146
146: ; preds = %145, %82
%147 = load i32, i32* %25
%148 = icmp ne i32 %147, 0
br i1 %148, label %149, label %213
149: ; preds = %146
%150 = load i32, i32* %12
%151 = load i32, i32* %17
%152 = icmp ne i32 %150, %151
br i1 %152, label %153, label %162
153: ; preds = %149
%154 = load i32, i32* %12
switch i32 %154, label %158 [
i32 1, label %155
i32 3, label %155
i32 5, label %155
i32 7, label %155
i32 8, label %155
i32 10, label %155
i32 12, label %155
]
155: ; preds = %153, %153, %153, %153, %153, %153, %153
%156 = load i32, i32* %18
%157 = add nsw i32 %156, 31
store i32 %157, i32* %18
br label %161
158: ; preds = %153
%159 = load i32, i32* %18
%160 = add nsw i32 %159, 30
store i32 %160, i32* %18
br label %161
161: ; preds = %158, %155
br label %162
162: ; preds = %161, %149
%163 = load i32, i32* %13
%164 = mul nsw i32 %163, 24
%165 = mul nsw i32 %164, 3600
%166 = load i32, i32* %14
%167 = mul nsw i32 %166, 3600
%168 = add nsw i32 %165, %167
%169 = load i32, i32* %15
%170 = mul nsw i32 %169, 60
%171 = add nsw i32 %168, %170
%172 = load i32, i32* %16
%173 = add nsw i32 %171, %172
store i32 %173, i32* %28
%174 = load i32, i32* %18
%175 = mul nsw i32 %174, 24
%176 = mul nsw i32 %175, 3600
%177 = load i32, i32* %19
%178 = mul nsw i32 %177, 3600
%179 = add nsw i32 %176, %178
%180 = load i32, i32* %20
%181 = mul nsw i32 %180, 60
%182 = add nsw i32 %179, %181
%183 = load i32, i32* %21
%184 = add nsw i32 %182, %183
store i32 %184, i32* %29
%185 = load i32, i32* %29
%186 = load i32, i32* %28
%187 = sub nsw i32 %185, %186
%188 = sitofp i32 %187 to double
%189 = load double, double* %10
%190 = fdiv double %188, %189
%191 = fptosi double %190 to i32
%192 = call double @ceil(i32 %191)
%193 = fmul double %192, 2.300000e-01
store double %193, double* %27
%194 = load double, double* %27
%195 = load double, double* %11
%196 = fadd double %195, %194
store double %196, double* %11
%197 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%198 = load i32, i32* %13
%199 = load i32, i32* %12
%200 = load i32, i32* %14
%201 = load i32, i32* %15
%202 = load i32, i32* %16
%203 = load i32, i32* %22
%204 = load i32, i32* %29
%205 = load i32, i32* %28
%206 = sub nsw i32 %204, %205
%207 = load double, double* %27
%208 = load i32, i32* %24
%209 = load i32, i32* %23
%210 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.16, i64 0, i64 0), i8* %197, i32 %198, i32 %199, i32 %200, i32 %201, i32 %202, i32 %203, i32 %206, double %207, i32 %208, i32 %209)
store i32 0, i32* %24
store i32 0, i32* %22
store i32 0, i32* %25
%211 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%212 = call i32 @strcpy(i8* %211, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
br label %213
213: ; preds = %162, %146
br label %65
214: ; preds = %65
%215 = load double, double* %11
%216 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.18, i64 0, i64 0), double %215)
%217 = load i32*, i32** %6
%218 = call i32 @fclose(i32* %217)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"usage: %s [Dauer einer Einheit]\0A\0A\00"
@.str.1 = [22 x i8] c"/var/spool/fax/Faxlog\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [27 x i8] c"Logdatei nicht gefunden!\0A\0A\00"
@.str.4 = [44 x i8] c"Dauer einer Telefoneinheit: %1.0f Sekunden\0A\00"
@.str.6 = [6 x i8] c"+FCON\00"
@.str.7 = [15 x i8] c"%d/%d %d:%d:%d\00"
@.str.8 = [38 x i8] c"Fehler: FCON ohne vorheriges hangup!\0A\00"
@.str.9 = [17 x i8] c"fax_id: '+FCSI: \00"
@.str.10 = [11 x i8] c"checking f\00"
@.str.11 = [3 x i8] c"%d\00"
@.str.12 = [17 x i8] c"transmission par\00"
@.str.13 = [16 x i8] c"hangup: '+FHNG:\00"
@.str.14 = [26 x i8] c"##### failed transmitting\00"
@.str.15 = [6 x i8] c"+FHS:\00"
@.str.16 = [59 x i8] c"%s\09%2d.%2d %2d:%2d:%2d\09%2d S,%3d Sek,%5.2f DM, G.%d,St %d\0A\00"
@.str.17 = [21 x i8] c"(FEHLER!) \00"
@.str.18 = [24 x i8] c"Gesamtkosten: %1.2f DM\0A\00"
@str = [55 x i8] c"empfangene ID\09\09Datum\09\09Seiten Dauer Kosten Geschw. OK=0\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%20 = bitcast i32* %5 to i8*
%21 = bitcast i32* %6 to i8*
%22 = bitcast i32* %7 to i8*
%23 = bitcast i32* %8 to i8*
%24 = bitcast i32* %9 to i8*
%25 = bitcast i32* %10 to i8*
%26 = bitcast i32* %11 to i8*
%27 = bitcast i32* %12 to i8*
%28 = bitcast i32* %13 to i8*
%29 = bitcast i32* %14 to i8*
%30 = bitcast i32* %15 to i8*
%31 = bitcast i32* %16 to i8*
%32 = bitcast i32* %17 to i8*
store i32 0, i32* %17
%33 = icmp sgt i32 %0, 1
br i1 %33, label %34, label %46
34: ; preds = %2
%35 = getelementptr inbounds i8*, i8** %1, i64 1
%36 = load i8*, i8** %35
%37 = tail call double @atoi(i8* %36)
%38 = fcmp oeq double %37, 0.000000e+00
%39 = icmp ne i32 %0, 2
%40 = or i1 %39, %38
br i1 %40, label %41, label %46
41: ; preds = %34
%42 = load i32, i32* @stderr
%43 = load i8*, i8** %1
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %43)
%45 = tail call i32 @exit(i32 1)
unreachable
46: ; preds = %34, %2
%47 = phi double [ %37, %34 ], [ 0.000000e+00, %2 ]
%48 = fcmp une double %47, 0.000000e+00
%49 = select i1 %48, double %47, double 3.600000e+02
%50 = tail call i32* @fopen(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%51 = icmp eq i32* %50, null
br i1 %51, label %52, label %56
52: ; preds = %46
%53 = load i32, i32* @stderr
%54 = tail call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%55 = tail call i32 @exit(i32 2)
unreachable
56: ; preds = %46
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), double %49)
%58 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%59 = call i64 @fgets(i8* %18, i32 100, i32* %50)
%60 = icmp eq i64 %59, 0
br i1 %60, label %164, label %61
61: ; preds = %56, %159
%62 = phi double [ %161, %159 ], [ 0.000000e+00, %56 ]
%63 = phi i32 [ %160, %159 ], [ 1, %56 ]
%64 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%65 = icmp eq i8* %64, null
br i1 %65, label %72, label %66
66: ; preds = %61
%67 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %18, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32* %5, i32* %6, i32* %7, i32* %8, i32* %9)
%68 = icmp eq i32 %63, 0
br i1 %68, label %69, label %159
69: ; preds = %66
%70 = load i32, i32* @stderr
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
br label %159
72: ; preds = %61
%73 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%74 = icmp eq i8* %73, null
br i1 %74, label %82, label %75
75: ; preds = %72
%76 = getelementptr inbounds i8, i8* %73, i64 17
%77 = call i32 @strcpy(i8* %19, i8* %76)
%78 = call i32 @strlen(i8* %19)
%79 = add nsw i32 %78, -3
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %80
store i8 0, i8* %81
br label %159
82: ; preds = %72
%83 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%84 = icmp eq i8* %83, null
br i1 %84, label %88, label %85
85: ; preds = %82
%86 = getelementptr inbounds i8, i8* %83, i64 10
%87 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %86, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %15)
br label %159
88: ; preds = %82
%89 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%90 = icmp eq i8* %89, null
br i1 %90, label %94, label %91
91: ; preds = %88
%92 = getelementptr inbounds i8, i8* %89, i64 29
%93 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %17)
br label %159
94: ; preds = %88
%95 = icmp eq i32 %63, 0
br i1 %95, label %96, label %159
96: ; preds = %94
%97 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0))
%98 = icmp eq i8* %97, null
br i1 %98, label %102, label %99
99: ; preds = %96
%100 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %18, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32* %10, i32* %11, i32* %12, i32* %13, i32* %14)
%101 = getelementptr inbounds i8, i8* %97, i64 16
br label %109
102: ; preds = %96
%103 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0))
%104 = icmp eq i8* %103, null
br i1 %104, label %159, label %105
105: ; preds = %102
%106 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %18, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32* %10, i32* %11, i32* %12, i32* %13, i32* %14)
%107 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%108 = getelementptr inbounds i8, i8* %107, i64 5
br label %109
109: ; preds = %99, %105
%110 = phi i8* [ %101, %99 ], [ %108, %105 ]
%111 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %110, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %16)
%112 = load i32, i32* %5
%113 = load i32, i32* %10
%114 = icmp eq i32 %112, %113
br i1 %114, label %115, label %117
115: ; preds = %109
%116 = load i32, i32* %11
br label %124
117: ; preds = %109
switch i32 %112, label %121 [
i32 1, label %118
i32 3, label %118
i32 5, label %118
i32 7, label %118
i32 8, label %118
i32 10, label %118
i32 12, label %118
]
118: ; preds = %117, %117, %117, %117, %117, %117, %117
%119 = load i32, i32* %11
%120 = add nsw i32 %119, 31
store i32 %120, i32* %11
br label %124
121: ; preds = %117
%122 = load i32, i32* %11
%123 = add nsw i32 %122, 30
store i32 %123, i32* %11
br label %124
124: ; preds = %115, %118, %121
%125 = phi i32 [ %116, %115 ], [ %120, %118 ], [ %123, %121 ]
%126 = load i32, i32* %6
%127 = load i32, i32* %7
%128 = load i32, i32* %8
%129 = load i32, i32* %9
%130 = load i32, i32* %12
%131 = load i32, i32* %13
%132 = load i32, i32* %14
%133 = sub i32 %131, %128
%134 = mul i32 %133, 60
%135 = sub i32 %130, %127
%136 = mul i32 %135, 3600
%137 = sub i32 %125, %126
%138 = mul i32 %137, 86400
%139 = sub i32 %138, %129
%140 = add i32 %139, %132
%141 = add i32 %140, %136
%142 = add i32 %141, %134
%143 = sitofp i32 %142 to double
%144 = fdiv double %143, %49
%145 = fptosi double %144 to i32
%146 = call double @ceil(i32 %145)
%147 = fmul double %146, 2.300000e-01
%148 = fadd double %62, %147
%149 = load i32, i32* %6
%150 = load i32, i32* %5
%151 = load i32, i32* %7
%152 = load i32, i32* %8
%153 = load i32, i32* %9
%154 = load i32, i32* %15
%155 = load i32, i32* %17
%156 = load i32, i32* %16
%157 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.16, i64 0, i64 0), i8* %19, i32 %149, i32 %150, i32 %151, i32 %152, i32 %153, i32 %154, i32 %142, double %147, i32 %155, i32 %156)
store i32 0, i32* %17
store i32 0, i32* %15
%158 = call i32 @strcpy(i8* %19, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
br label %159
159: ; preds = %94, %66, %69, %85, %102, %91, %75, %124
%160 = phi i32 [ 1, %124 ], [ 1, %94 ], [ 0, %66 ], [ 0, %69 ], [ %63, %85 ], [ 0, %102 ], [ %63, %91 ], [ %63, %75 ]
%161 = phi double [ %148, %124 ], [ %62, %94 ], [ %62, %66 ], [ %62, %69 ], [ %62, %85 ], [ %62, %102 ], [ %62, %91 ], [ %62, %75 ]
%162 = call i64 @fgets(i8* %18, i32 100, i32* %50)
%163 = icmp eq i64 %162, 0
br i1 %163, label %164, label %61
164: ; preds = %159, %56
%165 = phi double [ 0.000000e+00, %56 ], [ %161, %159 ]
%166 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.18, i64 0, i64 0), double %165)
%167 = call i32 @fclose(i32* %50)
ret i32 0
}