#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*/ divide();
int /*<<< orphan*/ printf(char *, ...);
int recebe(char *);
void validaDados() {
  int verifica = 0;
  char principal[256];
  verifica = recebe(principal);
  printf("%s\n", principal);
  if (verifica > 0) {
    printf("\nCaracteres invalidos inseridos. Por favor, tente novamente.\n\n");
    validaDados();
  }
  if (verifica == 0) {
    divide();
  }
}


x86 assembly (clang, -O0):
<validaDados>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
call   1050 <recebe@plt>
mov    %eax,-0x4(%rbp)
lea    -0x110(%rbp),%rsi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1193 <validaDados+0x53>
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
call   1060 <validaDados@plt>
cmpl   $0x0,-0x4(%rbp)
jne    11a4 <validaDados+0x64>
mov    $0x0,%al
call   1030 <divide@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validaDados>:
push   %rbp
push   %rbx
sub    $0x108,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <recebe@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <puts@plt>
test   %ebp,%ebp
jle    1175 <validaDados+0x35>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
call   1060 <validaDados@plt>
jmp    117e <validaDados+0x3e>
jne    117e <validaDados+0x3e>
xor    %eax,%eax
call   1040 <divide@plt>
add    $0x108,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [63 x i8] c"\0ACaracteres invalidos inseridos. Por favor, tente novamente.\0A\0A\00"
define void @validaDados() {
%1 = alloca i32
%2 = alloca [256 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @recebe(i8* %3)
store i32 %4, i32* %1
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %1
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %0
%12 = load i32, i32* %1
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @divide()
br label %16
16: ; preds = %14, %11
ret void
}

LLVM IR (-O2):
@str = [62 x i8] c"\0ACaracteres invalidos inseridos. Por favor, tente novamente.\0A\00"
define void @validaDados() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @recebe(i8* %2)
%4 = call i32 @puts(i8* %2)
%5 = icmp sgt i32 %3, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
br label %12
8: ; preds = %0
%9 = icmp eq i32 %3, 0
br i1 %9, label %10, label %12
10: ; preds = %8
%11 = call i32 (...) @divide()
br label %12
12: ; preds = %6, %10, %8
ret void
}