#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, double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
float sqrt(float);
int main(int argc, char const *argv[]) {
  float a, b, c;
  scanf("%f %f %f", &a, &b, &c);
  if (a == 0) {
    printf("Impossivel calcular\n");
    return 0;
  }
  float base = 2 * a;
  float delta = pow(b, 2.0) - 4 * a * c;
  if (delta < 0) {
    printf("Impossivel calcular\n");
    return 0;
  }
  delta = sqrt(delta);
  float r_1 = (b * -1 + delta) / base;
  float r_2 = (b * -1 + delta * -1) / base;
  printf("R1 = %.5f\n", r_1);
  printf("R2 = %.5f\n", r_2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xebb(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    119f <main+0x5f>
jp     119f <main+0x5f>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1296 <main+0x156>
movss  0xe5d(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x18(%rbp),%xmm0
movsd  0xe52(%rip),%xmm1
call   1050 <pow@plt>
cvtsi2ss %eax,%xmm1
movss  0xe31(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x24(%rbp),%xmm0
jbe    121a <main+0xda>
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1296 <main+0x156>
movss  -0x24(%rbp),%xmm0
call   1060 <sqrt@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x18(%rbp),%xmm1
movss  -0x24(%rbp),%xmm0
subss  %xmm1,%xmm0
divss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x18(%rbp),%xmm1
movss  0xdba(%rip),%xmm0
mulss  -0x24(%rbp),%xmm0
subss  %xmm1,%xmm0
divss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdc5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdb9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xec5(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    117f <main+0x2f>
jnp    11bf <main+0x6f>
movss  %xmm0,0x10(%rsp)
movss  0x4(%rsp),%xmm0
movsd  0xe6d(%rip),%xmm1
call   1060 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
movss  0x8(%rsp),%xmm0
mulss  0xe5b(%rip),%xmm0
mulss  0xc(%rsp),%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    11d2 <main+0x82>
lea    0xe79(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret
movss  0x10(%rsp),%xmm2
addss  %xmm2,%xmm2
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     11ea <main+0x9a>
sqrtss %xmm0,%xmm0
jmp    11fb <main+0xab>
movss  %xmm2,0x10(%rsp)
call   1070 <sqrt@plt>
movss  0x10(%rsp),%xmm2
movss  0x4(%rsp),%xmm3
movaps %xmm0,%xmm1
subss  %xmm3,%xmm1
xorps  0xe01(%rip),%xmm3
divss  %xmm2,%xmm1
subss  %xmm0,%xmm3
divss  %xmm2,%xmm3
movaps %xmm3,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xdfb(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movaps 0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdef(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    11cb <main+0x7b>

LLVM IR (-O0):
@.str = [9 x i8] c"%f %f %f\00"
@.str.1 = [21 x i8] c"Impossivel calcular\0A\00"
@.str.2 = [11 x i8] c"R1 = %.5f\0A\00"
@.str.3 = [11 x i8] c"R2 = %.5f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %6, float* %7, float* %8)
%14 = load float, float* %6
%15 = fcmp oeq float %14, 0.000000e+00
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %53
18: ; preds = %2
%19 = load float, float* %6
%20 = fmul float 2.000000e+00, %19
store float %20, float* %9
%21 = load float, float* %7
%22 = call i32 @pow(float %21, double 2.000000e+00)
%23 = sitofp i32 %22 to float
%24 = load float, float* %6
%25 = fmul float 4.000000e+00, %24
%26 = load float, float* %8
%27 = fneg float %25
%28 = call float @llvm.fmuladd.f32(float %27, float %26, float %23)
store float %28, float* %10
%29 = load float, float* %10
%30 = fcmp olt float %29, 0.000000e+00
br i1 %30, label %31, label %33
31: ; preds = %18
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %53
33: ; preds = %18
%34 = load float, float* %10
%35 = call float @sqrt(float %34)
store float %35, float* %10
%36 = load float, float* %7
%37 = load float, float* %10
%38 = call float @llvm.fmuladd.f32(float %36, float -1.000000e+00, float %37)
%39 = load float, float* %9
%40 = fdiv float %38, %39
store float %40, float* %11
%41 = load float, float* %7
%42 = load float, float* %10
%43 = fmul float %42, -1.000000e+00
%44 = call float @llvm.fmuladd.f32(float %41, float -1.000000e+00, float %43)
%45 = load float, float* %9
%46 = fdiv float %44, %45
store float %46, float* %12
%47 = load float, float* %11
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %48)
%50 = load float, float* %12
%51 = fpext float %50 to double
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double %51)
store i32 0, i32* %3
br label %53
53: ; preds = %33, %31, %16
%54 = load i32, i32* %3
ret i32 %54
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f %f %f\00"
@.str.2 = [11 x i8] c"R1 = %.5f\0A\00"
@.str.3 = [11 x i8] c"R2 = %.5f\0A\00"
@str.4 = [20 x i8] c"Impossivel calcular\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = bitcast float* %3 to i8*
%7 = bitcast float* %4 to i8*
%8 = bitcast float* %5 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %3, float* %4, float* %5)
%10 = load float, float* %3
%11 = fcmp oeq float %10, 0.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.4, i64 0, i64 0))
br label %38
14: ; preds = %2
%15 = fmul float %10, 2.000000e+00
%16 = load float, float* %4
%17 = call i32 @pow(float %16, double 2.000000e+00)
%18 = sitofp i32 %17 to float
%19 = load float, float* %3
%20 = load float, float* %5
%21 = fmul float %19, -4.000000e+00
%22 = call float @llvm.fmuladd.f32(float %21, float %20, float %18)
%23 = fcmp olt float %22, 0.000000e+00
br i1 %23, label %24, label %26
24: ; preds = %14
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.4, i64 0, i64 0))
br label %38
26: ; preds = %14
%27 = call float @sqrt(float %22)
%28 = load float, float* %4
%29 = call float @llvm.fmuladd.f32(float %28, float -1.000000e+00, float %27)
%30 = fdiv float %29, %15
%31 = fneg float %27
%32 = call float @llvm.fmuladd.f32(float %28, float -1.000000e+00, float %31)
%33 = fdiv float %32, %15
%34 = fpext float %30 to double
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %34)
%36 = fpext float %33 to double
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double %36)
br label %38
38: ; preds = %24, %26, %12
ret i32 0
}