#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*/ isdigit(char const);
int sscanf(char const *, char *, int *, ...);
char *strchr(char const *, char);
int strlen(char const *);
int valid_room(const char *name) {
  int n;
  char *cp, c;
  if (!name)
    return 0;
  if (strlen(name) < 6)
    return 0;
  if (name[1] != ' ')
    return 0;
  switch (name[0]) {
  case 'M':
    name += 2;
    if (name[0] < '0' || name[0] > '9')
      return 0;
    if (name[1] != ':')
      return 0;
    if (!isdigit(name[2]) || !isdigit(name[3]) || !isdigit(name[4]))
      return 0;
    if (name[5])
      return 0;
    return 1;
  case 'F':
    name += 2;
    if (name[0] < 'A' || name[0] > 'Z')
      return 0;
    if (!isdigit(name[1]) || !isdigit(name[2]) || !isdigit(name[3]))
      return 0;
    if (name[4])
      return 0;
    return 1;
  case 'B':
    name += 2;
    if (name[0] < '1' || name[0] > '3')
      return 0;
    cp = strchr(name, ':');
    if (cp) {
      switch (cp - name) {
      case 2:
        if (name[1] < 'A' || name[1] > 'E')
          return 0;
        break;
      case 3:
        if (sscanf(name + 1, "%u", &n) != 1)
          return 0;
        if (n < 21 || n > 25)
          return 0;
        break;
      default:
        return 0;
      }
      ++cp;
      if (sscanf(cp, "%u", &n) != 1)
        return 0;
      if (n < 100 || n > 999)
        return 0;
    } else {
      if (sscanf(name, "%u%c", &n, &c) != 2)
        return 0;
      if (n < 100 || n > 999)
        return 0;
      if (c < 'A' || c > 'E')
        return 0;
    }
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<valid_room>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1163 <valid_room+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x6,%eax
jge    1181 <valid_room+0x41>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x20,%eax
je     119e <valid_room+0x5e>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x28(%rbp)
sub    $0x42,%eax
je     134d <valid_room+0x20d>
jmp    11b6 <valid_room+0x76>
mov    -0x28(%rbp),%eax
sub    $0x46,%eax
je     12a1 <valid_room+0x161>
jmp    11c7 <valid_room+0x87>
mov    -0x28(%rbp),%eax
sub    $0x4d,%eax
jne    154e <valid_room+0x40e>
jmp    11d8 <valid_room+0x98>
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1204 <valid_room+0xc4>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    1210 <valid_room+0xd0>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3a,%eax
je     122d <valid_room+0xed>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
je     126f <valid_room+0x12f>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
je     126f <valid_room+0x12f>
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    127b <valid_room+0x13b>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rax
cmpb   $0x0,0x5(%rax)
je     1295 <valid_room+0x155>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
movl   $0x1,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     12cd <valid_room+0x18d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jle    12d9 <valid_room+0x199>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
je     131b <valid_room+0x1db>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
je     131b <valid_room+0x1db>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1327 <valid_room+0x1e7>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rax
cmpb   $0x0,0x4(%rax)
je     1341 <valid_room+0x201>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
movl   $0x1,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x31,%eax
jl     1379 <valid_room+0x239>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x33,%eax
jle    1385 <valid_room+0x245>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x10(%rbp),%rdi
mov    $0x3a,%esi
call   1050 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     14c5 <valid_room+0x385>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x30(%rbp)
sub    $0x2,%rax
je     13d3 <valid_room+0x293>
jmp    13c0 <valid_room+0x280>
mov    -0x30(%rbp),%rax
sub    $0x3,%rax
je     1406 <valid_room+0x2c6>
jmp    145a <valid_room+0x31a>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x41,%eax
jl     13f5 <valid_room+0x2b5>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x45,%eax
jle    1401 <valid_room+0x2c1>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
jmp    1466 <valid_room+0x326>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xbeb(%rip),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1435 <valid_room+0x2f5>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
cmpl   $0x15,-0x14(%rbp)
jl     1449 <valid_room+0x309>
cmpl   $0x19,-0x14(%rbp)
jle    1455 <valid_room+0x315>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
jmp    1466 <valid_room+0x326>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xb83(%rip),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     149d <valid_room+0x35d>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
cmpl   $0x64,-0x14(%rbp)
jl     14b4 <valid_room+0x374>
cmpl   $0x3e7,-0x14(%rbp)
jle    14c0 <valid_room+0x380>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
jmp    1542 <valid_room+0x402>
mov    -0x10(%rbp),%rdi
lea    0xb33(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x21(%rbp),%rcx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x2,%eax
je     14f4 <valid_room+0x3b4>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
cmpl   $0x64,-0x14(%rbp)
jl     150b <valid_room+0x3cb>
cmpl   $0x3e7,-0x14(%rbp)
jle    1517 <valid_room+0x3d7>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
movsbl -0x21(%rbp),%eax
cmp    $0x41,%eax
jl     1531 <valid_room+0x3f1>
movsbl -0x21(%rbp),%eax
cmp    $0x45,%eax
jle    153d <valid_room+0x3fd>
movl   $0x0,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
jmp    1542 <valid_room+0x402>
movl   $0x1,-0x4(%rbp)
jmp    1555 <valid_room+0x415>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_room>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1314 <valid_room+0x1d4>
mov    %rdi,%rbx
call   1040 <strlen@plt>
cmp    $0x6,%eax
jl     1314 <valid_room+0x1d4>
cmpb   $0x20,0x1(%rbx)
jne    1314 <valid_room+0x1d4>
movsbl (%rbx),%eax
cmp    $0x42,%eax
je     11dc <valid_room+0x9c>
cmp    $0x46,%eax
je     122b <valid_room+0xeb>
cmp    $0x4d,%eax
jne    1314 <valid_room+0x1d4>
mov    0x2(%rbx),%al
add    $0xc6,%al
cmp    $0xf6,%al
jb     1314 <valid_room+0x1d4>
cmpb   $0x3a,0x3(%rbx)
jne    1314 <valid_room+0x1d4>
movsbl 0x4(%rbx),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1314 <valid_room+0x1d4>
movsbl 0x5(%rbx),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1314 <valid_room+0x1d4>
movsbl 0x6(%rbx),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1314 <valid_room+0x1d4>
cmpb   $0x0,0x7(%rbx)
sete   %bpl
jmp    1316 <valid_room+0x1d6>
mov    0x2(%rbx),%al
add    $0xcc,%al
cmp    $0xfd,%al
jb     1314 <valid_room+0x1d4>
lea    0x2(%rbx),%r15
mov    %r15,%rdi
mov    $0x3a,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     1278 <valid_room+0x138>
mov    %rax,%r14
sub    %r15,%rax
cmp    $0x3,%rax
je     12b6 <valid_room+0x176>
cmp    $0x2,%rax
jne    1314 <valid_room+0x1d4>
mov    0x3(%rbx),%al
add    $0xba,%al
cmp    $0xfb,%al
jae    12e3 <valid_room+0x1a3>
jmp    1314 <valid_room+0x1d4>
mov    0x2(%rbx),%al
add    $0xa5,%al
cmp    $0xe6,%al
jb     1314 <valid_room+0x1d4>
movsbl 0x3(%rbx),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1314 <valid_room+0x1d4>
movsbl 0x4(%rbx),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1314 <valid_room+0x1d4>
movsbl 0x5(%rbx),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1314 <valid_room+0x1d4>
cmpb   $0x0,0x6(%rbx)
sete   %bpl
jmp    1316 <valid_room+0x1d6>
lea    0xd84(%rip),%rsi
xor    %ebp,%ebp
lea    0x4(%rsp),%rdx
lea    0x3(%rsp),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x2,%eax
jne    1316 <valid_room+0x1d6>
mov    $0xfffffc18,%eax
add    0x4(%rsp),%eax
cmp    $0xfffffc7c,%eax
jb     1314 <valid_room+0x1d4>
mov    0x3(%rsp),%al
add    $0xba,%al
cmp    $0xfb,%al
jb     1314 <valid_room+0x1d4>
jmp    1325 <valid_room+0x1e5>
add    $0x3,%rbx
lea    0xd3f(%rip),%rsi
xor    %ebp,%ebp
lea    0x4(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    1316 <valid_room+0x1d6>
mov    0x4(%rsp),%eax
add    $0xffffffe6,%eax
cmp    $0xfffffffb,%eax
jb     1314 <valid_room+0x1d4>
add    $0x1,%r14
lea    0xd12(%rip),%rsi
xor    %ebp,%ebp
lea    0x4(%rsp),%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    1316 <valid_room+0x1d6>
mov    $0xfffffc18,%eax
add    0x4(%rsp),%eax
cmp    $0xfffffc7c,%eax
jae    1325 <valid_room+0x1e5>
xor    %ebp,%ebp
movzbl %bpl,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%bpl
jmp    1316 <valid_room+0x1d6>

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
@.str.1 = [5 x i8] c"%u%c\00"
define i32 @valid_room(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8
store i8* %0, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 0, i32* %2
br label %210
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 @strlen(i8* %11)
%13 = icmp slt i32 %12, 6
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 0, i32* %2
br label %210
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 32
br i1 %20, label %21, label %22
21: ; preds = %15
store i32 0, i32* %2
br label %210
22: ; preds = %15
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i64 0
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
switch i32 %26, label %209 [
i32 77, label %27
i32 70, label %75
i32 66, label %116
]
27: ; preds = %22
%28 = load i8*, i8** %3
%29 = getelementptr inbounds i8, i8* %28, i64 2
store i8* %29, i8** %3
%30 = load i8*, i8** %3
%31 = getelementptr inbounds i8, i8* %30, i64 0
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp slt i32 %33, 48
br i1 %34, label %41, label %35
35: ; preds = %27
%36 = load i8*, i8** %3
%37 = getelementptr inbounds i8, i8* %36, i64 0
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = icmp sgt i32 %39, 57
br i1 %40, label %41, label %42
41: ; preds = %35, %27
store i32 0, i32* %2
br label %210
42: ; preds = %35
%43 = load i8*, i8** %3
%44 = getelementptr inbounds i8, i8* %43, i64 1
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp ne i32 %46, 58
br i1 %47, label %48, label %49
48: ; preds = %42
store i32 0, i32* %2
br label %210
49: ; preds = %42
%50 = load i8*, i8** %3
%51 = getelementptr inbounds i8, i8* %50, i64 2
%52 = load i8, i8* %51
%53 = call i32 @isdigit(i8 signext %52)
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %67
55: ; preds = %49
%56 = load i8*, i8** %3
%57 = getelementptr inbounds i8, i8* %56, i64 3
%58 = load i8, i8* %57
%59 = call i32 @isdigit(i8 signext %58)
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %67
61: ; preds = %55
%62 = load i8*, i8** %3
%63 = getelementptr inbounds i8, i8* %62, i64 4
%64 = load i8, i8* %63
%65 = call i32 @isdigit(i8 signext %64)
%66 = icmp ne i32 %65, 0
br i1 %66, label %68, label %67
67: ; preds = %61, %55, %49
store i32 0, i32* %2
br label %210
68: ; preds = %61
%69 = load i8*, i8** %3
%70 = getelementptr inbounds i8, i8* %69, i64 5
%71 = load i8, i8* %70
%72 = icmp ne i8 %71, 0
br i1 %72, label %73, label %74
73: ; preds = %68
store i32 0, i32* %2
br label %210
74: ; preds = %68
store i32 1, i32* %2
br label %210
75: ; preds = %22
%76 = load i8*, i8** %3
%77 = getelementptr inbounds i8, i8* %76, i64 2
store i8* %77, i8** %3
%78 = load i8*, i8** %3
%79 = getelementptr inbounds i8, i8* %78, i64 0
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = icmp slt i32 %81, 65
br i1 %82, label %89, label %83
83: ; preds = %75
%84 = load i8*, i8** %3
%85 = getelementptr inbounds i8, i8* %84, i64 0
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = icmp sgt i32 %87, 90
br i1 %88, label %89, label %90
89: ; preds = %83, %75
store i32 0, i32* %2
br label %210
90: ; preds = %83
%91 = load i8*, i8** %3
%92 = getelementptr inbounds i8, i8* %91, i64 1
%93 = load i8, i8* %92
%94 = call i32 @isdigit(i8 signext %93)
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %108
96: ; preds = %90
%97 = load i8*, i8** %3
%98 = getelementptr inbounds i8, i8* %97, i64 2
%99 = load i8, i8* %98
%100 = call i32 @isdigit(i8 signext %99)
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %108
102: ; preds = %96
%103 = load i8*, i8** %3
%104 = getelementptr inbounds i8, i8* %103, i64 3
%105 = load i8, i8* %104
%106 = call i32 @isdigit(i8 signext %105)
%107 = icmp ne i32 %106, 0
br i1 %107, label %109, label %108
108: ; preds = %102, %96, %90
store i32 0, i32* %2
br label %210
109: ; preds = %102
%110 = load i8*, i8** %3
%111 = getelementptr inbounds i8, i8* %110, i64 4
%112 = load i8, i8* %111
%113 = icmp ne i8 %112, 0
br i1 %113, label %114, label %115
114: ; preds = %109
store i32 0, i32* %2
br label %210
115: ; preds = %109
store i32 1, i32* %2
br label %210
116: ; preds = %22
%117 = load i8*, i8** %3
%118 = getelementptr inbounds i8, i8* %117, i64 2
store i8* %118, i8** %3
%119 = load i8*, i8** %3
%120 = getelementptr inbounds i8, i8* %119, i64 0
%121 = load i8, i8* %120
%122 = sext i8 %121 to i32
%123 = icmp slt i32 %122, 49
br i1 %123, label %130, label %124
124: ; preds = %116
%125 = load i8*, i8** %3
%126 = getelementptr inbounds i8, i8* %125, i64 0
%127 = load i8, i8* %126
%128 = sext i8 %127 to i32
%129 = icmp sgt i32 %128, 51
br i1 %129, label %130, label %131
130: ; preds = %124, %116
store i32 0, i32* %2
br label %210
131: ; preds = %124
%132 = load i8*, i8** %3
%133 = call i8* @strchr(i8* %132, i8 signext 58)
store i8* %133, i8** %5
%134 = load i8*, i8** %5
%135 = icmp ne i8* %134, null
br i1 %135, label %136, label %186
136: ; preds = %131
%137 = load i8*, i8** %5
%138 = load i8*, i8** %3
%139 = ptrtoint i8* %137 to i64
%140 = ptrtoint i8* %138 to i64
%141 = sub i64 %139, %140
switch i64 %141, label %170 [
i64 2, label %142
i64 3, label %156
]
142: ; preds = %136
%143 = load i8*, i8** %3
%144 = getelementptr inbounds i8, i8* %143, i64 1
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp slt i32 %146, 65
br i1 %147, label %154, label %148
148: ; preds = %142
%149 = load i8*, i8** %3
%150 = getelementptr inbounds i8, i8* %149, i64 1
%151 = load i8, i8* %150
%152 = sext i8 %151 to i32
%153 = icmp sgt i32 %152, 69
br i1 %153, label %154, label %155
154: ; preds = %148, %142
store i32 0, i32* %2
br label %210
155: ; preds = %148
br label %171
156: ; preds = %136
%157 = load i8*, i8** %3
%158 = getelementptr inbounds i8, i8* %157, i64 1
%159 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %158, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%160 = icmp ne i32 %159, 1
br i1 %160, label %161, label %162
161: ; preds = %156
store i32 0, i32* %2
br label %210
162: ; preds = %156
%163 = load i32, i32* %4
%164 = icmp slt i32 %163, 21
br i1 %164, label %168, label %165
165: ; preds = %162
%166 = load i32, i32* %4
%167 = icmp sgt i32 %166, 25
br i1 %167, label %168, label %169
168: ; preds = %165, %162
store i32 0, i32* %2
br label %210
169: ; preds = %165
br label %171
170: ; preds = %136
store i32 0, i32* %2
br label %210
171: ; preds = %169, %155
%172 = load i8*, i8** %5
%173 = getelementptr inbounds i8, i8* %172, i32 1
store i8* %173, i8** %5
%174 = load i8*, i8** %5
%175 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %174, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%176 = icmp ne i32 %175, 1
br i1 %176, label %177, label %178
177: ; preds = %171
store i32 0, i32* %2
br label %210
178: ; preds = %171
%179 = load i32, i32* %4
%180 = icmp slt i32 %179, 100
br i1 %180, label %184, label %181
181: ; preds = %178
%182 = load i32, i32* %4
%183 = icmp sgt i32 %182, 999
br i1 %183, label %184, label %185
184: ; preds = %181, %178
store i32 0, i32* %2
br label %210
185: ; preds = %181
br label %208
186: ; preds = %131
%187 = load i8*, i8** %3
%188 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %187, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %4, i8* %6)
%189 = icmp ne i32 %188, 2
br i1 %189, label %190, label %191
190: ; preds = %186
store i32 0, i32* %2
br label %210
191: ; preds = %186
%192 = load i32, i32* %4
%193 = icmp slt i32 %192, 100
br i1 %193, label %197, label %194
194: ; preds = %191
%195 = load i32, i32* %4
%196 = icmp sgt i32 %195, 999
br i1 %196, label %197, label %198
197: ; preds = %194, %191
store i32 0, i32* %2
br label %210
198: ; preds = %194
%199 = load i8, i8* %6
%200 = sext i8 %199 to i32
%201 = icmp slt i32 %200, 65
br i1 %201, label %206, label %202
202: ; preds = %198
%203 = load i8, i8* %6
%204 = sext i8 %203 to i32
%205 = icmp sgt i32 %204, 69
br i1 %205, label %206, label %207
206: ; preds = %202, %198
store i32 0, i32* %2
br label %210
207: ; preds = %202
br label %208
208: ; preds = %207, %185
store i32 1, i32* %2
br label %210
209: ; preds = %22
store i32 0, i32* %2
br label %210
210: ; preds = %209, %208, %206, %197, %190, %184, %177, %170, %168, %161, %154, %130, %115, %114, %108, %89, %74, %73, %67, %48, %41, %21, %14, %9
%211 = load i32, i32* %2
ret i32 %211
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
@.str.1 = [5 x i8] c"%u%c\00"
define i32 @valid_room(i8* %0) {
%2 = alloca i32
%3 = alloca i8
%4 = bitcast i32* %2 to i8*
%5 = icmp eq i8* %0, null
br i1 %5, label %113, label %6
6: ; preds = %1
%7 = tail call i32 @strlen(i8* %0)
%8 = icmp slt i32 %7, 6
br i1 %8, label %113, label %9
9: ; preds = %6
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 32
br i1 %12, label %13, label %113
13: ; preds = %9
%14 = load i8, i8* %0
%15 = sext i8 %14 to i32
switch i32 %15, label %113 [
i32 77, label %16
i32 70, label %44
i32 66, label %68
]
16: ; preds = %13
%17 = getelementptr inbounds i8, i8* %0, i64 2
%18 = load i8, i8* %17
%19 = add i8 %18, -58
%20 = icmp ult i8 %19, -10
br i1 %20, label %113, label %21
21: ; preds = %16
%22 = getelementptr inbounds i8, i8* %0, i64 3
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 58
br i1 %24, label %25, label %113
25: ; preds = %21
%26 = getelementptr inbounds i8, i8* %0, i64 4
%27 = load i8, i8* %26
%28 = tail call i32 @isdigit(i8 signext %27)
%29 = icmp eq i32 %28, 0
br i1 %29, label %113, label %30
30: ; preds = %25
%31 = getelementptr inbounds i8, i8* %0, i64 5
%32 = load i8, i8* %31
%33 = tail call i32 @isdigit(i8 signext %32)
%34 = icmp eq i32 %33, 0
br i1 %34, label %113, label %35
35: ; preds = %30
%36 = getelementptr inbounds i8, i8* %0, i64 6
%37 = load i8, i8* %36
%38 = tail call i32 @isdigit(i8 signext %37)
%39 = icmp eq i32 %38, 0
br i1 %39, label %113, label %40
40: ; preds = %35
%41 = getelementptr inbounds i8, i8* %0, i64 7
%42 = load i8, i8* %41
%43 = icmp eq i8 %42, 0
br label %113
44: ; preds = %13
%45 = getelementptr inbounds i8, i8* %0, i64 2
%46 = load i8, i8* %45
%47 = add i8 %46, -91
%48 = icmp ult i8 %47, -26
br i1 %48, label %113, label %49
49: ; preds = %44
%50 = getelementptr inbounds i8, i8* %0, i64 3
%51 = load i8, i8* %50
%52 = tail call i32 @isdigit(i8 signext %51)
%53 = icmp eq i32 %52, 0
br i1 %53, label %113, label %54
54: ; preds = %49
%55 = getelementptr inbounds i8, i8* %0, i64 4
%56 = load i8, i8* %55
%57 = tail call i32 @isdigit(i8 signext %56)
%58 = icmp eq i32 %57, 0
br i1 %58, label %113, label %59
59: ; preds = %54
%60 = getelementptr inbounds i8, i8* %0, i64 5
%61 = load i8, i8* %60
%62 = tail call i32 @isdigit(i8 signext %61)
%63 = icmp eq i32 %62, 0
br i1 %63, label %113, label %64
64: ; preds = %59
%65 = getelementptr inbounds i8, i8* %0, i64 6
%66 = load i8, i8* %65
%67 = icmp eq i8 %66, 0
br label %113
68: ; preds = %13
%69 = getelementptr inbounds i8, i8* %0, i64 2
%70 = load i8, i8* %69
%71 = add i8 %70, -52
%72 = icmp ult i8 %71, -3
br i1 %72, label %113, label %73
73: ; preds = %68
%74 = tail call i8* @strchr(i8* %69, i8 signext 58)
%75 = icmp eq i8* %74, null
br i1 %75, label %101, label %76
76: ; preds = %73
%77 = ptrtoint i8* %74 to i64
%78 = ptrtoint i8* %69 to i64
%79 = sub i64 %77, %78
switch i64 %79, label %113 [
i64 2, label %80
i64 3, label %85
]
80: ; preds = %76
%81 = getelementptr inbounds i8, i8* %0, i64 3
%82 = load i8, i8* %81
%83 = add i8 %82, -70
%84 = icmp ult i8 %83, -5
br i1 %84, label %113, label %93
85: ; preds = %76
%86 = getelementptr inbounds i8, i8* %0, i64 3
%87 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %86, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%88 = icmp eq i32 %87, 1
br i1 %88, label %89, label %113
89: ; preds = %85
%90 = load i32, i32* %2
%91 = add i32 %90, -26
%92 = icmp ult i32 %91, -5
br i1 %92, label %113, label %93
93: ; preds = %80, %89
%94 = getelementptr inbounds i8, i8* %74, i64 1
%95 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %94, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%96 = icmp eq i32 %95, 1
br i1 %96, label %97, label %113
97: ; preds = %93
%98 = load i32, i32* %2
%99 = add i32 %98, -1000
%100 = icmp ult i32 %99, -900
br i1 %100, label %113, label %112
101: ; preds = %73
%102 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %69, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i8* %3)
%103 = icmp eq i32 %102, 2
br i1 %103, label %104, label %113
104: ; preds = %101
%105 = load i32, i32* %2
%106 = add i32 %105, -1000
%107 = icmp ult i32 %106, -900
br i1 %107, label %113, label %108
108: ; preds = %104
%109 = load i8, i8* %3
%110 = add i8 %109, -70
%111 = icmp ult i8 %110, -5
br i1 %111, label %113, label %112
112: ; preds = %108, %97
br label %113
113: ; preds = %13, %108, %104, %101, %97, %93, %76, %89, %85, %80, %68, %64, %49, %54, %59, %44, %40, %25, %30, %35, %21, %16, %9, %6, %1, %112
%114 = phi i1 [ true, %112 ], [ false, %1 ], [ false, %6 ], [ false, %9 ], [ false, %16 ], [ false, %21 ], [ false, %35 ], [ false, %30 ], [ false, %25 ], [ %43, %40 ], [ false, %44 ], [ false, %59 ], [ false, %54 ], [ false, %49 ], [ %67, %64 ], [ false, %68 ], [ false, %80 ], [ false, %85 ], [ false, %89 ], [ false, %76 ], [ false, %93 ], [ false, %97 ], [ false, %101 ], [ false, %104 ], [ false, %108 ], [ false, %13 ]
%115 = zext i1 %114 to i32
ret i32 %115
}