#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ stdin;
double strtod(char *, char **);
char *strtok(char *, char *);
int main() {
  char girdi[40];
  char *word;
  char *ptr;
  double A[4];
  double B[4];
  double yeniAx, yeniBx, yeniAy, yeniBy, uzunluk, genislik;
  fgets(girdi, 40, stdin);
  word = strtok(girdi, "\n ");
  for (int i = 0; i < 4; i++) {
    A[i] = strtod(word, &ptr);
    word = strtok(NULL, " ");
  }
  fgets(girdi, 40, stdin);
  word = strtok(girdi, "\n ");
  for (int i = 0; i < 4; i++) {
    B[i] = strtod(word, &ptr);
    word = strtok(NULL, " ");
  }
  yeniAx = A[0] + A[2];
  yeniBx = B[0] + B[2];
  yeniAy = A[1] + A[3];
  yeniBy = B[1] + B[3];
  if (B[0] < A[0]) {
    if (A[0] <= yeniBx && yeniBx <= yeniAx) {
      genislik = yeniBx - A[0];
    } else if (yeniAx < yeniBx) {
      genislik = yeniAx - A[0];
    } else {
      genislik = 0;
    }
  } else {
    if (B[0] <= yeniAx && yeniAx <= yeniBx) {
      genislik = yeniAx - B[0];
    } else if (yeniBx < yeniAx) {
      genislik = yeniBx - B[0];
    } else {
      genislik = 0;
    }
  }
  if (B[1] < A[1]) {
    if (A[1] <= yeniBy && yeniBy <= yeniAy) {
      uzunluk = yeniBy - A[1];
    } else if (yeniAy < yeniBy) {
      uzunluk = yeniAy - A[1];
    } else {
      uzunluk = 0;
    }
  } else {
    if (B[1] <= yeniAy && yeniAy <= yeniBy) {
      uzunluk = yeniAy - B[1];
    } else if (yeniBy < yeniAy) {
      uzunluk = yeniBy - B[1];
    } else {
      uzunluk = 0;
    }
  }
  printf("%.2lf", (uzunluk * genislik));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
mov    0x2e8b(%rip),%rax
mov    (%rax),%edx
mov    $0x28,%esi
call   1050 <fgets@plt>
lea    -0x30(%rbp),%rdi
lea    0xe8c(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0xb4(%rbp)
cmpl   $0x4,-0xb4(%rbp)
jge    11d6 <main+0x96>
mov    -0x38(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <strtod@plt>
movslq -0xb4(%rbp),%rax
movsd  %xmm0,-0x60(%rbp,%rax,8)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe48(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x38(%rbp)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1187 <main+0x47>
lea    -0x30(%rbp),%rdi
mov    0x2e07(%rip),%rax
mov    (%rax),%edx
mov    $0x28,%esi
call   1050 <fgets@plt>
lea    -0x30(%rbp),%rdi
lea    0xe08(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0xb8(%rbp)
cmpl   $0x4,-0xb8(%rbp)
jge    125a <main+0x11a>
mov    -0x38(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <strtod@plt>
movslq -0xb8(%rbp),%rax
movsd  %xmm0,-0x80(%rbp,%rax,8)
xor    %eax,%eax
mov    %eax,%edi
lea    0xdc4(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x38(%rbp)
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    120b <main+0xcb>
movsd  -0x60(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x80(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    134a <main+0x20a>
movsd  -0x60(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1301 <main+0x1c1>
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x88(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1301 <main+0x1c1>
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1345 <main+0x205>
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1335 <main+0x1f5>
movsd  -0x88(%rbp),%xmm0
ff
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1340 <main+0x200>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1345 <main+0x205>
jmp    13de <main+0x29e>
movsd  -0x80(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1395 <main+0x255>
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1395 <main+0x255>
movsd  -0x88(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    13d9 <main+0x299>
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x88(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    13c9 <main+0x289>
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    13d4 <main+0x294>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    13d9 <main+0x299>
jmp    13de <main+0x29e>
movsd  -0x78(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1486 <main+0x346>
movsd  -0x58(%rbp),%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     143d <main+0x2fd>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     143d <main+0x2fd>
movsd  -0xa0(%rbp),%xmm0
ff
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1481 <main+0x341>
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1471 <main+0x331>
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    147c <main+0x33c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1481 <main+0x341>
jmp    151a <main+0x3da>
movsd  -0x78(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     14d1 <main+0x391>
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     14d1 <main+0x391>
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1515 <main+0x3d5>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1505 <main+0x3c5>
movsd  -0xa0(%rbp),%xmm0
ff
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1510 <main+0x3d0>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1515 <main+0x3d5>
jmp    151a <main+0x3da>
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
lea    0xad2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x80,%rsp
mov    0x2e91(%rip),%r13
mov    0x0(%r13),%edx
lea    0x50(%rsp),%r15
mov    %r15,%rdi
mov    $0x28,%esi
call   1050 <fgets@plt>
lea    0xe8c(%rip),%r12
mov    %r15,%rdi
mov    %r12,%rsi
call   1060 <strtok@plt>
lea    0x48(%rsp),%r14
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strtod@plt>
movsd  %xmm0,0x40(%rsp)
lea    0xe65(%rip),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strtod@plt>
movsd  %xmm0,0x20(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strtod@plt>
movsd  %xmm0,0x38(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strtod@plt>
movsd  %xmm0,0x18(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    0x0(%r13),%edx
mov    %r15,%rdi
mov    $0x28,%esi
call   1050 <fgets@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strtod@plt>
movsd  %xmm0,0x30(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strtod@plt>
movsd  %xmm0,0x10(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strtod@plt>
movsd  %xmm0,0x28(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strtod@plt>
movsd  %xmm0,0x8(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
movsd  0x28(%rsp),%xmm2
movsd  0x30(%rsp),%xmm7
movsd  0x38(%rsp),%xmm4
movsd  0x40(%rsp),%xmm1
addsd  %xmm1,%xmm4
addsd  %xmm7,%xmm2
ucomisd %xmm7,%xmm1
jbe    12bb <main+0x17b>
ucomisd %xmm1,%xmm2
jb     12ea <main+0x1aa>
ucomisd %xmm2,%xmm4
jb     12ea <main+0x1aa>
subsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
jmp    12cf <main+0x18f>
ucomisd %xmm7,%xmm4
jb     1317 <main+0x1d7>
ucomisd %xmm4,%xmm2
jb     1317 <main+0x1d7>
subsd  %xmm7,%xmm4
movapd %xmm4,%xmm0
movsd  0x20(%rsp),%xmm8
movsd  0x18(%rsp),%xmm3
movsd  0x10(%rsp),%xmm5
movsd  0x8(%rsp),%xmm6
jmp    1342 <main+0x202>
xorpd  %xmm0,%xmm0
ucomisd %xmm4,%xmm2
movsd  0x20(%rsp),%xmm8
movsd  0x18(%rsp),%xmm3
movsd  0x10(%rsp),%xmm5
movsd  0x8(%rsp),%xmm6
jbe    1342 <main+0x202>
subsd  %xmm1,%xmm4
movapd %xmm4,%xmm0
jmp    1342 <main+0x202>
xorpd  %xmm0,%xmm0
ucomisd %xmm2,%xmm4
movsd  0x20(%rsp),%xmm8
movsd  0x18(%rsp),%xmm3
movsd  0x10(%rsp),%xmm5
movsd  0x8(%rsp),%xmm6
jbe    1342 <main+0x202>
subsd  %xmm7,%xmm2
movapd %xmm2,%xmm0
addsd  %xmm8,%xmm3
addsd  %xmm5,%xmm6
ucomisd %xmm5,%xmm8
jbe    1366 <main+0x226>
ucomisd %xmm8,%xmm6
jb     137c <main+0x23c>
ucomisd %xmm6,%xmm3
jb     137c <main+0x23c>
subsd  %xmm8,%xmm6
jmp    139f <main+0x25f>
ucomisd %xmm5,%xmm3
jb     1391 <main+0x251>
ucomisd %xmm3,%xmm6
jb     1391 <main+0x251>
subsd  %xmm5,%xmm3
movapd %xmm3,%xmm1
jmp    13a3 <main+0x263>
xorpd  %xmm1,%xmm1
ucomisd %xmm3,%xmm6
jbe    13a3 <main+0x263>
subsd  %xmm8,%xmm3
movapd %xmm3,%xmm1
jmp    13a3 <main+0x263>
xorpd  %xmm1,%xmm1
ucomisd %xmm6,%xmm3
jbe    13a3 <main+0x263>
subsd  %xmm5,%xmm6
movapd %xmm6,%xmm1
mulsd  %xmm1,%xmm0
lea    0xc55(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [3 x i8] c"\0A \00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [6 x i8] c"%.2lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [40 x i8]
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [4 x double]
%6 = alloca [4 x double]
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %1
%15 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%16 = load i32, i32* @stdin
%17 = call i32 @fgets(i8* %15, i32 40, i32 %16)
%18 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%19 = call i8* @strtok(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %19, i8** %3
store i32 0, i32* %13
br label %20
20: ; preds = %30, %0
%21 = load i32, i32* %13
%22 = icmp slt i32 %21, 4
br i1 %22, label %23, label %33
23: ; preds = %20
%24 = load i8*, i8** %3
%25 = call double @strtod(i8* %24, i8** %4)
%26 = load i32, i32* %13
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 %27
store double %25, double* %28
%29 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i8* %29, i8** %3
br label %30
30: ; preds = %23
%31 = load i32, i32* %13
%32 = add nsw i32 %31, 1
store i32 %32, i32* %13
br label %20
33: ; preds = %20
%34 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%35 = load i32, i32* @stdin
%36 = call i32 @fgets(i8* %34, i32 40, i32 %35)
%37 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%38 = call i8* @strtok(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %38, i8** %3
store i32 0, i32* %14
br label %39
39: ; preds = %49, %33
%40 = load i32, i32* %14
%41 = icmp slt i32 %40, 4
br i1 %41, label %42, label %52
42: ; preds = %39
%43 = load i8*, i8** %3
%44 = call double @strtod(i8* %43, i8** %4)
%45 = load i32, i32* %14
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 %46
store double %44, double* %47
%48 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i8* %48, i8** %3
br label %49
49: ; preds = %42
%50 = load i32, i32* %14
%51 = add nsw i32 %50, 1
store i32 %51, i32* %14
br label %39
52: ; preds = %39
%53 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%54 = load double, double* %53
%55 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 2
%56 = load double, double* %55
%57 = fadd double %54, %56
store double %57, double* %7
%58 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%59 = load double, double* %58
%60 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 2
%61 = load double, double* %60
%62 = fadd double %59, %61
store double %62, double* %8
%63 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 1
%64 = load double, double* %63
%65 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 3
%66 = load double, double* %65
%67 = fadd double %64, %66
store double %67, double* %9
%68 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 1
%69 = load double, double* %68
%70 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 3
%71 = load double, double* %70
%72 = fadd double %69, %71
store double %72, double* %10
%73 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%74 = load double, double* %73
%75 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%76 = load double, double* %75
%77 = fcmp olt double %74, %76
br i1 %77, label %78, label %104
78: ; preds = %52
%79 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%80 = load double, double* %79
%81 = load double, double* %8
%82 = fcmp ole double %80, %81
br i1 %82, label %83, label %92
83: ; preds = %78
%84 = load double, double* %8
%85 = load double, double* %7
%86 = fcmp ole double %84, %85
br i1 %86, label %87, label %92
87: ; preds = %83
%88 = load double, double* %8
%89 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%90 = load double, double* %89
%91 = fsub double %88, %90
store double %91, double* %12
br label %103
92: ; preds = %83, %78
%93 = load double, double* %7
%94 = load double, double* %8
%95 = fcmp olt double %93, %94
br i1 %95, label %96, label %101
96: ; preds = %92
%97 = load double, double* %7
%98 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%99 = load double, double* %98
%100 = fsub double %97, %99
store double %100, double* %12
br label %102
101: ; preds = %92
store double 0.000000e+00, double* %12
br label %102
102: ; preds = %101, %96
br label %103
103: ; preds = %102, %87
br label %130
104: ; preds = %52
%105 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%106 = load double, double* %105
%107 = load double, double* %7
%108 = fcmp ole double %106, %107
br i1 %108, label %109, label %118
109: ; preds = %104
%110 = load double, double* %7
%111 = load double, double* %8
%112 = fcmp ole double %110, %111
br i1 %112, label %113, label %118
113: ; preds = %109
%114 = load double, double* %7
%115 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%116 = load double, double* %115
%117 = fsub double %114, %116
store double %117, double* %12
br label %129
118: ; preds = %109, %104
%119 = load double, double* %8
%120 = load double, double* %7
%121 = fcmp olt double %119, %120
br i1 %121, label %122, label %127
122: ; preds = %118
%123 = load double, double* %8
%124 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%125 = load double, double* %124
%126 = fsub double %123, %125
store double %126, double* %12
br label %128
127: ; preds = %118
store double 0.000000e+00, double* %12
br label %128
128: ; preds = %127, %122
br label %129
129: ; preds = %128, %113
br label %130
130: ; preds = %129, %103
%131 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 1
%132 = load double, double* %131
%133 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 1
%134 = load double, double* %133
%135 = fcmp olt double %132, %134
br i1 %135, label %136, label %162
136: ; preds = %130
%137 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 1
%138 = load double, double* %137
%139 = load double, double* %10
%140 = fcmp ole double %138, %139
br i1 %140, label %141, label %150
141: ; preds = %136
%142 = load double, double* %10
%143 = load double, double* %9
%144 = fcmp ole double %142, %143
br i1 %144, label %145, label %150
145: ; preds = %141
%146 = load double, double* %10
%147 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 1
%148 = load double, double* %147
%149 = fsub double %146, %148
store double %149, double* %11
br label %161
150: ; preds = %141, %136
%151 = load double, double* %9
%152 = load double, double* %10
%153 = fcmp olt double %151, %152
br i1 %153, label %154, label %159
154: ; preds = %150
%155 = load double, double* %9
%156 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 1
%157 = load double, double* %156
%158 = fsub double %155, %157
store double %158, double* %11
br label %160
159: ; preds = %150
store double 0.000000e+00, double* %11
br label %160
160: ; preds = %159, %154
br label %161
161: ; preds = %160, %145
br label %188
162: ; preds = %130
%163 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 1
%164 = load double, double* %163
%165 = load double, double* %9
%166 = fcmp ole double %164, %165
br i1 %166, label %167, label %176
167: ; preds = %162
%168 = load double, double* %9
%169 = load double, double* %10
%170 = fcmp ole double %168, %169
br i1 %170, label %171, label %176
171: ; preds = %167
%172 = load double, double* %9
%173 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 1
%174 = load double, double* %173
%175 = fsub double %172, %174
store double %175, double* %11
br label %187
176: ; preds = %167, %162
%177 = load double, double* %10
%178 = load double, double* %9
%179 = fcmp olt double %177, %178
br i1 %179, label %180, label %185
180: ; preds = %176
%181 = load double, double* %10
%182 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 1
%183 = load double, double* %182
%184 = fsub double %181, %183
store double %184, double* %11
br label %186
185: ; preds = %176
store double 0.000000e+00, double* %11
br label %186
186: ; preds = %185, %180
br label %187
187: ; preds = %186, %171
br label %188
188: ; preds = %187, %161
%189 = load double, double* %11
%190 = load double, double* %12
%191 = fmul double %189, %190
%192 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %191)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"\0A \00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [6 x i8] c"%.2lf\00"
define i32 @main() {
%1 = alloca [40 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%4 = bitcast i8** %2 to i8*
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %3, i32 40, i32 %5)
%7 = call i8* @strtok(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = call double @strtod(i8* %7, i8** %2)
%9 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = call double @strtod(i8* %9, i8** %2)
%11 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = call double @strtod(i8* %11, i8** %2)
%13 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = call double @strtod(i8* %13, i8** %2)
%15 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = load i32, i32* @stdin
%17 = call i32 @fgets(i8* %3, i32 40, i32 %16)
%18 = call i8* @strtok(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%19 = call double @strtod(i8* %18, i8** %2)
%20 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%21 = call double @strtod(i8* %20, i8** %2)
%22 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%23 = call double @strtod(i8* %22, i8** %2)
%24 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%25 = call double @strtod(i8* %24, i8** %2)
%26 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%27 = fadd double %8, %12
%28 = fadd double %19, %23
%29 = fadd double %10, %14
%30 = fadd double %21, %25
%31 = fcmp olt double %19, %8
br i1 %31, label %32, label %42
32: ; preds = %0
%33 = fcmp ugt double %8, %28
%34 = fcmp ugt double %28, %27
%35 = select i1 %33, i1 true, i1 %34
br i1 %35, label %38, label %36
36: ; preds = %32
%37 = fsub double %28, %8
br label %52
38: ; preds = %32
%39 = fcmp olt double %27, %28
br i1 %39, label %40, label %52
40: ; preds = %38
%41 = fsub double %27, %8
br label %52
42: ; preds = %0
%43 = fcmp ugt double %19, %27
%44 = fcmp ugt double %27, %28
%45 = select i1 %43, i1 true, i1 %44
br i1 %45, label %48, label %46
46: ; preds = %42
%47 = fsub double %27, %19
br label %52
48: ; preds = %42
%49 = fcmp olt double %28, %27
br i1 %49, label %50, label %52
50: ; preds = %48
%51 = fsub double %28, %19
br label %52
52: ; preds = %48, %38, %46, %50, %36, %40
%53 = phi double [ %37, %36 ], [ %41, %40 ], [ %47, %46 ], [ %51, %50 ], [ 0.000000e+00, %38 ], [ 0.000000e+00, %48 ]
%54 = fcmp olt double %21, %10
br i1 %54, label %55, label %65
55: ; preds = %52
%56 = fcmp ugt double %10, %30
%57 = fcmp ugt double %30, %29
%58 = select i1 %56, i1 true, i1 %57
br i1 %58, label %61, label %59
59: ; preds = %55
%60 = fsub double %30, %10
br label %75
61: ; preds = %55
%62 = fcmp olt double %29, %30
br i1 %62, label %63, label %75
63: ; preds = %61
%64 = fsub double %29, %10
br label %75
65: ; preds = %52
%66 = fcmp ugt double %21, %29
%67 = fcmp ugt double %29, %30
%68 = select i1 %66, i1 true, i1 %67
br i1 %68, label %71, label %69
69: ; preds = %65
%70 = fsub double %29, %21
br label %75
71: ; preds = %65
%72 = fcmp olt double %30, %29
br i1 %72, label %73, label %75
73: ; preds = %71
%74 = fsub double %30, %21
br label %75
75: ; preds = %71, %61, %69, %73, %59, %63
%76 = phi double [ %60, %59 ], [ %64, %63 ], [ %70, %69 ], [ %74, %73 ], [ 0.000000e+00, %61 ], [ 0.000000e+00, %71 ]
%77 = fmul double %53, %76
%78 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %77)
ret i32 0
}