#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);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int sqrt(double);
int main() {
  int xy, xz, zy, x, y, z;
  scanf("%d%d%d", &xy, &xz, &zy);
  y = sqrt((((double)xy / xz) * zy));
  x = xy / y;
  z = zy / y;
  printf("%d", 4 * (x + y + z));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
add    -0x18(%rbp),%esi
add    -0x1c(%rbp),%esi
shl    $0x2,%esi
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
cvtsi2sdl 0x10(%rsp),%xmm1
cvtsi2sdl 0x14(%rsp),%xmm0
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl 0xc(%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
mov    %eax,%ecx
mov    0x10(%rsp),%eax
cltd
idiv   %ecx
mov    %eax,%esi
mov    0xc(%rsp),%eax
cltd
idiv   %ecx
add    %ecx,%esi
add    %eax,%esi
shl    $0x2,%esi
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to double
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to double
%13 = fdiv double %10, %12
%14 = load i32, i32* %4
%15 = sitofp i32 %14 to double
%16 = fmul double %13, %15
%17 = call i32 @sqrt(double %16)
store i32 %17, i32* %6
%18 = load i32, i32* %2
%19 = load i32, i32* %6
%20 = sdiv i32 %18, %19
store i32 %20, i32* %5
%21 = load i32, i32* %4
%22 = load i32, i32* %6
%23 = sdiv i32 %21, %22
store i32 %23, i32* %7
%24 = load i32, i32* %5
%25 = load i32, i32* %6
%26 = add nsw i32 %24, %25
%27 = load i32, i32* %7
%28 = add nsw i32 %26, %27
%29 = mul nsw i32 4, %28
%30 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %29)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = sitofp i32 %8 to double
%10 = load i32, i32* %2
%11 = sitofp i32 %10 to double
%12 = fdiv double %9, %11
%13 = load i32, i32* %3
%14 = sitofp i32 %13 to double
%15 = fmul double %12, %14
%16 = call i32 @sqrt(double %15)
%17 = load i32, i32* %1
%18 = sdiv i32 %17, %16
%19 = load i32, i32* %3
%20 = sdiv i32 %19, %16
%21 = add nsw i32 %18, %16
%22 = add nsw i32 %21, %20
%23 = shl nsw i32 %22, 2
%24 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %23)
ret i32 0
}