#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*/ num;
typedef int /*<<< orphan*/ name;
typedef int /*<<< orphan*/ help;
typedef int /*<<< orphan*/ def;
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ args;

/* Variables and functions */
int atoi(char *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
char *strdup(char *);
int strlen(char *);
int main(void) {
  char name[512];
  char num[512];
  char help[512];
  char def[512];
  char args[512];
  char buf[512];
  char *defines[512];
  int i = 0, max;
  printf("/* this file is auto generated, edit textevents.in instead! "
         "*/\n\nconst struct text_event te[] = {\n");
  while (fgets(name, sizeof(name), stdin)) {
    name[strlen(name) - 1] = 0;
    fgets(num, sizeof(num), stdin);
    num[strlen(num) - 1] = 0;
    fgets(help, sizeof(help), stdin);
    help[strlen(help) - 1] = 0;
    fgets(def, sizeof(def), stdin);
    def[strlen(def) - 1] = 0;
    fgets(args, sizeof(args), stdin);
    args[strlen(args) - 1] = 0;
    fgets(buf, sizeof(buf), stdin);
    if (args[0] == 'n')
      printf("\n{\"%s\", %s, %d, \n\"%s\"},\n", name, help,
             atoi(args + 1) | 128, def);
    else
      printf("\n{\"%s\", %s, %d, \nN_(\"%s\")},\n", name, help, atoi(args),
             def);
    defines[i] = strdup(num);
    i++;
  }
  printf("};\n");
  fprintf(stderr, "/* this file is auto generated, edit textevents.in instead! "
                  "*/\n\nenum\n{\n");
  max = i;
  i = 0;
  while (i < max) {
    if (i + 1 < max) {
      fprintf(stderr, "\t%s,\t\t%s,\n", defines[i], defines[i + 1]);
      free(defines[i]);
      i++;
    } else
      fprintf(stderr, "\t%s,\n", defines[i]);
    free(defines[i]);
    i++;
  }
  fprintf(stderr, "\tNUM_XP\n};\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c14(%rbp)
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x210(%rbp),%rdi
mov    0x2e40(%rip),%rax
mov    (%rax),%edx
mov    $0x200,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     13a8 <main+0x238>
lea    -0x210(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x210(%rbp,%rax,1)
lea    -0x410(%rbp),%rdi
mov    0x2e03(%rip),%rax
mov    (%rax),%edx
mov    $0x200,%esi
call   1060 <fgets@plt>
lea    -0x410(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x410(%rbp,%rax,1)
lea    -0x610(%rbp),%rdi
mov    0x2dd0(%rip),%rax
mov    (%rax),%edx
mov    $0x200,%esi
call   1060 <fgets@plt>
lea    -0x610(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x610(%rbp,%rax,1)
lea    -0x810(%rbp),%rdi
mov    0x2d9d(%rip),%rax
mov    (%rax),%edx
mov    $0x200,%esi
call   1060 <fgets@plt>
lea    -0x810(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x810(%rbp,%rax,1)
lea    -0xa10(%rbp),%rdi
mov    0x2d6a(%rip),%rax
mov    (%rax),%edx
mov    $0x200,%esi
call   1060 <fgets@plt>
lea    -0xa10(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0xa10(%rbp,%rax,1)
lea    -0xc10(%rbp),%rdi
mov    0x2d37(%rip),%rax
mov    (%rax),%edx
mov    $0x200,%esi
call   1060 <fgets@plt>
movsbl -0xa10(%rbp),%eax
cmp    $0x6e,%eax
jne    1329 <main+0x1b9>
lea    -0x210(%rbp),%rax
mov    %rax,-0x1c28(%rbp)
lea    -0x610(%rbp),%rax
mov    %rax,-0x1c20(%rbp)
lea    -0xa10(%rbp),%rdi
add    $0x1,%rdi
call   1080 <atoi@plt>
mov    -0x1c28(%rbp),%rsi
mov    -0x1c20(%rbp),%rdx
mov    %eax,%ecx
or     $0x80,%ecx
lea    -0x810(%rbp),%r8
lea    0xd45(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1376 <main+0x206>
lea    -0x210(%rbp),%rax
mov    %rax,-0x1c38(%rbp)
lea    -0x610(%rbp),%rax
mov    %rax,-0x1c30(%rbp)
lea    -0xa10(%rbp),%rdi
call   1080 <atoi@plt>
mov    -0x1c38(%rbp),%rsi
mov    -0x1c30(%rbp),%rdx
mov    %eax,%ecx
lea    -0x810(%rbp),%r8
lea    0xd0c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x410(%rbp),%rdi
call   1090 <strdup@plt>
mov    %rax,%rcx
movslq -0x1c14(%rbp),%rax
mov    %rcx,-0x1c10(%rbp,%rax,8)
ff
mov    -0x1c14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c14(%rbp)
jmp    119a <main+0x2a>
lea    0xd44(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2c1b(%rip),%rax
mov    (%rax),%edi
lea    0xcd2(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x1c14(%rbp),%eax
mov    %eax,-0x1c18(%rbp)
movl   $0x0,-0x1c14(%rbp)
mov    -0x1c14(%rbp),%eax
cmp    -0x1c18(%rbp),%eax
jge    14b9 <main+0x349>
mov    -0x1c14(%rbp),%eax
add    $0x1,%eax
cmp    -0x1c18(%rbp),%eax
jge    146b <main+0x2fb>
mov    0x2bc7(%rip),%rax
mov    (%rax),%edi
movslq -0x1c14(%rbp),%rax
mov    -0x1c10(%rbp,%rax,8),%rdx
ff
mov    -0x1c14(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x1c10(%rbp,%rax,8),%rcx
ff
lea    0xca4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movslq -0x1c14(%rbp),%rax
mov    -0x1c10(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
mov    -0x1c14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c14(%rbp)
jmp    1491 <main+0x321>
mov    0x2b66(%rip),%rax
mov    (%rax),%edi
movslq -0x1c14(%rbp),%rax
mov    -0x1c10(%rbp,%rax,8),%rdx
ff
lea    0xc5b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movslq -0x1c14(%rbp),%rax
mov    -0x1c10(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
mov    -0x1c14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c14(%rbp)
jmp    13e3 <main+0x273>
mov    0x2b18(%rip),%rax
mov    (%rax),%edi
lea    0xc22(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
xor    %eax,%eax
add    $0x1c40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1c08,%rsp
lea    0xefd(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e44(%rip),%rbx
mov    (%rbx),%edx
lea    0xa00(%rsp),%r15
mov    %r15,%rdi
mov    $0x200,%esi
call   1070 <fgets@plt>
test   %rax,%rax
je     1311 <main+0x191>
lea    0x200(%rsp),%rbp
lea    0x800(%rsp),%r12
xor    %r14d,%r14d
jmp    123f <main+0xbf>
nopl   0x0(%rax)
mov    %r15,%rdi
call   1090 <atoi@plt>
lea    0xe2a(%rip),%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
mov    %eax,%ecx
mov    %r13,%r8
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%r15
lea    0x200(%rsp),%rbp
mov    %rbp,%rdi
call   10a0 <strdup@plt>
mov    %rax,0xc00(%rsp,%r14,8)
add    $0x1,%r14
mov    0x2dc1(%rip),%rbx
mov    (%rbx),%edx
mov    %r15,%rdi
mov    $0x200,%esi
call   1070 <fgets@plt>
test   %rax,%rax
je     1314 <main+0x194>
mov    %r15,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r15,1)
mov    (%rbx),%edx
mov    %rbp,%rdi
mov    $0x200,%esi
call   1070 <fgets@plt>
mov    %rbp,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbp,1)
mov    (%rbx),%edx
mov    %r12,%rdi
mov    $0x200,%esi
call   1070 <fgets@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r12,1)
mov    (%rbx),%edx
lea    0x600(%rsp),%r13
mov    %r13,%rdi
mov    $0x200,%esi
call   1070 <fgets@plt>
mov    %r13,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r13,1)
mov    (%rbx),%edx
mov    %r15,%rbp
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x200,%esi
call   1070 <fgets@plt>
mov    %r15,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r15,1)
mov    (%rbx),%edx
lea    0x400(%rsp),%rdi
mov    $0x200,%esi
call   1070 <fgets@plt>
cmpb   $0x6e,(%rsp)
jne    11e0 <main+0x60>
lea    0x1(%rsp),%rdi
call   1090 <atoi@plt>
or     $0x80,%eax
lea    0xcf4(%rip),%rdi
jmp    11ef <main+0x6f>
xor    %r14d,%r14d
lea    0xddb(%rip),%rdi
call   1040 <puts@plt>
mov    0x2cb1(%rip),%r13
mov    0x0(%r13),%edi
lea    0xd04(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
test   %r14d,%r14d
jle    13bd <main+0x23d>
xor    %r12d,%r12d
jmp    1371 <main+0x1f1>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xd2c(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r15d,%r12d
cmp    %r14d,%r15d
jge    13bd <main+0x23d>
lea    0x1(%r12),%r15d
mov    0x0(%r13),%edi
movslq %r12d,%rax
mov    0xc00(%rsp,%rax,8),%rbx
cmp    %r14d,%r15d
jge    1350 <main+0x1d0>
movslq %r15d,%rax
mov    0xc00(%rsp,%rax,8),%rbp
lea    0xce2(%rip),%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
add    $0x2,%r12d
mov    %r12d,%r15d
mov    %rbp,%rbx
jmp    1361 <main+0x1e1>
mov    0x0(%r13),%edi
lea    0xcc1(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
xor    %eax,%eax
add    $0x1c08,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [98 x i8] c"/* this file is auto generated, edit textevents.in instead! */\0A\0Aconst struct text_event te[] = {\0A\00"
@stdin = global i32 0
@.str.1 = [25 x i8] c"\0A{\22%s\22, %s, %d, \0A\22%s\22},\0A\00"
@.str.2 = [29 x i8] c"\0A{\22%s\22, %s, %d, \0AN_(\22%s\22)},\0A\00"
@.str.3 = [4 x i8] c"};\0A\00"
@stderr = global i32 0
@.str.4 = [72 x i8] c"/* this file is auto generated, edit textevents.in instead! */\0A\0Aenum\0A{\0A\00"
@.str.5 = [11 x i8] c"\09%s,\09\09%s,\0A\00"
@.str.6 = [6 x i8] c"\09%s,\0A\00"
@.str.7 = [12 x i8] c"\09NUM_XP\0A};\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [512 x i8]
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = alloca [512 x i8]
%8 = alloca [512 x i8*]
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %78, %0
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%14 = load i32, i32* @stdin
%15 = call i64 @fgets(i8* %13, i32 512, i32 %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %86
17: ; preds = %12
%18 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%19 = call i32 @strlen(i8* %18)
%20 = sub nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 %21
store i8 0, i8* %22
%23 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%24 = load i32, i32* @stdin
%25 = call i64 @fgets(i8* %23, i32 512, i32 %24)
%26 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%27 = call i32 @strlen(i8* %26)
%28 = sub nsw i32 %27, 1
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 %29
store i8 0, i8* %30
%31 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%32 = load i32, i32* @stdin
%33 = call i64 @fgets(i8* %31, i32 512, i32 %32)
%34 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%35 = call i32 @strlen(i8* %34)
%36 = sub nsw i32 %35, 1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 %37
store i8 0, i8* %38
%39 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%40 = load i32, i32* @stdin
%41 = call i64 @fgets(i8* %39, i32 512, i32 %40)
%42 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%43 = call i32 @strlen(i8* %42)
%44 = sub nsw i32 %43, 1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 %45
store i8 0, i8* %46
%47 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%48 = load i32, i32* @stdin
%49 = call i64 @fgets(i8* %47, i32 512, i32 %48)
%50 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%51 = call i32 @strlen(i8* %50)
%52 = sub nsw i32 %51, 1
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 %53
store i8 0, i8* %54
%55 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%56 = load i32, i32* @stdin
%57 = call i64 @fgets(i8* %55, i32 512, i32 %56)
%58 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = icmp eq i32 %60, 110
br i1 %61, label %62, label %71
62: ; preds = %17
%63 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%64 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%65 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%66 = getelementptr inbounds i8, i8* %65, i64 1
%67 = call i32 @atoi(i8* %66)
%68 = or i32 %67, 128
%69 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %63, i8* %64, i32 %68, i8* %69)
br label %78
71: ; preds = %17
%72 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%73 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%74 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%75 = call i32 @atoi(i8* %74)
%76 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %72, i8* %73, i32 %75, i8* %76)
br label %78
78: ; preds = %71, %62
%79 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%80 = call i8* @strdup(i8* %79)
%81 = load i32, i32* %9
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [512 x i8*], [512 x i8*]* %8, i64 0, i64 %82
store i8* %80, i8** %83
%84 = load i32, i32* %9
%85 = add nsw i32 %84, 1
store i32 %85, i32* %9
br label %12
86: ; preds = %12
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%88 = load i32, i32* @stderr
%89 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.4, i64 0, i64 0))
%90 = load i32, i32* %9
store i32 %90, i32* %10
store i32 0, i32* %9
br label %91
91: ; preds = %126, %86
%92 = load i32, i32* %9
%93 = load i32, i32* %10
%94 = icmp slt i32 %92, %93
br i1 %94, label %95, label %134
95: ; preds = %91
%96 = load i32, i32* %9
%97 = add nsw i32 %96, 1
%98 = load i32, i32* %10
%99 = icmp slt i32 %97, %98
br i1 %99, label %100, label %119
100: ; preds = %95
%101 = load i32, i32* @stderr
%102 = load i32, i32* %9
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [512 x i8*], [512 x i8*]* %8, i64 0, i64 %103
%105 = load i8*, i8** %104
%106 = load i32, i32* %9
%107 = add nsw i32 %106, 1
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [512 x i8*], [512 x i8*]* %8, i64 0, i64 %108
%110 = load i8*, i8** %109
%111 = call i32 (i32, i8*, ...) @fprintf(i32 %101, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %105, i8* %110)
%112 = load i32, i32* %9
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [512 x i8*], [512 x i8*]* %8, i64 0, i64 %113
%115 = load i8*, i8** %114
%116 = call i32 @free(i8* %115)
%117 = load i32, i32* %9
%118 = add nsw i32 %117, 1
store i32 %118, i32* %9
br label %126
119: ; preds = %95
%120 = load i32, i32* @stderr
%121 = load i32, i32* %9
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [512 x i8*], [512 x i8*]* %8, i64 0, i64 %122
%124 = load i8*, i8** %123
%125 = call i32 (i32, i8*, ...) @fprintf(i32 %120, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %124)
br label %126
126: ; preds = %119, %100
%127 = load i32, i32* %9
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [512 x i8*], [512 x i8*]* %8, i64 0, i64 %128
%130 = load i8*, i8** %129
%131 = call i32 @free(i8* %130)
%132 = load i32, i32* %9
%133 = add nsw i32 %132, 1
store i32 %133, i32* %9
br label %91
134: ; preds = %91
%135 = load i32, i32* @stderr
%136 = call i32 (i32, i8*, ...) @fprintf(i32 %135, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str.1 = [25 x i8] c"\0A{\22%s\22, %s, %d, \0A\22%s\22},\0A\00"
@.str.2 = [29 x i8] c"\0A{\22%s\22, %s, %d, \0AN_(\22%s\22)},\0A\00"
@stderr = global i32 0
@.str.4 = [72 x i8] c"/* this file is auto generated, edit textevents.in instead! */\0A\0Aenum\0A{\0A\00"
@.str.5 = [11 x i8] c"\09%s,\09\09%s,\0A\00"
@.str.6 = [6 x i8] c"\09%s,\0A\00"
@.str.7 = [12 x i8] c"\09NUM_XP\0A};\0A\00"
@str = [97 x i8] c"/* this file is auto generated, edit textevents.in instead! */\0A\0Aconst struct text_event te[] = {\00"
@str.8 = [3 x i8] c"};\00"
define i32 @main() {
%1 = alloca [512 x i8]
%2 = alloca [512 x i8]
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = alloca [512 x i8*]
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%14 = bitcast [512 x i8*]* %7 to i8*
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @str, i64 0, i64 0))
%16 = load i32, i32* @stdin
%17 = call i64 @fgets(i8* %8, i32 512, i32 %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %71, label %19
19: ; preds = %0
%20 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 1
br label %21
21: ; preds = %19, %62
%22 = phi i64 [ 0, %19 ], [ %65, %62 ]
%23 = call i32 @strlen(i8* %8)
%24 = add nsw i32 %23, -1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %25
store i8 0, i8* %26
%27 = load i32, i32* @stdin
%28 = call i64 @fgets(i8* %9, i32 512, i32 %27)
%29 = call i32 @strlen(i8* %9)
%30 = add nsw i32 %29, -1
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 %31
store i8 0, i8* %32
%33 = load i32, i32* @stdin
%34 = call i64 @fgets(i8* %10, i32 512, i32 %33)
%35 = call i32 @strlen(i8* %10)
%36 = add nsw i32 %35, -1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 %37
store i8 0, i8* %38
%39 = load i32, i32* @stdin
%40 = call i64 @fgets(i8* %11, i32 512, i32 %39)
%41 = call i32 @strlen(i8* %11)
%42 = add nsw i32 %41, -1
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 %43
store i8 0, i8* %44
%45 = load i32, i32* @stdin
%46 = call i64 @fgets(i8* %12, i32 512, i32 %45)
%47 = call i32 @strlen(i8* %12)
%48 = add nsw i32 %47, -1
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 %49
store i8 0, i8* %50
%51 = load i32, i32* @stdin
%52 = call i64 @fgets(i8* %13, i32 512, i32 %51)
%53 = load i8, i8* %12
%54 = icmp eq i8 %53, 110
br i1 %54, label %55, label %59
55: ; preds = %21
%56 = call i32 @atoi(i8* %20)
%57 = or i32 %56, 128
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %10, i32 %57, i8* %11)
br label %62
59: ; preds = %21
%60 = call i32 @atoi(i8* %12)
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %8, i8* %10, i32 %60, i8* %11)
br label %62
62: ; preds = %59, %55
%63 = call i8* @strdup(i8* %9)
%64 = getelementptr inbounds [512 x i8*], [512 x i8*]* %7, i64 0, i64 %22
store i8* %63, i8** %64
%65 = add nuw i64 %22, 1
%66 = load i32, i32* @stdin
%67 = call i64 @fgets(i8* %8, i32 512, i32 %66)
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %21
69: ; preds = %62
%70 = trunc i64 %65 to i32
br label %71
71: ; preds = %69, %0
%72 = phi i32 [ 0, %0 ], [ %70, %69 ]
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.8, i64 0, i64 0))
%74 = load i32, i32* @stderr
%75 = call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.4, i64 0, i64 0))
%76 = icmp sgt i32 %72, 0
br i1 %76, label %77, label %99
77: ; preds = %71, %94
%78 = phi i32 [ %95, %94 ], [ 0, %71 ]
%79 = add nsw i32 %78, 1
%80 = icmp slt i32 %79, %72
%81 = load i32, i32* @stderr
%82 = sext i32 %78 to i64
%83 = getelementptr inbounds [512 x i8*], [512 x i8*]* %7, i64 0, i64 %82
%84 = load i8*, i8** %83
br i1 %80, label %85, label %92
85: ; preds = %77
%86 = sext i32 %79 to i64
%87 = getelementptr inbounds [512 x i8*], [512 x i8*]* %7, i64 0, i64 %86
%88 = load i8*, i8** %87
%89 = call i32 (i32, i8*, ...) @fprintf(i32 %81, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %84, i8* %88)
%90 = call i32 @free(i8* %84)
%91 = add nsw i32 %78, 2
br label %94
92: ; preds = %77
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %81, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %84)
br label %94
94: ; preds = %92, %85
%95 = phi i32 [ %79, %92 ], [ %91, %85 ]
%96 = phi i8* [ %84, %92 ], [ %88, %85 ]
%97 = call i32 @free(i8* %96)
%98 = icmp slt i32 %95, %72
br i1 %98, label %77, label %99
99: ; preds = %94, %71
%100 = load i32, i32* @stderr
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}