#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*/ giraHorizontal();
int /*<<< orphan*/ giraVertical();
int /*<<< orphan*/ inicializar();
int /*<<< orphan*/ inverteMatriz();
int /*<<< orphan*/ inverteMatriz2();
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ substitui(int, int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ trocaColLinha();
int /*<<< orphan*/ trocaColunaGrande(int, int);
int /*<<< orphan*/ trocaColunaPeq(int, int);
int /*<<< orphan*/ trocaLinhaGrande(int, int);
int /*<<< orphan*/ trocaLinhaPeq(int, int);
void geraSudoku() {
  inicializar();
  srand(time(NULL));
  int embaralha, i, bloco;
  for (i = 0; i < 10; i++) {
    embaralha = rand() % 10;
    bloco = rand() % 3;
    switch (embaralha) {
    case 0:
      switch (bloco) {
      case 0:
        trocaLinhaPeq(rand() % 3, rand() % 3);
        break;
      case 1:
        trocaLinhaPeq((rand() % 3) + 3, (rand() % 3) + 3);
        break;
      case 2:
        trocaLinhaPeq((rand() % 3) + 6, (rand() % 3) + 6);
        break;
      }
      break;
    case 1:
      trocaLinhaGrande((rand() % 3), (rand() % 3));
      break;
    case 2:
      switch (bloco) {
      case 0:
        trocaColunaPeq((rand() % 3), (rand() % 3));
        break;
      case 1:
        trocaColunaPeq((rand() % 3) + 3, (rand() % 3) + 3);
        break;
      case 2:
        trocaColunaPeq((rand() % 3) + 6, (rand() % 3) + 6);
        break;
      }
      break;
    case 3:
      trocaColunaGrande((rand() % 3), (rand() % 3));
      break;
    case 4:
      giraVertical();
      break;
    case 5:
      giraHorizontal();
      break;
    case 6:
      trocaColLinha();
      break;
    case 7:
      inverteMatriz();
      break;
    case 8:
      inverteMatriz2();
      break;
    case 9:
      substitui((rand() % 9) + 1, (rand() % 9) + 1);
      break;
    }
  }
}


x86 assembly (clang, -O0):
<geraSudoku>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    $0x0,%al
call   1070 <inicializar@plt>
xor    %eax,%eax
mov    %eax,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1512 <geraSudoku+0x332>
xor    %eax,%eax
mov    %al,-0x19(%rbp)
call   1100 <rand@plt>
mov    %eax,%ecx
mov    -0x19(%rbp),%al
movslq %ecx,%rdx
imul   $0x66666667,%rdx,%rsi
mov    %rsi,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rsi
sar    $0x2,%esi
add    %edx,%esi
add    %esi,%esi
mov    %esi,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
mov    %ecx,-0x4(%rbp)
call   1100 <rand@plt>
movslq %eax,%rcx
imul   $0x55555556,%rcx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rdx
add    %ecx,%edx
mov    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x9,%rax
ja     14ff <geraSudoku+0x31f>
mov    -0x18(%rbp),%rax
lea    0xd79(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
test   %eax,%eax
je     12c5 <geraSudoku+0xe5>
jmp    12a3 <geraSudoku+0xc3>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
je     12f5 <geraSudoku+0x115>
jmp    12b4 <geraSudoku+0xd4>
mov    -0x20(%rbp),%eax
sub    $0x2,%eax
je     132b <geraSudoku+0x14b>
jmp    135c <geraSudoku+0x17c>
mov    $0x0,%al
call   1100 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x24(%rbp)
mov    $0x0,%al
call   1100 <rand@plt>
mov    -0x24(%rbp),%edi
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
call   10d0 <trocaLinhaPeq@plt>
jmp    135c <geraSudoku+0x17c>
mov    $0x0,%al
call   1100 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
add    $0x3,%edx
mov    %edx,-0x28(%rbp)
mov    $0x0,%al
call   1100 <rand@plt>
mov    -0x28(%rbp),%edi
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x3,%esi
call   10d0 <trocaLinhaPeq@plt>
jmp    135c <geraSudoku+0x17c>
mov    $0x0,%al
call   1100 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
add    $0x6,%edx
mov    %edx,-0x2c(%rbp)
mov    $0x0,%al
call   1100 <rand@plt>
mov    -0x2c(%rbp),%edi
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x6,%esi
call   10d0 <trocaLinhaPeq@plt>
jmp    14ff <geraSudoku+0x31f>
mov    $0x0,%al
call   1100 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x30(%rbp)
mov    $0x0,%al
call   1100 <rand@plt>
mov    -0x30(%rbp),%edi
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
call   1040 <trocaLinhaGrande@plt>
jmp    14ff <geraSudoku+0x31f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
test   %eax,%eax
je     13c6 <geraSudoku+0x1e6>
jmp    13a4 <geraSudoku+0x1c4>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
je     13f6 <geraSudoku+0x216>
jmp    13b5 <geraSudoku+0x1d5>
mov    -0x34(%rbp),%eax
sub    $0x2,%eax
je     142c <geraSudoku+0x24c>
jmp    145d <geraSudoku+0x27d>
mov    $0x0,%al
call   1100 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x38(%rbp)
mov    $0x0,%al
call   1100 <rand@plt>
mov    -0x38(%rbp),%edi
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
call   1030 <trocaColunaPeq@plt>
jmp    145d <geraSudoku+0x27d>
mov    $0x0,%al
call   1100 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
add    $0x3,%edx
mov    %edx,-0x3c(%rbp)
mov    $0x0,%al
call   1100 <rand@plt>
mov    -0x3c(%rbp),%edi
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x3,%esi
call   1030 <trocaColunaPeq@plt>
jmp    145d <geraSudoku+0x27d>
mov    $0x0,%al
call   1100 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
add    $0x6,%edx
mov    %edx,-0x40(%rbp)
mov    $0x0,%al
call   1100 <rand@plt>
mov    -0x40(%rbp),%edi
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x6,%esi
call   1030 <trocaColunaPeq@plt>
jmp    14ff <geraSudoku+0x31f>
mov    $0x0,%al
call   1100 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x44(%rbp)
mov    $0x0,%al
call   1100 <rand@plt>
mov    -0x44(%rbp),%edi
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
call   10b0 <trocaColunaGrande@plt>
jmp    14ff <geraSudoku+0x31f>
mov    $0x0,%al
call   1090 <giraVertical@plt>
jmp    14ff <geraSudoku+0x31f>
mov    $0x0,%al
call   10c0 <giraHorizontal@plt>
jmp    14ff <geraSudoku+0x31f>
mov    $0x0,%al
call   1050 <trocaColLinha@plt>
jmp    14ff <geraSudoku+0x31f>
mov    $0x0,%al
call   1060 <inverteMatriz@plt>
jmp    14ff <geraSudoku+0x31f>
mov    $0x0,%al
call   10f0 <inverteMatriz2@plt>
jmp    14ff <geraSudoku+0x31f>
mov    $0x0,%al
call   1100 <rand@plt>
mov    $0x9,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x48(%rbp)
mov    $0x0,%al
call   1100 <rand@plt>
mov    -0x48(%rbp),%edi
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1,%esi
call   10e0 <substitui@plt>
jmp    1504 <geraSudoku+0x324>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1206 <geraSudoku+0x26>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geraSudoku>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1070 <inicializar@plt>
xor    %edi,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
mov    $0xa,%ebp
lea    0xdfb(%rip),%r14
jmp    1269 <geraSudoku+0x89>
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0x38e38e39,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,8),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x1,%ebx
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0x38e38e39,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,8),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
mov    %ebx,%edi
call   10e0 <substitui@plt>
xchg   %ax,%ax
add    $0xffffffff,%ebp
je     15d1 <geraSudoku+0x3f1>
xor    %eax,%eax
call   1100 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x2,%eax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
xor    %eax,%eax
call   1100 <rand@plt>
cmp    $0x9,%ebx
ja     1260 <geraSudoku+0x80>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
movslq (%r14,%rbx,4),%rcx
add    %r14,%rcx
jmp    *%rcx
cmp    $0x2,%eax
je     1475 <geraSudoku+0x295>
cmp    $0x1,%eax
je     14c7 <geraSudoku+0x2e7>
test   %eax,%eax
jne    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   1100 <rand@plt>
movslq %eax,%rbx
imul   $0x55555556,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%ebx
xor    %eax,%eax
call   1100 <rand@plt>
movslq %eax,%rsi
imul   $0x55555556,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%esi
mov    %ebx,%edi
call   10d0 <trocaLinhaPeq@plt>
jmp    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   1100 <rand@plt>
movslq %eax,%rbx
imul   $0x55555556,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%ebx
xor    %eax,%eax
call   1100 <rand@plt>
movslq %eax,%rsi
imul   $0x55555556,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%esi
mov    %ebx,%edi
call   1040 <trocaLinhaGrande@plt>
jmp    1260 <geraSudoku+0x80>
cmp    $0x2,%eax
je     1523 <geraSudoku+0x343>
cmp    $0x1,%eax
je     1575 <geraSudoku+0x395>
test   %eax,%eax
jne    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   1100 <rand@plt>
movslq %eax,%rbx
imul   $0x55555556,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%ebx
xor    %eax,%eax
call   1100 <rand@plt>
movslq %eax,%rsi
imul   $0x55555556,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%esi
mov    %ebx,%edi
call   1030 <trocaColunaPeq@plt>
jmp    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   1100 <rand@plt>
movslq %eax,%rbx
imul   $0x55555556,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%ebx
xor    %eax,%eax
call   1100 <rand@plt>
movslq %eax,%rsi
imul   $0x55555556,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%esi
mov    %ebx,%edi
call   10b0 <trocaColunaGrande@plt>
jmp    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   1090 <giraVertical@plt>
jmp    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   1060 <inverteMatriz@plt>
jmp    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   10c0 <giraHorizontal@plt>
jmp    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   1050 <trocaColLinha@plt>
jmp    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   10f0 <inverteMatriz2@plt>
jmp    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x6,%ebx
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x6,%esi
jmp    1517 <geraSudoku+0x337>
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x3,%ebx
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x3,%esi
mov    %ebx,%edi
call   10d0 <trocaLinhaPeq@plt>
jmp    1260 <geraSudoku+0x80>
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x6,%ebx
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x6,%esi
jmp    15c5 <geraSudoku+0x3e5>
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x3,%ebx
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x3,%esi
mov    %ebx,%edi
call   1030 <trocaColunaPeq@plt>
jmp    1260 <geraSudoku+0x80>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @geraSudoku() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @inicializar()
%5 = call i32 @time(i32* null)
%6 = call i32 @srand(i32 %5)
store i32 0, i32* %2
br label %7
7: ; preds = %97, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %100
10: ; preds = %7
%11 = call i32 (...) @rand()
%12 = srem i32 %11, 10
store i32 %12, i32* %1
%13 = call i32 (...) @rand()
%14 = srem i32 %13, 3
store i32 %14, i32* %3
%15 = load i32, i32* %1
switch i32 %15, label %96 [
i32 0, label %16
i32 1, label %41
i32 2, label %47
i32 3, label %72
i32 4, label %78
i32 5, label %80
i32 6, label %82
i32 7, label %84
i32 8, label %86
i32 9, label %88
]
16: ; preds = %10
%17 = load i32, i32* %3
switch i32 %17, label %40 [
i32 0, label %18
i32 1, label %24
i32 2, label %32
]
18: ; preds = %16
%19 = call i32 (...) @rand()
%20 = srem i32 %19, 3
%21 = call i32 (...) @rand()
%22 = srem i32 %21, 3
%23 = call i32 @trocaLinhaPeq(i32 %20, i32 %22)
br label %40
24: ; preds = %16
%25 = call i32 (...) @rand()
%26 = srem i32 %25, 3
%27 = add nsw i32 %26, 3
%28 = call i32 (...) @rand()
%29 = srem i32 %28, 3
%30 = add nsw i32 %29, 3
%31 = call i32 @trocaLinhaPeq(i32 %27, i32 %30)
br label %40
32: ; preds = %16
%33 = call i32 (...) @rand()
%34 = srem i32 %33, 3
%35 = add nsw i32 %34, 6
%36 = call i32 (...) @rand()
%37 = srem i32 %36, 3
%38 = add nsw i32 %37, 6
%39 = call i32 @trocaLinhaPeq(i32 %35, i32 %38)
br label %40
40: ; preds = %16, %32, %24, %18
br label %96
41: ; preds = %10
%42 = call i32 (...) @rand()
%43 = srem i32 %42, 3
%44 = call i32 (...) @rand()
%45 = srem i32 %44, 3
%46 = call i32 @trocaLinhaGrande(i32 %43, i32 %45)
br label %96
47: ; preds = %10
%48 = load i32, i32* %3
switch i32 %48, label %71 [
i32 0, label %49
i32 1, label %55
i32 2, label %63
]
49: ; preds = %47
%50 = call i32 (...) @rand()
%51 = srem i32 %50, 3
%52 = call i32 (...) @rand()
%53 = srem i32 %52, 3
%54 = call i32 @trocaColunaPeq(i32 %51, i32 %53)
br label %71
55: ; preds = %47
%56 = call i32 (...) @rand()
%57 = srem i32 %56, 3
%58 = add nsw i32 %57, 3
%59 = call i32 (...) @rand()
%60 = srem i32 %59, 3
%61 = add nsw i32 %60, 3
%62 = call i32 @trocaColunaPeq(i32 %58, i32 %61)
br label %71
63: ; preds = %47
%64 = call i32 (...) @rand()
%65 = srem i32 %64, 3
%66 = add nsw i32 %65, 6
%67 = call i32 (...) @rand()
%68 = srem i32 %67, 3
%69 = add nsw i32 %68, 6
%70 = call i32 @trocaColunaPeq(i32 %66, i32 %69)
br label %71
71: ; preds = %47, %63, %55, %49
br label %96
72: ; preds = %10
%73 = call i32 (...) @rand()
%74 = srem i32 %73, 3
%75 = call i32 (...) @rand()
%76 = srem i32 %75, 3
%77 = call i32 @trocaColunaGrande(i32 %74, i32 %76)
br label %96
78: ; preds = %10
%79 = call i32 (...) @giraVertical()
br label %96
80: ; preds = %10
%81 = call i32 (...) @giraHorizontal()
br label %96
82: ; preds = %10
%83 = call i32 (...) @trocaColLinha()
br label %96
84: ; preds = %10
%85 = call i32 (...) @inverteMatriz()
br label %96
86: ; preds = %10
%87 = call i32 (...) @inverteMatriz2()
br label %96
88: ; preds = %10
%89 = call i32 (...) @rand()
%90 = srem i32 %89, 9
%91 = add nsw i32 %90, 1
%92 = call i32 (...) @rand()
%93 = srem i32 %92, 9
%94 = add nsw i32 %93, 1
%95 = call i32 @substitui(i32 %91, i32 %94)
br label %96
96: ; preds = %10, %88, %86, %84, %82, %80, %78, %72, %71, %41, %40
br label %97
97: ; preds = %96
%98 = load i32, i32* %2
%99 = add nsw i32 %98, 1
store i32 %99, i32* %2
br label %7
100: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @geraSudoku() {
%1 = tail call i32 (...) @inicializar()
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
br label %4
4: ; preds = %0, %86
%5 = phi i32 [ 0, %0 ], [ %87, %86 ]
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 10
%8 = tail call i32 (...) @rand()
%9 = srem i32 %8, 3
switch i32 %7, label %86 [
i32 0, label %10
i32 1, label %33
i32 2, label %39
i32 3, label %62
i32 4, label %68
i32 5, label %70
i32 6, label %72
i32 7, label %74
i32 8, label %76
i32 9, label %78
]
10: ; preds = %4
switch i32 %9, label %86 [
i32 0, label %11
i32 1, label %17
i32 2, label %25
]
11: ; preds = %10
%12 = tail call i32 (...) @rand()
%13 = srem i32 %12, 3
%14 = tail call i32 (...) @rand()
%15 = srem i32 %14, 3
%16 = tail call i32 @trocaLinhaPeq(i32 %13, i32 %15)
br label %86
17: ; preds = %10
%18 = tail call i32 (...) @rand()
%19 = srem i32 %18, 3
%20 = add nsw i32 %19, 3
%21 = tail call i32 (...) @rand()
%22 = srem i32 %21, 3
%23 = add nsw i32 %22, 3
%24 = tail call i32 @trocaLinhaPeq(i32 %20, i32 %23)
br label %86
25: ; preds = %10
%26 = tail call i32 (...) @rand()
%27 = srem i32 %26, 3
%28 = add nsw i32 %27, 6
%29 = tail call i32 (...) @rand()
%30 = srem i32 %29, 3
%31 = add nsw i32 %30, 6
%32 = tail call i32 @trocaLinhaPeq(i32 %28, i32 %31)
br label %86
33: ; preds = %4
%34 = tail call i32 (...) @rand()
%35 = srem i32 %34, 3
%36 = tail call i32 (...) @rand()
%37 = srem i32 %36, 3
%38 = tail call i32 @trocaLinhaGrande(i32 %35, i32 %37)
br label %86
39: ; preds = %4
switch i32 %9, label %86 [
i32 0, label %40
i32 1, label %46
i32 2, label %54
]
40: ; preds = %39
%41 = tail call i32 (...) @rand()
%42 = srem i32 %41, 3
%43 = tail call i32 (...) @rand()
%44 = srem i32 %43, 3
%45 = tail call i32 @trocaColunaPeq(i32 %42, i32 %44)
br label %86
46: ; preds = %39
%47 = tail call i32 (...) @rand()
%48 = srem i32 %47, 3
%49 = add nsw i32 %48, 3
%50 = tail call i32 (...) @rand()
%51 = srem i32 %50, 3
%52 = add nsw i32 %51, 3
%53 = tail call i32 @trocaColunaPeq(i32 %49, i32 %52)
br label %86
54: ; preds = %39
%55 = tail call i32 (...) @rand()
%56 = srem i32 %55, 3
%57 = add nsw i32 %56, 6
%58 = tail call i32 (...) @rand()
%59 = srem i32 %58, 3
%60 = add nsw i32 %59, 6
%61 = tail call i32 @trocaColunaPeq(i32 %57, i32 %60)
br label %86
62: ; preds = %4
%63 = tail call i32 (...) @rand()
%64 = srem i32 %63, 3
%65 = tail call i32 (...) @rand()
%66 = srem i32 %65, 3
%67 = tail call i32 @trocaColunaGrande(i32 %64, i32 %66)
br label %86
68: ; preds = %4
%69 = tail call i32 (...) @giraVertical()
br label %86
70: ; preds = %4
%71 = tail call i32 (...) @giraHorizontal()
br label %86
72: ; preds = %4
%73 = tail call i32 (...) @trocaColLinha()
br label %86
74: ; preds = %4
%75 = tail call i32 (...) @inverteMatriz()
br label %86
76: ; preds = %4
%77 = tail call i32 (...) @inverteMatriz2()
br label %86
78: ; preds = %4
%79 = tail call i32 (...) @rand()
%80 = srem i32 %79, 9
%81 = add nsw i32 %80, 1
%82 = tail call i32 (...) @rand()
%83 = srem i32 %82, 9
%84 = add nsw i32 %83, 1
%85 = tail call i32 @substitui(i32 %81, i32 %84)
br label %86
86: ; preds = %33, %62, %68, %70, %72, %74, %76, %78, %4, %10, %25, %17, %11, %39, %54, %46, %40
%87 = add nuw nsw i32 %5, 1
%88 = icmp eq i32 %87, 10
br i1 %88, label %89, label %4
89: ; preds = %86
ret void
}