#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*/ print_solution(double, double, double);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *, ...);
int main(void) {
  double a, b, c, d = 1, f = 1;
  while (d == 1) {
    printf("----------------------------------------");
    printf("\nEnter the values a, b and c: ");
    scanf("%lf %lf %lf", &a, &b, &c);
    print_solution(a, b, c);
    printf("Made by Thuan\n\n");
    printf("Try again 0(yes) or 1(no)\n");
    scanf("%d", &d);
  }
  printf("---------------------------------------------\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe9a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11eb <main+0xbb>
jp     11eb <main+0xbb>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1050 <print_solution@plt>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    1159 <main+0x29>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movabs $0x3ff0000000000000,%rax
mov    %rax,0x8(%rsp)
lea    0x18(%rsp),%rbx
lea    0x10(%rsp),%rbp
lea    0xef6(%rip),%r14
lea    0xefe(%rip),%r15
lea    0xeb7(%rip),%r12
lea    0x8(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
lea    0xe65(%rip),%rdi
call   1040 <printf@plt>
lea    0xe78(%rip),%rdi
lea    0x20(%rsp),%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1060 <print_solution@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm0
ucomisd 0xdfd(%rip),%xmm0
jne    1207 <main+0xc7>
jnp    1190 <main+0x50>
lea    0xe28(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [41 x i8] c"----------------------------------------\00"
@.str.1 = [31 x i8] c"\0AEnter the values a, b and c: \00"
@.str.2 = [12 x i8] c"%lf %lf %lf\00"
@.str.3 = [16 x i8] c"Made by Thuan\0A\0A\00"
@.str.4 = [27 x i8] c"Try again 0(yes) or 1(no)\0A\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [47 x i8] c"---------------------------------------------\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
store double 1.000000e+00, double* %5
store double 1.000000e+00, double* %6
br label %7
7: ; preds = %10, %0
%8 = load double, double* %5
%9 = fcmp oeq double %8, 1.000000e+00
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double* %2, double* %3, double* %4)
%14 = load double, double* %2
%15 = load double, double* %3
%16 = load double, double* %4
%17 = call i32 @print_solution(double %14, double %15, double %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%20 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), double* %5)
br label %7
21: ; preds = %7
%22 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"----------------------------------------\00"
@.str.1 = [31 x i8] c"\0AEnter the values a, b and c: \00"
@.str.2 = [12 x i8] c"%lf %lf %lf\00"
@.str.5 = [3 x i8] c"%d\00"
@str = [46 x i8] c"---------------------------------------------\00"
@str.7 = [15 x i8] c"Made by Thuan\0A\00"
@str.8 = [26 x i8] c"Try again 0(yes) or 1(no)\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %1 to i8*
%6 = bitcast double* %2 to i8*
%7 = bitcast double* %3 to i8*
%8 = bitcast double* %4 to i8*
store double 1.000000e+00, double* %4
br label %9
9: ; preds = %0, %9
%10 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double* %1, double* %2, double* %3)
%13 = load double, double* %1
%14 = load double, double* %2
%15 = load double, double* %3
%16 = call i32 @print_solution(double %13, double %14, double %15)
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.7, i64 0, i64 0))
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.8, i64 0, i64 0))
%19 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), double* %4)
%20 = load double, double* %4
%21 = fcmp oeq double %20, 1.000000e+00
br i1 %21, label %9, label %22
22: ; preds = %9
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret i32 0
}