#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 findCurveType(int, int, int);
int /*<<< orphan*/ findRoots(int, int, int, double *, double *, int *);
int /*<<< orphan*/ getCoefficients(int *, int *, int *);
int /*<<< orphan*/ printScreen(int, int, int, int, int, double, double);
int main() {
  int a;
  int b;
  int c;
  int curveType;
  int realOrComplex;
  double root1;
  double root2;
  getCoefficients(&a, &b, &c);
  curveType = findCurveType(a, b, c);
  findRoots(a, b, c, &root1, &root2, &realOrComplex);
  printScreen(a, b, c, curveType, realOrComplex, root1, root2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1050 <getCoefficients@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1060 <findCurveType@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
lea    -0x18(%rbp),%r9
call   1030 <findRoots@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1040 <printScreen@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0x8(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <getCoefficients@plt>
mov    0x8(%rsp),%edi
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
call   1060 <findCurveType@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%edi
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0x18(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
call   1030 <findRoots@plt>
mov    0x8(%rsp),%edi
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
mov    0xc(%rsp),%r8d
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebx,%ecx
call   1040 <printScreen@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca double
store i32 0, i32* %1
%9 = call i32 @getCoefficients(i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @findCurveType(i32 %10, i32 %11, i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = call i32 @findRoots(i32 %14, i32 %15, i32 %16, double* %7, double* %8, i32* %6)
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = load double, double* %7
%24 = load double, double* %8
%25 = call i32 @printScreen(i32 %18, i32 %19, i32 %20, i32 %21, i32 %22, double %23, double %24)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = bitcast i32* %1 to i8*
%8 = bitcast i32* %2 to i8*
%9 = bitcast i32* %3 to i8*
%10 = bitcast i32* %4 to i8*
%11 = bitcast double* %5 to i8*
%12 = bitcast double* %6 to i8*
%13 = call i32 @getCoefficients(i32* %1, i32* %2, i32* %3)
%14 = load i32, i32* %1
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = call i32 @findCurveType(i32 %14, i32 %15, i32 %16)
%18 = load i32, i32* %1
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = call i32 @findRoots(i32 %18, i32 %19, i32 %20, double* %5, double* %6, i32* %4)
%22 = load i32, i32* %1
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = load double, double* %5
%27 = load double, double* %6
%28 = call i32 @printScreen(i32 %22, i32 %23, i32 %24, i32 %17, i32 %25, double %26, double %27)
ret i32 0
}