program ABC168_C
  double precision::A,B,H,M
  double precision::pi,radH,radM,rad,ans
  read(*,*)A,B,H,M
  pi=datan(1.0d0)*4.0d0
  radH=(3.0d1*H+5.0d-1*M)*pi/1.8d2
  radM=6.0q0*M*pi/1.8d2
  rad=dabs(radH-radM)
  ans=sqrt(A*A+B*B-2.0d0*A*B*dcos(rad))
  write(*,*)ans
end program ABC168_C
; ModuleID = 'FIRModule'
source_filename = "FIRModule"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@_QQcl.572c17ae48775b6b51254eaa590d1ed5 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_1380/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca double, align 8
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.572c17ae48775b6b51254eaa590d1ed5, i32 4)
  %6 = call i1 @_FortranAioInputReal64(ptr %5, ptr nonnull %1)
  %7 = call i1 @_FortranAioInputReal64(ptr %5, ptr nonnull %2)
  %8 = call i1 @_FortranAioInputReal64(ptr %5, ptr nonnull %3)
  %9 = call i1 @_FortranAioInputReal64(ptr %5, ptr nonnull %4)
  %10 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %11 = load double, ptr %3, align 8, !tbaa !3
  %12 = fmul contract double %11, 3.000000e+01
  %13 = load double, ptr %4, align 8, !tbaa !3
  %14 = fmul contract double %13, 5.000000e-01
  %15 = fadd contract double %12, %14
  %16 = fmul contract double %15, 0x400921FB54442D18
  %17 = fdiv contract double %16, 1.800000e+02
  %18 = fpext double %13 to x86_fp80
  %19 = fmul contract x86_fp80 %18, 0xK4001C000000000000000
  %20 = fmul contract x86_fp80 %19, 0xK4000C90FDAA22168C000
  %21 = fdiv contract x86_fp80 %20, 0xK4006B400000000000000
  %22 = fptrunc x86_fp80 %21 to double
  %23 = fsub contract double %17, %22
  %24 = load double, ptr %1, align 8, !tbaa !3
  %25 = fmul contract double %24, %24
  %26 = load double, ptr %2, align 8, !tbaa !3
  %27 = fmul contract double %26, %26
  %28 = fadd contract double %25, %27
  %29 = fmul contract double %24, 2.000000e+00
  %30 = fmul contract double %29, %26
  %31 = call contract double @llvm.cos.f64(double %23)
  %32 = fmul contract double %30, %31
  %33 = fsub contract double %28, %32
  %34 = call contract double @llvm.sqrt.f64(double %33)
  %35 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.572c17ae48775b6b51254eaa590d1ed5, i32 10)
  %36 = call i1 @_FortranAioOutputReal64(ptr %35, double %34)
  %37 = call i32 @_FortranAioEndIoStatement(ptr %35)
  ret void
}

declare ptr @_FortranAioBeginExternalListInput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputReal64(ptr, ptr) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare ptr @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputReal64(ptr, double) local_unnamed_addr

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.cos.f64(double) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #0

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{!4, !4, i64 0}
!4 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
