#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 IsSudokuValid(int, int, int, int);
int CheckRegion(int regiao) {
  int isValid;
  switch (regiao) {
  case 18: {
    isValid = IsSudokuValid(0, 2, 0, 2);
    break;
  }
  case 19: {
    isValid = IsSudokuValid(0, 2, 3, 5);
    break;
  }
  case 20: {
    isValid = IsSudokuValid(0, 2, 6, 8);
    break;
  }
  case 21: {
    isValid = IsSudokuValid(3, 5, 0, 2);
    break;
  }
  case 22: {
    isValid = IsSudokuValid(3, 5, 3, 5);
    break;
  }
  case 23: {
    isValid = IsSudokuValid(3, 5, 6, 8);
    break;
  }
  case 24: {
    isValid = IsSudokuValid(6, 8, 0, 2);
    break;
  }
  case 25: {
    isValid = IsSudokuValid(6, 8, 3, 5);
    break;
  }
  case 26: {
    isValid = IsSudokuValid(6, 8, 6, 8);
    break;
  }
  }
  return isValid;
}


x86 assembly (clang, -O0):
<CheckRegion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffee,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x8,%eax
ja     1247 <CheckRegion+0x137>
mov    -0x10(%rbp),%rax
lea    0xec5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %edx,%edx
mov    $0x2,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1030 <IsSudokuValid@plt>
mov    %eax,-0x8(%rbp)
jmp    1247 <CheckRegion+0x137>
xor    %edi,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x5,%ecx
call   1030 <IsSudokuValid@plt>
mov    %eax,-0x8(%rbp)
jmp    1247 <CheckRegion+0x137>
xor    %edi,%edi
mov    $0x2,%esi
mov    $0x6,%edx
mov    $0x8,%ecx
call   1030 <IsSudokuValid@plt>
mov    %eax,-0x8(%rbp)
jmp    1247 <CheckRegion+0x137>
mov    $0x3,%edi
mov    $0x5,%esi
xor    %edx,%edx
mov    $0x2,%ecx
call   1030 <IsSudokuValid@plt>
mov    %eax,-0x8(%rbp)
jmp    1247 <CheckRegion+0x137>
mov    $0x3,%edx
mov    $0x5,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1030 <IsSudokuValid@plt>
mov    %eax,-0x8(%rbp)
jmp    1247 <CheckRegion+0x137>
mov    $0x3,%edi
mov    $0x5,%esi
mov    $0x6,%edx
mov    $0x8,%ecx
call   1030 <IsSudokuValid@plt>
mov    %eax,-0x8(%rbp)
jmp    1247 <CheckRegion+0x137>
mov    $0x6,%edi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x2,%ecx
call   1030 <IsSudokuValid@plt>
mov    %eax,-0x8(%rbp)
jmp    1247 <CheckRegion+0x137>
mov    $0x6,%edi
mov    $0x8,%esi
mov    $0x3,%edx
mov    $0x5,%ecx
call   1030 <IsSudokuValid@plt>
mov    %eax,-0x8(%rbp)
jmp    1247 <CheckRegion+0x137>
mov    $0x6,%edx
mov    $0x8,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1030 <IsSudokuValid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckRegion>:
add    $0xffffffee,%edi
cmp    $0x8,%edi
ja     1131 <CheckRegion+0x21>
lea    0xee1(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
xor    %edi,%edi
mov    $0x2,%esi
jmp    1172 <CheckRegion+0x62>
ret
xor    %edi,%edi
mov    $0x2,%esi
jmp    1188 <CheckRegion+0x78>
xor    %edi,%edi
mov    $0x2,%esi
jmp    11a1 <CheckRegion+0x91>
mov    $0x3,%edi
mov    $0x5,%esi
jmp    1172 <CheckRegion+0x62>
mov    $0x3,%edi
mov    $0x5,%esi
jmp    1188 <CheckRegion+0x78>
mov    $0x3,%edi
mov    $0x5,%esi
jmp    11a1 <CheckRegion+0x91>
mov    $0x6,%edi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x2,%ecx
jmp    1030 <IsSudokuValid@plt>
mov    $0x6,%edi
mov    $0x8,%esi
mov    $0x3,%edx
mov    $0x5,%ecx
jmp    1030 <IsSudokuValid@plt>
mov    $0x6,%edi
mov    $0x8,%esi
mov    $0x6,%edx
mov    $0x8,%ecx
jmp    1030 <IsSudokuValid@plt>

LLVM IR (-O0):
define i32 @CheckRegion(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %23 [
i32 18, label %5
i32 19, label %7
i32 20, label %9
i32 21, label %11
i32 22, label %13
i32 23, label %15
i32 24, label %17
i32 25, label %19
i32 26, label %21
]
5: ; preds = %1
%6 = call i32 @IsSudokuValid(i32 0, i32 2, i32 0, i32 2)
store i32 %6, i32* %3
br label %23
7: ; preds = %1
%8 = call i32 @IsSudokuValid(i32 0, i32 2, i32 3, i32 5)
store i32 %8, i32* %3
br label %23
9: ; preds = %1
%10 = call i32 @IsSudokuValid(i32 0, i32 2, i32 6, i32 8)
store i32 %10, i32* %3
br label %23
11: ; preds = %1
%12 = call i32 @IsSudokuValid(i32 3, i32 5, i32 0, i32 2)
store i32 %12, i32* %3
br label %23
13: ; preds = %1
%14 = call i32 @IsSudokuValid(i32 3, i32 5, i32 3, i32 5)
store i32 %14, i32* %3
br label %23
15: ; preds = %1
%16 = call i32 @IsSudokuValid(i32 3, i32 5, i32 6, i32 8)
store i32 %16, i32* %3
br label %23
17: ; preds = %1
%18 = call i32 @IsSudokuValid(i32 6, i32 8, i32 0, i32 2)
store i32 %18, i32* %3
br label %23
19: ; preds = %1
%20 = call i32 @IsSudokuValid(i32 6, i32 8, i32 3, i32 5)
store i32 %20, i32* %3
br label %23
21: ; preds = %1
%22 = call i32 @IsSudokuValid(i32 6, i32 8, i32 6, i32 8)
store i32 %22, i32* %3
br label %23
23: ; preds = %1, %21, %19, %17, %15, %13, %11, %9, %7, %5
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @CheckRegion(i32 %0) {
switch i32 %0, label %20 [
i32 18, label %2
i32 19, label %4
i32 20, label %6
i32 21, label %8
i32 22, label %10
i32 23, label %12
i32 24, label %14
i32 25, label %16
i32 26, label %18
]
2: ; preds = %1
%3 = tail call i32 @IsSudokuValid(i32 0, i32 2, i32 0, i32 2)
br label %20
4: ; preds = %1
%5 = tail call i32 @IsSudokuValid(i32 0, i32 2, i32 3, i32 5)
br label %20
6: ; preds = %1
%7 = tail call i32 @IsSudokuValid(i32 0, i32 2, i32 6, i32 8)
br label %20
8: ; preds = %1
%9 = tail call i32 @IsSudokuValid(i32 3, i32 5, i32 0, i32 2)
br label %20
10: ; preds = %1
%11 = tail call i32 @IsSudokuValid(i32 3, i32 5, i32 3, i32 5)
br label %20
12: ; preds = %1
%13 = tail call i32 @IsSudokuValid(i32 3, i32 5, i32 6, i32 8)
br label %20
14: ; preds = %1
%15 = tail call i32 @IsSudokuValid(i32 6, i32 8, i32 0, i32 2)
br label %20
16: ; preds = %1
%17 = tail call i32 @IsSudokuValid(i32 6, i32 8, i32 3, i32 5)
br label %20
18: ; preds = %1
%19 = tail call i32 @IsSudokuValid(i32 6, i32 8, i32 6, i32 8)
br label %20
20: ; preds = %1, %18, %16, %14, %12, %10, %8, %6, %4, %2
%21 = phi i32 [ undef, %1 ], [ %19, %18 ], [ %17, %16 ], [ %15, %14 ], [ %13, %12 ], [ %11, %10 ], [ %9, %8 ], [ %7, %6 ], [ %5, %4 ], [ %3, %2 ]
ret i32 %21
}