#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 */

/* Variables and functions */
scalar_t__ CheckSum(char *);
scalar_t__ atoi(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *strtok(char *, char *);
int main() {
  char isbn[20], token[5][10], dashlessISBN[14],
      publisherList[2][4][50] = {{"933346", "55583", "4210", "01"},
                                 {"Bluebridge", "Alyson Books",
                                  "FUNimation Productions, Ltd.",
                                  "Pyramid Books"}};
  char *tempToken;
  int i;
  scanf("%s", isbn);
  if (strlen(isbn) != 17) {
    printf("0");
    return 0;
  }
  tempToken = strtok(isbn, "-");
  for (i = 0; tempToken != NULL; i++) {
    strcpy(token[i], tempToken);
    tempToken = strtok(NULL, "-");
  }
  if (tempToken != NULL ||
      (strcmp(token[0], "978") != 0 && strcmp(token[0], "979") != 0)) {
    printf("0");
    return 0;
  }
  i = 0;
  strcpy(dashlessISBN, token[i]);
  i++;
  for (; i < 4; i++) {
    strcat(dashlessISBN, token[i]);
  }
  dashlessISBN[13] = 0;
  if (atoi(token[i]) != CheckSum(dashlessISBN)) {
    printf("0");
    return 0;
  }
  printf("1");
  for (i = 0; i < 4; i++) {
    if (strcmp(token[2], publisherList[0][i]) == 0) {
      printf("\n%s", publisherList[1][i]);
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x200(%rbp),%rdi
lea    0xe40(%rip),%rsi
mov    $0x190,%edx
call   1070 <memcpy@plt>
lea    -0x20(%rbp),%rsi
lea    0xfca(%rip),%rdi
call   1090 <scanf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x11,%eax
je     1206 <main+0x66>
lea    0xf9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1442 <main+0x2a2>
lea    -0x20(%rbp),%rdi
lea    0xf81(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0x208(%rbp)
movl   $0x0,-0x20c(%rbp)
cmpq   $0x0,-0x208(%rbp)
je     127e <main+0xde>
movslq -0x20c(%rbp),%rax
lea    -0x60(%rbp),%rdi
imul   $0xa,%rax,%rax
add    %rax,%rdi
mov    -0x208(%rbp),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xf34(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0x208(%rbp)
mov    -0x20c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20c(%rbp)
jmp    1227 <main+0x87>
cmpq   $0x0,-0x208(%rbp)
jne    12c0 <main+0x120>
lea    -0x60(%rbp),%rdi
lea    0xefd(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     12da <main+0x13a>
lea    -0x60(%rbp),%rdi
lea    0xee7(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     12da <main+0x13a>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1442 <main+0x2a2>
movl   $0x0,-0x20c(%rbp)
lea    -0x6e(%rbp),%rdi
movslq -0x20c(%rbp),%rax
lea    -0x60(%rbp),%rsi
imul   $0xa,%rax,%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
mov    -0x20c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20c(%rbp)
cmpl   $0x4,-0x20c(%rbp)
jge    134a <main+0x1aa>
lea    -0x6e(%rbp),%rdi
movslq -0x20c(%rbp),%rax
lea    -0x60(%rbp),%rsi
imul   $0xa,%rax,%rax
add    %rax,%rsi
call   10c0 <strcat@plt>
mov    -0x20c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20c(%rbp)
jmp    130e <main+0x16e>
movb   $0x0,-0x61(%rbp)
movslq -0x20c(%rbp),%rax
lea    -0x60(%rbp),%rdi
imul   $0xa,%rax,%rax
add    %rax,%rdi
call   10b0 <atoi@plt>
mov    %rax,-0x218(%rbp)
lea    -0x6e(%rbp),%rdi
call   1080 <CheckSum@plt>
mov    %rax,%rcx
mov    -0x218(%rbp),%rax
cmp    %rcx,%rax
je     13a2 <main+0x202>
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1442 <main+0x2a2>
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x20c(%rbp)
cmpl   $0x4,-0x20c(%rbp)
jge    143b <main+0x29b>
lea    -0x60(%rbp),%rdi
add    $0x14,%rdi
lea    -0x200(%rbp),%rsi
movslq -0x20c(%rbp),%rax
imul   $0x32,%rax,%rax
add    %rax,%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1422 <main+0x282>
lea    -0x200(%rbp),%rsi
add    $0xc8,%rsi
movslq -0x20c(%rbp),%rax
imul   $0x32,%rax,%rax
add    %rax,%rsi
lea    0xd88(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    143b <main+0x29b>
jmp    1427 <main+0x287>
mov    -0x20c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20c(%rbp)
jmp    13ba <main+0x21a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x1f0,%rsp
lea    0xe3d(%rip),%rsi
lea    0x60(%rsp),%rdi
mov    $0x190,%edx
call   1080 <memcpy@plt>
lea    0xfc2(%rip),%rdi
lea    0x40(%rsp),%rbx
mov    %rbx,%rsi
call   10a0 <scanf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cmp    $0x11,%eax
jne    1325 <main+0x175>
lea    0xf92(%rip),%rsi
lea    0x40(%rsp),%rdi
call   10b0 <strtok@plt>
test   %rax,%rax
je     123e <main+0x8e>
mov    %rsp,%rbx
lea    0xf79(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <strcpy@plt>
xor    %edi,%edi
mov    %r14,%rsi
call   10b0 <strtok@plt>
add    $0xa,%rbx
test   %rax,%rax
jne    1220 <main+0x70>
lea    0xf4d(%rip),%rsi
mov    %rsp,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     126a <main+0xba>
lea    0xf3d(%rip),%rsi
mov    %rsp,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1325 <main+0x175>
lea    0x32(%rsp),%r15
mov    %rsp,%rsi
mov    %r15,%rdi
call   1040 <strcpy@plt>
lea    0xa(%rsp),%rsi
mov    %r15,%rdi
call   10d0 <strcat@plt>
lea    0x14(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   10d0 <strcat@plt>
lea    0x1e(%rsp),%rsi
mov    %r15,%rdi
call   10d0 <strcat@plt>
movb   $0x0,0x3f(%rsp)
lea    0x28(%rsp),%rdi
call   10c0 <atoi@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1090 <CheckSum@plt>
cmp    %rax,%rbx
jne    1325 <main+0x175>
mov    $0x31,%edi
call   1030 <putchar@plt>
lea    0x60(%rsp),%rsi
mov    %r14,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     133e <main+0x18e>
lea    0x92(%rsp),%rsi
mov    %r14,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1342 <main+0x192>
lea    0xc4(%rsp),%rsi
mov    %r14,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1349 <main+0x199>
lea    0xf6(%rsp),%rsi
mov    %r14,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    132f <main+0x17f>
mov    $0x3,%eax
jmp    134e <main+0x19e>
mov    $0x30,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x1f0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
xor    %eax,%eax
jmp    134e <main+0x19e>
mov    $0x1,%eax
jmp    134e <main+0x19e>
mov    $0x2,%eax
imul   $0x32,%rax,%rax
lea    (%rsp,%rax,1),%rsi
add    $0x128,%rsi
lea    0xe36(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    132f <main+0x17f>

LLVM IR (-O0):
@__const.main.publisherList = [2 x [4 x [50 x i8]]] [[4 x [50 x i8]] [[50 x i8] c"933346\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"55583\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"4210\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"], [4 x [50 x i8]] [[50 x i8] c"Bluebridge\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Alyson Books\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"FUNimation Productions, Ltd.\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Pyramid Books\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]]
@.str = [3 x i8] c"%s\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [4 x i8] c"978\00"
@.str.4 = [4 x i8] c"979\00"
@.str.5 = [2 x i8] c"1\00"
@.str.6 = [4 x i8] c"\0A%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca [5 x [10 x i8]]
%4 = alloca [14 x i8]
%5 = alloca [2 x [4 x [50 x i8]]]
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %1
%8 = bitcast [2 x [4 x [50 x i8]]]* %5 to i8*
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%12 = call i32 @strlen(i8* %11)
%13 = icmp ne i32 %12, 17
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %109
16: ; preds = %0
%17 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%18 = call i8* @strtok(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i8* %18, i8** %6
store i32 0, i32* %7
br label %19
19: ; preds = %30, %16
%20 = load i8*, i8** %6
%21 = icmp ne i8* %20, null
br i1 %21, label %22, label %33
22: ; preds = %19
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %3, i64 0, i64 %24
%26 = getelementptr inbounds [10 x i8], [10 x i8]* %25, i64 0, i64 0
%27 = load i8*, i8** %6
%28 = call i32 @strcpy(i8* %26, i8* %27)
%29 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i8* %29, i8** %6
br label %30
30: ; preds = %22
%31 = load i32, i32* %7
%32 = add nsw i32 %31, 1
store i32 %32, i32* %7
br label %19
33: ; preds = %19
%34 = load i8*, i8** %6
%35 = icmp ne i8* %34, null
br i1 %35, label %46, label %36
36: ; preds = %33
%37 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %3, i64 0, i64 0
%38 = getelementptr inbounds [10 x i8], [10 x i8]* %37, i64 0, i64 0
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %48
41: ; preds = %36
%42 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %3, i64 0, i64 0
%43 = getelementptr inbounds [10 x i8], [10 x i8]* %42, i64 0, i64 0
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %41, %33
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %109
48: ; preds = %41, %36
store i32 0, i32* %7
%49 = getelementptr inbounds [14 x i8], [14 x i8]* %4, i64 0, i64 0
%50 = load i32, i32* %7
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %3, i64 0, i64 %51
%53 = getelementptr inbounds [10 x i8], [10 x i8]* %52, i64 0, i64 0
%54 = call i32 @strcpy(i8* %49, i8* %53)
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
br label %57
57: ; preds = %67, %48
%58 = load i32, i32* %7
%59 = icmp slt i32 %58, 4
br i1 %59, label %60, label %70
60: ; preds = %57
%61 = getelementptr inbounds [14 x i8], [14 x i8]* %4, i64 0, i64 0
%62 = load i32, i32* %7
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %3, i64 0, i64 %63
%65 = getelementptr inbounds [10 x i8], [10 x i8]* %64, i64 0, i64 0
%66 = call i32 @strcat(i8* %61, i8* %65)
br label %67
67: ; preds = %60
%68 = load i32, i32* %7
%69 = add nsw i32 %68, 1
store i32 %69, i32* %7
br label %57
70: ; preds = %57
%71 = getelementptr inbounds [14 x i8], [14 x i8]* %4, i64 0, i64 13
store i8 0, i8* %71
%72 = load i32, i32* %7
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %3, i64 0, i64 %73
%75 = getelementptr inbounds [10 x i8], [10 x i8]* %74, i64 0, i64 0
%76 = call i64 @atoi(i8* %75)
%77 = getelementptr inbounds [14 x i8], [14 x i8]* %4, i64 0, i64 0
%78 = call i64 @CheckSum(i8* %77)
%79 = icmp ne i64 %76, %78
br i1 %79, label %80, label %82
80: ; preds = %70
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %109
82: ; preds = %70
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %7
br label %84
84: ; preds = %105, %82
%85 = load i32, i32* %7
%86 = icmp slt i32 %85, 4
br i1 %86, label %87, label %108
87: ; preds = %84
%88 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %3, i64 0, i64 2
%89 = getelementptr inbounds [10 x i8], [10 x i8]* %88, i64 0, i64 0
%90 = getelementptr inbounds [2 x [4 x [50 x i8]]], [2 x [4 x [50 x i8]]]* %5, i64 0, i64 0
%91 = load i32, i32* %7
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [4 x [50 x i8]], [4 x [50 x i8]]* %90, i64 0, i64 %92
%94 = getelementptr inbounds [50 x i8], [50 x i8]* %93, i64 0, i64 0
%95 = call i64 @strcmp(i8* %89, i8* %94)
%96 = icmp eq i64 %95, 0
br i1 %96, label %97, label %104
97: ; preds = %87
%98 = getelementptr inbounds [2 x [4 x [50 x i8]]], [2 x [4 x [50 x i8]]]* %5, i64 0, i64 1
%99 = load i32, i32* %7
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [4 x [50 x i8]], [4 x [50 x i8]]* %98, i64 0, i64 %100
%102 = getelementptr inbounds [50 x i8], [50 x i8]* %101, i64 0, i64 0
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %102)
br label %108
104: ; preds = %87
br label %105
105: ; preds = %104
%106 = load i32, i32* %7
%107 = add nsw i32 %106, 1
store i32 %107, i32* %7
br label %84
108: ; preds = %97, %84
store i32 0, i32* %1
br label %109
109: ; preds = %108, %80, %46, %14
%110 = load i32, i32* %1
ret i32 %110
}

LLVM IR (-O2):
@__const.main.publisherList = [2 x [4 x [50 x i8]]] [[4 x [50 x i8]] [[50 x i8] c"933346\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"55583\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"4210\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"], [4 x [50 x i8]] [[50 x i8] c"Bluebridge\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Alyson Books\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"FUNimation Productions, Ltd.\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Pyramid Books\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]]
@.str = [3 x i8] c"%s\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [4 x i8] c"978\00"
@.str.4 = [4 x i8] c"979\00"
@.str.6 = [4 x i8] c"\0A%s\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca [5 x [10 x i8]]
%3 = alloca [14 x i8]
%4 = alloca [2 x [4 x [50 x i8]]]
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %2, i64 0, i64 0, i64 0
%7 = getelementptr inbounds [14 x i8], [14 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [2 x [4 x [50 x i8]]], [2 x [4 x [50 x i8]]]* %4, i64 0, i64 0, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%10 = call i32 @strlen(i8* %5)
%11 = icmp eq i32 %10, 17
br i1 %11, label %14, label %12
12: ; preds = %0
%13 = call i32 @putchar(i32 48)
br label %68
14: ; preds = %0
%15 = call i8* @strtok(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = icmp eq i8* %15, null
br i1 %16, label %25, label %17
17: ; preds = %14, %17
%18 = phi i64 [ %23, %17 ], [ 0, %14 ]
%19 = phi i8* [ %22, %17 ], [ %15, %14 ]
%20 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %2, i64 0, i64 %18, i64 0
%21 = call i32 @strcpy(i8* %20, i8* %19)
%22 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%23 = add nuw i64 %18, 1
%24 = icmp eq i8* %22, null
br i1 %24, label %25, label %17
25: ; preds = %17, %14
%26 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %33, label %28
28: ; preds = %25
%29 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %33, label %31
31: ; preds = %28
%32 = call i32 @putchar(i32 48)
br label %68
33: ; preds = %28, %25
%34 = call i32 @strcpy(i8* %7, i8* %6)
%35 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %2, i64 0, i64 1, i64 0
%36 = call i32 @strcat(i8* %7, i8* %35)
%37 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %2, i64 0, i64 2, i64 0
%38 = call i32 @strcat(i8* %7, i8* %37)
%39 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %2, i64 0, i64 3, i64 0
%40 = call i32 @strcat(i8* %7, i8* %39)
%41 = getelementptr inbounds [14 x i8], [14 x i8]* %3, i64 0, i64 13
store i8 0, i8* %41
%42 = getelementptr inbounds [5 x [10 x i8]], [5 x [10 x i8]]* %2, i64 0, i64 4, i64 0
%43 = call i64 @atoi(i8* %42)
%44 = call i64 @CheckSum(i8* %7)
%45 = icmp eq i64 %43, %44
br i1 %45, label %48, label %46
46: ; preds = %33
%47 = call i32 @putchar(i32 48)
br label %68
48: ; preds = %33
%49 = call i32 @putchar(i32 49)
%50 = call i64 @strcmp(i8* %37, i8* %8)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %56
52: ; preds = %64, %60, %56, %48
%53 = phi i64 [ 0, %48 ], [ 1, %56 ], [ 2, %60 ], [ 3, %64 ]
%54 = getelementptr inbounds [2 x [4 x [50 x i8]]], [2 x [4 x [50 x i8]]]* %4, i64 0, i64 1, i64 %53, i64 0
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %54)
br label %68
56: ; preds = %48
%57 = getelementptr inbounds [2 x [4 x [50 x i8]]], [2 x [4 x [50 x i8]]]* %4, i64 0, i64 0, i64 1, i64 0
%58 = call i64 @strcmp(i8* %37, i8* %57)
%59 = icmp eq i64 %58, 0
br i1 %59, label %52, label %60
60: ; preds = %56
%61 = getelementptr inbounds [2 x [4 x [50 x i8]]], [2 x [4 x [50 x i8]]]* %4, i64 0, i64 0, i64 2, i64 0
%62 = call i64 @strcmp(i8* %37, i8* %61)
%63 = icmp eq i64 %62, 0
br i1 %63, label %52, label %64
64: ; preds = %60
%65 = getelementptr inbounds [2 x [4 x [50 x i8]]], [2 x [4 x [50 x i8]]]* %4, i64 0, i64 0, i64 3, i64 0
%66 = call i64 @strcmp(i8* %37, i8* %65)
%67 = icmp eq i64 %66, 0
br i1 %67, label %52, label %68
68: ; preds = %64, %52, %46, %31, %12
ret i32 0
}