#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*/ calc_area(double *, double, double, double, double, double);
int /*<<< orphan*/ calc_co(double, double *, double, double, double, double);
int /*<<< orphan*/ calc_heat(double, double, double, double, double, double *);
int /*<<< orphan*/ calc_tf(double, double, double, double *, double, double);
int /*<<< orphan*/ calc_thick(double, double, double, double, double, double *);
int /*<<< orphan*/ calc_ti(double, double, double *, double, double, double);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, ...);
main() {
  double h, t1, t2, x, k, a;
  int n1, n2, n3, n4, n5, n6;
  char ch;
  printf("Please enter the value of Heat transfer\n");
  n1 = scanf("%lf", &h);
  if (n1 == 0) {
    scanf("%c", &ch);
  }
  printf("Please enter the value of Area\n");
  n2 = scanf("%lf", &a);
  if (n2 == 0) {
    scanf("%c", &ch);
  }
  printf("Please enter the vlaue of co_efficient\n");
  n3 = scanf("%lf", &k);
  if (n3 == 0) {
    scanf("%c", &ch);
  }
  printf("Please enter the value of T1\n");
  n4 = scanf("%lf", &t1);
  if (n4 == 0) {
    scanf("%c", &ch);
  }
  printf("Please enter the value of T2\n");
  n5 = scanf("%lf", &t2);
  if (n5 == 0) {
    scanf("%c", &ch);
  }
  printf("Please enter the thickness X\n");
  n6 = scanf("%lf", &x);
  if (n6 == 0) {
    scanf("%c", &ch);
  }
  if (n1 == 0) {
    calc_heat(a, k, t1, t2, x, &h);
  } else if (n2 == 0) {
    calc_area(&a, t1, t2, x, k, h);
  } else if (n1 == 0) {
    calc_co(a, &k, t1, t2, x, h);
  } else if (n2 == 0) {
    calc_ti(a, k, &t1, t2, x, h);
  } else if (n5 == 0) {
    calc_tf(a, k, t1, &t2, x, h);
  } else if (n6 == 0) {
    calc_thick(a, h, k, t1, t2, &x);
  }
  printf("KA(T2-T1)\n");
  printf("H=--------------\n");
  printf("     x\n");
  printf("HEAT %f\n", h);
  printf("CO_EFFICIENT %f\n", k);
  printf("T1 %f\n", t1);
  printf("T2 %f\n", t2);
  printf("AREA %f\n", a);
  printf("THICKNESS %f\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe85(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jne    11ce <main+0x4e>
lea    0xe6a(%rip),%rdi
lea    -0x51(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe46(%rip),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jne    120d <main+0x8d>
lea    0xe2b(%rip),%rdi
lea    -0x51(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe07(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    124c <main+0xcc>
lea    0xdec(%rip),%rdi
lea    -0x51(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdc8(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
jne    128b <main+0x10b>
lea    0xdad(%rip),%rdi
lea    -0x51(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd89(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jne    12ca <main+0x14a>
lea    0xd6e(%rip),%rdi
lea    -0x51(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd4a(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    %eax,-0x50(%rbp)
cmpl   $0x0,-0x50(%rbp)
jne    1309 <main+0x189>
lea    0xd2f(%rip),%rdi
lea    -0x51(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
cmpl   $0x0,-0x3c(%rbp)
jne    133a <main+0x1ba>
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
lea    -0x10(%rbp),%rdi
call   1060 <calc_heat@plt>
jmp    1443 <main+0x2c3>
cmpl   $0x0,-0x40(%rbp)
jne    136b <main+0x1eb>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm4
lea    -0x38(%rbp),%rdi
call   1030 <calc_area@plt>
jmp    143e <main+0x2be>
cmpl   $0x0,-0x3c(%rbp)
jne    139c <main+0x21c>
movsd  -0x38(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm4
lea    -0x30(%rbp),%rdi
call   1040 <calc_co@plt>
jmp    1439 <main+0x2b9>
cmpl   $0x0,-0x40(%rbp)
jne    13cd <main+0x24d>
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm4
lea    -0x18(%rbp),%rdi
call   10a0 <calc_ti@plt>
jmp    1434 <main+0x2b4>
cmpl   $0x0,-0x4c(%rbp)
jne    13fe <main+0x27e>
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm4
lea    -0x20(%rbp),%rdi
call   1080 <calc_tf@plt>
jmp    142f <main+0x2af>
cmpl   $0x0,-0x50(%rbp)
jne    142a <main+0x2aa>
movsd  -0x38(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm4
lea    -0x28(%rbp),%rdi
call   1070 <calc_thick@plt>
jmp    142f <main+0x2af>
jmp    1434 <main+0x2b4>
jmp    1439 <main+0x2b9>
jmp    143e <main+0x2be>
jmp    1443 <main+0x2c3>
lea    0xc88(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc85(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc89(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xc7e(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  -0x30(%rbp),%xmm0
lea    0xc74(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xc72(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xc66(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  -0x38(%rbp),%xmm0
lea    0xc5a(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  -0x28(%rbp),%xmm0
lea    0xc50(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
lea    0xe73(%rip),%rdi
lea    0x30(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %eax,%r14d
test   %eax,%eax
jne    11b3 <main+0x43>
lea    0xe5d(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xe3a(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %eax,%r15d
test   %eax,%eax
jne    11ec <main+0x7c>
lea    0xe24(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0xe9a(%rip),%rdi
call   1030 <puts@plt>
lea    0xe01(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
test   %eax,%eax
jne    1222 <main+0xb2>
lea    0xdee(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0xe8b(%rip),%rdi
call   1030 <puts@plt>
lea    0xdcb(%rip),%rdi
lea    0x28(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
test   %eax,%eax
jne    1258 <main+0xe8>
lea    0xdb8(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0xe72(%rip),%rdi
call   1030 <puts@plt>
lea    0xd95(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1290 <main+0x120>
lea    0xd80(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0xe57(%rip),%rdi
call   1030 <puts@plt>
lea    0xd5d(%rip),%rdi
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %eax,%ebp
test   %eax,%eax
je     12fc <main+0x18c>
test   %r14d,%r14d
je     1314 <main+0x1a4>
test   %r15d,%r15d
je     133e <main+0x1ce>
test   %ebx,%ebx
je     1368 <main+0x1f8>
test   %ebp,%ebp
jne    1390 <main+0x220>
movsd  0x8(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
movsd  0x20(%rsp),%xmm4
lea    0x18(%rsp),%rdi
call   1070 <calc_thick@plt>
jmp    1390 <main+0x220>
lea    0xd01(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
test   %r14d,%r14d
jne    12ba <main+0x14a>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
lea    0x30(%rsp),%rdi
call   1060 <calc_heat@plt>
jmp    1390 <main+0x220>
movsd  0x28(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
movsd  0x30(%rsp),%xmm4
lea    0x8(%rsp),%rdi
call   1040 <calc_area@plt>
jmp    1390 <main+0x220>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
movsd  0x30(%rsp),%xmm4
lea    0x20(%rsp),%rdi
call   1080 <calc_tf@plt>
lea    0xd74(%rip),%rdi
call   1030 <puts@plt>
lea    0xd72(%rip),%rdi
call   1030 <puts@plt>
lea    0xd77(%rip),%rdi
call   1030 <puts@plt>
movsd  0x30(%rsp),%xmm0
lea    0xc46(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x10(%rsp),%xmm0
lea    0xc3b(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x28(%rsp),%xmm0
lea    0xc38(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x20(%rsp),%xmm0
lea    0xc2b(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x8(%rsp),%xmm0
lea    0xc1e(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x18(%rsp),%xmm0
lea    0xc13(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Please enter the value of Heat transfer\0A\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [32 x i8] c"Please enter the value of Area\0A\00"
@.str.4 = [40 x i8] c"Please enter the vlaue of co_efficient\0A\00"
@.str.5 = [30 x i8] c"Please enter the value of T1\0A\00"
@.str.6 = [30 x i8] c"Please enter the value of T2\0A\00"
@.str.7 = [30 x i8] c"Please enter the thickness X\0A\00"
@.str.8 = [11 x i8] c"KA(T2-T1)\0A\00"
@.str.9 = [18 x i8] c"H=--------------\0A\00"
@.str.10 = [8 x i8] c" x\0A\00"
@.str.11 = [9 x i8] c"HEAT %f\0A\00"
@.str.12 = [17 x i8] c"CO_EFFICIENT %f\0A\00"
@.str.13 = [7 x i8] c"T1 %f\0A\00"
@.str.14 = [7 x i8] c"T2 %f\0A\00"
@.str.15 = [9 x i8] c"AREA %f\0A\00"
@.str.16 = [14 x i8] c"THICKNESS %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8
store i32 0, i32* %1
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
store i32 %16, i32* %8
%17 = load i32, i32* %8
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %0
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %14)
br label %21
21: ; preds = %19, %0
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %7)
store i32 %23, i32* %9
%24 = load i32, i32* %9
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %21
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %14)
br label %28
28: ; preds = %26, %21
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %6)
store i32 %30, i32* %10
%31 = load i32, i32* %10
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %28
%34 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %14)
br label %35
35: ; preds = %33, %28
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
%37 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
store i32 %37, i32* %11
%38 = load i32, i32* %11
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %35
%41 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %14)
br label %42
42: ; preds = %40, %35
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%44 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
store i32 %44, i32* %12
%45 = load i32, i32* %12
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %42
%48 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %14)
br label %49
49: ; preds = %47, %42
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%51 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
store i32 %51, i32* %13
%52 = load i32, i32* %13
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %49
%55 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %14)
br label %56
56: ; preds = %54, %49
%57 = load i32, i32* %8
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %66
59: ; preds = %56
%60 = load double, double* %7
%61 = load double, double* %6
%62 = load double, double* %3
%63 = load double, double* %4
%64 = load double, double* %5
%65 = call i32 @calc_heat(double %60, double %61, double %62, double %63, double %64, double* %2)
br label %121
66: ; preds = %56
%67 = load i32, i32* %9
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %76
69: ; preds = %66
%70 = load double, double* %3
%71 = load double, double* %4
%72 = load double, double* %5
%73 = load double, double* %6
%74 = load double, double* %2
%75 = call i32 @calc_area(double* %7, double %70, double %71, double %72, double %73, double %74)
br label %120
76: ; preds = %66
%77 = load i32, i32* %8
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %86
79: ; preds = %76
%80 = load double, double* %7
%81 = load double, double* %3
%82 = load double, double* %4
%83 = load double, double* %5
%84 = load double, double* %2
%85 = call i32 @calc_co(double %80, double* %6, double %81, double %82, double %83, double %84)
br label %119
86: ; preds = %76
%87 = load i32, i32* %9
%88 = icmp eq i32 %87, 0
br i1 %88, label %89, label %96
89: ; preds = %86
%90 = load double, double* %7
%91 = load double, double* %6
%92 = load double, double* %4
%93 = load double, double* %5
%94 = load double, double* %2
%95 = call i32 @calc_ti(double %90, double %91, double* %3, double %92, double %93, double %94)
br label %118
96: ; preds = %86
%97 = load i32, i32* %12
%98 = icmp eq i32 %97, 0
br i1 %98, label %99, label %106
99: ; preds = %96
%100 = load double, double* %7
%101 = load double, double* %6
%102 = load double, double* %3
%103 = load double, double* %5
%104 = load double, double* %2
%105 = call i32 @calc_tf(double %100, double %101, double %102, double* %4, double %103, double %104)
br label %117
106: ; preds = %96
%107 = load i32, i32* %13
%108 = icmp eq i32 %107, 0
br i1 %108, label %109, label %116
109: ; preds = %106
%110 = load double, double* %7
%111 = load double, double* %2
%112 = load double, double* %6
%113 = load double, double* %3
%114 = load double, double* %4
%115 = call i32 @calc_thick(double %110, double %111, double %112, double %113, double %114, double* %5)
br label %116
116: ; preds = %109, %106
br label %117
117: ; preds = %116, %99
br label %118
118: ; preds = %117, %89
br label %119
119: ; preds = %118, %79
br label %120
120: ; preds = %119, %69
br label %121
121: ; preds = %120, %59
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%125 = load double, double* %2
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), double %125)
%127 = load double, double* %6
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %127)
%129 = load double, double* %3
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), double %129)
%131 = load double, double* %4
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), double %131)
%133 = load double, double* %7
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), double %133)
%135 = load double, double* %5
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), double %135)
%137 = load i32, i32* %1
ret i32 %137
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.11 = [9 x i8] c"HEAT %f\0A\00"
@.str.12 = [17 x i8] c"CO_EFFICIENT %f\0A\00"
@.str.13 = [7 x i8] c"T1 %f\0A\00"
@.str.14 = [7 x i8] c"T2 %f\0A\00"
@.str.15 = [9 x i8] c"AREA %f\0A\00"
@.str.16 = [14 x i8] c"THICKNESS %f\0A\00"
@str = [40 x i8] c"Please enter the value of Heat transfer\00"
@str.17 = [31 x i8] c"Please enter the value of Area\00"
@str.18 = [39 x i8] c"Please enter the vlaue of co_efficient\00"
@str.19 = [29 x i8] c"Please enter the value of T1\00"
@str.20 = [29 x i8] c"Please enter the value of T2\00"
@str.21 = [29 x i8] c"Please enter the thickness X\00"
@str.22 = [10 x i8] c"KA(T2-T1)\00"
@str.23 = [17 x i8] c"H=--------------\00"
@str.24 = [7 x i8] c" x\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i8
%8 = bitcast double* %1 to i8*
%9 = bitcast double* %2 to i8*
%10 = bitcast double* %3 to i8*
%11 = bitcast double* %4 to i8*
%12 = bitcast double* %5 to i8*
%13 = bitcast double* %6 to i8*
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
br label %19
19: ; preds = %17, %0
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.17, i64 0, i64 0))
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %6)
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
br label %25
25: ; preds = %23, %19
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.18, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
br label %31
31: ; preds = %29, %25
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.19, i64 0, i64 0))
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
br label %37
37: ; preds = %35, %31
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.20, i64 0, i64 0))
%39 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
br label %43
43: ; preds = %41, %37
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.21, i64 0, i64 0))
%45 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
br label %49
49: ; preds = %47, %43
br i1 %16, label %50, label %57
50: ; preds = %49
%51 = load double, double* %6
%52 = load double, double* %5
%53 = load double, double* %2
%54 = load double, double* %3
%55 = load double, double* %4
%56 = call i32 @calc_heat(double %51, double %52, double %53, double %54, double %55, double* %1)
br label %81
57: ; preds = %49
br i1 %22, label %58, label %65
58: ; preds = %57
%59 = load double, double* %2
%60 = load double, double* %3
%61 = load double, double* %4
%62 = load double, double* %5
%63 = load double, double* %1
%64 = call i32 @calc_area(double* %6, double %59, double %60, double %61, double %62, double %63)
br label %81
65: ; preds = %57
br i1 %40, label %66, label %73
66: ; preds = %65
%67 = load double, double* %6
%68 = load double, double* %5
%69 = load double, double* %2
%70 = load double, double* %4
%71 = load double, double* %1
%72 = call i32 @calc_tf(double %67, double %68, double %69, double* %3, double %70, double %71)
br label %81
73: ; preds = %65
br i1 %46, label %74, label %81
74: ; preds = %73
%75 = load double, double* %6
%76 = load double, double* %1
%77 = load double, double* %5
%78 = load double, double* %2
%79 = load double, double* %3
%80 = call i32 @calc_thick(double %75, double %76, double %77, double %78, double %79, double* %4)
br label %81
81: ; preds = %58, %73, %74, %66, %50
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.22, i64 0, i64 0))
%83 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.23, i64 0, i64 0))
%84 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.24, i64 0, i64 0))
%85 = load double, double* %1
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), double %85)
%87 = load double, double* %5
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %87)
%89 = load double, double* %2
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), double %89)
%91 = load double, double* %3
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), double %91)
%93 = load double, double* %6
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), double %93)
%95 = load double, double* %4
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), double %95)
ret i32 0
}