#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 */
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
scalar_t__ param_exist(char *, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ rm_comment(char *, char *);
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int check_tpl(char *fname) {
  FILE *fp;
  char sbuff[320];
  char line[320];
  char key1[9 + 1];
  char key2[6 + 1];
  char key3[5 + 1];
  int i;
  if ((fp = fopen(fname, "r")) == NULL) {
    printf("\ncheck_tpl(): failed oppening file \"%s\".\n", fname);
    return -1;
  }
  while (fgets(sbuff, 320 * sizeof(char), fp)) {
    memset(line, 0, 320 * sizeof(char));
    rm_comment(line, sbuff);
    if (strncmp(line, "ATOMNAME ", 9)) {
      for (i = strlen(line) - 1; i >= 0; i--) {
        if (line[i] == ' ')
          line[i] = '\0';
        else if (line[i] == '\t')
          line[i] = '\0';
        else
          break;
      }
    }
    if (strlen(line) < (9 + 6 + 5))
      continue;
    for (i = strlen(line) - 1; i >= 0; i--) {
      if (line[i] == '\t') {
        printf("\n   Tab charater is not recognized by MCCE\n");
        printf("   Please check line \"%s\" in file \"%s\" and replace tab "
               "with spaces\n",
               line, fname);
        return -1;
      }
    }
    strncpy(key1, line, 9);
    key1[9] = '\0';
    strncpy(key2, line + 9, 6);
    key2[6] = '\0';
    strncpy(key3, line + 9 + 6, 5);
    key3[5] = '\0';
    if (param_exist(key1, key2, key3)) {
      printf("\n   In file %s, parameter \"%s\" is already loaded somewhere "
             "else.\n",
             fname, line);
      printf("   Try delete this entry and run MCCE again\n");
      return 0;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_tpl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2c0,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe56(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    11db <check_tpl+0x4b>
mov    -0x10(%rbp),%rsi
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1455 <check_tpl+0x2c5>
jmp    11e0 <check_tpl+0x50>
lea    -0x160(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x140,%esi
call   10a0 <fgets@plt>
cmp    $0x0,%rax
je     144e <check_tpl+0x2be>
lea    -0x2a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x140,%edx
call   1090 <memset@plt>
lea    -0x2a0(%rbp),%rdi
lea    -0x160(%rbp),%rsi
call   1050 <rm_comment@plt>
lea    -0x2a0(%rbp),%rdi
lea    0xdf9(%rip),%rsi
mov    $0x9,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     12e9 <check_tpl+0x159>
lea    -0x2a0(%rbp),%rdi
call   1070 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x2bc(%rbp)
cmpl   $0x0,-0x2bc(%rbp)
jl     12e4 <check_tpl+0x154>
movslq -0x2bc(%rbp),%rax
movsbl -0x2a0(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1295 <check_tpl+0x105>
movslq -0x2bc(%rbp),%rax
movb   $0x0,-0x2a0(%rbp,%rax,1)
jmp    12cb <check_tpl+0x13b>
movslq -0x2bc(%rbp),%rax
movsbl -0x2a0(%rbp,%rax,1),%eax
ff
cmp    $0x9,%eax
jne    12c1 <check_tpl+0x131>
movslq -0x2bc(%rbp),%rax
movb   $0x0,-0x2a0(%rbp,%rax,1)
jmp    12c6 <check_tpl+0x136>
jmp    12e4 <check_tpl+0x154>
jmp    12cb <check_tpl+0x13b>
jmp    12d0 <check_tpl+0x140>
mov    -0x2bc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2bc(%rbp)
jmp    125c <check_tpl+0xcc>
jmp    12e9 <check_tpl+0x159>
lea    -0x2a0(%rbp),%rdi
call   1070 <strlen@plt>
cmp    $0x14,%eax
jge    1303 <check_tpl+0x173>
jmp    11e0 <check_tpl+0x50>
lea    -0x2a0(%rbp),%rdi
call   1070 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x2bc(%rbp)
cmpl   $0x0,-0x2bc(%rbp)
jl     1389 <check_tpl+0x1f9>
movslq -0x2bc(%rbp),%rax
movsbl -0x2a0(%rbp,%rax,1),%eax
ff
cmp    $0x9,%eax
jne    1370 <check_tpl+0x1e0>
lea    0xcf2(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x2a0(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xd05(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1455 <check_tpl+0x2c5>
jmp    1375 <check_tpl+0x1e5>
mov    -0x2bc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2bc(%rbp)
jmp    1318 <check_tpl+0x188>
lea    -0x2aa(%rbp),%rdi
lea    -0x2a0(%rbp),%rsi
mov    $0x9,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x2a1(%rbp)
lea    -0x2b1(%rbp),%rdi
lea    -0x2a0(%rbp),%rsi
add    $0x9,%rsi
mov    $0x6,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x2ab(%rbp)
lea    -0x2b7(%rbp),%rdi
lea    -0x2a0(%rbp),%rsi
add    $0x9,%rsi
add    $0x6,%rsi
mov    $0x5,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x2b2(%rbp)
lea    -0x2aa(%rbp),%rdi
lea    -0x2b1(%rbp),%rsi
lea    -0x2b7(%rbp),%rdx
call   1060 <param_exist@plt>
cmp    $0x0,%rax
je     1449 <check_tpl+0x2b9>
mov    -0x10(%rbp),%rsi
lea    -0x2a0(%rbp),%rdx
lea    0xc7e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xcb2(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1455 <check_tpl+0x2c5>
jmp    11e0 <check_tpl+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_tpl>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2a8,%rsp
mov    %rdi,%r15
lea    0xe45(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     11ff <check_tpl+0x5f>
mov    %rax,%r13
lea    0x160(%rsp),%rdi
mov    $0x140,%esi
mov    %rax,%rdx
call   10b0 <fgets@plt>
test   %rax,%rax
je     137c <check_tpl+0x1dc>
lea    0x20(%rsp),%r14
lea    0x160(%rsp),%rbx
lea    0xe32(%rip),%rbp
jmp    12a6 <check_tpl+0x106>
lea    0xdfc(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0xffffffff,%ebx
jmp    137e <check_tpl+0x1de>
nopw   0x0(%rax,%rax,1)
lea    0xf(%rsp),%rdi
mov    %r14,%rsi
mov    $0x9,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x18(%rsp)
mov    %r15,%r12
lea    0x19(%rsp),%r15
mov    %r15,%rdi
lea    0x29(%rsp),%rsi
mov    $0x6,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x1f(%rsp)
lea    0x9(%rsp),%rdi
lea    0x2f(%rsp),%rsi
mov    $0x5,%edx
call   1030 <strncpy@plt>
movb   $0x0,0xe(%rsp)
lea    0xf(%rsp),%rdi
mov    %r15,%rsi
mov    %r12,%r15
lea    0x9(%rsp),%rdx
call   1070 <param_exist@plt>
test   %rax,%rax
jne    1392 <check_tpl+0x1f2>
mov    %rbx,%rdi
mov    $0x140,%esi
mov    %r13,%rdx
call   10b0 <fgets@plt>
test   %rax,%rax
je     137c <check_tpl+0x1dc>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x140,%edx
call   10a0 <memset@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <rm_comment@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    $0x9,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1320 <check_tpl+0x180>
mov    %r14,%rdi
call   1080 <strlen@plt>
test   %eax,%eax
jle    1320 <check_tpl+0x180>
mov    %eax,%eax
add    $0x1,%rax
jmp    12ff <check_tpl+0x15f>
nopl   0x0(%rax)
movb   $0x0,0x20(%rsp,%rcx,1)
add    $0xffffffffffffffff,%rax
cmp    $0x1,%rax
jbe    1320 <check_tpl+0x180>
lea    -0x2(%rax),%ecx
movzbl 0x20(%rsp,%rcx,1),%edx
cmp    $0x20,%dl
je     12f0 <check_tpl+0x150>
cmp    $0x9,%dl
je     12f0 <check_tpl+0x150>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
cmp    $0x13,%eax
jle    128d <check_tpl+0xed>
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    %eax,%eax
nopl   0x0(%rax,%rax,1)
test   %eax,%eax
jle    1220 <check_tpl+0x80>
cmpb   $0x9,0x1f(%rsp,%rax,1)
lea    -0x1(%rax),%rax
jne    1340 <check_tpl+0x1a0>
lea    0xd8e(%rip),%rdi
call   1050 <puts@plt>
lea    0xcd0(%rip),%rdi
lea    0x20(%rsp),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0xffffffff,%ebx
jmp    137e <check_tpl+0x1de>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x2a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xce1(%rip),%rdi
xor    %ebx,%ebx
lea    0x20(%rsp),%rdx
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
lea    0xd0b(%rip),%rdi
call   1050 <puts@plt>
jmp    137e <check_tpl+0x1de>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [42 x i8] c"\0Acheck_tpl(): failed oppening file \22%s\22.\0A\00"
@.str.2 = [10 x i8] c"ATOMNAME \00"
@.str.3 = [44 x i8] c"\0A Tab charater is not recognized by MCCE\0A\00"
@.str.4 = [68 x i8] c" Please check line \22%s\22 in file \22%s\22 and replace tab with spaces\0A\00"
@.str.5 = [66 x i8] c"\0A In file %s, parameter \22%s\22 is already loaded somewhere else.\0A\00"
@.str.6 = [45 x i8] c" Try delete this entry and run MCCE again\0A\00"
define i32 @check_tpl(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca [320 x i8]
%6 = alloca [320 x i8]
%7 = alloca [10 x i8]
%8 = alloca [7 x i8]
%9 = alloca [6 x i8]
%10 = alloca i32
store i8* %0, i8** %3
%11 = load i8*, i8** %3
%12 = call i32* @fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %12, i32** %4
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %17
14: ; preds = %1
%15 = load i8*, i8** %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %15)
store i32 -1, i32* %2
br label %124
17: ; preds = %1
br label %18
18: ; preds = %122, %72, %17
%19 = getelementptr inbounds [320 x i8], [320 x i8]* %5, i64 0, i64 0
%20 = load i32*, i32** %4
%21 = call i64 @fgets(i8* %19, i32 320, i32* %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %123
23: ; preds = %18
%24 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%25 = call i32 @memset(i8* %24, i32 0, i32 320)
%26 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%27 = getelementptr inbounds [320 x i8], [320 x i8]* %5, i64 0, i64 0
%28 = call i32 @rm_comment(i8* %26, i8* %27)
%29 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%30 = call i64 @strncmp(i8* %29, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 9)
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %68
32: ; preds = %23
%33 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%34 = call i32 @strlen(i8* %33)
%35 = sub nsw i32 %34, 1
store i32 %35, i32* %10
br label %36
36: ; preds = %64, %32
%37 = load i32, i32* %10
%38 = icmp sge i32 %37, 0
br i1 %38, label %39, label %67
39: ; preds = %36
%40 = load i32, i32* %10
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 %41
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp eq i32 %44, 32
br i1 %45, label %46, label %50
46: ; preds = %39
%47 = load i32, i32* %10
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 %48
store i8 0, i8* %49
br label %63
50: ; preds = %39
%51 = load i32, i32* %10
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 %52
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 9
br i1 %56, label %57, label %61
57: ; preds = %50
%58 = load i32, i32* %10
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 %59
store i8 0, i8* %60
br label %62
61: ; preds = %50
br label %67
62: ; preds = %57
br label %63
63: ; preds = %62, %46
br label %64
64: ; preds = %63
%65 = load i32, i32* %10
%66 = add nsw i32 %65, -1
store i32 %66, i32* %10
br label %36
67: ; preds = %61, %36
br label %68
68: ; preds = %67, %23
%69 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%70 = call i32 @strlen(i8* %69)
%71 = icmp slt i32 %70, 20
br i1 %71, label %72, label %73
72: ; preds = %68
br label %18
73: ; preds = %68
%74 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%75 = call i32 @strlen(i8* %74)
%76 = sub nsw i32 %75, 1
store i32 %76, i32* %10
br label %77
77: ; preds = %93, %73
%78 = load i32, i32* %10
%79 = icmp sge i32 %78, 0
br i1 %79, label %80, label %96
80: ; preds = %77
%81 = load i32, i32* %10
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 %82
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp eq i32 %85, 9
br i1 %86, label %87, label %92
87: ; preds = %80
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%89 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%90 = load i8*, i8** %3
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0), i8* %89, i8* %90)
store i32 -1, i32* %2
br label %124
92: ; preds = %80
br label %93
93: ; preds = %92
%94 = load i32, i32* %10
%95 = add nsw i32 %94, -1
store i32 %95, i32* %10
br label %77
96: ; preds = %77
%97 = getelementptr inbounds [10 x i8], [10 x i8]* %7, i64 0, i64 0
%98 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%99 = call i32 @strncpy(i8* %97, i8* %98, i32 9)
%100 = getelementptr inbounds [10 x i8], [10 x i8]* %7, i64 0, i64 9
store i8 0, i8* %100
%101 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 0
%102 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%103 = getelementptr inbounds i8, i8* %102, i64 9
%104 = call i32 @strncpy(i8* %101, i8* %103, i32 6)
%105 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 6
store i8 0, i8* %105
%106 = getelementptr inbounds [6 x i8], [6 x i8]* %9, i64 0, i64 0
%107 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%108 = getelementptr inbounds i8, i8* %107, i64 9
%109 = getelementptr inbounds i8, i8* %108, i64 6
%110 = call i32 @strncpy(i8* %106, i8* %109, i32 5)
%111 = getelementptr inbounds [6 x i8], [6 x i8]* %9, i64 0, i64 5
store i8 0, i8* %111
%112 = getelementptr inbounds [10 x i8], [10 x i8]* %7, i64 0, i64 0
%113 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 0
%114 = getelementptr inbounds [6 x i8], [6 x i8]* %9, i64 0, i64 0
%115 = call i64 @param_exist(i8* %112, i8* %113, i8* %114)
%116 = icmp ne i64 %115, 0
br i1 %116, label %117, label %122
117: ; preds = %96
%118 = load i8*, i8** %3
%119 = getelementptr inbounds [320 x i8], [320 x i8]* %6, i64 0, i64 0
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.5, i64 0, i64 0), i8* %118, i8* %119)
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %2
br label %124
122: ; preds = %96
br label %18
123: ; preds = %18
store i32 0, i32* %2
br label %124
124: ; preds = %123, %117, %87, %14
%125 = load i32, i32* %2
ret i32 %125
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [42 x i8] c"\0Acheck_tpl(): failed oppening file \22%s\22.\0A\00"
@.str.2 = [10 x i8] c"ATOMNAME \00"
@.str.4 = [68 x i8] c" Please check line \22%s\22 in file \22%s\22 and replace tab with spaces\0A\00"
@.str.5 = [66 x i8] c"\0A In file %s, parameter \22%s\22 is already loaded somewhere else.\0A\00"
@str = [44 x i8] c" Try delete this entry and run MCCE again\00"
@str.7 = [43 x i8] c"\0A Tab charater is not recognized by MCCE\00"
define i32 @check_tpl(i8* %0) {
%2 = alloca [320 x i8]
%3 = alloca [320 x i8]
%4 = alloca [10 x i8]
%5 = alloca [7 x i8]
%6 = alloca [6 x i8]
%7 = getelementptr inbounds [320 x i8], [320 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [320 x i8], [320 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [7 x i8], [7 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%12 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %23, label %14
14: ; preds = %1
%15 = call i64 @fgets(i8* %7, i32 320, i32* %12)
%16 = icmp eq i64 %15, 0
br i1 %16, label %73, label %17
17: ; preds = %14
%18 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 9
%19 = getelementptr inbounds [320 x i8], [320 x i8]* %3, i64 0, i64 9
%20 = getelementptr inbounds [7 x i8], [7 x i8]* %5, i64 0, i64 6
%21 = getelementptr inbounds [320 x i8], [320 x i8]* %3, i64 0, i64 15
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 5
br label %25
23: ; preds = %1
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %73
25: ; preds = %17, %46
%26 = call i32 @memset(i8* %8, i32 0, i32 320)
%27 = call i32 @rm_comment(i8* %8, i8* %7)
%28 = call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 9)
%29 = icmp eq i64 %28, 0
br i1 %29, label %43, label %30
30: ; preds = %25
%31 = call i32 @strlen(i8* %8)
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %43
33: ; preds = %30
%34 = zext i32 %31 to i64
br label %35
35: ; preds = %33, %41
%36 = phi i64 [ %34, %33 ], [ %37, %41 ]
%37 = add nsw i64 %36, -1
%38 = and i64 %37, 4294967295
%39 = getelementptr inbounds [320 x i8], [320 x i8]* %3, i64 0, i64 %38
%40 = load i8, i8* %39
switch i8 %40, label %43 [
i8 32, label %41
i8 9, label %41
]
41: ; preds = %35, %35
store i8 0, i8* %39
%42 = icmp ugt i64 %36, 1
br i1 %42, label %35, label %43
43: ; preds = %41, %35, %30, %25
%44 = call i32 @strlen(i8* %8)
%45 = icmp slt i32 %44, 20
br i1 %45, label %46, label %49
46: ; preds = %43, %64
%47 = call i64 @fgets(i8* %7, i32 320, i32* %12)
%48 = icmp eq i64 %47, 0
br i1 %48, label %73, label %25
49: ; preds = %43
%50 = call i32 @strlen(i8* %8)
%51 = zext i32 %50 to i64
br label %52
52: ; preds = %57, %49
%53 = phi i64 [ %54, %57 ], [ %51, %49 ]
%54 = add nsw i64 %53, -1
%55 = trunc i64 %53 to i32
%56 = icmp sgt i32 %55, 0
br i1 %56, label %57, label %64
57: ; preds = %52
%58 = getelementptr inbounds [320 x i8], [320 x i8]* %3, i64 0, i64 %54
%59 = load i8, i8* %58
%60 = icmp eq i8 %59, 9
br i1 %60, label %61, label %52
61: ; preds = %57
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.7, i64 0, i64 0))
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0), i8* %8, i8* %0)
br label %73
64: ; preds = %52
%65 = call i32 @strncpy(i8* %9, i8* %8, i32 9)
store i8 0, i8* %18
%66 = call i32 @strncpy(i8* %10, i8* %19, i32 6)
store i8 0, i8* %20
%67 = call i32 @strncpy(i8* %11, i8* %21, i32 5)
store i8 0, i8* %22
%68 = call i64 @param_exist(i8* %9, i8* %10, i8* %11)
%69 = icmp eq i64 %68, 0
br i1 %69, label %46, label %70
70: ; preds = %64
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.5, i64 0, i64 0), i8* %0, i8* %8)
%72 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
br label %73
73: ; preds = %46, %14, %70, %61, %23
%74 = phi i32 [ -1, %23 ], [ -1, %61 ], [ 0, %70 ], [ 0, %14 ], [ 0, %46 ]
ret i32 %74
}