#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 min() {
  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):
<min>:
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),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    116b <min+0x4b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1198 <min+0x78>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    118e <min+0x6e>
jp     118e <min+0x6e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1198 <min+0x78>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
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),%xmm2
movapd %xmm1,%xmm0
cmpltsd %xmm2,%xmm0
movapd %xmm0,%xmm3
andpd  %xmm1,%xmm0
cmpeqsd %xmm2,%xmm1
andnpd %xmm2,%xmm1
andnpd %xmm1,%xmm3
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 @min() {
%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 olt 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 @min() {
%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 olt 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
}