#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*/ negDelta();
int /*<<< orphan*/ posDelta(float, float, float);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
int /*<<< orphan*/ zeroDelta(float, float);
int main(void) {
  float a;
  float b;
  float c;
  float delta;
  float x1;
  float x2;
  printf("\nPlease input the coefficients of the function ax^2 + bx + c in the "
         "form nnn.nn nnn.nn nnn.nn\n");
  scanf("%f %f %f\n\n", &a, &b, &c);
  delta = ((b * b) - (4.00 * a * c));
  if (delta > 0) {
    posDelta(delta, a, b);
  } else if (delta < 0) {
    negDelta();
  } else {
    zeroDelta(a, b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea2(%rip),%rdi
call   1060 <printf@plt>
lea    0xef5(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1070 <scanf@plt>
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe5e(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x10(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1201 <main+0xb1>
movss  -0x14(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1050 <posDelta@plt>
jmp    122e <main+0xde>
xorps  %xmm0,%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    121a <main+0xca>
mov    $0x0,%al
call   1040 <negDelta@plt>
jmp    1229 <main+0xd9>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <zeroDelta@plt>
jmp    122e <main+0xde>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
lea    0xea1(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1070 <scanf@plt>
movss  0x10(%rsp),%xmm2
movaps %xmm2,%xmm0
mulss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x14(%rsp),%xmm1
cvtss2sd %xmm1,%xmm3
movss  0xc(%rsp),%xmm4
cvtss2sd %xmm4,%xmm4
mulsd  0xe58(%rip),%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm0,%xmm3
xorps  %xmm0,%xmm0
cvtsd2ss %xmm3,%xmm0
xorps  %xmm3,%xmm3
ucomiss %xmm3,%xmm0
jbe    11c6 <main+0x76>
call   1060 <posDelta@plt>
jmp    11df <main+0x8f>
ucomiss %xmm0,%xmm3
jbe    11d4 <main+0x84>
xor    %eax,%eax
call   1050 <negDelta@plt>
jmp    11df <main+0x8f>
movaps %xmm1,%xmm0
movaps %xmm2,%xmm1
call   1040 <zeroDelta@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [95 x i8] c"\0APlease input the coefficients of the function ax^2 + bx + c in the form nnn.nn nnn.nn nnn.nn\0A\00"
@.str.1 = [11 x i8] c"%f %f %f\0A\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 @printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3, float* %4)
%10 = load float, float* %3
%11 = load float, float* %3
%12 = fmul float %10, %11
%13 = fpext float %12 to double
%14 = load float, float* %2
%15 = fpext float %14 to double
%16 = fmul double 4.000000e+00, %15
%17 = load float, float* %4
%18 = fpext float %17 to double
%19 = fneg double %16
%20 = call double @llvm.fmuladd.f64(double %19, double %18, double %13)
%21 = fptrunc double %20 to float
store float %21, float* %5
%22 = load float, float* %5
%23 = fcmp ogt float %22, 0.000000e+00
br i1 %23, label %24, label %29
24: ; preds = %0
%25 = load float, float* %5
%26 = load float, float* %2
%27 = load float, float* %3
%28 = call i32 @posDelta(float %25, float %26, float %27)
br label %39
29: ; preds = %0
%30 = load float, float* %5
%31 = fcmp olt float %30, 0.000000e+00
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 (...) @negDelta()
br label %38
34: ; preds = %29
%35 = load float, float* %2
%36 = load float, float* %3
%37 = call i32 @zeroDelta(float %35, float %36)
br label %38
38: ; preds = %34, %32
br label %39
39: ; preds = %38, %24
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"%f %f %f\0A\0A\00"
@str = [94 x i8] c"\0APlease input the coefficients of the function ax^2 + bx + c in the form nnn.nn nnn.nn nnn.nn\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 ([94 x i8], [94 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, float* %3)
%9 = load float, float* %2
%10 = fmul float %9, %9
%11 = fpext float %10 to double
%12 = load float, float* %1
%13 = fpext float %12 to double
%14 = load float, float* %3
%15 = fpext float %14 to double
%16 = fmul double %13, -4.000000e+00
%17 = call double @llvm.fmuladd.f64(double %16, double %15, double %11)
%18 = fptrunc double %17 to float
%19 = fcmp ogt float %18, 0.000000e+00
br i1 %19, label %20, label %22
20: ; preds = %0
%21 = call i32 @posDelta(float %18, float %12, float %9)
br label %28
22: ; preds = %0
%23 = fcmp olt float %18, 0.000000e+00
br i1 %23, label %24, label %26
24: ; preds = %22
%25 = call i32 (...) @negDelta()
br label %28
26: ; preds = %22
%27 = call i32 @zeroDelta(float %12, float %9)
br label %28
28: ; preds = %24, %26, %20
ret i32 0
}