program main
  implicit none
  integer :: a, b, x
  real(8) :: theta, p, q, pi
  pi = acos(-1.0d0)
  read (*, *) a, b, x
  if (2 * x >= a * a * b) then
    p = 2.0d0 * b - 2.0d0 * x / a ** 2
    theta = atan2(p, dble(a))
  else
    q = 2.0d0 * x / (a * b)
    theta = atan2(dble(b), q)
  end if
  write (*, "(f12.8)") theta * 180.0d0 / pi
  contains
end program main

; 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.33125d67f270d618d25e30bdd832348f = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3079/source.f\00"
@_QQcl.286631322E3829 = linkonce constant [7 x i8] c"(f12.8)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

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

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.33125d67f270d618d25e30bdd832348f, i32 6)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %1, i32 4)
  %6 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %2, i32 4)
  %7 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %3, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %9 = load i32, ptr %3, align 4, !tbaa !3
  %10 = shl i32 %9, 1
  %11 = load i32, ptr %1, align 4, !tbaa !3
  %12 = mul i32 %11, %11
  %13 = load i32, ptr %2, align 4, !tbaa !3
  %14 = mul i32 %12, %13
  %.not = icmp slt i32 %10, %14
  br i1 %.not, label %24, label %15

15:                                               ; preds = %0
  %16 = sitofp i32 %13 to double
  %17 = fmul contract double %16, 2.000000e+00
  %18 = sitofp i32 %9 to double
  %19 = fmul contract double %18, 2.000000e+00
  %20 = sitofp i32 %12 to double
  %21 = fdiv contract double %19, %20
  %22 = fsub contract double %17, %21
  %23 = sitofp i32 %11 to double
  br label %31

24:                                               ; preds = %0
  %25 = sitofp i32 %9 to double
  %26 = fmul contract double %25, 2.000000e+00
  %27 = mul i32 %13, %11
  %28 = sitofp i32 %27 to double
  %29 = fdiv contract double %26, %28
  %30 = sitofp i32 %13 to double
  br label %31

31:                                               ; preds = %15, %24
  %.sink4 = phi double [ %23, %15 ], [ %29, %24 ]
  %.sink = phi double [ %22, %15 ], [ %30, %24 ]
  %32 = call double @atan2(double %.sink, double %.sink4)
  %33 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286631322E3829, i64 7, ptr null, i32 -1, ptr nonnull @_QQcl.33125d67f270d618d25e30bdd832348f, i32 14)
  %34 = fmul contract double %32, 1.800000e+02
  %35 = fdiv contract double %34, 0x400921FB54442D18
  %36 = call i1 @_FortranAioOutputReal64(ptr %33, double %35)
  %37 = call i32 @_FortranAioEndIoStatement(ptr %33)
  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 @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, 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"}
