#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  short int idade;
  int montante;
  long int n_conta;
  printf("Qual sua idade? ");
  scanf("%hd", &idade);
  printf("Qual o montante a depositar: ");
  scanf("%d", &montante);
  printf("Qual o numero da conta: ");
  scanf("%ld", &n_conta);
  printf("Uma pessoa de %hd anos, depositou R$%d,00 na conta %ld\n", idade,
         montante, n_conta);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x6(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movswl -0x6(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0xa(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movswl 0xa(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x10(%rsp),%rcx
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Qual sua idade? \00"
@.str.1 = [4 x i8] c"%hd\00"
@.str.2 = [30 x i8] c"Qual o montante a depositar: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [25 x i8] c"Qual o numero da conta: \00"
@.str.5 = [4 x i8] c"%ld\00"
@.str.6 = [56 x i8] c"Uma pessoa de %hd anos, depositou R$%d,00 na conta %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i32
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i16* %2)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i64* %4)
%11 = load i16, i16* %2
%12 = sext i16 %11 to i32
%13 = load i32, i32* %3
%14 = load i64, i64* %4
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i64 0, i64 0), i32 %12, i32 %13, i64 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Qual sua idade? \00"
@.str.1 = [4 x i8] c"%hd\00"
@.str.2 = [30 x i8] c"Qual o montante a depositar: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [25 x i8] c"Qual o numero da conta: \00"
@.str.5 = [4 x i8] c"%ld\00"
@.str.6 = [56 x i8] c"Uma pessoa de %hd anos, depositou R$%d,00 na conta %ld\0A\00"
define i32 @main() {
%1 = alloca i16
%2 = alloca i32
%3 = alloca i64
%4 = bitcast i16* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i64* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i16* %1)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i64* %3)
%13 = load i16, i16* %1
%14 = sext i16 %13 to i32
%15 = load i32, i32* %2
%16 = load i64, i64* %3
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i64 0, i64 0), i32 %14, i32 %15, i64 %16)
ret i32 0
}