#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 */
unsigned long long atoll(char *);
int cpf_valido(unsigned long long);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  unsigned long long int n = 0;
  int v = 0;
  if (argc == 2) {
    n = atoll(argv[1]);
    v = cpf_valido(n);
    printf("CPF %llu => %sválido\n", n, v ? "" : "in");
    return v;
  }
  printf("Sintaxe: %s <CPF>\n", argv[0]);
  return 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    11b1 <main+0x81>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoll@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <cpf_valido@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%ecx
lea    0xe8d(%rip),%rdx
lea    0xe9b(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11cd <main+0x9d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    1176 <main+0x46>
mov    0x8(%rsi),%rdi
call   1040 <atoll@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1050 <cpf_valido@plt>
mov    %eax,%ebx
test   %eax,%eax
lea    0xebf(%rip),%rax
lea    0xecd(%rip),%rdx
cmove  %rax,%rdx
lea    0xe96(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    118c <main+0x5c>
mov    (%rsi),%rsi
lea    0xe9a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x2,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [23 x i8] c"CPF %llu => %sv\C3\A1lido\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [3 x i8] c"in\00"
@.str.3 = [19 x i8] c"Sintaxe: %s <CPF>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %24
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i64 @atoll(i8* %13)
store i64 %14, i64* %6
%15 = load i64, i64* %6
%16 = call i32 @cpf_valido(i64 %15)
store i32 %16, i32* %7
%17 = load i64, i64* %6
%18 = load i32, i32* %7
%19 = icmp ne i32 %18, 0
%20 = zext i1 %19 to i64
%21 = select i1 %19, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 %17, i8* %21)
%23 = load i32, i32* %7
store i32 %23, i32* %3
br label %29
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 0
%27 = load i8*, i8** %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %27)
store i32 2, i32* %3
br label %29
29: ; preds = %24, %10
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
@.str = [23 x i8] c"CPF %llu => %sv\C3\A1lido\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [3 x i8] c"in\00"
@.str.3 = [19 x i8] c"Sintaxe: %s <CPF>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @atoll(i8* %6)
%8 = tail call i32 @cpf_valido(i64 %7)
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 %7, i8* %10)
br label %15
12: ; preds = %2
%13 = load i8*, i8** %1
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %12, %4
%16 = phi i32 [ %8, %4 ], [ 2, %12 ]
ret i32 %16
}