#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 *, float, float, float, float, float);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main() {
  float a, b, a1, b1;
  float area;
  scanf("%f %f", &a, &b);
  a1 = a, b1 = b;
  if (a < 0)
    a1 = -a;
  if (b < 0)
    b1 = -b;
  area = 0.5 * a1 * b1;
  printf("The area of (%.4f,%.4f), (%.4f,0) and (0,%.4f) is %.4f.\n", a, b, a,
         b, area);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    117b <main+0x5b>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    119f <main+0x7f>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe50(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
movss  -0xc(%rbp),%xmm3
movss  -0x18(%rbp),%xmm4
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
movaps 0xeb9(%rip),%xmm2
movaps %xmm0,%xmm3
xorps  %xmm2,%xmm3
xorps  %xmm4,%xmm4
movaps %xmm0,%xmm5
cmpltss %xmm4,%xmm5
andps  %xmm5,%xmm3
andnps %xmm0,%xmm5
orps   %xmm3,%xmm5
xorps  %xmm1,%xmm2
movaps %xmm1,%xmm3
cmpltss %xmm4,%xmm3
andps  %xmm3,%xmm2
andnps %xmm1,%xmm3
orps   %xmm2,%xmm3
xorps  %xmm2,%xmm2
cvtss2sd %xmm5,%xmm2
mulsd  0xe8c(%rip),%xmm2
cvtss2sd %xmm3,%xmm3
mulsd  %xmm2,%xmm3
xorps  %xmm4,%xmm4
cvtsd2ss %xmm3,%xmm4
lea    0xe84(%rip),%rdi
movaps %xmm0,%xmm2
movaps %xmm1,%xmm3
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [57 x i8] c"The area of (%.4f,%.4f), (%.4f,0) and (0,%.4f) is %.4f.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %2, float* %3)
%8 = load float, float* %2
store float %8, float* %4
%9 = load float, float* %3
store float %9, float* %5
%10 = load float, float* %2
%11 = fcmp olt float %10, 0.000000e+00
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = load float, float* %2
%14 = fneg float %13
store float %14, float* %4
br label %15
15: ; preds = %12, %0
%16 = load float, float* %3
%17 = fcmp olt float %16, 0.000000e+00
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load float, float* %3
%20 = fneg float %19
store float %20, float* %5
br label %21
21: ; preds = %18, %15
%22 = load float, float* %4
%23 = fpext float %22 to double
%24 = fmul double 5.000000e-01, %23
%25 = load float, float* %5
%26 = fpext float %25 to double
%27 = fmul double %24, %26
%28 = fptrunc double %27 to float
store float %28, float* %6
%29 = load float, float* %2
%30 = load float, float* %3
%31 = load float, float* %2
%32 = load float, float* %3
%33 = load float, float* %6
%34 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), float %29, float %30, float %31, float %32, float %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [57 x i8] c"The area of (%.4f,%.4f), (%.4f,0) and (0,%.4f) is %.4f.\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = fcmp olt float %6, 0.000000e+00
%9 = fneg float %6
%10 = select i1 %8, float %9, float %6
%11 = fcmp olt float %7, 0.000000e+00
%12 = fneg float %7
%13 = select i1 %11, float %12, float %7
%14 = fpext float %10 to double
%15 = fmul double %14, 5.000000e-01
%16 = fpext float %13 to double
%17 = fmul double %15, %16
%18 = fptrunc double %17 to float
%19 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), float %6, float %7, float %6, float %7, float %18)
ret i32 0
}