program problemD
  implicit none

  integer, parameter     :: double = selected_real_kind ( 9 )
  integer, parameter     :: i8 = selected_int_kind  ( 18 )
  real ( kind = double ), parameter :: pi = 3.141592653589790_double
  integer ( kind = i8 )  :: a, b, x
  real ( kind = double ) :: ans

  read *, a, b, x
  a = real ( a )
  b = real ( b )
  x = real ( x )

  if ( a **2.0_double * b / 2.0_double < x ) then
     ans = atan ( ( 2.0_double * b ) / a - ( 2.0_double * x ) &
          & / ( a **3.0_double ) ) / ( 2.0_double * pi ) * 360_i8
  else
     ans = atan ( a * b **2.0_double / ( 2.0_double * x ) ) / ( 2.0_double * pi ) * 360_i8
  end if
  print *, ans

end program problemD

; 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.759df6201d724fddf3689337174e7923 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3083/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare double @atan(double) local_unnamed_addr #0

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.759df6201d724fddf3689337174e7923, i32 10)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %1, i32 8)
  %6 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %2, i32 8)
  %7 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %3, i32 8)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %9 = load i64, ptr %1, align 8, !tbaa !3
  %10 = sitofp i64 %9 to float
  %11 = fptosi float %10 to i64
  store i64 %11, ptr %1, align 8, !tbaa !3
  %12 = load i64, ptr %2, align 8, !tbaa !3
  %13 = sitofp i64 %12 to float
  %14 = fptosi float %13 to i64
  store i64 %14, ptr %2, align 8, !tbaa !3
  %15 = load i64, ptr %3, align 8, !tbaa !3
  %16 = sitofp i64 %15 to float
  %17 = fptosi float %16 to i64
  store i64 %17, ptr %3, align 8, !tbaa !3
  %18 = sitofp i64 %11 to double
  %19 = fmul double %18, %18
  %20 = sitofp i64 %14 to double
  %21 = fmul contract double %19, %20
  %22 = fmul contract double %21, 5.000000e-01
  %23 = sitofp i64 %17 to double
  %24 = fcmp olt double %22, %23
  %25 = fmul contract double %23, 2.000000e+00
  br i1 %24, label %26, label %32

26:                                               ; preds = %0
  %27 = fmul contract double %20, 2.000000e+00
  %28 = fdiv contract double %27, %18
  %29 = fmul double %19, %18
  %30 = fdiv contract double %25, %29
  %31 = fsub contract double %28, %30
  br label %36

32:                                               ; preds = %0
  %33 = fmul double %20, %20
  %34 = fmul contract double %33, %18
  %35 = fdiv contract double %34, %25
  br label %36

36:                                               ; preds = %26, %32
  %.sink = phi double [ %31, %26 ], [ %35, %32 ]
  %37 = call double @atan(double %.sink)
  %.0.in = fdiv contract double %37, 0x401921FB54442D11
  %.0 = fmul contract double %.0.in, 3.600000e+02
  %38 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.759df6201d724fddf3689337174e7923, i32 21)
  %39 = call i1 @_FortranAioOutputReal64(ptr %38, double %.0)
  %40 = call i32 @_FortranAioEndIoStatement(ptr %38)
  ret void
}

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

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) 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

attributes #0 = { mustprogress nofree nosync nounwind 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"}
