#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 */
int /*<<< orphan*/ clearerr(int /*<<< orphan*/);
int /*<<< orphan*/ errmsg(char *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
scalar_t__ isalpha(char);
scalar_t__ isdigit(char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
int outfil_c(char *filename, char *title1, char *title2) {
  int len;
  do {
    printf("Enter output filename [Xnn000.xxx]: ");
    if (fgets(filename, 80, stdin) == NULL) {
      clearerr(stdin);
      printf("\n");
      return (-1);
    } else if ((filename[0] == '^') && filename[1] == 'd' || filename[1] == 'D')
      return (-1);
    len = strlen(filename);
    *(filename + --len) = '\0';
    if (len != 10)
      errmsg("Error: Invalid header filename");
    else {
      if (isalpha(*filename) && isdigit(*(filename + 1)) &&
          isdigit(*(filename + 2)) && *(filename + 3) == '0' &&
          *(filename + 4) == '0' && *(filename + 5) == '0' &&
          *(filename + 6) == '.')
        break;
      else
        errmsg("Error: Invalid header filename");
    }
  } while (1);
  printf("Enter first header: ");
  if (fgets(title1, 80, stdin) == NULL) {
    clearerr(stdin);
    printf("\n");
    return (-1);
  } else if ((title1[0] == '^') && title1[1] == 'd' || title1[1] == 'D')
    return (-1);
  len = strlen(title1);
  *(title1 + --len) = '\0';
  printf("Enter second header: ");
  if (fgets(title2, 80, stdin) == NULL) {
    clearerr(stdin);
    printf("\n");
    return (-1);
  } else if ((title2[0] == '^') && title2[1] == 'd' || title2[1] == 'D')
    return (-1);
  len = strlen(title2);
  *(title2 + --len) = '\0';
  return (0);
}


x86 assembly (clang, -O0):
<outfil_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    0xe75(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    0x2e4d(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
jne    11d7 <outfil_c+0x67>
mov    0x2e30(%rip),%rax
mov    (%rax),%edi
call   1070 <clearerr@plt>
lea    0xe5f(%rip),%rdi
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    147a <outfil_c+0x30a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5e,%eax
jne    11f8 <outfil_c+0x88>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x64,%eax
je     1209 <outfil_c+0x99>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x44,%eax
jne    1215 <outfil_c+0xa5>
movl   $0xffffffff,-0x4(%rbp)
jmp    147a <outfil_c+0x30a>
jmp    121a <outfil_c+0xaa>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x24(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
cmpl   $0xa,-0x24(%rbp)
je     1255 <outfil_c+0xe5>
lea    0xddc(%rip),%rdi
call   1090 <errmsg@plt>
jmp    12f3 <outfil_c+0x183>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1080 <isalpha@plt>
cmp    $0x0,%rax
je     12e2 <outfil_c+0x172>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     12e2 <outfil_c+0x172>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     12e2 <outfil_c+0x172>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x30,%eax
jne    12e2 <outfil_c+0x172>
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0x30,%eax
jne    12e2 <outfil_c+0x172>
mov    -0x10(%rbp),%rax
movsbl 0x5(%rax),%eax
cmp    $0x30,%eax
jne    12e2 <outfil_c+0x172>
mov    -0x10(%rbp),%rax
movsbl 0x6(%rax),%eax
cmp    $0x2e,%eax
jne    12e2 <outfil_c+0x172>
jmp    1307 <outfil_c+0x197>
lea    0xd3e(%rip),%rdi
call   1090 <errmsg@plt>
jmp    12f3 <outfil_c+0x183>
jmp    12f8 <outfil_c+0x188>
mov    $0x1,%al
test   $0x1,%al
jne    1184 <outfil_c+0x14>
jmp    1307 <outfil_c+0x197>
lea    0xd38(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    0x2cca(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
jne    135a <outfil_c+0x1ea>
mov    0x2cad(%rip),%rax
mov    (%rax),%edi
call   1070 <clearerr@plt>
lea    0xcdc(%rip),%rdi
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    147a <outfil_c+0x30a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5e,%eax
jne    137b <outfil_c+0x20b>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x64,%eax
je     138c <outfil_c+0x21c>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x44,%eax
jne    1398 <outfil_c+0x228>
movl   $0xffffffff,-0x4(%rbp)
jmp    147a <outfil_c+0x30a>
jmp    139d <outfil_c+0x22d>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x24(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
lea    0xc97(%rip),%rdi
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    0x2c14(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
jne    1410 <outfil_c+0x2a0>
mov    0x2bf7(%rip),%rax
mov    (%rax),%edi
call   1070 <clearerr@plt>
lea    0xc26(%rip),%rdi
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    147a <outfil_c+0x30a>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5e,%eax
jne    1431 <outfil_c+0x2c1>
mov    -0x20(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x64,%eax
je     1442 <outfil_c+0x2d2>
mov    -0x20(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x44,%eax
jne    144e <outfil_c+0x2de>
movl   $0xffffffff,-0x4(%rbp)
jmp    147a <outfil_c+0x30a>
jmp    1453 <outfil_c+0x2e3>
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x24(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outfil_c>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,(%rsp)
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xe64(%rip),%rdi
call   1060 <printf@plt>
mov    0x2e40(%rip),%r14
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1070 <fgets@plt>
test   %rax,%rax
je     132e <outfil_c+0x1ae>
lea    0xe5d(%rip),%r12
lea    0xe31(%rip),%r13
mov    $0xffffffff,%ebp
jmp    1209 <outfil_c+0x89>
cs nopw 0x0(%rax,%rax,1)
mov    %r12,%rdi
call   10a0 <errmsg@plt>
mov    %r13,%rdi
call   1060 <printf@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1070 <fgets@plt>
test   %rax,%rax
je     132e <outfil_c+0x1ae>
movzbl (%rbx),%ecx
movzbl 0x1(%rbx),%eax
xor    $0x5e,%cl
mov    %eax,%edx
xor    $0x64,%dl
or     %cl,%dl
je     1345 <outfil_c+0x1c5>
cmp    $0x44,%al
je     1345 <outfil_c+0x1c5>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rbx,%rax,1)
add    $0xffffffffffffffff,%rax
cmp    $0xa,%eax
jne    11e0 <outfil_c+0x60>
movsbl (%rbx),%edi
call   1090 <isalpha@plt>
test   %rax,%rax
je     11e0 <outfil_c+0x60>
movsbl 0x1(%rbx),%edi
call   1040 <isdigit@plt>
test   %rax,%rax
je     11e0 <outfil_c+0x60>
movsbl 0x2(%rbx),%edi
call   1040 <isdigit@plt>
test   %rax,%rax
je     11e0 <outfil_c+0x60>
cmpb   $0x30,0x3(%rbx)
jne    11e0 <outfil_c+0x60>
cmpb   $0x30,0x4(%rbx)
jne    11e0 <outfil_c+0x60>
cmpb   $0x30,0x5(%rbx)
jne    11e0 <outfil_c+0x60>
cmpb   $0x2e,0x6(%rbx)
jne    11e0 <outfil_c+0x60>
lea    0xda8(%rip),%rdi
call   1060 <printf@plt>
mov    (%r14),%edx
mov    %r15,%rdi
mov    $0x50,%esi
call   1070 <fgets@plt>
test   %rax,%rax
je     1356 <outfil_c+0x1d6>
mov    (%r15),%cl
mov    0x1(%r15),%al
xor    $0x5e,%cl
mov    %eax,%edx
xor    $0x64,%dl
or     %cl,%dl
je     1345 <outfil_c+0x1c5>
cmp    $0x44,%al
je     1345 <outfil_c+0x1c5>
mov    %r15,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r15,1)
lea    0xd71(%rip),%rdi
call   1060 <printf@plt>
mov    (%r14),%edx
mov    (%rsp),%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1070 <fgets@plt>
test   %rax,%rax
je     1356 <outfil_c+0x1d6>
mov    (%rbx),%cl
mov    0x1(%rbx),%al
xor    $0x5e,%cl
mov    %eax,%edx
xor    $0x64,%dl
or     %cl,%dl
je     1345 <outfil_c+0x1c5>
cmp    $0x44,%al
je     1345 <outfil_c+0x1c5>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
xor    %ebp,%ebp
jmp    1345 <outfil_c+0x1c5>
mov    (%r14),%edi
call   1080 <clearerr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%r14),%edi
call   1080 <clearerr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1345 <outfil_c+0x1c5>

LLVM IR (-O0):
@.str = [37 x i8] c"Enter output filename [Xnn000.xxx]: \00"
@stdin = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [31 x i8] c"Error: Invalid header filename\00"
@.str.3 = [21 x i8] c"Enter first header: \00"
@.str.4 = [22 x i8] c"Enter second header: \00"
define i32 @outfil_c(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
br label %9
9: ; preds = %97, %3
%10 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%11 = load i8*, i8** %5
%12 = load i32, i32* @stdin
%13 = call i32* @fgets(i8* %11, i32 80, i32 %12)
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %19
15: ; preds = %9
%16 = load i32, i32* @stdin
%17 = call i32 @clearerr(i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %173
19: ; preds = %9
%20 = load i8*, i8** %5
%21 = getelementptr inbounds i8, i8* %20, i64 0
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 94
br i1 %24, label %25, label %31
25: ; preds = %19
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i64 1
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 100
br i1 %30, label %37, label %31
31: ; preds = %25, %19
%32 = load i8*, i8** %5
%33 = getelementptr inbounds i8, i8* %32, i64 1
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 68
br i1 %36, label %37, label %38
37: ; preds = %31, %25
store i32 -1, i32* %4
br label %173
38: ; preds = %31
br label %39
39: ; preds = %38
%40 = load i8*, i8** %5
%41 = call i32 @strlen(i8* %40)
store i32 %41, i32* %8
%42 = load i8*, i8** %5
%43 = load i32, i32* %8
%44 = add nsw i32 %43, -1
store i32 %44, i32* %8
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %42, i64 %45
store i8 0, i8* %46
%47 = load i32, i32* %8
%48 = icmp ne i32 %47, 10
br i1 %48, label %49, label %51
49: ; preds = %39
%50 = call i32 @errmsg(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
br label %96
51: ; preds = %39
%52 = load i8*, i8** %5
%53 = load i8, i8* %52
%54 = call i64 @isalpha(i8 signext %53)
%55 = icmp ne i64 %54, 0
br i1 %55, label %56, label %93
56: ; preds = %51
%57 = load i8*, i8** %5
%58 = getelementptr inbounds i8, i8* %57, i64 1
%59 = load i8, i8* %58
%60 = call i64 @isdigit(i8 signext %59)
%61 = icmp ne i64 %60, 0
br i1 %61, label %62, label %93
62: ; preds = %56
%63 = load i8*, i8** %5
%64 = getelementptr inbounds i8, i8* %63, i64 2
%65 = load i8, i8* %64
%66 = call i64 @isdigit(i8 signext %65)
%67 = icmp ne i64 %66, 0
br i1 %67, label %68, label %93
68: ; preds = %62
%69 = load i8*, i8** %5
%70 = getelementptr inbounds i8, i8* %69, i64 3
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = icmp eq i32 %72, 48
br i1 %73, label %74, label %93
74: ; preds = %68
%75 = load i8*, i8** %5
%76 = getelementptr inbounds i8, i8* %75, i64 4
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = icmp eq i32 %78, 48
br i1 %79, label %80, label %93
80: ; preds = %74
%81 = load i8*, i8** %5
%82 = getelementptr inbounds i8, i8* %81, i64 5
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = icmp eq i32 %84, 48
br i1 %85, label %86, label %93
86: ; preds = %80
%87 = load i8*, i8** %5
%88 = getelementptr inbounds i8, i8* %87, i64 6
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = icmp eq i32 %90, 46
br i1 %91, label %92, label %93
92: ; preds = %86
br label %98
93: ; preds = %86, %80, %74, %68, %62, %56, %51
%94 = call i32 @errmsg(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
br label %95
95: ; preds = %93
br label %96
96: ; preds = %95, %49
br label %97
97: ; preds = %96
br i1 true, label %9, label %98
98: ; preds = %97, %92
%99 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%100 = load i8*, i8** %6
%101 = load i32, i32* @stdin
%102 = call i32* @fgets(i8* %100, i32 80, i32 %101)
%103 = icmp eq i32* %102, null
br i1 %103, label %104, label %108
104: ; preds = %98
%105 = load i32, i32* @stdin
%106 = call i32 @clearerr(i32 %105)
%107 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %173
108: ; preds = %98
%109 = load i8*, i8** %6
%110 = getelementptr inbounds i8, i8* %109, i64 0
%111 = load i8, i8* %110
%112 = sext i8 %111 to i32
%113 = icmp eq i32 %112, 94
br i1 %113, label %114, label %120
114: ; preds = %108
%115 = load i8*, i8** %6
%116 = getelementptr inbounds i8, i8* %115, i64 1
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = icmp eq i32 %118, 100
br i1 %119, label %126, label %120
120: ; preds = %114, %108
%121 = load i8*, i8** %6
%122 = getelementptr inbounds i8, i8* %121, i64 1
%123 = load i8, i8* %122
%124 = sext i8 %123 to i32
%125 = icmp eq i32 %124, 68
br i1 %125, label %126, label %127
126: ; preds = %120, %114
store i32 -1, i32* %4
br label %173
127: ; preds = %120
br label %128
128: ; preds = %127
%129 = load i8*, i8** %6
%130 = call i32 @strlen(i8* %129)
store i32 %130, i32* %8
%131 = load i8*, i8** %6
%132 = load i32, i32* %8
%133 = add nsw i32 %132, -1
store i32 %133, i32* %8
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds i8, i8* %131, i64 %134
store i8 0, i8* %135
%136 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%137 = load i8*, i8** %7
%138 = load i32, i32* @stdin
%139 = call i32* @fgets(i8* %137, i32 80, i32 %138)
%140 = icmp eq i32* %139, null
br i1 %140, label %141, label %145
141: ; preds = %128
%142 = load i32, i32* @stdin
%143 = call i32 @clearerr(i32 %142)
%144 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %173
145: ; preds = %128
%146 = load i8*, i8** %7
%147 = getelementptr inbounds i8, i8* %146, i64 0
%148 = load i8, i8* %147
%149 = sext i8 %148 to i32
%150 = icmp eq i32 %149, 94
br i1 %150, label %151, label %157
151: ; preds = %145
%152 = load i8*, i8** %7
%153 = getelementptr inbounds i8, i8* %152, i64 1
%154 = load i8, i8* %153
%155 = sext i8 %154 to i32
%156 = icmp eq i32 %155, 100
br i1 %156, label %163, label %157
157: ; preds = %151, %145
%158 = load i8*, i8** %7
%159 = getelementptr inbounds i8, i8* %158, i64 1
%160 = load i8, i8* %159
%161 = sext i8 %160 to i32
%162 = icmp eq i32 %161, 68
br i1 %162, label %163, label %164
163: ; preds = %157, %151
store i32 -1, i32* %4
br label %173
164: ; preds = %157
br label %165
165: ; preds = %164
%166 = load i8*, i8** %7
%167 = call i32 @strlen(i8* %166)
store i32 %167, i32* %8
%168 = load i8*, i8** %7
%169 = load i32, i32* %8
%170 = add nsw i32 %169, -1
store i32 %170, i32* %8
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds i8, i8* %168, i64 %171
store i8 0, i8* %172
store i32 0, i32* %4
br label %173
173: ; preds = %165, %163, %141, %126, %104, %37, %15
%174 = load i32, i32* %4
ret i32 %174
}

LLVM IR (-O2):
@.str = [37 x i8] c"Enter output filename [Xnn000.xxx]: \00"
@stdin = global i32 0
@.str.2 = [31 x i8] c"Error: Invalid header filename\00"
@.str.3 = [21 x i8] c"Enter first header: \00"
@.str.4 = [22 x i8] c"Enter second header: \00"
define i32 @outfil_c(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdin
%6 = tail call i32* @fgets(i8* %0, i32 80, i32 %5)
%7 = icmp eq i32* %6, null
br i1 %7, label %15, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %0, i64 1
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = getelementptr inbounds i8, i8* %0, i64 3
%12 = getelementptr inbounds i8, i8* %0, i64 4
%13 = getelementptr inbounds i8, i8* %0, i64 5
%14 = getelementptr inbounds i8, i8* %0, i64 6
br label %19
15: ; preds = %57, %3
%16 = load i32, i32* @stdin
%17 = tail call i32 @clearerr(i32 %16)
%18 = tail call i32 @putchar(i32 10)
br label %108
19: ; preds = %8, %57
%20 = load i8, i8* %0
%21 = icmp eq i8 %20, 94
%22 = load i8, i8* %9
%23 = icmp eq i8 %22, 100
%24 = select i1 %21, i1 %23, i1 false
%25 = icmp eq i8 %22, 68
%26 = select i1 %24, i1 true, i1 %25
br i1 %26, label %108, label %27
27: ; preds = %19
%28 = tail call i32 @strlen(i8* %0)
%29 = add nsw i32 %28, -1
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %0, i64 %30
store i8 0, i8* %31
%32 = icmp eq i32 %29, 10
br i1 %32, label %33, label %57
33: ; preds = %27
%34 = load i8, i8* %0
%35 = tail call i64 @isalpha(i8 signext %34)
%36 = icmp eq i64 %35, 0
br i1 %36, label %57, label %37
37: ; preds = %33
%38 = load i8, i8* %9
%39 = tail call i64 @isdigit(i8 signext %38)
%40 = icmp eq i64 %39, 0
br i1 %40, label %57, label %41
41: ; preds = %37
%42 = load i8, i8* %10
%43 = tail call i64 @isdigit(i8 signext %42)
%44 = icmp eq i64 %43, 0
br i1 %44, label %57, label %45
45: ; preds = %41
%46 = load i8, i8* %11
%47 = icmp eq i8 %46, 48
br i1 %47, label %48, label %57
48: ; preds = %45
%49 = load i8, i8* %12
%50 = icmp eq i8 %49, 48
br i1 %50, label %51, label %57
51: ; preds = %48
%52 = load i8, i8* %13
%53 = icmp eq i8 %52, 48
br i1 %53, label %54, label %57
54: ; preds = %51
%55 = load i8, i8* %14
%56 = icmp eq i8 %55, 46
br i1 %56, label %63, label %57
57: ; preds = %33, %37, %41, %45, %48, %51, %54, %27
%58 = tail call i32 @errmsg(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%59 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%60 = load i32, i32* @stdin
%61 = tail call i32* @fgets(i8* %0, i32 80, i32 %60)
%62 = icmp eq i32* %61, null
br i1 %62, label %15, label %19
63: ; preds = %54
%64 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%65 = load i32, i32* @stdin
%66 = tail call i32* @fgets(i8* %1, i32 80, i32 %65)
%67 = icmp eq i32* %66, null
br i1 %67, label %68, label %72
68: ; preds = %63
%69 = load i32, i32* @stdin
%70 = tail call i32 @clearerr(i32 %69)
%71 = tail call i32 @putchar(i32 10)
br label %108
72: ; preds = %63
%73 = load i8, i8* %1
%74 = icmp eq i8 %73, 94
%75 = getelementptr inbounds i8, i8* %1, i64 1
%76 = load i8, i8* %75
%77 = icmp eq i8 %76, 100
%78 = select i1 %74, i1 %77, i1 false
%79 = icmp eq i8 %76, 68
%80 = select i1 %78, i1 true, i1 %79
br i1 %80, label %108, label %81
81: ; preds = %72
%82 = tail call i32 @strlen(i8* %1)
%83 = add nsw i32 %82, -1
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8, i8* %1, i64 %84
store i8 0, i8* %85
%86 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%87 = load i32, i32* @stdin
%88 = tail call i32* @fgets(i8* %2, i32 80, i32 %87)
%89 = icmp eq i32* %88, null
br i1 %89, label %90, label %94
90: ; preds = %81
%91 = load i32, i32* @stdin
%92 = tail call i32 @clearerr(i32 %91)
%93 = tail call i32 @putchar(i32 10)
br label %108
94: ; preds = %81
%95 = load i8, i8* %2
%96 = icmp eq i8 %95, 94
%97 = getelementptr inbounds i8, i8* %2, i64 1
%98 = load i8, i8* %97
%99 = icmp eq i8 %98, 100
%100 = select i1 %96, i1 %99, i1 false
%101 = icmp eq i8 %98, 68
%102 = select i1 %100, i1 true, i1 %101
br i1 %102, label %108, label %103
103: ; preds = %94
%104 = tail call i32 @strlen(i8* %2)
%105 = add nsw i32 %104, -1
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i8, i8* %2, i64 %106
store i8 0, i8* %107
br label %108
108: ; preds = %19, %94, %72, %103, %90, %68, %15
%109 = phi i32 [ -1, %15 ], [ -1, %68 ], [ -1, %90 ], [ 0, %103 ], [ -1, %72 ], [ -1, %94 ], [ -1, %19 ]
ret i32 %109
}