#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 pow(float, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *, float *, float *, float *, float *,
                         float *);
int ej5() {
  float a, b, c, d, e, f;
  float x, y;
  printf("Ingrese valores de a, b, c, d, e y f en ese orden: \n");
  scanf("%f%f%f%f%f%f", &a, &b, &c, &d, &e, &f);
  x = (3 * a + b) / (c - ((d + 5 * e) / (a - b)));
  y = 3 * pow(a, 4) - 5 * pow(b, 3) + 12 * c - 7;
  printf("x=%f \n y=%f \n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<ej5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
lea    -0x14(%rbp),%r9
lea    -0x18(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xe8c(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm3
movss  -0x14(%rbp),%xmm2
movss  0xe69(%rip),%xmm4
mulss  %xmm4,%xmm2
addss  %xmm3,%xmm2
movss  -0x4(%rbp),%xmm3
subss  -0x8(%rbp),%xmm3
divss  %xmm3,%xmm2
subss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x4,%edi
call   1050 <pow@plt>
imul   $0x3,%eax,%eax
mov    %eax,-0x24(%rbp)
movss  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
imul   $0x5,%ecx,%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm1
movss  -0xc(%rbp),%xmm0
movss  0xe03(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xdef(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe1f(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ej5>:
push   %rbx
sub    $0x30,%rsp
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0x2c(%rsp),%rax
mov    %rax,(%rsp)
lea    0xeaf(%rip),%rdi
lea    0x28(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x24(%rsp),%r8
lea    0x20(%rsp),%r9
call   1050 <scanf@plt>
movss  0x28(%rsp),%xmm0
movss  0x18(%rsp),%xmm1
movss  0xe6d(%rip),%xmm2
mulss  %xmm0,%xmm2
addss  %xmm1,%xmm2
movaps %xmm2,%xmm5
movss  0x14(%rsp),%xmm2
movss  0x20(%rsp),%xmm3
mulss  0xe52(%rip),%xmm3
addss  0x24(%rsp),%xmm3
movaps %xmm0,%xmm4
subss  %xmm1,%xmm4
divss  %xmm4,%xmm3
subss  %xmm3,%xmm2
divss  %xmm2,%xmm5
movss  %xmm5,0x1c(%rsp)
mov    $0x4,%edi
call   1060 <pow@plt>
lea    (%rax,%rax,2),%ebx
movss  0x18(%rsp),%xmm0
mov    $0x3,%edi
call   1060 <pow@plt>
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
movss  0x14(%rsp),%xmm1
mulss  0xe00(%rip),%xmm1
addss  %xmm0,%xmm1
addss  0xdf8(%rip),%xmm1
movss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
lea    0xdf4(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"Ingrese valores de a, b, c, d, e y f en ese orden: \0A\00"
@.str.1 = [13 x i8] c"%f%f%f%f%f%f\00"
@.str.2 = [14 x i8] c"x=%f \0A y=%f \0A\00"
define i32 @ej5() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4, float* %5, float* %6)
%11 = load float, float* %1
%12 = load float, float* %2
%13 = call float @llvm.fmuladd.f32(float 3.000000e+00, float %11, float %12)
%14 = load float, float* %3
%15 = load float, float* %4
%16 = load float, float* %5
%17 = call float @llvm.fmuladd.f32(float 5.000000e+00, float %16, float %15)
%18 = load float, float* %1
%19 = load float, float* %2
%20 = fsub float %18, %19
%21 = fdiv float %17, %20
%22 = fsub float %14, %21
%23 = fdiv float %13, %22
store float %23, float* %7
%24 = load float, float* %1
%25 = call i32 @pow(float %24, i32 4)
%26 = mul nsw i32 3, %25
%27 = load float, float* %2
%28 = call i32 @pow(float %27, i32 3)
%29 = mul nsw i32 5, %28
%30 = sub nsw i32 %26, %29
%31 = sitofp i32 %30 to float
%32 = load float, float* %3
%33 = call float @llvm.fmuladd.f32(float 1.200000e+01, float %32, float %31)
%34 = fsub float %33, 7.000000e+00
store float %34, float* %8
%35 = load float, float* %7
%36 = fpext float %35 to double
%37 = load float, float* %8
%38 = fpext float %37 to double
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %36, double %38)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"%f%f%f%f%f%f\00"
@.str.2 = [14 x i8] c"x=%f \0A y=%f \0A\00"
@str = [52 x i8] c"Ingrese valores de a, b, c, d, e y f en ese orden: \00"
define i32 @ej5() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = bitcast float* %1 to i8*
%8 = bitcast float* %2 to i8*
%9 = bitcast float* %3 to i8*
%10 = bitcast float* %4 to i8*
%11 = bitcast float* %5 to i8*
%12 = bitcast float* %6 to i8*
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4, float* %5, float* %6)
%15 = load float, float* %1
%16 = load float, float* %2
%17 = call float @llvm.fmuladd.f32(float %15, float 3.000000e+00, float %16)
%18 = load float, float* %3
%19 = load float, float* %4
%20 = load float, float* %5
%21 = call float @llvm.fmuladd.f32(float %20, float 5.000000e+00, float %19)
%22 = fsub float %15, %16
%23 = fdiv float %21, %22
%24 = fsub float %18, %23
%25 = fdiv float %17, %24
%26 = call i32 @pow(float %15, i32 4)
%27 = mul nsw i32 %26, 3
%28 = load float, float* %2
%29 = call i32 @pow(float %28, i32 3)
%30 = mul i32 %29, -5
%31 = add i32 %30, %27
%32 = sitofp i32 %31 to float
%33 = load float, float* %3
%34 = call float @llvm.fmuladd.f32(float %33, float 1.200000e+01, float %32)
%35 = fadd float %34, -7.000000e+00
%36 = fpext float %25 to double
%37 = fpext float %35 to double
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %36, double %37)
ret i32 0
}