#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, int, int, ...);
int main() {
  char c0, c1, c2, c3;
  int i0, i1, i2, i3;
  float f0, f1, f2, f3;
  c0 = 'd';
  i0 = 50;
  f0 = 50.0;
  printf("Atribui os valores %c, %d e %f as minhas variaveis!\n", c0, i0, f0);
  printf("Aritmetica com int (+ - * / 3): %d, %d, %d, %d\n", i0 + 3, i0 - 3,
         i0 * 3, i0 / 3);
  printf("Aritmetica com float (+ - * / 3): %f, %f, %f, %f\n", f0 + 3, f0 - 3,
         f0 * 3, f0 / 3);
  printf("Aritmetica com char (+ - * / 3): %c, %c, %c, %c\n", c0 + 3, c0 - 3,
         c0 * 3, c0 / 3);
  printf("Aritmetica com char (+ - * / 3): %d, %d, %d, %d\n", c0 + 3, c0 - 3,
         c0 * 3, c0 / 3);
  i0 = 163;
  f1 = i0 / f0;
  i1 = i0 / f0;
  f2 = i0 / (int)f0;
  i2 = (float)i0 / f0;
  f3 = 3 * i0 / f0;
  i3 = 3 * i0 / f0;
  printf("Teste de conversao de tipos de dados: %f, %d, %f, %d, %f, %d\n", f1,
         i1, f2, i2, f3, i3);
  printf("Tesde de divisao inteira de %d por 7: quociente=%d, resto=%d\n", i0,
         i0 / 7, i0 % 7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x64,-0x5(%rbp)
movl   $0x32,-0xc(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movsbl -0x5(%rbp),%esi
mov    -0xc(%rbp),%edx
cvttss2si -0x1c(%rbp),%ecx
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
add    $0x3,%esi
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x38(%rbp)
imul   $0x3,-0xc(%rbp),%ecx
mov    -0xc(%rbp),%eax
mov    $0x3,%edi
cltd
idiv   %edi
mov    -0x38(%rbp),%edx
mov    %eax,%r8d
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xe75(%rip),%xmm0
addss  -0x1c(%rbp),%xmm0
cvttss2si %xmm0,%esi
movss  -0x1c(%rbp),%xmm0
movss  0xe5f(%rip),%xmm1
subss  %xmm1,%xmm0
cvttss2si %xmm0,%edx
movss  0xe4f(%rip),%xmm0
mulss  -0x1c(%rbp),%xmm0
cvttss2si %xmm0,%ecx
movss  -0x1c(%rbp),%xmm0
movss  0xe39(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe97(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%esi
add    $0x3,%esi
movsbl -0x5(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x34(%rbp)
movsbl -0x5(%rbp),%eax
imul   $0x3,%eax,%ecx
movsbl -0x5(%rbp),%eax
mov    $0x3,%edi
cltd
idiv   %edi
mov    -0x34(%rbp),%edx
mov    %eax,%r8d
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%esi
add    $0x3,%esi
movsbl -0x5(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x30(%rbp)
movsbl -0x5(%rbp),%eax
imul   $0x3,%eax,%ecx
movsbl -0x5(%rbp),%eax
mov    $0x3,%edi
cltd
idiv   %edi
mov    -0x30(%rbp),%edx
mov    %eax,%r8d
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xa3,-0xc(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
divss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
divss  -0x1c(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cvttss2si -0x1c(%rbp),%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x24(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
divss  -0x1c(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
imul   $0x3,-0xc(%rbp),%eax
cvtsi2ss %eax,%xmm0
divss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
imul   $0x3,-0xc(%rbp),%eax
cvtsi2ss %eax,%xmm0
divss  -0x1c(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
cvttss2si -0x20(%rbp),%esi
mov    -0x10(%rbp),%edx
cvttss2si -0x24(%rbp),%ecx
mov    -0x14(%rbp),%r8d
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%r9d
lea    0xe1d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    -0x2c(%rbp),%edx
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
mov    $0x64,%esi
mov    $0x32,%edx
mov    $0x32,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
mov    $0x35,%esi
mov    $0x2f,%edx
mov    $0x96,%ecx
mov    $0x10,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf1d(%rip),%rdi
movsd  0xea0(%rip),%xmm0
mov    $0x35,%esi
mov    $0x2f,%edx
mov    $0x96,%ecx
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf2a(%rip),%rdi
mov    $0x67,%esi
mov    $0x61,%edx
mov    $0x12c,%ecx
mov    $0x21,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf38(%rip),%rdi
mov    $0x67,%esi
mov    $0x61,%edx
mov    $0x12c,%ecx
mov    $0x21,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf46(%rip),%rdi
movsd  0xe3d(%rip),%xmm0
mov    $0x3,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
mov    $0x3,%r8d
mov    $0x9,%r9d
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf53(%rip),%rdi
mov    $0xa3,%esi
mov    $0x17,%edx
mov    $0x2,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"Atribui os valores %c, %d e %f as minhas variaveis!\0A\00"
@.str.1 = [48 x i8] c"Aritmetica com int (+ - * / 3): %d, %d, %d, %d\0A\00"
@.str.2 = [50 x i8] c"Aritmetica com float (+ - * / 3): %f, %f, %f, %f\0A\00"
@.str.3 = [49 x i8] c"Aritmetica com char (+ - * / 3): %c, %c, %c, %c\0A\00"
@.str.4 = [49 x i8] c"Aritmetica com char (+ - * / 3): %d, %d, %d, %d\0A\00"
@.str.5 = [62 x i8] c"Teste de conversao de tipos de dados: %f, %d, %f, %d, %f, %d\0A\00"
@.str.6 = [62 x i8] c"Tesde de divisao inteira de %d por 7: quociente=%d, resto=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
store i32 0, i32* %1
store i8 100, i8* %2
store i32 50, i32* %6
store float 5.000000e+01, float* %10
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = load i32, i32* %6
%17 = load float, float* %10
%18 = fptosi float %17 to i32
%19 = call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i32 %18)
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 3
%22 = load i32, i32* %6
%23 = sub nsw i32 %22, 3
%24 = load i32, i32* %6
%25 = mul nsw i32 %24, 3
%26 = load i32, i32* %6
%27 = sdiv i32 %26, 3
%28 = call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %21, i32 %23, i32 %25, i32 %27)
%29 = load float, float* %10
%30 = fadd float %29, 3.000000e+00
%31 = fptosi float %30 to i32
%32 = load float, float* %10
%33 = fsub float %32, 3.000000e+00
%34 = fptosi float %33 to i32
%35 = load float, float* %10
%36 = fmul float %35, 3.000000e+00
%37 = fptosi float %36 to i32
%38 = load float, float* %10
%39 = fdiv float %38, 3.000000e+00
%40 = fpext float %39 to double
%41 = call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i32 %31, i32 %34, i32 %37, double %40)
%42 = load i8, i8* %2
%43 = sext i8 %42 to i32
%44 = add nsw i32 %43, 3
%45 = load i8, i8* %2
%46 = sext i8 %45 to i32
%47 = sub nsw i32 %46, 3
%48 = load i8, i8* %2
%49 = sext i8 %48 to i32
%50 = mul nsw i32 %49, 3
%51 = load i8, i8* %2
%52 = sext i8 %51 to i32
%53 = sdiv i32 %52, 3
%54 = call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0), i32 %44, i32 %47, i32 %50, i32 %53)
%55 = load i8, i8* %2
%56 = sext i8 %55 to i32
%57 = add nsw i32 %56, 3
%58 = load i8, i8* %2
%59 = sext i8 %58 to i32
%60 = sub nsw i32 %59, 3
%61 = load i8, i8* %2
%62 = sext i8 %61 to i32
%63 = mul nsw i32 %62, 3
%64 = load i8, i8* %2
%65 = sext i8 %64 to i32
%66 = sdiv i32 %65, 3
%67 = call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0), i32 %57, i32 %60, i32 %63, i32 %66)
store i32 163, i32* %6
%68 = load i32, i32* %6
%69 = sitofp i32 %68 to float
%70 = load float, float* %10
%71 = fdiv float %69, %70
store float %71, float* %11
%72 = load i32, i32* %6
%73 = sitofp i32 %72 to float
%74 = load float, float* %10
%75 = fdiv float %73, %74
%76 = fptosi float %75 to i32
store i32 %76, i32* %7
%77 = load i32, i32* %6
%78 = load float, float* %10
%79 = fptosi float %78 to i32
%80 = sdiv i32 %77, %79
%81 = sitofp i32 %80 to float
store float %81, float* %12
%82 = load i32, i32* %6
%83 = sitofp i32 %82 to float
%84 = load float, float* %10
%85 = fdiv float %83, %84
%86 = fptosi float %85 to i32
store i32 %86, i32* %8
%87 = load i32, i32* %6
%88 = mul nsw i32 3, %87
%89 = sitofp i32 %88 to float
%90 = load float, float* %10
%91 = fdiv float %89, %90
store float %91, float* %13
%92 = load i32, i32* %6
%93 = mul nsw i32 3, %92
%94 = sitofp i32 %93 to float
%95 = load float, float* %10
%96 = fdiv float %94, %95
%97 = fptosi float %96 to i32
store i32 %97, i32* %9
%98 = load float, float* %11
%99 = fptosi float %98 to i32
%100 = load i32, i32* %7
%101 = load float, float* %12
%102 = fptosi float %101 to i32
%103 = load i32, i32* %8
%104 = load float, float* %13
%105 = fpext float %104 to double
%106 = load i32, i32* %9
%107 = call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0), i32 %99, i32 %100, i32 %102, i32 %103, double %105, i32 %106)
%108 = load i32, i32* %6
%109 = load i32, i32* %6
%110 = sdiv i32 %109, 7
%111 = load i32, i32* %6
%112 = srem i32 %111, 7
%113 = call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.6, i64 0, i64 0), i32 %108, i32 %110, i32 %112)
ret i32 0
}

LLVM IR (-O2):
@.str = [53 x i8] c"Atribui os valores %c, %d e %f as minhas variaveis!\0A\00"
@.str.1 = [48 x i8] c"Aritmetica com int (+ - * / 3): %d, %d, %d, %d\0A\00"
@.str.2 = [50 x i8] c"Aritmetica com float (+ - * / 3): %f, %f, %f, %f\0A\00"
@.str.3 = [49 x i8] c"Aritmetica com char (+ - * / 3): %c, %c, %c, %c\0A\00"
@.str.4 = [49 x i8] c"Aritmetica com char (+ - * / 3): %d, %d, %d, %d\0A\00"
@.str.5 = [62 x i8] c"Teste de conversao de tipos de dados: %f, %d, %f, %d, %f, %d\0A\00"
@.str.6 = [62 x i8] c"Tesde de divisao inteira de %d por 7: quociente=%d, resto=%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 100, i32 50, i32 50)
%2 = tail call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 53, i32 47, i32 150, i32 16)
%3 = tail call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i32 53, i32 47, i32 150, double 0x4030AAAAA0000000)
%4 = tail call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0), i32 103, i32 97, i32 300, i32 33)
%5 = tail call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0), i32 103, i32 97, i32 300, i32 33)
%6 = tail call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0), i32 3, i32 3, i32 3, i32 3, double 0x40238F5C20000000, i32 9)
%7 = tail call i32 (i8*, i32, i32, i32, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.6, i64 0, i64 0), i32 163, i32 23, i32 2)
ret i32 0
}