#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 sqrtf(float);
main() {
  float a, b, c, D, x1, x2;
  printf("Найдите корни квадратного уравнения ax^2+bx+c=0\n");
  printf("a=");
  scanf("%f", &a);
  printf("b=");
  scanf("%f", &b);
  printf("c=");
  scanf("%f", &c);
  D = pow(b, 2) - 4 * a * c;
  printf("D=%.1f\n\n", D);
  if (D > 0) {
    x1 = (-b + sqrtf(D)) / (2 * a);
    x2 = (-b - sqrtf(D)) / (2 * a);
    printf("Корнями уравнения являются: %.2f и %.2f\n", x1, x2);
  }
  if (D == 0) {
    x1 = (-b + sqrtf(D)) / (2 * a);
    printf("Уравнение имеет 1 корень это = %.2f\n", x1);
  }
  if (D < 0) {
    printf("Уравнение не имеет вещественных корней\n");
  }
  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   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeae(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0xc(%rbp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
cvtsi2ss %eax,%xmm1
movss  0xe2e(%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,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe5f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    12c4 <main+0x184>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x14(%rbp),%xmm0
call   1040 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  0xdb1(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x14(%rbp),%xmm0
call   1040 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  -0x20(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  0xd6e(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xdb1(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1335 <main+0x1f5>
jp     1335 <main+0x1f5>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x14(%rbp),%xmm0
call   1040 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  0xcf4(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd82(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1350 <main+0x210>
lea    0xda3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xf57(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xead(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xe9c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xe84(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0x14(%rsp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x18(%rsp),%xmm1
mulss  0xe22(%rip),%xmm1
mulss  0x1c(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe30(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jbe    12cf <main+0x17f>
movss  0x14(%rsp),%xmm0
sqrtss %xmm1,%xmm3
movaps %xmm3,%xmm2
jae    124d <main+0xfd>
movss  %xmm0,0x20(%rsp)
movaps %xmm1,%xmm0
movss  %xmm3,0xc(%rsp)
call   1050 <sqrtf@plt>
movss  0xc(%rsp),%xmm3
movss  0x10(%rsp),%xmm1
movaps %xmm0,%xmm2
movss  0x20(%rsp),%xmm0
subss  %xmm0,%xmm2
movss  0x18(%rsp),%xmm0
addss  %xmm0,%xmm0
movss  0x14(%rsp),%xmm4
xorps  0xda8(%rip),%xmm4
divss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jae    1298 <main+0x148>
movss  0x10(%rsp),%xmm0
movss  %xmm2,0xc(%rsp)
movaps %xmm4,0x20(%rsp)
call   1050 <sqrtf@plt>
movaps 0x20(%rsp),%xmm4
movss  0xc(%rsp),%xmm2
movaps %xmm0,%xmm3
subss  %xmm3,%xmm4
movss  0x18(%rsp),%xmm0
addss  %xmm0,%xmm0
divss  %xmm0,%xmm4
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm4,%xmm1
lea    0xd76(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jne    132b <main+0x1db>
jp     132b <main+0x1db>
movss  0x14(%rsp),%xmm2
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jb     12ed <main+0x19d>
xorps  %xmm0,%xmm0
sqrtss %xmm1,%xmm0
jmp    1301 <main+0x1b1>
movaps %xmm1,%xmm0
movss  %xmm2,0xc(%rsp)
call   1050 <sqrtf@plt>
movss  0xc(%rsp),%xmm2
subss  %xmm2,%xmm0
movss  0x18(%rsp),%xmm1
addss  %xmm1,%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd59(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jbe    133f <main+0x1ef>
lea    0xdc9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [81 x i8] c"\D0\9D\D0\B0\D0\B9\D0\B4\D0\B8\D1\82\D0\B5 \D0\BA\D0\BE\D1\80\D0\BD\D0\B8 \D0\BA\D0\B2\D0\B0\D0\B4\D1\80\D0\B0\D1\82\D0\BD\D0\BE\D0\B3\D0\BE \D1\83\D1\80\D0\B0\D0\B2\D0\BD\D0\B5\D0\BD\D0\B8\D1\8F ax^2+bx+c=0\0A\00"
@.str.1 = [3 x i8] c"a=\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [3 x i8] c"b=\00"
@.str.4 = [3 x i8] c"c=\00"
@.str.5 = [9 x i8] c"D=%.1f\0A\0A\00"
@.str.6 = [66 x i8] c"\D0\9A\D0\BE\D1\80\D0\BD\D1\8F\D0\BC\D0\B8 \D1\83\D1\80\D0\B0\D0\B2\D0\BD\D0\B5\D0\BD\D0\B8\D1\8F \D1\8F\D0\B2\D0\BB\D1\8F\D1\8E\D1\82\D1\81\D1\8F: %.2f \D0\B8 %.2f\0A\00"
@.str.7 = [60 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 1 \D0\BA\D0\BE\D1\80\D0\B5\D0\BD\D1\8C \D1\8D\D1\82\D0\BE = %.2f\0A\00"
@.str.8 = [74 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 \D0\B2\D0\B5\D1\89\D0\B5\D1\81\D1\82\D0\B2\D0\B5\D0\BD\D0\BD\D1\8B\D1\85 \D0\BA\D0\BE\D1\80\D0\BD\D0\B5\D0\B9\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 ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %4)
%15 = load float, float* %3
%16 = call i32 @pow(float %15, i32 2)
%17 = sitofp i32 %16 to float
%18 = load float, float* %2
%19 = fmul float 4.000000e+00, %18
%20 = load float, float* %4
%21 = fneg float %19
%22 = call float @llvm.fmuladd.f32(float %21, float %20, float %17)
store float %22, float* %5
%23 = load float, float* %5
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), double %24)
%26 = load float, float* %5
%27 = fcmp ogt float %26, 0.000000e+00
br i1 %27, label %28, label %50
28: ; preds = %0
%29 = load float, float* %3
%30 = fneg float %29
%31 = load float, float* %5
%32 = call float @sqrtf(float %31)
%33 = fadd float %30, %32
%34 = load float, float* %2
%35 = fmul float 2.000000e+00, %34
%36 = fdiv float %33, %35
store float %36, float* %6
%37 = load float, float* %3
%38 = fneg float %37
%39 = load float, float* %5
%40 = call float @sqrtf(float %39)
%41 = fsub float %38, %40
%42 = load float, float* %2
%43 = fmul float 2.000000e+00, %42
%44 = fdiv float %41, %43
store float %44, float* %7
%45 = load float, float* %6
%46 = fpext float %45 to double
%47 = load float, float* %7
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.6, i64 0, i64 0), double %46, double %48)
br label %50
50: ; preds = %28, %0
%51 = load float, float* %5
%52 = fcmp oeq float %51, 0.000000e+00
br i1 %52, label %53, label %65
53: ; preds = %50
%54 = load float, float* %3
%55 = fneg float %54
%56 = load float, float* %5
%57 = call float @sqrtf(float %56)
%58 = fadd float %55, %57
%59 = load float, float* %2
%60 = fmul float 2.000000e+00, %59
%61 = fdiv float %58, %60
store float %61, float* %6
%62 = load float, float* %6
%63 = fpext float %62 to double
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.7, i64 0, i64 0), double %63)
br label %65
65: ; preds = %53, %50
%66 = load float, float* %5
%67 = fcmp olt float %66, 0.000000e+00
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.8, i64 0, i64 0))
br label %70
70: ; preds = %68, %65
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"a=\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [3 x i8] c"b=\00"
@.str.4 = [3 x i8] c"c=\00"
@.str.5 = [9 x i8] c"D=%.1f\0A\0A\00"
@.str.6 = [66 x i8] c"\D0\9A\D0\BE\D1\80\D0\BD\D1\8F\D0\BC\D0\B8 \D1\83\D1\80\D0\B0\D0\B2\D0\BD\D0\B5\D0\BD\D0\B8\D1\8F \D1\8F\D0\B2\D0\BB\D1\8F\D1\8E\D1\82\D1\81\D1\8F: %.2f \D0\B8 %.2f\0A\00"
@.str.7 = [60 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 1 \D0\BA\D0\BE\D1\80\D0\B5\D0\BD\D1\8C \D1\8D\D1\82\D0\BE = %.2f\0A\00"
@str = [80 x i8] c"\D0\9D\D0\B0\D0\B9\D0\B4\D0\B8\D1\82\D0\B5 \D0\BA\D0\BE\D1\80\D0\BD\D0\B8 \D0\BA\D0\B2\D0\B0\D0\B4\D1\80\D0\B0\D1\82\D0\BD\D0\BE\D0\B3\D0\BE \D1\83\D1\80\D0\B0\D0\B2\D0\BD\D0\B5\D0\BD\D0\B8\D1\8F ax^2+bx+c=0\00"
@str.9 = [73 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 \D0\B2\D0\B5\D1\89\D0\B5\D1\81\D1\82\D0\B2\D0\B5\D0\BD\D0\BD\D1\8B\D1\85 \D0\BA\D0\BE\D1\80\D0\BD\D0\B5\D0\B9\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 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%14 = load float, float* %2
%15 = call i32 @pow(float %14, i32 2)
%16 = sitofp i32 %15 to float
%17 = load float, float* %1
%18 = load float, float* %3
%19 = fmul float %17, -4.000000e+00
%20 = call float @llvm.fmuladd.f32(float %19, float %18, float %16)
%21 = fpext float %20 to double
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), double %21)
%23 = fcmp ogt float %20, 0.000000e+00
br i1 %23, label %24, label %41
24: ; preds = %0
%25 = load float, float* %2
%26 = call float @sqrtf(float %20)
%27 = fsub float %26, %25
%28 = load float, float* %1
%29 = fmul float %28, 2.000000e+00
%30 = fdiv float %27, %29
%31 = load float, float* %2
%32 = fneg float %31
%33 = call float @sqrtf(float %20)
%34 = fsub float %32, %33
%35 = load float, float* %1
%36 = fmul float %35, 2.000000e+00
%37 = fdiv float %34, %36
%38 = fpext float %30 to double
%39 = fpext float %37 to double
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.6, i64 0, i64 0), double %38, double %39)
br label %41
41: ; preds = %24, %0
%42 = fcmp oeq float %20, 0.000000e+00
br i1 %42, label %43, label %52
43: ; preds = %41
%44 = load float, float* %2
%45 = call float @sqrtf(float %20)
%46 = fsub float %45, %44
%47 = load float, float* %1
%48 = fmul float %47, 2.000000e+00
%49 = fdiv float %46, %48
%50 = fpext float %49 to double
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.7, i64 0, i64 0), double %50)
br label %52
52: ; preds = %43, %41
%53 = fcmp olt float %20, 0.000000e+00
br i1 %53, label %54, label %56
54: ; preds = %52
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.9, i64 0, i64 0))
br label %56
56: ; preds = %54, %52
ret i32 0
}