#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 abs(int);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
main() {
  int CPF[11] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  int somatorio1, digito1, somatorio2, digito2;
  char *validade = (char *)malloc(sizeof(char[10]));
  for (int i = 0; i <= 10; i++) {
    printf("|==============================================================|");
    printf(
        "\n|....................VALIDADOR DE CPF..........................|");
    printf(
        "\n|Insira o CPF numero a numero pressionando ENTER para confirmar|");
    printf(
        "\n|Insira 9999 pressionando ENTER para reiniciar em caso de erro.|");
    printf(
        "\n|==============================================================|");
    printf("\n|............CPF: "
           "%d%d%d.%d%d%d.%d%d%d-%d%d...............................|",
           CPF[0], CPF[1], CPF[2], CPF[3], CPF[4], CPF[5], CPF[6], CPF[7],
           CPF[8], CPF[9], CPF[10]);
    printf(
        "\n|==============================================================|");
    printf("\n\nInsira o numero: ");
    scanf("%d", &CPF[i]);
    system("cls");
    if (CPF[i] == 9999) {
      main();
    }
  }
  somatorio1 = (CPF[0] * 10) + (CPF[1] * 9) + (CPF[2] * 8) + (CPF[3] * 7) +
               (CPF[4] * 6) + (CPF[5] * 5) + (CPF[6] * 4) + (CPF[7] * 3) +
               (CPF[8] * 2);
  if ((somatorio1 % 11) < 2) {
    digito1 = 0;
  } else {
    digito1 = abs(11 - (somatorio1 % 11));
  }
  somatorio2 = (CPF[0] * 11) + (CPF[1] * 10) + (CPF[2] * 9) + (CPF[3] * 8) +
               (CPF[4] * 7) + (CPF[5] * 6) + (CPF[6] * 5) + (CPF[7] * 4) +
               (CPF[8] * 3) + (CPF[9] * 2);
  if ((somatorio2 % 11) < 2) {
    digito2 = 0;
  } else {
    digito2 = abs(11 - (somatorio2 % 11));
  }
  if (CPF[9] == digito1 && CPF[10] == digito2) {
    validade = "VALIDO";
  } else {
    validade = "INVALIDO";
  }
  printf("|==============================================================|");
  printf("\n|....................VALIDADOR DE CPF..........................|");
  printf("\n|==============================================================|");
  printf("\n\n CPF: %d%d%d.%d%d%d.%d%d%d-%d%d ", CPF[0], CPF[1], CPF[2], CPF[3],
         CPF[4], CPF[5], CPF[6], CPF[7], CPF[8], CPF[9], CPF[10]);
  printf("%s\n\n", validade);
  validade = NULL;
  free(validade);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x88,%rsp
movl   $0x0,-0x1c(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x2c,%edx
call   1070 <memset@plt>
mov    $0xa,%edi
call   1080 <malloc@plt>
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
cmpl   $0xa,-0x6c(%rbp)
jg     12c9 <main+0x149>
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    -0x48(%rbp),%ecx
mov    -0x44(%rbp),%r8d
mov    -0x40(%rbp),%r9d
mov    -0x3c(%rbp),%r15d
mov    -0x38(%rbp),%r14d
mov    -0x34(%rbp),%ebx
mov    -0x30(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
mov    -0x28(%rbp),%eax
lea    0xece(%rip),%rdi
mov    %r15d,(%rsp)
mov    %r14d,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %r11d,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %eax,0x28(%rsp)
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movslq -0x6c(%rbp),%rax
lea    -0x50(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xedb(%rip),%rdi
call   10a0 <scanf@plt>
lea    0xed2(%rip),%rdi
call   1050 <system@plt>
movslq -0x6c(%rbp),%rax
cmpl   $0x270f,-0x50(%rbp,%rax,4)
jne    12b6 <main+0x136>
call   1090 <main@plt>
jmp    12bb <main+0x13b>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11bc <main+0x3c>
imul   $0xa,-0x50(%rbp),%eax
imul   $0x9,-0x4c(%rbp),%ecx
add    %ecx,%eax
mov    -0x48(%rbp),%ecx
shl    $0x3,%ecx
add    %ecx,%eax
imul   $0x7,-0x44(%rbp),%ecx
add    %ecx,%eax
imul   $0x6,-0x40(%rbp),%ecx
add    %ecx,%eax
imul   $0x5,-0x3c(%rbp),%ecx
add    %ecx,%eax
mov    -0x38(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
imul   $0x3,-0x34(%rbp),%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
cmp    $0x2,%edx
jge    1326 <main+0x1a6>
movl   $0x0,-0x58(%rbp)
jmp    1340 <main+0x1c0>
mov    -0x54(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
mov    $0xb,%edi
sub    %edx,%edi
call   1040 <abs@plt>
mov    %eax,-0x58(%rbp)
imul   $0xb,-0x50(%rbp),%eax
imul   $0xa,-0x4c(%rbp),%ecx
add    %ecx,%eax
imul   $0x9,-0x48(%rbp),%ecx
add    %ecx,%eax
mov    -0x44(%rbp),%ecx
shl    $0x3,%ecx
add    %ecx,%eax
imul   $0x7,-0x40(%rbp),%ecx
add    %ecx,%eax
imul   $0x6,-0x3c(%rbp),%ecx
add    %ecx,%eax
imul   $0x5,-0x38(%rbp),%ecx
add    %ecx,%eax
mov    -0x34(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
imul   $0x3,-0x30(%rbp),%ecx
add    %ecx,%eax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
cmp    $0x2,%edx
jge    13a3 <main+0x223>
movl   $0x0,-0x60(%rbp)
jmp    13bd <main+0x23d>
mov    -0x5c(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
mov    $0xb,%edi
sub    %edx,%edi
call   1040 <abs@plt>
mov    %eax,-0x60(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x58(%rbp),%eax
jne    13e5 <main+0x265>
mov    -0x28(%rbp),%eax
cmp    -0x60(%rbp),%eax
jne    13e5 <main+0x265>
lea    0xd96(%rip),%rax
mov    %rax,-0x68(%rbp)
jmp    13f0 <main+0x270>
lea    0xd84(%rip),%rax
mov    %rax,-0x68(%rbp)
lea    0xcd0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xbfb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xcb3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    -0x48(%rbp),%ecx
mov    -0x44(%rbp),%r8d
mov    -0x40(%rbp),%r9d
mov    -0x3c(%rbp),%r15d
mov    -0x38(%rbp),%r14d
mov    -0x34(%rbp),%ebx
mov    -0x30(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
mov    -0x28(%rbp),%eax
lea    0xd31(%rip),%rdi
mov    %r15d,(%rsp)
mov    %r14d,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %r11d,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %eax,0x28(%rsp)
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x68(%rbp),%rsi
lea    0xd27(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movq   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x1c(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    $0xa,%edi
call   1060 <malloc@plt>
lea    0xf36(%rip),%r14
xor    %r13d,%r13d
jmp    11ae <main+0x4e>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x4,%r13
cmp    $0x2c,%r13
je     1289 <main+0x129>
lea    0xf12(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe3d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe71(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%edx
mov    0x8(%rsp),%ecx
mov    0xc(%rsp),%r8d
mov    0x10(%rsp),%r9d
mov    0x14(%rsp),%r10d
mov    0x18(%rsp),%r11d
mov    0x1c(%rsp),%ebp
mov    0x20(%rsp),%ebx
mov    0x24(%rsp),%r15d
mov    0x28(%rsp),%r12d
lea    0xee0(%rip),%rdi
xor    %eax,%eax
push   %r12
push   %r15
push   %rbx
push   %rbp
push   %r11
push   %r10
call   1050 <printf@plt>
add    $0x30,%rsp
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf07(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%rsp,%r13,1),%rsi
lea    0xf09(%rip),%rdi
call   1080 <scanf@plt>
lea    0xf00(%rip),%rdi
call   1040 <system@plt>
cmpl   $0x270f,(%rsp,%r13,1)
jne    11a0 <main+0x40>
call   1070 <main@plt>
jmp    11a0 <main+0x40>
mov    (%rsp),%r8d
mov    0x4(%rsp),%r9d
lea    (%r9,%r9,8),%eax
lea    (%r8,%r8,4),%r11d
lea    (%rax,%r11,2),%eax
mov    0x8(%rsp),%r10d
lea    (%rax,%r10,8),%eax
mov    0xc(%rsp),%esi
lea    0x0(,%rsi,8),%edx
sub    %esi,%edx
add    %eax,%edx
mov    0x10(%rsp),%ecx
lea    (%rcx,%rcx,2),%eax
lea    (%rdx,%rax,2),%eax
mov    0x14(%rsp),%r15d
lea    (%r15,%r15,4),%edx
add    %eax,%edx
mov    0x18(%rsp),%r12d
lea    (%rdx,%r12,4),%eax
mov    0x1c(%rsp),%r13d
lea    0x0(%r13,%r13,2),%edx
add    %eax,%edx
mov    0x20(%rsp),%ebx
lea    (%rdx,%rbx,2),%eax
cltq
imul   $0x2e8ba2e9,%rax,%rdx
mov    %rdx,%rdi
shr    $0x3f,%rdi
shr    $0x20,%rdx
sar    %edx
add    %edi,%edx
lea    (%rdx,%rdx,4),%edi
lea    (%rdx,%rdi,2),%edx
sub    %edx,%eax
mov    $0xb,%edx
sub    %eax,%edx
xor    %r14d,%r14d
cmp    $0x2,%eax
cmovl  %r14d,%edx
mov    $0xb,%eax
lea    (%r8,%r11,2),%edi
lea    (%r9,%r9,4),%ebp
lea    (%rdi,%rbp,2),%edi
lea    (%r10,%r10,8),%ebp
add    %edi,%ebp
lea    0x0(%rbp,%rsi,8),%esi
lea    0x0(,%rcx,8),%edi
sub    %ecx,%edi
add    %esi,%edi
lea    (%r15,%r15,2),%ecx
lea    (%rdi,%rcx,2),%ecx
lea    (%r12,%r12,4),%esi
add    %ecx,%esi
lea    (%rsi,%r13,4),%ecx
lea    (%rbx,%rbx,2),%esi
add    %ecx,%esi
mov    0x24(%rsp),%ecx
lea    (%rsi,%rcx,2),%esi
movslq %esi,%rsi
imul   $0x2e8ba2e9,%rsi,%rdi
mov    %rdi,%rbp
shr    $0x3f,%rbp
shr    $0x20,%rdi
sar    %edi
add    %ebp,%edi
lea    (%rdi,%rdi,4),%ebp
lea    (%rdi,%rbp,2),%edi
sub    %edi,%esi
sub    %esi,%eax
cmp    $0x2,%esi
cmovl  %r14d,%eax
xor    %ecx,%edx
xor    0x28(%rsp),%eax
lea    0xde1(%rip),%rcx
lea    0xdd8(%rip),%r15
or     %edx,%eax
cmove  %rcx,%r15
lea    0xd22(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc4d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd05(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%edx
mov    0x8(%rsp),%ecx
mov    0xc(%rsp),%r8d
mov    0x10(%rsp),%r9d
mov    0x14(%rsp),%r10d
mov    0x18(%rsp),%r11d
mov    0x1c(%rsp),%r14d
mov    0x20(%rsp),%r12d
mov    0x24(%rsp),%ebx
mov    0x28(%rsp),%ebp
lea    0xd79(%rip),%rdi
xor    %eax,%eax
push   %rbp
push   %rbx
push   %r12
push   %r14
push   %r11
push   %r10
call   1050 <printf@plt>
add    $0x30,%rsp
lea    0xd80(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [65 x i8] c"|==============================================================|\00"
@.str.1 = [66 x i8] c"\0A|....................VALIDADOR DE CPF..........................|\00"
@.str.2 = [66 x i8] c"\0A|Insira o CPF numero a numero pressionando ENTER para confirmar|\00"
@.str.3 = [66 x i8] c"\0A|Insira 9999 pressionando ENTER para reiniciar em caso de erro.|\00"
@.str.4 = [66 x i8] c"\0A|==============================================================|\00"
@.str.5 = [77 x i8] c"\0A|............CPF: %d%d%d.%d%d%d.%d%d%d-%d%d...............................|\00"
@.str.6 = [20 x i8] c"\0A\0AInsira o numero: \00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [4 x i8] c"cls\00"
@.str.9 = [7 x i8] c"VALIDO\00"
@.str.10 = [9 x i8] c"INVALIDO\00"
@.str.11 = [35 x i8] c"\0A\0A CPF: %d%d%d.%d%d%d.%d%d%d-%d%d \00"
@.str.12 = [5 x i8] c"%s\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 0, i32* %1
%9 = bitcast [11 x i32]* %2 to i8*
%10 = call i64 @malloc(i32 10)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %7
store i32 0, i32* %8
br label %12
12: ; preds = %59, %0
%13 = load i32, i32* %8
%14 = icmp sle i32 %13, 10
br i1 %14, label %15, label %62
15: ; preds = %12
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%21 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%22 = load i32, i32* %21
%23 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 1
%24 = load i32, i32* %23
%25 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 2
%26 = load i32, i32* %25
%27 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 3
%28 = load i32, i32* %27
%29 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 4
%30 = load i32, i32* %29
%31 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 5
%32 = load i32, i32* %31
%33 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 6
%34 = load i32, i32* %33
%35 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 7
%36 = load i32, i32* %35
%37 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 8
%38 = load i32, i32* %37
%39 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 9
%40 = load i32, i32* %39
%41 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 10
%42 = load i32, i32* %41
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.5, i64 0, i64 0), i32 %22, i32 %24, i32 %26, i32 %28, i32 %30, i32 %32, i32 %34, i32 %36, i32 %38, i32 %40, i32 %42)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%46 = load i32, i32* %8
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 %47
%49 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %48)
%50 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%51 = load i32, i32* %8
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 %52
%54 = load i32, i32* %53
%55 = icmp eq i32 %54, 9999
br i1 %55, label %56, label %58
56: ; preds = %15
%57 = call i32 @main()
br label %58
58: ; preds = %56, %15
br label %59
59: ; preds = %58
%60 = load i32, i32* %8
%61 = add nsw i32 %60, 1
store i32 %61, i32* %8
br label %12
62: ; preds = %12
%63 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%64 = load i32, i32* %63
%65 = mul nsw i32 %64, 10
%66 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 1
%67 = load i32, i32* %66
%68 = mul nsw i32 %67, 9
%69 = add nsw i32 %65, %68
%70 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 2
%71 = load i32, i32* %70
%72 = mul nsw i32 %71, 8
%73 = add nsw i32 %69, %72
%74 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 3
%75 = load i32, i32* %74
%76 = mul nsw i32 %75, 7
%77 = add nsw i32 %73, %76
%78 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 4
%79 = load i32, i32* %78
%80 = mul nsw i32 %79, 6
%81 = add nsw i32 %77, %80
%82 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 5
%83 = load i32, i32* %82
%84 = mul nsw i32 %83, 5
%85 = add nsw i32 %81, %84
%86 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 6
%87 = load i32, i32* %86
%88 = mul nsw i32 %87, 4
%89 = add nsw i32 %85, %88
%90 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 7
%91 = load i32, i32* %90
%92 = mul nsw i32 %91, 3
%93 = add nsw i32 %89, %92
%94 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 8
%95 = load i32, i32* %94
%96 = mul nsw i32 %95, 2
%97 = add nsw i32 %93, %96
store i32 %97, i32* %3
%98 = load i32, i32* %3
%99 = srem i32 %98, 11
%100 = icmp slt i32 %99, 2
br i1 %100, label %101, label %102
101: ; preds = %62
store i32 0, i32* %4
br label %107
102: ; preds = %62
%103 = load i32, i32* %3
%104 = srem i32 %103, 11
%105 = sub nsw i32 11, %104
%106 = call i32 @abs(i32 %105)
store i32 %106, i32* %4
br label %107
107: ; preds = %102, %101
%108 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%109 = load i32, i32* %108
%110 = mul nsw i32 %109, 11
%111 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 1
%112 = load i32, i32* %111
%113 = mul nsw i32 %112, 10
%114 = add nsw i32 %110, %113
%115 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 2
%116 = load i32, i32* %115
%117 = mul nsw i32 %116, 9
%118 = add nsw i32 %114, %117
%119 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 3
%120 = load i32, i32* %119
%121 = mul nsw i32 %120, 8
%122 = add nsw i32 %118, %121
%123 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 4
%124 = load i32, i32* %123
%125 = mul nsw i32 %124, 7
%126 = add nsw i32 %122, %125
%127 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 5
%128 = load i32, i32* %127
%129 = mul nsw i32 %128, 6
%130 = add nsw i32 %126, %129
%131 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 6
%132 = load i32, i32* %131
%133 = mul nsw i32 %132, 5
%134 = add nsw i32 %130, %133
%135 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 7
%136 = load i32, i32* %135
%137 = mul nsw i32 %136, 4
%138 = add nsw i32 %134, %137
%139 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 8
%140 = load i32, i32* %139
%141 = mul nsw i32 %140, 3
%142 = add nsw i32 %138, %141
%143 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 9
%144 = load i32, i32* %143
%145 = mul nsw i32 %144, 2
%146 = add nsw i32 %142, %145
store i32 %146, i32* %5
%147 = load i32, i32* %5
%148 = srem i32 %147, 11
%149 = icmp slt i32 %148, 2
br i1 %149, label %150, label %151
150: ; preds = %107
store i32 0, i32* %6
br label %156
151: ; preds = %107
%152 = load i32, i32* %5
%153 = srem i32 %152, 11
%154 = sub nsw i32 11, %153
%155 = call i32 @abs(i32 %154)
store i32 %155, i32* %6
br label %156
156: ; preds = %151, %150
%157 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 9
%158 = load i32, i32* %157
%159 = load i32, i32* %4
%160 = icmp eq i32 %158, %159
br i1 %160, label %161, label %167
161: ; preds = %156
%162 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 10
%163 = load i32, i32* %162
%164 = load i32, i32* %6
%165 = icmp eq i32 %163, %164
br i1 %165, label %166, label %167
166: ; preds = %161
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8** %7
br label %168
167: ; preds = %161, %156
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8** %7
br label %168
168: ; preds = %167, %166
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%172 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%173 = load i32, i32* %172
%174 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 1
%175 = load i32, i32* %174
%176 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 2
%177 = load i32, i32* %176
%178 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 3
%179 = load i32, i32* %178
%180 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 4
%181 = load i32, i32* %180
%182 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 5
%183 = load i32, i32* %182
%184 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 6
%185 = load i32, i32* %184
%186 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 7
%187 = load i32, i32* %186
%188 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 8
%189 = load i32, i32* %188
%190 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 9
%191 = load i32, i32* %190
%192 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 10
%193 = load i32, i32* %192
%194 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %173, i32 %175, i32 %177, i32 %179, i32 %181, i32 %183, i32 %185, i32 %187, i32 %189, i32 %191, i32 %193)
%195 = load i8*, i8** %7
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* %195)
store i8* null, i8** %7
%197 = load i8*, i8** %7
%198 = call i32 @free(i8* %197)
%199 = load i32, i32* %1
ret i32 %199
}

LLVM IR (-O2):
@.str = [65 x i8] c"|==============================================================|\00"
@.str.1 = [66 x i8] c"\0A|....................VALIDADOR DE CPF..........................|\00"
@.str.2 = [66 x i8] c"\0A|Insira o CPF numero a numero pressionando ENTER para confirmar|\00"
@.str.3 = [66 x i8] c"\0A|Insira 9999 pressionando ENTER para reiniciar em caso de erro.|\00"
@.str.4 = [66 x i8] c"\0A|==============================================================|\00"
@.str.5 = [77 x i8] c"\0A|............CPF: %d%d%d.%d%d%d.%d%d%d-%d%d...............................|\00"
@.str.6 = [20 x i8] c"\0A\0AInsira o numero: \00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [4 x i8] c"cls\00"
@.str.9 = [7 x i8] c"VALIDO\00"
@.str.10 = [9 x i8] c"INVALIDO\00"
@.str.11 = [35 x i8] c"\0A\0A CPF: %d%d%d.%d%d%d.%d%d%d-%d%d \00"
@.str.12 = [5 x i8] c"%s\0A\0A\00"
define i32 @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = tail call i64 @malloc(i32 10)
%4 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%5 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 1
%6 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 2
%7 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 3
%8 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 4
%9 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 5
%10 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 6
%11 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 7
%12 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 8
%13 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 9
%14 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 10
br label %92
15: ; preds = %120
%16 = load i32, i32* %4
%17 = mul nsw i32 %16, 10
%18 = load i32, i32* %5
%19 = mul nsw i32 %18, 9
%20 = add nsw i32 %19, %17
%21 = load i32, i32* %6
%22 = shl nsw i32 %21, 3
%23 = add nsw i32 %20, %22
%24 = load i32, i32* %7
%25 = mul nsw i32 %24, 7
%26 = add nsw i32 %23, %25
%27 = load i32, i32* %8
%28 = mul nsw i32 %27, 6
%29 = add nsw i32 %26, %28
%30 = load i32, i32* %9
%31 = mul nsw i32 %30, 5
%32 = add nsw i32 %29, %31
%33 = load i32, i32* %10
%34 = shl nsw i32 %33, 2
%35 = add nsw i32 %32, %34
%36 = load i32, i32* %11
%37 = mul nsw i32 %36, 3
%38 = add nsw i32 %35, %37
%39 = load i32, i32* %12
%40 = shl nsw i32 %39, 1
%41 = add nsw i32 %38, %40
%42 = srem i32 %41, 11
%43 = icmp slt i32 %42, 2
%44 = sub nsw i32 11, %42
%45 = select i1 %43, i32 0, i32 %44
%46 = mul nsw i32 %16, 11
%47 = mul nsw i32 %18, 10
%48 = add nsw i32 %47, %46
%49 = mul nsw i32 %21, 9
%50 = add nsw i32 %48, %49
%51 = shl nsw i32 %24, 3
%52 = add nsw i32 %50, %51
%53 = mul nsw i32 %27, 7
%54 = add nsw i32 %52, %53
%55 = mul nsw i32 %30, 6
%56 = add nsw i32 %54, %55
%57 = mul nsw i32 %33, 5
%58 = add nsw i32 %56, %57
%59 = shl nsw i32 %36, 2
%60 = add nsw i32 %58, %59
%61 = mul nsw i32 %39, 3
%62 = add nsw i32 %60, %61
%63 = load i32, i32* %13
%64 = shl nsw i32 %63, 1
%65 = add nsw i32 %62, %64
%66 = srem i32 %65, 11
%67 = icmp slt i32 %66, 2
%68 = sub nsw i32 11, %66
%69 = select i1 %67, i32 0, i32 %68
%70 = icmp eq i32 %63, %45
%71 = load i32, i32* %14
%72 = icmp eq i32 %71, %69
%73 = select i1 %70, i1 %72, i1 false
%74 = select i1 %73, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0)
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%78 = load i32, i32* %4
%79 = load i32, i32* %5
%80 = load i32, i32* %6
%81 = load i32, i32* %7
%82 = load i32, i32* %8
%83 = load i32, i32* %9
%84 = load i32, i32* %10
%85 = load i32, i32* %11
%86 = load i32, i32* %12
%87 = load i32, i32* %13
%88 = load i32, i32* %14
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %78, i32 %79, i32 %80, i32 %81, i32 %82, i32 %83, i32 %84, i32 %85, i32 %86, i32 %87, i32 %88)
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* %74)
%91 = call i32 @free(i8* null)
ret i32 0
92: ; preds = %0, %120
%93 = phi i64 [ 0, %0 ], [ %121, %120 ]
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0))
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%99 = load i32, i32* %4
%100 = load i32, i32* %5
%101 = load i32, i32* %6
%102 = load i32, i32* %7
%103 = load i32, i32* %8
%104 = load i32, i32* %9
%105 = load i32, i32* %10
%106 = load i32, i32* %11
%107 = load i32, i32* %12
%108 = load i32, i32* %13
%109 = load i32, i32* %14
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @.str.5, i64 0, i64 0), i32 %99, i32 %100, i32 %101, i32 %102, i32 %103, i32 %104, i32 %105, i32 %106, i32 %107, i32 %108, i32 %109)
%111 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%113 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 %93
%114 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %113)
%115 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%116 = load i32, i32* %113
%117 = icmp eq i32 %116, 9999
br i1 %117, label %118, label %120
118: ; preds = %92
%119 = call i32 @main()
br label %120
120: ; preds = %92, %118
%121 = add nuw nsw i64 %93, 1
%122 = icmp eq i64 %121, 11
br i1 %122, label %15, label %92
}