#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 *, float *);
main() {
  float t1, t2, v1, v2, t, v;
  printf(" Введите количество и температуру воды в первой таре\n v1=");
  scanf("%f", &v1);
  printf("\n t1=");
  scanf("%f", &t1);
  printf(" Введите количество и температуру воды во второй таре\n v2=");
  scanf("%f", &v2);
  printf("\n t2=");
  scanf("%f", &t2);
  v = v1 + v2;
  t = (v1 * t1 + v2 * t2) / v;
  printf(
      "\n Общая температура при смешивании =%f . Общая масса жидкости =%f \n",
      t, v);
  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    0xf22(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xf15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xf47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  -0x14(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
divss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xee8(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf2c(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xf1b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xf06(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xf55(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
movaps %xmm0,%xmm2
addss  %xmm1,%xmm2
mulss  0x8(%rsp),%xmm1
mulss  0xc(%rsp),%xmm0
addss  %xmm1,%xmm0
divss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
lea    0xf0f(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [102 x i8] c" \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BA\D0\BE\D0\BB\D0\B8\D1\87\D0\B5\D1\81\D1\82\D0\B2\D0\BE \D0\B8 \D1\82\D0\B5\D0\BC\D0\BF\D0\B5\D1\80\D0\B0\D1\82\D1\83\D1\80\D1\83 \D0\B2\D0\BE\D0\B4\D1\8B \D0\B2 \D0\BF\D0\B5\D1\80\D0\B2\D0\BE\D0\B9 \D1\82\D0\B0\D1\80\D0\B5\0A v1=\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [6 x i8] c"\0A t1=\00"
@.str.3 = [104 x i8] c" \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BA\D0\BE\D0\BB\D0\B8\D1\87\D0\B5\D1\81\D1\82\D0\B2\D0\BE \D0\B8 \D1\82\D0\B5\D0\BC\D0\BF\D0\B5\D1\80\D0\B0\D1\82\D1\83\D1\80\D1\83 \D0\B2\D0\BE\D0\B4\D1\8B \D0\B2\D0\BE \D0\B2\D1\82\D0\BE\D1\80\D0\BE\D0\B9 \D1\82\D0\B0\D1\80\D0\B5\0A v2=\00"
@.str.4 = [6 x i8] c"\0A t2=\00"
@.str.5 = [115 x i8] c"\0A \D0\9E\D0\B1\D1\89\D0\B0\D1\8F \D1\82\D0\B5\D0\BC\D0\BF\D0\B5\D1\80\D0\B0\D1\82\D1\83\D1\80\D0\B0 \D0\BF\D1\80\D0\B8 \D1\81\D0\BC\D0\B5\D1\88\D0\B8\D0\B2\D0\B0\D0\BD\D0\B8\D0\B8 =%f . \D0\9E\D0\B1\D1\89\D0\B0\D1\8F \D0\BC\D0\B0\D1\81\D1\81\D0\B0 \D0\B6\D0\B8\D0\B4\D0\BA\D0\BE\D1\81\D1\82\D0\B8 =%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 (i8*, ...) @printf(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%16 = load float, float* %4
%17 = load float, float* %5
%18 = fadd float %16, %17
store float %18, float* %7
%19 = load float, float* %4
%20 = load float, float* %2
%21 = load float, float* %5
%22 = load float, float* %3
%23 = fmul float %21, %22
%24 = call float @llvm.fmuladd.f32(float %19, float %20, float %23)
%25 = load float, float* %7
%26 = fdiv float %24, %25
store float %26, float* %6
%27 = load float, float* %6
%28 = fpext float %27 to double
%29 = load float, float* %7
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.5, i64 0, i64 0), double %28, double %30)
ret i32 0
}

LLVM IR (-O2):
@.str = [102 x i8] c" \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BA\D0\BE\D0\BB\D0\B8\D1\87\D0\B5\D1\81\D1\82\D0\B2\D0\BE \D0\B8 \D1\82\D0\B5\D0\BC\D0\BF\D0\B5\D1\80\D0\B0\D1\82\D1\83\D1\80\D1\83 \D0\B2\D0\BE\D0\B4\D1\8B \D0\B2 \D0\BF\D0\B5\D1\80\D0\B2\D0\BE\D0\B9 \D1\82\D0\B0\D1\80\D0\B5\0A v1=\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [6 x i8] c"\0A t1=\00"
@.str.3 = [104 x i8] c" \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BA\D0\BE\D0\BB\D0\B8\D1\87\D0\B5\D1\81\D1\82\D0\B2\D0\BE \D0\B8 \D1\82\D0\B5\D0\BC\D0\BF\D0\B5\D1\80\D0\B0\D1\82\D1\83\D1\80\D1\83 \D0\B2\D0\BE\D0\B4\D1\8B \D0\B2\D0\BE \D0\B2\D1\82\D0\BE\D1\80\D0\BE\D0\B9 \D1\82\D0\B0\D1\80\D0\B5\0A v2=\00"
@.str.4 = [6 x i8] c"\0A t2=\00"
@.str.5 = [115 x i8] c"\0A \D0\9E\D0\B1\D1\89\D0\B0\D1\8F \D1\82\D0\B5\D0\BC\D0\BF\D0\B5\D1\80\D0\B0\D1\82\D1\83\D1\80\D0\B0 \D0\BF\D1\80\D0\B8 \D1\81\D0\BC\D0\B5\D1\88\D0\B8\D0\B2\D0\B0\D0\BD\D0\B8\D0\B8 =%f . \D0\9E\D0\B1\D1\89\D0\B0\D1\8F \D0\BC\D0\B0\D1\81\D1\81\D0\B0 \D0\B6\D0\B8\D0\B4\D0\BA\D0\BE\D1\81\D1\82\D0\B8 =%f \0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = bitcast float* %4 to i8*
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([104 x i8], [104 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%17 = load float, float* %3
%18 = load float, float* %4
%19 = fadd float %17, %18
%20 = load float, float* %1
%21 = load float, float* %2
%22 = fmul float %18, %21
%23 = call float @llvm.fmuladd.f32(float %17, float %20, float %22)
%24 = fdiv float %23, %19
%25 = fpext float %24 to double
%26 = fpext float %19 to double
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([115 x i8], [115 x i8]* @.str.5, i64 0, i64 0), double %25, double %26)
ret i32 0
}