#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 sqrt(int);
void main() {
  int a = 3, b = 4, c = 5;
  float area;
  printf("a = %d,b = %d,c = %d\n", a, b, c);
  area = sqrt((a + b + c) / 2 * ((a + b + c) / 2 - a) * ((a + b + c) / 2 - b) *
              ((a + b + c) / 2 - c));
  printf("area = %f", area);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    -0x4(%rbp),%eax
imul   %eax,%edi
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    -0x8(%rbp),%eax
imul   %eax,%edi
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    -0xc(%rbp),%eax
imul   %eax,%edi
call   1040 <sqrt@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xe52(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
movss  0xed0(%rip),%xmm0
mov    $0x4,%esi
mov    $0x5,%edx
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x24,%edi
call   1040 <sqrt@plt>
lea    0xec8(%rip),%rdi
mov    $0x1,%al
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"a = %d,b = %d,c = %d\0A\00"
@.str.1 = [10 x i8] c"area = %f\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 3, i32* %1
store i32 4, i32* %2
store i32 5, i32* %3
%5 = load i32, i32* %1
%6 = sitofp i32 %5 to float
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float %6, i32 %7, i32 %8)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = add nsw i32 %10, %11
%13 = load i32, i32* %3
%14 = add nsw i32 %12, %13
%15 = sdiv i32 %14, 2
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = add nsw i32 %16, %17
%19 = load i32, i32* %3
%20 = add nsw i32 %18, %19
%21 = sdiv i32 %20, 2
%22 = load i32, i32* %1
%23 = sub nsw i32 %21, %22
%24 = mul nsw i32 %15, %23
%25 = load i32, i32* %1
%26 = load i32, i32* %2
%27 = add nsw i32 %25, %26
%28 = load i32, i32* %3
%29 = add nsw i32 %27, %28
%30 = sdiv i32 %29, 2
%31 = load i32, i32* %2
%32 = sub nsw i32 %30, %31
%33 = mul nsw i32 %24, %32
%34 = load i32, i32* %1
%35 = load i32, i32* %2
%36 = add nsw i32 %34, %35
%37 = load i32, i32* %3
%38 = add nsw i32 %36, %37
%39 = sdiv i32 %38, 2
%40 = load i32, i32* %3
%41 = sub nsw i32 %39, %40
%42 = mul nsw i32 %33, %41
%43 = call float @sqrt(i32 %42)
store float %43, float* %4
%44 = load float, float* %4
%45 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), float %44)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"a = %d,b = %d,c = %d\0A\00"
@.str.1 = [10 x i8] c"area = %f\00"
define void @main() {
%1 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float 3.000000e+00, i32 4, i32 5)
%2 = tail call float @sqrt(i32 36)
%3 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), float %2)
ret void
}