#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 *, float, float, float, float);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main() {
  float numero1, numero2;
  float multiplicacao, divisao, adicao, subtracao;
  scanf("%f%f", &numero1, &numero2);
  multiplicacao = numero1 * numero2;
  divisao = numero1 / numero2;
  adicao = numero1 + numero2;
  subtracao = numero1 - numero2;
  printf("%f\n%f\n%f\n%f\n", multiplicacao, divisao, adicao, subtracao);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm3
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm3
movss  (%rsp),%xmm4
movaps %xmm3,%xmm0
mulss  %xmm4,%xmm0
movaps %xmm3,%xmm1
divss  %xmm4,%xmm1
movaps %xmm3,%xmm2
addss  %xmm4,%xmm2
subss  %xmm4,%xmm3
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%f%f\00"
@.str.1 = [13 x i8] c"%f\0A%f\0A%f\0A%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %2, float* %3)
%9 = load float, float* %2
%10 = load float, float* %3
%11 = fmul float %9, %10
store float %11, float* %4
%12 = load float, float* %2
%13 = load float, float* %3
%14 = fdiv float %12, %13
store float %14, float* %5
%15 = load float, float* %2
%16 = load float, float* %3
%17 = fadd float %15, %16
store float %17, float* %6
%18 = load float, float* %2
%19 = load float, float* %3
%20 = fsub float %18, %19
store float %20, float* %7
%21 = load float, float* %4
%22 = load float, float* %5
%23 = load float, float* %6
%24 = load float, float* %7
%25 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float %21, float %22, float %23, float %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%f%f\00"
@.str.1 = [13 x i8] c"%f\0A%f\0A%f\0A%f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = fmul float %6, %7
%9 = fdiv float %6, %7
%10 = fadd float %6, %7
%11 = fsub float %6, %7
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float %8, float %9, float %10, float %11)
ret i32 0
}