#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 time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
long atol(char *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
struct tm *gmtime(int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int strlen(char *);
char *strstr(char *, char const *);
int /*<<< orphan*/ terminatePrevious(char *, char *);
int /*<<< orphan*/ time(int *);
int main(int argc, char **argv) {
  int compactPrint = 0;
  if (argc >= 2) {
    if (argv[1][0] == '-' && argv[1][1] == 'c') {
      compactPrint = 1;
    } else {
      printf("-c \t Use compact format, omit date/time and non log4j2 JSON "
             "format lines.\n\n");
      return 0;
    }
  }
  const char *timeMillis = "\"timeMillis\"";
  const char *thread = "\"thread\"";
  const char *level = "\"level\"";
  const char *loggerName = "\"loggerName\"";
  const char *message = "\"message\"";
  const char *thrown = "\"thrown\"";
  const char *endOfBatch = "\"endOfBatch\"";
  const char *loggerFqcn = "\"loggerFqcn\"";
  const char *contextMap = "\"contextMap\"";
  const char *extendedStackTrace = "\"extendedStackTrace\"";
  const char *threadId = "\"threadId\"";
  const char *threadPriority = "\"threadPriority\"";
  char formattedTimeBuf[26];
  struct tm *tm_info;
  char buf[32768];
  char *s;
  while (fgets(buf, sizeof buf, stdin)) {
    if (buf[strlen(buf) - 1] == '\n') {
      char *posTimeMillis = strstr(buf, timeMillis);
      char *posThread = strstr(buf, thread);
      char *posLevel = strstr(buf, level);
      char *posLoggerName = strstr(buf, loggerName);
      char *posMessage = strstr(buf, message);
      char *posThrown = strstr(buf, thrown);
      char *posEndOfBatch = strstr(buf, endOfBatch);
      char *posLoggerFqcn = strstr(buf, loggerFqcn);
      char *posContextMap = strstr(buf, contextMap);
      char *posThreadId = strstr(buf, threadId);
      char *posThreadPriority = strstr(buf, threadPriority);
      char *posExtendedStackTrace = strstr(buf, extendedStackTrace);
      if (posTimeMillis == NULL || posThread == NULL || posLevel == NULL ||
          posLoggerName == NULL || posMessage == NULL) {
        if (!compactPrint) {
          printf("%s", buf);
        }
        continue;
      }
      terminatePrevious(buf, posTimeMillis);
      terminatePrevious(buf, posThread);
      terminatePrevious(buf, posLevel);
      terminatePrevious(buf, posLoggerName);
      terminatePrevious(buf, posMessage);
      terminatePrevious(buf, posThrown);
      terminatePrevious(buf, posEndOfBatch);
      terminatePrevious(buf, posLoggerFqcn);
      terminatePrevious(buf, posContextMap);
      terminatePrevious(buf, posThreadId);
      terminatePrevious(buf, posThreadPriority);
      char *finalTimeMillis = posTimeMillis + 13;
      char *finalThread = posThread + 10;
      char *finalLevel = posLevel + 9;
      char *finalLogger = posLoggerName + 14;
      char *finalMessage = posMessage + 11;
      printf("%s[%s]", buf, finalLevel);
      if (!compactPrint) {
        long longTimeMillis = atol(finalTimeMillis);
        time_t timer = (time_t)longTimeMillis / 1000;
        time(&timer);
        tm_info = gmtime(&timer);
        strftime(formattedTimeBuf, 26, "%Y-%m-%dT%H:%M:%S", tm_info);
        printf(" %s.%sZ ", formattedTimeBuf,
               &(finalTimeMillis[strlen(finalTimeMillis) - 3]));
      }
      printf("[%s][%s]", finalThread, finalLogger);
      if (posThreadId != NULL) {
        printf("[%s]", posContextMap);
      }
      printf(": %s", finalMessage);
      if (posThrown != NULL) {
        if (posExtendedStackTrace != NULL && posExtendedStackTrace - buf > 0) {
          buf[(posExtendedStackTrace - buf - 1)] = '\0';
        }
        if (posEndOfBatch != NULL && posEndOfBatch - buf > 1) {
          buf[(posEndOfBatch - buf - 2)] = '\0';
        }
        printf(" : %s", posThrown + 10);
      }
      printf("\n");
    } else {
      if (!compactPrint) {
        printf("%s\n", buf);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x8160,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     120e <main+0x7e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11ef <main+0x5f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x63,%eax
jne    11ef <main+0x5f>
movl   $0x1,-0x14(%rbp)
jmp    1209 <main+0x79>
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    17a3 <main+0x613>
jmp    120e <main+0x7e>
lea    0xe37(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xe39(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe37(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe34(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe36(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xe35(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe33(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xe35(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xe37(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xe39(%rip),%rax
mov    %rax,-0x68(%rbp)
lea    0xe43(%rip),%rax
mov    %rax,-0x70(%rbp)
lea    0xe43(%rip),%rax
mov    %rax,-0x78(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    0x2d48(%rip),%rax
mov    (%rax),%edx
mov    $0x8000,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     179c <main+0x60c>
lea    -0x80b0(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
cltq
movsbl -0x80b0(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    1773 <main+0x5e3>
lea    -0x80b0(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x80c0(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x80c8(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x80d0(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x80d8(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x40(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x80e0(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x80e8(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x50(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x80f0(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x58(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x80f8(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x60(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x8100(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x70(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x8108(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x78(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x8110(%rbp)
lea    -0x80b0(%rbp),%rdi
mov    -0x68(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x8118(%rbp)
cmpq   $0x0,-0x80c0(%rbp)
je     1432 <main+0x2a2>
cmpq   $0x0,-0x80c8(%rbp)
je     1432 <main+0x2a2>
cmpq   $0x0,-0x80d0(%rbp)
je     1432 <main+0x2a2>
cmpq   $0x0,-0x80d8(%rbp)
je     1432 <main+0x2a2>
cmpq   $0x0,-0x80e0(%rbp)
jne    1456 <main+0x2c6>
cmpl   $0x0,-0x14(%rbp)
jne    1451 <main+0x2c1>
lea    -0x80b0(%rbp),%rsi
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1292 <main+0x102>
lea    -0x80b0(%rbp),%rdi
mov    -0x80c0(%rbp),%rsi
call   1050 <terminatePrevious@plt>
lea    -0x80b0(%rbp),%rdi
mov    -0x80c8(%rbp),%rsi
call   1050 <terminatePrevious@plt>
lea    -0x80b0(%rbp),%rdi
mov    -0x80d0(%rbp),%rsi
call   1050 <terminatePrevious@plt>
lea    -0x80b0(%rbp),%rdi
mov    -0x80d8(%rbp),%rsi
call   1050 <terminatePrevious@plt>
lea    -0x80b0(%rbp),%rdi
mov    -0x80e0(%rbp),%rsi
call   1050 <terminatePrevious@plt>
lea    -0x80b0(%rbp),%rdi
mov    -0x80e8(%rbp),%rsi
call   1050 <terminatePrevious@plt>
lea    -0x80b0(%rbp),%rdi
mov    -0x80f0(%rbp),%rsi
call   1050 <terminatePrevious@plt>
lea    -0x80b0(%rbp),%rdi
mov    -0x80f8(%rbp),%rsi
call   1050 <terminatePrevious@plt>
lea    -0x80b0(%rbp),%rdi
mov    -0x8100(%rbp),%rsi
call   1050 <terminatePrevious@plt>
lea    -0x80b0(%rbp),%rdi
mov    -0x8108(%rbp),%rsi
call   1050 <terminatePrevious@plt>
lea    -0x80b0(%rbp),%rdi
mov    -0x8110(%rbp),%rsi
call   1050 <terminatePrevious@plt>
mov    -0x80c0(%rbp),%rax
add    $0xd,%rax
mov    %rax,-0x8120(%rbp)
mov    -0x80c8(%rbp),%rax
add    $0xa,%rax
mov    %rax,-0x8128(%rbp)
mov    -0x80d0(%rbp),%rax
add    $0x9,%rax
mov    %rax,-0x8130(%rbp)
mov    -0x80d8(%rbp),%rax
add    $0xe,%rax
mov    %rax,-0x8138(%rbp)
mov    -0x80e0(%rbp),%rax
add    $0xb,%rax
mov    %rax,-0x8140(%rbp)
lea    -0x80b0(%rbp),%rsi
mov    -0x8130(%rbp),%rdx
lea    0xb4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
jne    1659 <main+0x4c9>
mov    -0x8120(%rbp),%rdi
call   1090 <atol@plt>
mov    %rax,-0x8148(%rbp)
mov    -0x8148(%rbp),%rax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x814c(%rbp)
lea    -0x814c(%rbp),%rdi
call   1070 <time@plt>
lea    -0x814c(%rbp),%rdi
call   10a0 <gmtime@plt>
mov    %rax,-0xa8(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0xa8(%rbp),%rcx
mov    $0x1a,%esi
lea    0xae1(%rip),%rdx
call   1080 <strftime@plt>
lea    -0xa0(%rbp),%rax
mov    %rax,-0x8158(%rbp)
mov    -0x8120(%rbp),%rax
mov    %rax,-0x8160(%rbp)
mov    -0x8120(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x8160(%rbp),%rdx
mov    -0x8158(%rbp),%rsi
sub    $0x3,%eax
cltq
add    %rax,%rdx
lea    0xaa9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8128(%rbp),%rsi
mov    -0x8138(%rbp),%rdx
lea    0xa96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x8108(%rbp)
je     1698 <main+0x508>
mov    -0x8100(%rbp),%rsi
lea    0xa77(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8140(%rbp),%rsi
lea    0xa68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x80e8(%rbp)
je     1760 <main+0x5d0>
cmpq   $0x0,-0x8118(%rbp)
je     1701 <main+0x571>
mov    -0x8118(%rbp),%rax
lea    -0x80b0(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
jle    1701 <main+0x571>
mov    -0x8118(%rbp),%rax
lea    -0x80b0(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
movb   $0x0,-0x80b0(%rbp,%rax,1)
cmpq   $0x0,-0x80f0(%rbp)
je     1747 <main+0x5b7>
mov    -0x80f0(%rbp),%rax
lea    -0x80b0(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x1,%rax
jle    1747 <main+0x5b7>
mov    -0x80f0(%rbp),%rax
lea    -0x80b0(%rbp),%rcx
sub    %rcx,%rax
sub    $0x2,%rax
movb   $0x0,-0x80b0(%rbp,%rax,1)
mov    -0x80e8(%rbp),%rsi
add    $0xa,%rsi
lea    0x9b4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x8e3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1797 <main+0x607>
cmpl   $0x0,-0x14(%rbp)
jne    1792 <main+0x602>
lea    -0x80b0(%rbp),%rsi
lea    0x988(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1797 <main+0x607>
jmp    1292 <main+0x102>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x8078,%rsp
mov    %edi,0xc(%rsp)
cmp    $0x2,%edi
jl     11e1 <main+0x31>
mov    0x8(%rsi),%rax
cmpb   $0x2d,(%rax)
jne    156b <main+0x3bb>
cmpb   $0x63,0x1(%rax)
jne    156b <main+0x3bb>
mov    0x2e00(%rip),%rbp
mov    0x0(%rbp),%edx
lea    0x70(%rsp),%rbx
jmp    1203 <main+0x53>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x0(%rbp),%edx
mov    %rbx,%rdi
mov    $0x8000,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     1577 <main+0x3c7>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1520 <main+0x370>
mov    %rbx,%rdi
lea    0xdc8(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
lea    0xdc3(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,%r15
mov    %rbx,%rdi
lea    0xdba(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,%r12
mov    %rbx,%rdi
lea    0xdb0(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,%r13
mov    %rbx,%rdi
lea    0xdab(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,%r14
mov    %rbx,%rdi
lea    0xda3(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,0x10(%rsp)
mov    %rbx,%rdi
lea    0xd98(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,0x28(%rsp)
mov    %rbx,%rdi
lea    0xd9e(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,0x20(%rsp)
mov    %rbx,%rdi
lea    0xdac(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,0x30(%rsp)
mov    %rbx,%rdi
lea    0xd83(%rip),%rsi
call   10d0 <strstr@plt>
test   %rbp,%rbp
je     1540 <main+0x390>
test   %r15,%r15
je     1540 <main+0x390>
test   %r12,%r12
je     1540 <main+0x390>
test   %r13,%r13
je     1540 <main+0x390>
test   %r14,%r14
je     1540 <main+0x390>
mov    %rax,0x38(%rsp)
mov    %rbx,%rdi
lea    0xd62(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,0x48(%rsp)
mov    %rbx,%rdi
lea    0xd14(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,0x40(%rsp)
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1070 <terminatePrevious@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <terminatePrevious@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1070 <terminatePrevious@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1070 <terminatePrevious@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <terminatePrevious@plt>
mov    %rbx,%rdi
mov    0x10(%rsp),%rsi
call   1070 <terminatePrevious@plt>
mov    %rbx,%rdi
mov    0x28(%rsp),%rsi
call   1070 <terminatePrevious@plt>
mov    %rbx,%rdi
mov    0x40(%rsp),%rsi
call   1070 <terminatePrevious@plt>
mov    %rbx,%rdi
mov    0x20(%rsp),%rsi
call   1070 <terminatePrevious@plt>
mov    %rbx,%rdi
mov    0x30(%rsp),%rsi
call   1070 <terminatePrevious@plt>
mov    %rbx,%rdi
mov    0x48(%rsp),%rsi
call   1070 <terminatePrevious@plt>
add    $0xa,%r15
add    $0x9,%r12
add    $0xe,%r13
lea    0xcbd(%rip),%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
cmpl   $0x1,0xc(%rsp)
jg     1467 <main+0x2b7>
add    $0xd,%rbp
mov    %rbp,%rdi
call   10b0 <atol@plt>
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
mov    %eax,0x1c(%rsp)
lea    0x1c(%rsp),%r12
mov    %r12,%rdi
call   1090 <time@plt>
mov    %r12,%rdi
call   10c0 <gmtime@plt>
lea    0x50(%rsp),%r12
mov    %r12,%rdi
mov    $0x1a,%esi
lea    0xc61(%rip),%rdx
mov    %rax,%rcx
call   10a0 <strftime@plt>
mov    %rbp,%rdi
call   1050 <strlen@plt>
cltq
lea    (%rax,%rbp,1),%rdx
add    $0xfffffffffffffffd,%rdx
lea    0xc52(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0xb,%r14
lea    0xc46(%rip),%rdi
mov    %r15,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
cmpq   $0x0,0x30(%rsp)
je     149a <main+0x2ea>
lea    0xc2e(%rip),%rdi
mov    0x20(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc21(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
cmpq   $0x0,0x10(%rsp)
mov    0x2b30(%rip),%rbp
je     1500 <main+0x350>
mov    0x38(%rsp),%rax
test   %rax,%rax
je     14d1 <main+0x321>
sub    %rbx,%rax
test   %rax,%rax
jle    14d1 <main+0x321>
movb   $0x0,-0x1(%rax,%rbx,1)
mov    0x28(%rsp),%rax
test   %rax,%rax
je     14e9 <main+0x339>
sub    %rbx,%rax
cmp    $0x2,%rax
jl     14e9 <main+0x339>
movb   $0x0,-0x2(%rax,%rbx,1)
mov    0x10(%rsp),%rsi
add    $0xa,%rsi
lea    0xbc8(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x0(%rbp),%edx
jmp    1203 <main+0x53>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpl   $0x1,0xc(%rsp)
jg     1200 <main+0x50>
mov    %rbx,%rdi
call   1040 <puts@plt>
jmp    1200 <main+0x50>
nopl   0x0(%rax,%rax,1)
cmpl   $0x1,0xc(%rsp)
mov    0x2a9c(%rip),%rbp
jg     1200 <main+0x50>
lea    0xb6b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x0(%rbp),%edx
jmp    1203 <main+0x53>
lea    0xb55(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x8078,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [76 x i8] c"-c \09 Use compact format, omit date/time and non log4j2 JSON format lines.\0A\0A\00"
@.str.1 = [13 x i8] c"\22timeMillis\22\00"
@.str.2 = [9 x i8] c"\22thread\22\00"
@.str.3 = [8 x i8] c"\22level\22\00"
@.str.4 = [13 x i8] c"\22loggerName\22\00"
@.str.5 = [10 x i8] c"\22message\22\00"
@.str.6 = [9 x i8] c"\22thrown\22\00"
@.str.7 = [13 x i8] c"\22endOfBatch\22\00"
@.str.8 = [13 x i8] c"\22loggerFqcn\22\00"
@.str.9 = [13 x i8] c"\22contextMap\22\00"
@.str.10 = [21 x i8] c"\22extendedStackTrace\22\00"
@.str.11 = [11 x i8] c"\22threadId\22\00"
@.str.12 = [17 x i8] c"\22threadPriority\22\00"
@stdin = global i32 0
@.str.13 = [3 x i8] c"%s\00"
@.str.14 = [7 x i8] c"%s[%s]\00"
@.str.15 = [18 x i8] c"%Y-%m-%dT%H:%M:%S\00"
@.str.16 = [9 x i8] c" %s.%sZ \00"
@.str.17 = [9 x i8] c"[%s][%s]\00"
@.str.18 = [5 x i8] c"[%s]\00"
@.str.19 = [5 x i8] c": %s\00"
@.str.20 = [6 x i8] c" : %s\00"
@.str.21 = [2 x i8] c"\0A\00"
@.str.22 = [4 x i8] c"%s\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 i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca [26 x i8]
%20 = alloca %struct.tm*
%21 = alloca [32768 x i8]
%22 = alloca i8*
%23 = alloca i8*
%24 = alloca i8*
%25 = alloca i8*
%26 = alloca i8*
%27 = alloca i8*
%28 = alloca i8*
%29 = alloca i8*
%30 = alloca i8*
%31 = alloca i8*
%32 = alloca i8*
%33 = alloca i8*
%34 = alloca i8*
%35 = alloca i8*
%36 = alloca i8*
%37 = alloca i8*
%38 = alloca i8*
%39 = alloca i8*
%40 = alloca i64
%41 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%42 = load i32, i32* %4
%43 = icmp sge i32 %42, 2
br i1 %43, label %44, label %64
44: ; preds = %2
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 1
%47 = load i8*, i8** %46
%48 = getelementptr inbounds i8, i8* %47, i64 0
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 45
br i1 %51, label %52, label %61
52: ; preds = %44
%53 = load i8**, i8*** %5
%54 = getelementptr inbounds i8*, i8** %53, i64 1
%55 = load i8*, i8** %54
%56 = getelementptr inbounds i8, i8* %55, i64 1
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 99
br i1 %59, label %60, label %61
60: ; preds = %52
store i32 1, i32* %6
br label %63
61: ; preds = %52, %44
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %270
63: ; preds = %60
br label %64
64: ; preds = %63, %2
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8** %10
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8** %11
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8** %12
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8** %13
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8** %14
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i8** %15
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0), i8** %16
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8** %17
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8** %18
br label %65
65: ; preds = %268, %136, %64
%66 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%67 = load i32, i32* @stdin
%68 = call i64 @fgets(i8* %66, i32 32768, i32 %67)
%69 = icmp ne i64 %68, 0
br i1 %69, label %70, label %269
70: ; preds = %65
%71 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%72 = call i32 @strlen(i8* %71)
%73 = sub nsw i32 %72, 1
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 %74
%76 = load i8, i8* %75
%77 = sext i8 %76 to i32
%78 = icmp eq i32 %77, 10
br i1 %78, label %79, label %261
79: ; preds = %70
%80 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%81 = load i8*, i8** %7
%82 = call i8* @strstr(i8* %80, i8* %81)
store i8* %82, i8** %23
%83 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%84 = load i8*, i8** %8
%85 = call i8* @strstr(i8* %83, i8* %84)
store i8* %85, i8** %24
%86 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%87 = load i8*, i8** %9
%88 = call i8* @strstr(i8* %86, i8* %87)
store i8* %88, i8** %25
%89 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%90 = load i8*, i8** %10
%91 = call i8* @strstr(i8* %89, i8* %90)
store i8* %91, i8** %26
%92 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%93 = load i8*, i8** %11
%94 = call i8* @strstr(i8* %92, i8* %93)
store i8* %94, i8** %27
%95 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%96 = load i8*, i8** %12
%97 = call i8* @strstr(i8* %95, i8* %96)
store i8* %97, i8** %28
%98 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%99 = load i8*, i8** %13
%100 = call i8* @strstr(i8* %98, i8* %99)
store i8* %100, i8** %29
%101 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%102 = load i8*, i8** %14
%103 = call i8* @strstr(i8* %101, i8* %102)
store i8* %103, i8** %30
%104 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%105 = load i8*, i8** %15
%106 = call i8* @strstr(i8* %104, i8* %105)
store i8* %106, i8** %31
%107 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%108 = load i8*, i8** %17
%109 = call i8* @strstr(i8* %107, i8* %108)
store i8* %109, i8** %32
%110 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%111 = load i8*, i8** %18
%112 = call i8* @strstr(i8* %110, i8* %111)
store i8* %112, i8** %33
%113 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%114 = load i8*, i8** %16
%115 = call i8* @strstr(i8* %113, i8* %114)
store i8* %115, i8** %34
%116 = load i8*, i8** %23
%117 = icmp eq i8* %116, null
br i1 %117, label %130, label %118
118: ; preds = %79
%119 = load i8*, i8** %24
%120 = icmp eq i8* %119, null
br i1 %120, label %130, label %121
121: ; preds = %118
%122 = load i8*, i8** %25
%123 = icmp eq i8* %122, null
br i1 %123, label %130, label %124
124: ; preds = %121
%125 = load i8*, i8** %26
%126 = icmp eq i8* %125, null
br i1 %126, label %130, label %127
127: ; preds = %124
%128 = load i8*, i8** %27
%129 = icmp eq i8* %128, null
br i1 %129, label %130, label %137
130: ; preds = %127, %124, %121, %118, %79
%131 = load i32, i32* %6
%132 = icmp ne i32 %131, 0
br i1 %132, label %136, label %133
133: ; preds = %130
%134 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %134)
br label %136
136: ; preds = %133, %130
br label %65
137: ; preds = %127
%138 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%139 = load i8*, i8** %23
%140 = call i32 @terminatePrevious(i8* %138, i8* %139)
%141 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%142 = load i8*, i8** %24
%143 = call i32 @terminatePrevious(i8* %141, i8* %142)
%144 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%145 = load i8*, i8** %25
%146 = call i32 @terminatePrevious(i8* %144, i8* %145)
%147 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%148 = load i8*, i8** %26
%149 = call i32 @terminatePrevious(i8* %147, i8* %148)
%150 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%151 = load i8*, i8** %27
%152 = call i32 @terminatePrevious(i8* %150, i8* %151)
%153 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%154 = load i8*, i8** %28
%155 = call i32 @terminatePrevious(i8* %153, i8* %154)
%156 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%157 = load i8*, i8** %29
%158 = call i32 @terminatePrevious(i8* %156, i8* %157)
%159 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%160 = load i8*, i8** %30
%161 = call i32 @terminatePrevious(i8* %159, i8* %160)
%162 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%163 = load i8*, i8** %31
%164 = call i32 @terminatePrevious(i8* %162, i8* %163)
%165 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%166 = load i8*, i8** %32
%167 = call i32 @terminatePrevious(i8* %165, i8* %166)
%168 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%169 = load i8*, i8** %33
%170 = call i32 @terminatePrevious(i8* %168, i8* %169)
%171 = load i8*, i8** %23
%172 = getelementptr inbounds i8, i8* %171, i64 13
store i8* %172, i8** %35
%173 = load i8*, i8** %24
%174 = getelementptr inbounds i8, i8* %173, i64 10
store i8* %174, i8** %36
%175 = load i8*, i8** %25
%176 = getelementptr inbounds i8, i8* %175, i64 9
store i8* %176, i8** %37
%177 = load i8*, i8** %26
%178 = getelementptr inbounds i8, i8* %177, i64 14
store i8* %178, i8** %38
%179 = load i8*, i8** %27
%180 = getelementptr inbounds i8, i8* %179, i64 11
store i8* %180, i8** %39
%181 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%182 = load i8*, i8** %37
%183 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8* %181, i8* %182)
%184 = load i32, i32* %6
%185 = icmp ne i32 %184, 0
br i1 %185, label %205, label %186
186: ; preds = %137
%187 = load i8*, i8** %35
%188 = call i64 @atol(i8* %187)
store i64 %188, i64* %40
%189 = load i64, i64* %40
%190 = trunc i64 %189 to i32
%191 = sdiv i32 %190, 1000
store i32 %191, i32* %41
%192 = call i32 @time(i32* %41)
%193 = call %struct.tm* @gmtime(i32* %41)
store %struct.tm* %193, %struct.tm** %20
%194 = getelementptr inbounds [26 x i8], [26 x i8]* %19, i64 0, i64 0
%195 = load %struct.tm*, %struct.tm** %20
%196 = call i32 @strftime(i8* %194, i32 26, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0), %struct.tm* %195)
%197 = getelementptr inbounds [26 x i8], [26 x i8]* %19, i64 0, i64 0
%198 = load i8*, i8** %35
%199 = load i8*, i8** %35
%200 = call i32 @strlen(i8* %199)
%201 = sub nsw i32 %200, 3
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds i8, i8* %198, i64 %202
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* %197, i8* %203)
br label %205
205: ; preds = %186, %137
%206 = load i8*, i8** %36
%207 = load i8*, i8** %38
%208 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i8* %206, i8* %207)
%209 = load i8*, i8** %32
%210 = icmp ne i8* %209, null
br i1 %210, label %211, label %214
211: ; preds = %205
%212 = load i8*, i8** %31
%213 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* %212)
br label %214
214: ; preds = %211, %205
%215 = load i8*, i8** %39
%216 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8* %215)
%217 = load i8*, i8** %28
%218 = icmp ne i8* %217, null
br i1 %218, label %219, label %259
219: ; preds = %214
%220 = load i8*, i8** %34
%221 = icmp ne i8* %220, null
br i1 %221, label %222, label %237
222: ; preds = %219
%223 = load i8*, i8** %34
%224 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%225 = ptrtoint i8* %223 to i64
%226 = ptrtoint i8* %224 to i64
%227 = sub i64 %225, %226
%228 = icmp sgt i64 %227, 0
br i1 %228, label %229, label %237
229: ; preds = %222
%230 = load i8*, i8** %34
%231 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%232 = ptrtoint i8* %230 to i64
%233 = ptrtoint i8* %231 to i64
%234 = sub i64 %232, %233
%235 = sub nsw i64 %234, 1
%236 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 %235
store i8 0, i8* %236
br label %237
237: ; preds = %229, %222, %219
%238 = load i8*, i8** %29
%239 = icmp ne i8* %238, null
br i1 %239, label %240, label %255
240: ; preds = %237
%241 = load i8*, i8** %29
%242 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%243 = ptrtoint i8* %241 to i64
%244 = ptrtoint i8* %242 to i64
%245 = sub i64 %243, %244
%246 = icmp sgt i64 %245, 1
br i1 %246, label %247, label %255
247: ; preds = %240
%248 = load i8*, i8** %29
%249 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%250 = ptrtoint i8* %248 to i64
%251 = ptrtoint i8* %249 to i64
%252 = sub i64 %250, %251
%253 = sub nsw i64 %252, 2
%254 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 %253
store i8 0, i8* %254
br label %255
255: ; preds = %247, %240, %237
%256 = load i8*, i8** %28
%257 = getelementptr inbounds i8, i8* %256, i64 10
%258 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0), i8* %257)
br label %259
259: ; preds = %255, %214
%260 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
br label %268
261: ; preds = %70
%262 = load i32, i32* %6
%263 = icmp ne i32 %262, 0
br i1 %263, label %267, label %264
264: ; preds = %261
%265 = getelementptr inbounds [32768 x i8], [32768 x i8]* %21, i64 0, i64 0
%266 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* %265)
br label %267
267: ; preds = %264, %261
br label %268
268: ; preds = %267, %259
br label %65
269: ; preds = %65
store i32 0, i32* %3
br label %270
270: ; preds = %269, %61
%271 = load i32, i32* %3
ret i32 %271
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str.1 = [13 x i8] c"\22timeMillis\22\00"
@.str.2 = [9 x i8] c"\22thread\22\00"
@.str.3 = [8 x i8] c"\22level\22\00"
@.str.4 = [13 x i8] c"\22loggerName\22\00"
@.str.5 = [10 x i8] c"\22message\22\00"
@.str.6 = [9 x i8] c"\22thrown\22\00"
@.str.7 = [13 x i8] c"\22endOfBatch\22\00"
@.str.8 = [13 x i8] c"\22loggerFqcn\22\00"
@.str.9 = [13 x i8] c"\22contextMap\22\00"
@.str.10 = [21 x i8] c"\22extendedStackTrace\22\00"
@.str.11 = [11 x i8] c"\22threadId\22\00"
@.str.12 = [17 x i8] c"\22threadPriority\22\00"
@stdin = global i32 0
@.str.13 = [3 x i8] c"%s\00"
@.str.14 = [7 x i8] c"%s[%s]\00"
@.str.15 = [18 x i8] c"%Y-%m-%dT%H:%M:%S\00"
@.str.16 = [9 x i8] c" %s.%sZ \00"
@.str.17 = [9 x i8] c"[%s][%s]\00"
@.str.18 = [5 x i8] c"[%s]\00"
@.str.19 = [5 x i8] c": %s\00"
@.str.20 = [6 x i8] c" : %s\00"
@str = [75 x i8] c"-c \09 Use compact format, omit date/time and non log4j2 JSON format lines.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [26 x i8]
%4 = alloca [32768 x i8]
%5 = alloca i32
%6 = icmp sgt i32 %0, 1
br i1 %6, label %7, label %18
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 45
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = getelementptr inbounds i8, i8* %9, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 99
br i1 %15, label %18, label %16
16: ; preds = %12, %7
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str, i64 0, i64 0))
br label %128
18: ; preds = %12, %2
%19 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 0
%20 = getelementptr inbounds [32768 x i8], [32768 x i8]* %4, i64 0, i64 0
%21 = load i32, i32* @stdin
%22 = call i64 @fgets(i8* %20, i32 32768, i32 %21)
%23 = icmp eq i64 %22, 0
br i1 %23, label %127, label %24
24: ; preds = %18
%25 = bitcast i32* %5 to i8*
%26 = ptrtoint [32768 x i8]* %4 to i64
br label %27
27: ; preds = %24, %123
%28 = call i32 @strlen(i8* %20)
%29 = add nsw i32 %28, -1
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [32768 x i8], [32768 x i8]* %4, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 10
br i1 %33, label %34, label %120
34: ; preds = %27
%35 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%36 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%37 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%38 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%39 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%40 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%41 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%42 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%43 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%44 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%45 = icmp eq i8* %35, null
%46 = icmp eq i8* %36, null
%47 = select i1 %45, i1 true, i1 %46
%48 = icmp eq i8* %37, null
%49 = select i1 %47, i1 true, i1 %48
%50 = icmp eq i8* %38, null
%51 = select i1 %49, i1 true, i1 %50
%52 = icmp eq i8* %39, null
%53 = select i1 %51, i1 true, i1 %52
br i1 %53, label %54, label %57
54: ; preds = %34
br i1 %6, label %123, label %55
55: ; preds = %54
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %20)
br label %123
57: ; preds = %34
%58 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%59 = call i8* @strstr(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%60 = call i32 @terminatePrevious(i8* %20, i8* %35)
%61 = call i32 @terminatePrevious(i8* %20, i8* %36)
%62 = call i32 @terminatePrevious(i8* %20, i8* %37)
%63 = call i32 @terminatePrevious(i8* %20, i8* %38)
%64 = call i32 @terminatePrevious(i8* %20, i8* %39)
%65 = call i32 @terminatePrevious(i8* %20, i8* %40)
%66 = call i32 @terminatePrevious(i8* %20, i8* %41)
%67 = call i32 @terminatePrevious(i8* %20, i8* %59)
%68 = call i32 @terminatePrevious(i8* %20, i8* %42)
%69 = call i32 @terminatePrevious(i8* %20, i8* %43)
%70 = call i32 @terminatePrevious(i8* %20, i8* %58)
%71 = getelementptr inbounds i8, i8* %35, i64 13
%72 = getelementptr inbounds i8, i8* %36, i64 10
%73 = getelementptr inbounds i8, i8* %37, i64 9
%74 = getelementptr inbounds i8, i8* %38, i64 14
%75 = getelementptr inbounds i8, i8* %39, i64 11
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8* %20, i8* %73)
br i1 %6, label %89, label %77
77: ; preds = %57
%78 = call i64 @atol(i8* %71)
%79 = trunc i64 %78 to i32
%80 = sdiv i32 %79, 1000
store i32 %80, i32* %5
%81 = call i32 @time(i32* %5)
%82 = call %struct.tm* @gmtime(i32* %5)
%83 = call i32 @strftime(i8* %19, i32 26, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0), %struct.tm* %82)
%84 = call i32 @strlen(i8* %71)
%85 = add nsw i32 %84, -3
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8, i8* %71, i64 %86
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* %19, i8* %87)
br label %89
89: ; preds = %77, %57
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i8* %72, i8* %74)
%91 = icmp eq i8* %43, null
br i1 %91, label %94, label %92
92: ; preds = %89
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* %42)
br label %94
94: ; preds = %92, %89
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8* %75)
%96 = icmp eq i8* %40, null
br i1 %96, label %118, label %97
97: ; preds = %94
%98 = icmp eq i8* %44, null
br i1 %98, label %106, label %99
99: ; preds = %97
%100 = ptrtoint i8* %44 to i64
%101 = sub i64 %100, %26
%102 = icmp sgt i64 %101, 0
br i1 %102, label %103, label %106
103: ; preds = %99
%104 = add nsw i64 %101, -1
%105 = getelementptr inbounds [32768 x i8], [32768 x i8]* %4, i64 0, i64 %104
store i8 0, i8* %105
br label %106
106: ; preds = %103, %99, %97
%107 = icmp eq i8* %41, null
br i1 %107, label %115, label %108
108: ; preds = %106
%109 = ptrtoint i8* %41 to i64
%110 = sub i64 %109, %26
%111 = icmp sgt i64 %110, 1
br i1 %111, label %112, label %115
112: ; preds = %108
%113 = add nsw i64 %110, -2
%114 = getelementptr inbounds [32768 x i8], [32768 x i8]* %4, i64 0, i64 %113
store i8 0, i8* %114
br label %115
115: ; preds = %112, %108, %106
%116 = getelementptr inbounds i8, i8* %40, i64 10
%117 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0), i8* %116)
br label %118
118: ; preds = %94, %115
%119 = call i32 @putchar(i32 10)
br label %123
120: ; preds = %27
br i1 %6, label %123, label %121
121: ; preds = %120
%122 = call i32 @puts(i8* %20)
br label %123
123: ; preds = %121, %120, %118, %55, %54
%124 = load i32, i32* @stdin
%125 = call i64 @fgets(i8* %20, i32 32768, i32 %124)
%126 = icmp eq i64 %125, 0
br i1 %126, label %127, label %27
127: ; preds = %123, %18
br label %128
128: ; preds = %127, %16
ret i32 0
}