#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*/ Valores();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int end;
  printf("\n***CALCULOS DE MATRIZES*** \n");
  do {
    printf("\nMatriz Transposta\n");
    Valores();
    printf("\nDigite 1 para sair ou digite qualquer outro numero para "
           "Continuar:\n");
    scanf("%d", &end);
  } while (end != 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <Valores@plt>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    114b <main+0x1b>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
lea    0xed5(%rip),%r14
lea    0xee1(%rip),%r15
lea    0xea7(%rip),%r12
lea    0x4(%rsp),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <Valores@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmpl   $0x1,0x4(%rsp)
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [30 x i8] c"\0A***CALCULOS DE MATRIZES*** \0A\00"
@.str.1 = [20 x i8] c"\0AMatriz Transposta\0A\00"
@.str.2 = [69 x i8] c"\0ADigite 1 para sair ou digite qualquer outro numero para Continuar:\0A\00"
@.str.3 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %9, %0
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (...) @Valores()
%7 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
br label %9
9: ; preds = %4
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 1
br i1 %11, label %4, label %12
12: ; preds = %9
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str.3 = [3 x i8] c"%d\00"
@str = [29 x i8] c"\0A***CALCULOS DE MATRIZES*** \00"
@str.4 = [19 x i8] c"\0AMatriz Transposta\00"
@str.5 = [68 x i8] c"\0ADigite 1 para sair ou digite qualquer outro numero para Continuar:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
br label %4
4: ; preds = %4, %0
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.4, i64 0, i64 0))
%6 = call i32 (...) @Valores()
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.5, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %4
11: ; preds = %4
ret i32 0
}