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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int sscanf(char *, char *, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ stdout;
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int undrop(int argc, char *argv[]) {
  FILE *userfile;
  char username[11];
  char password[13];
  char flags[32];
  char t_username[512];
  char t_flags[512];
  char t_line[512];
  if (argc != 2) {
    userfile = stdin;
    printf("# userfile reading from stdin\n");
  } else {
    if ((userfile = fopen(argv[1], "rt")) == NULL) {
      fprintf(stderr, "opening userfile\n");
      userfile = stdin;
    }
  }
  if (fgets(t_line, sizeof(t_line) - 1, userfile) == NULL)
    return 1;
  if (strncmp(t_line, "#4v:", strlen("#4v:")) != 0) {
    fprintf(stderr, "usefile format is wrong\n");
    fclose(userfile);
    return 1;
  } else {
    printf("# userfile format OK\n\n");
  }
  while (fgets(t_line, sizeof(t_line) - 1, userfile) != NULL) {
    if (sscanf(t_line, "%10s - %24s\n", t_username, t_flags) == 2) {
      if (strncmp(t_username, "! ", 2) != 0 &&
          strncmp(t_username, "--", 2) != 0 &&
          strncmp(t_username, "&&", 2) != 0 &&
          strncmp(t_username, "::", 2) != 0 &&
          strncmp(t_username, "$$", 2) != 0) {
        strncpy(username, t_username, 11);
        strncpy(flags, t_flags, 32);
      }
    }
    if (strncmp(t_line, "--PASS +", 8) == 0) {
      sscanf(t_line, "--PASS %12s", password);
      printf("%s:%s:::%s:\n", username, password, flags);
    }
    fflush(stdout);
  }
  fclose(userfile);
  return 0;
}


x86 assembly (clang, -O0):
<undrop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x660,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11dd <undrop+0x3d>
mov    0x2e25(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    1227 <undrop+0x87>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe33(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1222 <undrop+0x82>
mov    0x2dd2(%rip),%rax
mov    (%rax),%edi
lea    0xe13(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2dcd(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1227 <undrop+0x87>
lea    -0x650(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x1ff,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
jne    1252 <undrop+0xb2>
movl   $0x1,-0x4(%rbp)
jmp    1464 <undrop+0x2c4>
lea    -0x650(%rbp),%rax
mov    %rax,-0x658(%rbp)
lea    0xdcd(%rip),%rdi
call   1060 <strlen@plt>
mov    -0x658(%rbp),%rdi
mov    %eax,%edx
lea    0xdb8(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     12b5 <undrop+0x115>
mov    0x2d46(%rip),%rax
mov    (%rax),%edi
lea    0xd9e(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1464 <undrop+0x2c4>
lea    0xd96(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    12c8 <undrop+0x128>
lea    -0x650(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x1ff,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     1454 <undrop+0x2b4>
lea    -0x650(%rbp),%rdi
lea    -0x250(%rbp),%rdx
lea    -0x450(%rbp),%rcx
lea    0xd66(%rip),%rsi
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jne    13ec <undrop+0x24c>
lea    -0x250(%rbp),%rdi
lea    0xd55(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     13e7 <undrop+0x247>
lea    -0x250(%rbp),%rdi
lea    0xd36(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     13e7 <undrop+0x247>
lea    -0x250(%rbp),%rdi
lea    0xd17(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     13e7 <undrop+0x247>
lea    -0x250(%rbp),%rdi
lea    0xcf8(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     13e7 <undrop+0x247>
lea    -0x250(%rbp),%rdi
lea    0xcd9(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     13e7 <undrop+0x247>
lea    -0x23(%rbp),%rdi
lea    -0x250(%rbp),%rsi
mov    $0xb,%edx
call   1030 <strncpy@plt>
lea    -0x50(%rbp),%rdi
lea    -0x450(%rbp),%rsi
mov    $0x20,%edx
call   1030 <strncpy@plt>
jmp    13ec <undrop+0x24c>
lea    -0x650(%rbp),%rdi
lea    0xc8b(%rip),%rsi
mov    $0x8,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1441 <undrop+0x2a1>
lea    -0x650(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xc6e(%rip),%rsi
mov    $0x0,%al
call   10b0 <sscanf@plt>
lea    -0x23(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x50(%rbp),%rcx
lea    0xc60(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2b88(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
jmp    12c8 <undrop+0x128>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x660,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<undrop>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x648,%rsp
cmp    $0x2,%edi
jne    11ff <undrop+0x4f>
mov    0x8(%rsi),%rdi
lea    0xe2f(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%r15
test   %rax,%rax
jne    1215 <undrop+0x65>
mov    0x2df3(%rip),%rax
mov    (%rax),%edi
lea    0xe15(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2dee(%rip),%rax
mov    (%rax),%r15
jmp    1215 <undrop+0x65>
mov    0x2de2(%rip),%rax
mov    (%rax),%r15
lea    0xe77(%rip),%rdi
call   1050 <puts@plt>
lea    0x40(%rsp),%rdi
mov    $0x1ff,%esi
mov    %r15,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     126e <undrop+0xbe>
lea    0xde2(%rip),%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
lea    0x40(%rsp),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1278 <undrop+0xc8>
mov    0x2d82(%rip),%rax
mov    (%rax),%edi
lea    0xdbb(%rip),%rsi
call   10a0 <fprintf@plt>
mov    $0x1,%ebx
jmp    1432 <undrop+0x282>
mov    $0x1,%ebx
jmp    143a <undrop+0x28a>
lea    0xdf2(%rip),%rdi
call   1050 <puts@plt>
lea    0x40(%rsp),%rdi
mov    $0x1ff,%esi
mov    %r15,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     1430 <undrop+0x280>
lea    0x40(%rsp),%r14
lea    0x440(%rsp),%r12
lea    0x240(%rsp),%rbp
lea    0xd94(%rip),%rbx
mov    0x2d0e(%rip),%r13
jmp    130b <undrop+0x15b>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13e0 <undrop+0x230>
mov    0x0(%r13),%edi
call   10b0 <fflush@plt>
mov    %r14,%rdi
mov    $0x1ff,%esi
mov    %r15,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     1430 <undrop+0x280>
mov    %r14,%rdi
lea    0xd1e(%rip),%rsi
mov    %r12,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   10c0 <sscanf@plt>
cmp    $0x2,%eax
jne    12d0 <undrop+0x120>
mov    %r12,%rdi
lea    0xd0f(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     12d0 <undrop+0x120>
mov    %r12,%rdi
lea    0xcf9(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     12d0 <undrop+0x120>
mov    %r12,%rdi
lea    0xcdf(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     12d0 <undrop+0x120>
mov    %r12,%rdi
lea    0xcc5(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     12d0 <undrop+0x120>
mov    %r12,%rdi
lea    0xcab(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     12d0 <undrop+0x120>
lea    0x8(%rsp),%rdi
mov    %r12,%rsi
mov    $0xb,%edx
call   1030 <strncpy@plt>
lea    0x20(%rsp),%rdi
mov    %rbp,%rsi
mov    $0x20,%edx
call   1030 <strncpy@plt>
jmp    12d0 <undrop+0x120>
nopl   (%rax)
mov    %r14,%rdi
lea    0xc6e(%rip),%rsi
mov    %r15,%r14
mov    %r12,%r15
mov    %r13,%r12
lea    0x13(%rsp),%r13
mov    %r13,%rdx
xor    %eax,%eax
call   10c0 <sscanf@plt>
lea    0xc5b(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %r13,%rdx
mov    %r12,%r13
mov    %r15,%r12
mov    %r14,%r15
lea    0x40(%rsp),%r14
lea    0x20(%rsp),%rcx
xor    %eax,%eax
call   1080 <printf@plt>
jmp    12e9 <undrop+0x139>
xor    %ebx,%ebx
mov    %r15,%rdi
call   1060 <fclose@plt>
mov    %ebx,%eax
add    $0x648,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32* null
@.str = [31 x i8] c"# userfile reading from stdin\0A\00"
@.str.1 = [3 x i8] c"rt\00"
@stderr = global i32 0
@.str.2 = [18 x i8] c"opening userfile\0A\00"
@.str.3 = [5 x i8] c"v:\00"
@.str.4 = [25 x i8] c"usefile format is wrong\0A\00"
@.str.5 = [23 x i8] c"# userfile format OK\0A\0A\00"
@.str.6 = [13 x i8] c"%10s - %24s\0A\00"
@.str.7 = [3 x i8] c"! \00"
@.str.8 = [3 x i8] c"--\00"
@.str.9 = [3 x i8] c"&&\00"
@.str.10 = [3 x i8] c"::\00"
@.str.11 = [3 x i8] c"$$\00"
@.str.12 = [9 x i8] c"--PASS +\00"
@.str.13 = [12 x i8] c"--PASS %12s\00"
@.str.14 = [13 x i8] c"%s:%s:::%s:\0A\00"
@stdout = global i32 0
define i32 @undrop(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [11 x i8]
%8 = alloca [13 x i8]
%9 = alloca [32 x i8]
%10 = alloca [512 x i8]
%11 = alloca [512 x i8]
%12 = alloca [512 x i8]
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 2
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = load i32*, i32** @stdin
store i32* %16, i32** %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %29
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32* @fopen(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %6
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %28
24: ; preds = %18
%25 = load i32, i32* @stderr
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%27 = load i32*, i32** @stdin
store i32* %27, i32** %6
br label %28
28: ; preds = %24, %18
br label %29
29: ; preds = %28, %15
%30 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%31 = load i32*, i32** %6
%32 = call i32* @fgets(i8* %30, i32 511, i32* %31)
%33 = icmp eq i32* %32, null
br i1 %33, label %34, label %35
34: ; preds = %29
store i32 1, i32* %3
br label %105
35: ; preds = %29
%36 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%37 = call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%38 = call i64 @strncmp(i8* %36, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %37)
%39 = icmp ne i64 %38, 0
br i1 %39, label %40, label %45
40: ; preds = %35
%41 = load i32, i32* @stderr
%42 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%43 = load i32*, i32** %6
%44 = call i32 @fclose(i32* %43)
store i32 1, i32* %3
br label %105
45: ; preds = %35
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %47
47: ; preds = %45
br label %48
48: ; preds = %99, %47
%49 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%50 = load i32*, i32** %6
%51 = call i32* @fgets(i8* %49, i32 511, i32* %50)
%52 = icmp ne i32* %51, null
br i1 %52, label %53, label %102
53: ; preds = %48
%54 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%55 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%56 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%57 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %54, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* %55, i8* %56)
%58 = icmp eq i32 %57, 2
br i1 %58, label %59, label %87
59: ; preds = %53
%60 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%61 = call i64 @strncmp(i8* %60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 2)
%62 = icmp ne i64 %61, 0
br i1 %62, label %63, label %86
63: ; preds = %59
%64 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%65 = call i64 @strncmp(i8* %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 2)
%66 = icmp ne i64 %65, 0
br i1 %66, label %67, label %86
67: ; preds = %63
%68 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%69 = call i64 @strncmp(i8* %68, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 2)
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %86
71: ; preds = %67
%72 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%73 = call i64 @strncmp(i8* %72, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 2)
%74 = icmp ne i64 %73, 0
br i1 %74, label %75, label %86
75: ; preds = %71
%76 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%77 = call i64 @strncmp(i8* %76, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32 2)
%78 = icmp ne i64 %77, 0
br i1 %78, label %79, label %86
79: ; preds = %75
%80 = getelementptr inbounds [11 x i8], [11 x i8]* %7, i64 0, i64 0
%81 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%82 = call i32 @strncpy(i8* %80, i8* %81, i32 11)
%83 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%84 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%85 = call i32 @strncpy(i8* %83, i8* %84, i32 32)
br label %86
86: ; preds = %79, %75, %71, %67, %63, %59
br label %87
87: ; preds = %86, %53
%88 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%89 = call i64 @strncmp(i8* %88, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i32 8)
%90 = icmp eq i64 %89, 0
br i1 %90, label %91, label %99
91: ; preds = %87
%92 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%93 = getelementptr inbounds [13 x i8], [13 x i8]* %8, i64 0, i64 0
%94 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %92, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %93)
%95 = getelementptr inbounds [11 x i8], [11 x i8]* %7, i64 0, i64 0
%96 = getelementptr inbounds [13 x i8], [13 x i8]* %8, i64 0, i64 0
%97 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), i8* %95, i8* %96, i8* %97)
br label %99
99: ; preds = %91, %87
%100 = load i32, i32* @stdout
%101 = call i32 @fflush(i32 %100)
br label %48
102: ; preds = %48
%103 = load i32*, i32** %6
%104 = call i32 @fclose(i32* %103)
store i32 0, i32* %3
br label %105
105: ; preds = %102, %40, %34
%106 = load i32, i32* %3
ret i32 %106
}

LLVM IR (-O2):
@stdin = global i32* null
@.str.1 = [3 x i8] c"rt\00"
@stderr = global i32 0
@.str.2 = [18 x i8] c"opening userfile\0A\00"
@.str.3 = [5 x i8] c"v:\00"
@.str.4 = [25 x i8] c"usefile format is wrong\0A\00"
@.str.6 = [13 x i8] c"%10s - %24s\0A\00"
@.str.7 = [3 x i8] c"! \00"
@.str.8 = [3 x i8] c"--\00"
@.str.9 = [3 x i8] c"&&\00"
@.str.10 = [3 x i8] c"::\00"
@.str.11 = [3 x i8] c"$$\00"
@.str.12 = [9 x i8] c"--PASS +\00"
@.str.13 = [12 x i8] c"--PASS %12s\00"
@.str.14 = [13 x i8] c"%s:%s:::%s:\0A\00"
@stdout = global i32 0
@str = [22 x i8] c"# userfile format OK\0A\00"
@str.15 = [30 x i8] c"# userfile reading from stdin\00"
define i32 @undrop(i32 %0, i8** nocapture %1) {
%3 = alloca [11 x i8]
%4 = alloca [13 x i8]
%5 = alloca [32 x i8]
%6 = alloca [512 x i8]
%7 = alloca [512 x i8]
%8 = alloca [512 x i8]
%9 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [13 x i8], [13 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%15 = icmp eq i32 %0, 2
br i1 %15, label %19, label %16
16: ; preds = %2
%17 = load i32*, i32** @stdin
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.15, i64 0, i64 0))
br label %28
19: ; preds = %2
%20 = getelementptr inbounds i8*, i8** %1, i64 1
%21 = load i8*, i8** %20
%22 = tail call i32* @fopen(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %28
24: ; preds = %19
%25 = load i32, i32* @stderr
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%27 = load i32*, i32** @stdin
br label %28
28: ; preds = %19, %24, %16
%29 = phi i32* [ %17, %16 ], [ %27, %24 ], [ %22, %19 ]
%30 = call i32* @fgets(i8* %14, i32 511, i32* %29)
%31 = icmp eq i32* %30, null
br i1 %31, label %78, label %32
32: ; preds = %28
%33 = call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%34 = call i64 @strncmp(i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %33)
%35 = icmp eq i64 %34, 0
br i1 %35, label %39, label %36
36: ; preds = %32
%37 = load i32, i32* @stderr
%38 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %75
39: ; preds = %32
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%41 = call i32* @fgets(i8* %14, i32 511, i32* %29)
%42 = icmp eq i32* %41, null
br i1 %42, label %75, label %43
43: ; preds = %39, %70
%44 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %14, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* %12, i8* %13)
%45 = icmp eq i32 %44, 2
br i1 %45, label %46, label %64
46: ; preds = %43
%47 = call i64 @strncmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 2)
%48 = icmp eq i64 %47, 0
br i1 %48, label %64, label %49
49: ; preds = %46
%50 = call i64 @strncmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 2)
%51 = icmp eq i64 %50, 0
br i1 %51, label %64, label %52
52: ; preds = %49
%53 = call i64 @strncmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 2)
%54 = icmp eq i64 %53, 0
br i1 %54, label %64, label %55
55: ; preds = %52
%56 = call i64 @strncmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 2)
%57 = icmp eq i64 %56, 0
br i1 %57, label %64, label %58
58: ; preds = %55
%59 = call i64 @strncmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32 2)
%60 = icmp eq i64 %59, 0
br i1 %60, label %64, label %61
61: ; preds = %58
%62 = call i32 @strncpy(i8* %9, i8* %12, i32 11)
%63 = call i32 @strncpy(i8* %11, i8* %13, i32 32)
br label %64
64: ; preds = %46, %49, %52, %55, %58, %61, %43
%65 = call i64 @strncmp(i8* %14, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i32 8)
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %70
67: ; preds = %64
%68 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %10)
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
br label %70
70: ; preds = %67, %64
%71 = load i32, i32* @stdout
%72 = call i32 @fflush(i32 %71)
%73 = call i32* @fgets(i8* %14, i32 511, i32* %29)
%74 = icmp eq i32* %73, null
br i1 %74, label %75, label %43
75: ; preds = %70, %39, %36
%76 = phi i32 [ 1, %36 ], [ 0, %39 ], [ 0, %70 ]
%77 = call i32 @fclose(i32* %29)
br label %78
78: ; preds = %75, %28
%79 = phi i32 [ 1, %28 ], [ %76, %75 ]
ret i32 %79
}