#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 powf(float, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
float sqrt(float);
main() {
  float a, b, c, x1, x2, D;
  printf("Введите а ");
  scanf("%f", &a);
  printf("Введите b ");
  scanf("%f", &b);
  printf("Введите c ");
  scanf("%f", &c);
  D = powf(b, 2) - 4 * a * c;
  x1 = (-b + sqrt(D)) / 2 * a;
  x2 = (-b - sqrt(D)) / 2 * a;
  if (D == 0)
    printf("Уравнение имеет одно решение. Корень x1=%f\n", x1);
  if (D < 0)
    printf("Уравнение не имеет решения.\n");
  if (D > 0)
    printf("Уравнение имеет два решения. Корни x1=%f x2=%f", x1, x2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfa3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf85(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf67(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0xc(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <powf@plt>
cvtsi2ss %eax,%xmm1
movss  0xe40(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  0xde3(%rip),%xmm1
divss  %xmm1,%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x20(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  0xda0(%rip),%xmm1
divss  %xmm1,%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    129c <main+0x15c>
jp     129c <main+0x15c>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdaa(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
ucomiss -0x1c(%rbp),%xmm0
jbe    12b7 <main+0x177>
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    12e8 <main+0x1a8>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xddd(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf81(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0x14(%rsp),%xmm0
mov    $0x2,%edi
call   1040 <powf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x18(%rsp),%xmm1
mulss  0xe2e(%rip),%xmm1
mulss  0x1c(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  0x14(%rsp),%xmm0
sqrtss %xmm1,%xmm3
xorps  %xmm4,%xmm4
ucomiss %xmm4,%xmm1
movaps %xmm3,%xmm2
movss  %xmm1,0x10(%rsp)
jae    1223 <main+0xd3>
movss  %xmm0,0x20(%rsp)
movaps %xmm1,%xmm0
movss  %xmm3,0xc(%rsp)
call   1070 <sqrt@plt>
xorps  %xmm4,%xmm4
movss  0xc(%rsp),%xmm3
movss  0x10(%rsp),%xmm1
movaps %xmm0,%xmm2
movss  0x20(%rsp),%xmm0
subss  %xmm0,%xmm2
mulss  0xdd5(%rip),%xmm2
mulss  0x18(%rsp),%xmm2
movss  0x14(%rsp),%xmm0
xorps  0xdce(%rip),%xmm0
ucomiss %xmm4,%xmm1
movss  %xmm2,0xc(%rsp)
jae    126e <main+0x11e>
movaps %xmm0,0x20(%rsp)
movaps %xmm1,%xmm0
call   1070 <sqrt@plt>
movss  0xc(%rsp),%xmm2
movss  0x10(%rsp),%xmm1
movaps %xmm0,%xmm3
movaps 0x20(%rsp),%xmm0
subss  %xmm3,%xmm0
mulss  0xd8a(%rip),%xmm0
mulss  0x18(%rsp),%xmm0
movaps %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jne    12b3 <main+0x163>
jp     12b3 <main+0x163>
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
lea    0xdba(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
movss  0xc(%rsp),%xmm2
movss  0x10(%rsp),%xmm1
ucomiss %xmm1,%xmm0
jbe    12d0 <main+0x180>
lea    0xe2f(%rip),%rdi
call   1030 <puts@plt>
movss  0xc(%rsp),%xmm2
movss  0x10(%rsp),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jbe    12f6 <main+0x1a6>
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
movaps 0x20(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xdb3(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B0 \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [18 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 b \00"
@.str.3 = [18 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 c \00"
@.str.4 = [75 x i8] c"\D0\A3\D1\80\D0\B0\D0\B2\D0\BD\D0\B5\D0\BD\D0\B8\D0\B5 \D0\B8\D0\BC\D0\B5\D0\B5\D1\82 \D0\BE\D0\B4\D0\BD\D0\BE \D1\80\D0\B5\D1\88\D0\B5\D0\BD\D0\B8\D0\B5. \D0\9A\D0\BE\D1\80\D0\B5\D0\BD\D1\8C x1=%f\0A\00"
@.str.5 = [52 x i8] c"\D0\A3\D1\80\D0\B0\D0\B2\D0\BD\D0\B5\D0\BD\D0\B8\D0\B5 \D0\BD\D0\B5 \D0\B8\D0\BC\D0\B5\D0\B5\D1\82 \D1\80\D0\B5\D1\88\D0\B5\D0\BD\D0\B8\D1\8F.\0A\00"
@.str.6 = [76 x i8] c"\D0\A3\D1\80\D0\B0\D0\B2\D0\BD\D0\B5\D0\BD\D0\B8\D0\B5 \D0\B8\D0\BC\D0\B5\D0\B5\D1\82 \D0\B4\D0\B2\D0\B0 \D1\80\D0\B5\D1\88\D0\B5\D0\BD\D0\B8\D1\8F. \D0\9A\D0\BE\D1\80\D0\BD\D0\B8 x1=%f x2=%f\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 ([19 x i8], [19 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* %2)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 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* %3)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 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* %4)
%14 = load float, float* %3
%15 = call i32 @powf(float %14, i32 2)
%16 = sitofp i32 %15 to float
%17 = load float, float* %2
%18 = fmul float 4.000000e+00, %17
%19 = load float, float* %4
%20 = fneg float %18
%21 = call float @llvm.fmuladd.f32(float %20, float %19, float %16)
store float %21, float* %7
%22 = load float, float* %3
%23 = fneg float %22
%24 = load float, float* %7
%25 = call float @sqrt(float %24)
%26 = fadd float %23, %25
%27 = fdiv float %26, 2.000000e+00
%28 = load float, float* %2
%29 = fmul float %27, %28
store float %29, float* %5
%30 = load float, float* %3
%31 = fneg float %30
%32 = load float, float* %7
%33 = call float @sqrt(float %32)
%34 = fsub float %31, %33
%35 = fdiv float %34, 2.000000e+00
%36 = load float, float* %2
%37 = fmul float %35, %36
store float %37, float* %6
%38 = load float, float* %7
%39 = fcmp oeq float %38, 0.000000e+00
br i1 %39, label %40, label %44
40: ; preds = %0
%41 = load float, float* %5
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.4, i64 0, i64 0), double %42)
br label %44
44: ; preds = %40, %0
%45 = load float, float* %7
%46 = fcmp olt float %45, 0.000000e+00
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
br label %49
49: ; preds = %47, %44
%50 = load float, float* %7
%51 = fcmp ogt float %50, 0.000000e+00
br i1 %51, label %52, label %58
52: ; preds = %49
%53 = load float, float* %5
%54 = fpext float %53 to double
%55 = load float, float* %6
%56 = fpext float %55 to double
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.6, i64 0, i64 0), double %54, double %56)
br label %58
58: ; preds = %52, %49
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B0 \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [18 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 b \00"
@.str.3 = [18 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 c \00"
@.str.4 = [75 x i8] c"\D0\A3\D1\80\D0\B0\D0\B2\D0\BD\D0\B5\D0\BD\D0\B8\D0\B5 \D0\B8\D0\BC\D0\B5\D0\B5\D1\82 \D0\BE\D0\B4\D0\BD\D0\BE \D1\80\D0\B5\D1\88\D0\B5\D0\BD\D0\B8\D0\B5. \D0\9A\D0\BE\D1\80\D0\B5\D0\BD\D1\8C x1=%f\0A\00"
@.str.6 = [76 x i8] c"\D0\A3\D1\80\D0\B0\D0\B2\D0\BD\D0\B5\D0\BD\D0\B8\D0\B5 \D0\B8\D0\BC\D0\B5\D0\B5\D1\82 \D0\B4\D0\B2\D0\B0 \D1\80\D0\B5\D1\88\D0\B5\D0\BD\D0\B8\D1\8F. \D0\9A\D0\BE\D1\80\D0\BD\D0\B8 x1=%f x2=%f\00"
@str = [51 x i8] c"\D0\A3\D1\80\D0\B0\D0\B2\D0\BD\D0\B5\D0\BD\D0\B8\D0\B5 \D0\BD\D0\B5 \D0\B8\D0\BC\D0\B5\D0\B5\D1\82 \D1\80\D0\B5\D1\88\D0\B5\D0\BD\D0\B8\D1\8F.\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%13 = load float, float* %2
%14 = call i32 @powf(float %13, i32 2)
%15 = sitofp i32 %14 to float
%16 = load float, float* %1
%17 = load float, float* %3
%18 = fmul float %16, -4.000000e+00
%19 = call float @llvm.fmuladd.f32(float %18, float %17, float %15)
%20 = load float, float* %2
%21 = call float @sqrt(float %19)
%22 = fsub float %21, %20
%23 = fmul float %22, 5.000000e-01
%24 = load float, float* %1
%25 = fmul float %24, %23
%26 = load float, float* %2
%27 = fneg float %26
%28 = call float @sqrt(float %19)
%29 = fsub float %27, %28
%30 = fmul float %29, 5.000000e-01
%31 = load float, float* %1
%32 = fmul float %31, %30
%33 = fcmp oeq float %19, 0.000000e+00
br i1 %33, label %34, label %37
34: ; preds = %0
%35 = fpext float %25 to double
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @.str.4, i64 0, i64 0), double %35)
br label %37
37: ; preds = %34, %0
%38 = fcmp olt float %19, 0.000000e+00
br i1 %38, label %39, label %41
39: ; preds = %37
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
br label %41
41: ; preds = %39, %37
%42 = fcmp ogt float %19, 0.000000e+00
br i1 %42, label %43, label %47
43: ; preds = %41
%44 = fpext float %25 to double
%45 = fpext float %32 to double
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.6, i64 0, i64 0), double %44, double %45)
br label %47
47: ; preds = %43, %41
ret i32 0
}