#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *, double *);
double max() {
  double a, b;
  printf("Iki deger veriniz.\nEger iki deger esit ise 0.0 dondurulecek\n");
  scanf("%lf%lf", &a, &b);
  if (a > b) {
    return a;
  } else if (a == b) {
    return 0.0;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1167 <max+0x47>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1194 <max+0x74>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    118a <max+0x6a>
jp     118a <max+0x6a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1194 <max+0x74>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
sub    $0x18,%rsp
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
movapd %xmm1,%xmm2
cmpeqsd %xmm0,%xmm2
andnpd %xmm0,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm3
andnpd %xmm2,%xmm3
andpd  %xmm1,%xmm0
orpd   %xmm3,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [61 x i8] c"Iki deger veriniz.\0AEger iki deger esit ise 0.0 dondurulecek\0A\00"
@.str.1 = [7 x i8] c"%lf%lf\00"
define double @max() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3)
%6 = load double, double* %2
%7 = load double, double* %3
%8 = fcmp ogt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = load double, double* %2
store double %10, double* %1
br label %18
11: ; preds = %0
%12 = load double, double* %2
%13 = load double, double* %3
%14 = fcmp oeq double %12, %13
br i1 %14, label %15, label %16
15: ; preds = %11
store double 0.000000e+00, double* %1
br label %18
16: ; preds = %11
%17 = load double, double* %3
store double %17, double* %1
br label %18
18: ; preds = %16, %15, %9
%19 = load double, double* %1
ret double %19
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%lf%lf\00"
@str = [60 x i8] c"Iki deger veriniz.\0AEger iki deger esit ise 0.0 dondurulecek\00"
define double @max() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2)
%7 = load double, double* %1
%8 = load double, double* %2
%9 = fcmp ogt double %7, %8
%10 = fcmp oeq double %7, %8
%11 = select i1 %10, double 0.000000e+00, double %8
%12 = select i1 %9, double %7, double %11
ret double %12
}