#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*/ gets_s(char *);
int /*<<< orphan*/ isvalid_date(int, int, int);
int /*<<< orphan*/ isvalid_id(char *);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int main(void) {
  char user_id[15] = {0}, gender = 0;
  printf("주민등록번호를 -를 포함하여 입력하시오. ");
  gets_s(user_id);
  if (strlen(user_id) != 14) {
    printf("주민등록번호의 길이가 너무 짧습니다.\n");
    return 0;
  }
  for (int i = 0; user_id[i]; i++)
    user_id[i] -= '0';
  int year = user_id[0] * 10 + user_id[1], month = user_id[2] * 10 + user_id[3],
      day = user_id[4] * 10 + user_id[5];
  gender = user_id[7];
  if (gender == 1 || gender == 2)
    year += 1900;
  else
    year += 2000;
  if (!((gender <= 4) && (gender > 0))) {
    printf("주민등록번호의 성별이 유효하지 않습니다.\n");
    return 0;
  }
  if (!isvalid_date(year, month, day)) {
    printf("주민등록번호의 생년월일이 유효하지 않습니다.\n");
    return 0;
  }
  if (!isvalid_id(user_id)) {
    printf("유효하지 않은 주민등록번호입니다.\n");
    return 0;
  }
  if (gender == 1 || gender == 3)
    printf("남성, ");
  else if (gender == 2 || gender == 4)
    printf("여성, ");
  printf("%d년 %d월 %d일생 입니다.\n", year, month, day);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x13(%rbp),%rdi
xor    %esi,%esi
mov    $0xf,%edx
call   1060 <memset@plt>
movb   $0x0,-0x14(%rbp)
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x13(%rbp),%rdi
call   1070 <gets_s@plt>
lea    -0x13(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
je     11c6 <main+0x66>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    136e <main+0x20e>
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
cmpb   $0x0,-0x13(%rbp,%rax,1)
je     11fa <main+0x9a>
movslq -0x18(%rbp),%rax
movsbl -0x13(%rbp,%rax,1),%ecx
sub    $0x30,%ecx
mov    %cl,-0x13(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11cd <main+0x6d>
movsbl -0x13(%rbp),%eax
imul   $0xa,%eax,%eax
movsbl -0x12(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
movsbl -0x11(%rbp),%eax
imul   $0xa,%eax,%eax
movsbl -0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
movsbl -0xf(%rbp),%eax
imul   $0xa,%eax,%eax
movsbl -0xe(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%al
mov    %al,-0x14(%rbp)
movsbl -0x14(%rbp),%eax
cmp    $0x1,%eax
je     124a <main+0xea>
movsbl -0x14(%rbp),%eax
cmp    $0x2,%eax
jne    125a <main+0xfa>
mov    -0x1c(%rbp),%eax
add    $0x76c,%eax
mov    %eax,-0x1c(%rbp)
jmp    1265 <main+0x105>
mov    -0x1c(%rbp),%eax
add    $0x7d0,%eax
mov    %eax,-0x1c(%rbp)
movsbl -0x14(%rbp),%eax
cmp    $0x4,%eax
jg     127f <main+0x11f>
movsbl -0x14(%rbp),%eax
cmp    $0x0,%eax
jg     1299 <main+0x139>
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    136e <main+0x20e>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1080 <isvalid_date@plt>
cmp    $0x0,%eax
jne    12ca <main+0x16a>
lea    0xdf5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    136e <main+0x20e>
lea    -0x13(%rbp),%rdi
call   1030 <isvalid_id@plt>
cmp    $0x0,%eax
jne    12f6 <main+0x196>
lea    0xe0b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    136e <main+0x20e>
movsbl -0x14(%rbp),%eax
cmp    $0x1,%eax
je     1310 <main+0x1b0>
movsbl -0x14(%rbp),%eax
cmp    $0x3,%eax
jne    1323 <main+0x1c3>
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1350 <main+0x1f0>
movsbl -0x14(%rbp),%eax
cmp    $0x2,%eax
je     133d <main+0x1dd>
movsbl -0x14(%rbp),%eax
cmp    $0x4,%eax
jne    134b <main+0x1eb>
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1350 <main+0x1f0>
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x7(%rsp)
movq   $0x0,(%rsp)
lea    0xe7c(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1070 <gets_s@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cmp    $0xe,%eax
jne    1252 <main+0xf2>
mov    (%rsp),%al
test   %al,%al
je     11d9 <main+0x79>
lea    0x1(%rsp),%rcx
cs nopw 0x0(%rax,%rax,1)
nop
add    $0xd0,%al
mov    %al,-0x1(%rcx)
movzbl (%rcx),%eax
add    $0x1,%rcx
test   %al,%al
jne    11c0 <main+0x60>
movsbl (%rsp),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%ebp
movsbl 0x1(%rsp),%eax
mov    0x7(%rsp),%r12b
lea    -0x1(%r12),%ecx
cmp    $0x2,%cl
lea    0x76c(%rbp,%rax,1),%edx
lea    0x7d0(%rbp,%rax,1),%ebx
cmovb  %edx,%ebx
cmp    $0x4,%cl
jae    1260 <main+0x100>
movsbl 0x2(%rsp),%eax
lea    (%rax,%rax,4),%eax
movsbl 0x3(%rsp),%ecx
lea    (%rcx,%rax,2),%r14d
movsbl 0x4(%rsp),%eax
lea    (%rax,%rax,4),%eax
movsbl 0x5(%rsp),%ecx
lea    (%rcx,%rax,2),%r15d
mov    %ebx,%edi
mov    %r14d,%esi
mov    %r15d,%edx
call   1080 <isvalid_date@plt>
test   %eax,%eax
je     126e <main+0x10e>
mov    %rsp,%rdi
call   1040 <isvalid_id@plt>
test   %eax,%eax
je     127c <main+0x11c>
mov    %r12d,%eax
and    $0xfd,%al
cmp    $0x1,%al
jne    128a <main+0x12a>
lea    0xdea(%rip),%rdi
jmp    129d <main+0x13d>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
jmp    12ba <main+0x15a>
lea    0xe06(%rip),%rdi
call   1030 <puts@plt>
jmp    12ba <main+0x15a>
lea    0xe33(%rip),%rdi
call   1030 <puts@plt>
jmp    12ba <main+0x15a>
lea    0xe66(%rip),%rdi
call   1030 <puts@plt>
jmp    12ba <main+0x15a>
lea    0xdb2(%rip),%rdi
cmp    $0x4,%r12b
je     129d <main+0x13d>
cmp    $0x2,%r12b
jne    12a4 <main+0x144>
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xda1(%rip),%rdi
mov    %ebx,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [58 x i8] c"\EC\A3\BC\EB\AF\BC\EB\93\B1\EB\A1\9D\EB\B2\88\ED\98\B8\EB\A5\BC -\EB\A5\BC \ED\8F\AC\ED\95\A8\ED\95\98\EC\97\AC \EC\9E\85\EB\A0\A5\ED\95\98\EC\8B\9C\EC\98\A4. \00"
@.str.1 = [54 x i8] c"\EC\A3\BC\EB\AF\BC\EB\93\B1\EB\A1\9D\EB\B2\88\ED\98\B8\EC\9D\98 \EA\B8\B8\EC\9D\B4\EA\B0\80 \EB\84\88\EB\AC\B4 \EC\A7\A7\EC\8A\B5\EB\8B\88\EB\8B\A4.\0A\00"
@.str.2 = [60 x i8] c"\EC\A3\BC\EB\AF\BC\EB\93\B1\EB\A1\9D\EB\B2\88\ED\98\B8\EC\9D\98 \EC\84\B1\EB\B3\84\EC\9D\B4 \EC\9C\A0\ED\9A\A8\ED\95\98\EC\A7\80 \EC\95\8A\EC\8A\B5\EB\8B\88\EB\8B\A4.\0A\00"
@.str.3 = [66 x i8] c"\EC\A3\BC\EB\AF\BC\EB\93\B1\EB\A1\9D\EB\B2\88\ED\98\B8\EC\9D\98 \EC\83\9D\EB\85\84\EC\9B\94\EC\9D\BC\EC\9D\B4 \EC\9C\A0\ED\9A\A8\ED\95\98\EC\A7\80 \EC\95\8A\EC\8A\B5\EB\8B\88\EB\8B\A4.\0A\00"
@.str.4 = [50 x i8] c"\EC\9C\A0\ED\9A\A8\ED\95\98\EC\A7\80 \EC\95\8A\EC\9D\80 \EC\A3\BC\EB\AF\BC\EB\93\B1\EB\A1\9D\EB\B2\88\ED\98\B8\EC\9E\85\EB\8B\88\EB\8B\A4.\0A\00"
@.str.5 = [9 x i8] c"\EB\82\A8\EC\84\B1, \00"
@.str.6 = [9 x i8] c"\EC\97\AC\EC\84\B1, \00"
@.str.7 = [33 x i8] c"%d\EB\85\84 %d\EC\9B\94 %d\EC\9D\BC\EC\83\9D \EC\9E\85\EB\8B\88\EB\8B\A4.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i8]
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = bitcast [15 x i8]* %2 to i8*
store i8 0, i8* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%11 = call i32 @gets_s(i8* %10)
%12 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%13 = call i32 @strlen(i8* %12)
%14 = icmp ne i32 %13, 14
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %125
17: ; preds = %0
store i32 0, i32* %4
br label %18
18: ; preds = %32, %17
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = icmp ne i8 %22, 0
br i1 %23, label %24, label %35
24: ; preds = %18
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = sub nsw i32 %29, 48
%31 = trunc i32 %30 to i8
store i8 %31, i8* %27
br label %32
32: ; preds = %24
%33 = load i32, i32* %4
%34 = add nsw i32 %33, 1
store i32 %34, i32* %4
br label %18
35: ; preds = %18
%36 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = mul nsw i32 %38, 10
%40 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 1
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = add nsw i32 %39, %42
store i32 %43, i32* %5
%44 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 2
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = mul nsw i32 %46, 10
%48 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 3
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = add nsw i32 %47, %50
store i32 %51, i32* %6
%52 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 4
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = mul nsw i32 %54, 10
%56 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 5
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = add nsw i32 %55, %58
store i32 %59, i32* %7
%60 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 7
%61 = load i8, i8* %60
store i8 %61, i8* %3
%62 = load i8, i8* %3
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 1
br i1 %64, label %69, label %65
65: ; preds = %35
%66 = load i8, i8* %3
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 2
br i1 %68, label %69, label %72
69: ; preds = %65, %35
%70 = load i32, i32* %5
%71 = add nsw i32 %70, 1900
store i32 %71, i32* %5
br label %75
72: ; preds = %65
%73 = load i32, i32* %5
%74 = add nsw i32 %73, 2000
store i32 %74, i32* %5
br label %75
75: ; preds = %72, %69
%76 = load i8, i8* %3
%77 = sext i8 %76 to i32
%78 = icmp sle i32 %77, 4
br i1 %78, label %79, label %83
79: ; preds = %75
%80 = load i8, i8* %3
%81 = sext i8 %80 to i32
%82 = icmp sgt i32 %81, 0
br i1 %82, label %85, label %83
83: ; preds = %79, %75
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %125
85: ; preds = %79
%86 = load i32, i32* %5
%87 = load i32, i32* %6
%88 = load i32, i32* %7
%89 = call i32 @isvalid_date(i32 %86, i32 %87, i32 %88)
%90 = icmp ne i32 %89, 0
br i1 %90, label %93, label %91
91: ; preds = %85
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %1
br label %125
93: ; preds = %85
%94 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%95 = call i32 @isvalid_id(i8* %94)
%96 = icmp ne i32 %95, 0
br i1 %96, label %99, label %97
97: ; preds = %93
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %1
br label %125
99: ; preds = %93
%100 = load i8, i8* %3
%101 = sext i8 %100 to i32
%102 = icmp eq i32 %101, 1
br i1 %102, label %107, label %103
103: ; preds = %99
%104 = load i8, i8* %3
%105 = sext i8 %104 to i32
%106 = icmp eq i32 %105, 3
br i1 %106, label %107, label %109
107: ; preds = %103, %99
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %120
109: ; preds = %103
%110 = load i8, i8* %3
%111 = sext i8 %110 to i32
%112 = icmp eq i32 %111, 2
br i1 %112, label %117, label %113
113: ; preds = %109
%114 = load i8, i8* %3
%115 = sext i8 %114 to i32
%116 = icmp eq i32 %115, 4
br i1 %116, label %117, label %119
117: ; preds = %113, %109
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
br label %119
119: ; preds = %117, %113
br label %120
120: ; preds = %119, %107
%121 = load i32, i32* %5
%122 = load i32, i32* %6
%123 = load i32, i32* %7
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i32 %121, i32 %122, i32 %123)
store i32 0, i32* %1
br label %125
125: ; preds = %120, %97, %91, %83, %15
%126 = load i32, i32* %1
ret i32 %126
}

LLVM IR (-O2):
@.str = [58 x i8] c"\EC\A3\BC\EB\AF\BC\EB\93\B1\EB\A1\9D\EB\B2\88\ED\98\B8\EB\A5\BC -\EB\A5\BC \ED\8F\AC\ED\95\A8\ED\95\98\EC\97\AC \EC\9E\85\EB\A0\A5\ED\95\98\EC\8B\9C\EC\98\A4. \00"
@.str.5 = [9 x i8] c"\EB\82\A8\EC\84\B1, \00"
@.str.6 = [9 x i8] c"\EC\97\AC\EC\84\B1, \00"
@.str.7 = [33 x i8] c"%d\EB\85\84 %d\EC\9B\94 %d\EC\9D\BC\EC\83\9D \EC\9E\85\EB\8B\88\EB\8B\A4.\0A\00"
@str = [59 x i8] c"\EC\A3\BC\EB\AF\BC\EB\93\B1\EB\A1\9D\EB\B2\88\ED\98\B8\EC\9D\98 \EC\84\B1\EB\B3\84\EC\9D\B4 \EC\9C\A0\ED\9A\A8\ED\95\98\EC\A7\80 \EC\95\8A\EC\8A\B5\EB\8B\88\EB\8B\A4.\00"
@str.8 = [65 x i8] c"\EC\A3\BC\EB\AF\BC\EB\93\B1\EB\A1\9D\EB\B2\88\ED\98\B8\EC\9D\98 \EC\83\9D\EB\85\84\EC\9B\94\EC\9D\BC\EC\9D\B4 \EC\9C\A0\ED\9A\A8\ED\95\98\EC\A7\80 \EC\95\8A\EC\8A\B5\EB\8B\88\EB\8B\A4.\00"
@str.9 = [49 x i8] c"\EC\9C\A0\ED\9A\A8\ED\95\98\EC\A7\80 \EC\95\8A\EC\9D\80 \EC\A3\BC\EB\AF\BC\EB\93\B1\EB\A1\9D\EB\B2\88\ED\98\B8\EC\9E\85\EB\8B\88\EB\8B\A4.\00"
@str.10 = [53 x i8] c"\EC\A3\BC\EB\AF\BC\EB\93\B1\EB\A1\9D\EB\B2\88\ED\98\B8\EC\9D\98 \EA\B8\B8\EC\9D\B4\EA\B0\80 \EB\84\88\EB\AC\B4 \EC\A7\A7\EC\8A\B5\EB\8B\88\EB\8B\A4.\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets_s(i8* %2)
%5 = call i32 @strlen(i8* %2)
%6 = icmp eq i32 %5, 14
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i8, i8* %2
%9 = icmp eq i8 %8, 0
br i1 %9, label %16, label %45
10: ; preds = %0
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.10, i64 0, i64 0))
br label %75
12: ; preds = %45
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = mul nsw i32 %14, 10
br label %16
16: ; preds = %12, %7
%17 = phi i32 [ %15, %12 ], [ 0, %7 ]
%18 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 1
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = add nsw i32 %17, %20
%22 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 2
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = mul nsw i32 %24, 10
%26 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 3
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = add nsw i32 %25, %28
%30 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 4
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = mul nsw i32 %32, 10
%34 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 5
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = add nsw i32 %33, %36
%38 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 7
%39 = load i8, i8* %38
%40 = add i8 %39, -1
%41 = icmp ult i8 %40, 2
%42 = select i1 %41, i32 1900, i32 2000
%43 = add nsw i32 %21, %42
%44 = icmp ult i8 %40, 4
br i1 %44, label %56, label %54
45: ; preds = %7, %45
%46 = phi i64 [ %50, %45 ], [ 0, %7 ]
%47 = phi i8 [ %52, %45 ], [ %8, %7 ]
%48 = phi i8* [ %51, %45 ], [ %2, %7 ]
%49 = add i8 %47, -48
store i8 %49, i8* %48
%50 = add nuw nsw i64 %46, 1
%51 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 %50
%52 = load i8, i8* %51
%53 = icmp eq i8 %52, 0
br i1 %53, label %12, label %45
54: ; preds = %16
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
br label %75
56: ; preds = %16
%57 = call i32 @isvalid_date(i32 %43, i32 %29, i32 %37)
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.8, i64 0, i64 0))
br label %75
61: ; preds = %56
%62 = call i32 @isvalid_id(i8* %2)
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.9, i64 0, i64 0))
br label %75
66: ; preds = %61
%67 = and i8 %39, -3
%68 = icmp eq i8 %67, 1
br i1 %68, label %70, label %69
69: ; preds = %66
switch i8 %39, label %73 [
i8 4, label %70
i8 2, label %70
]
70: ; preds = %69, %69, %66
%71 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), %66 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), %69 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), %69 ]
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %71)
br label %73
73: ; preds = %70, %69
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i32 %43, i32 %29, i32 %37)
br label %75
75: ; preds = %54, %59, %64, %73, %10
ret i32 0
}