program main
 implicit none
 real*8 a,b,x,theta,pi
 pi = 4.D0*atan(1.D0)
 read(*,*) a,b,x
 if(x > (a*a*b)/2) then
  theta = atan2(2*(a*a*b-x)/(a*a),a)
 else
  theta = atan2(b,2*x/(a*b))
 end if
 write(*,*) theta*180/pi
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.d670f1160dc9cfadc7ceb9709a61362b = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3076/source.f\00"
@_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 double, align 8
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.d670f1160dc9cfadc7ceb9709a61362b, i32 5)
  %5 = call i1 @_FortranAioInputReal64(ptr %4, ptr nonnull %1)
  %6 = call i1 @_FortranAioInputReal64(ptr %4, ptr nonnull %2)
  %7 = call i1 @_FortranAioInputReal64(ptr %4, ptr nonnull %3)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %9 = load double, ptr %3, align 8, !tbaa !3
  %10 = load double, ptr %1, align 8, !tbaa !3
  %11 = fmul contract double %10, %10
  %12 = load double, ptr %2, align 8, !tbaa !3
  %13 = fmul contract double %11, %12
  %14 = fmul contract double %13, 5.000000e-01
  %15 = fcmp ogt double %9, %14
  br i1 %15, label %16, label %21

16:                                               ; preds = %0
  %17 = fsub contract double %13, %9
  %18 = fmul contract double %17, 2.000000e+00
  %19 = fdiv contract double %18, %11
  %20 = call double @atan2(double %19, double %10)
  br label %26

21:                                               ; preds = %0
  %22 = fmul contract double %9, 2.000000e+00
  %23 = fmul contract double %10, %12
  %24 = fdiv contract double %22, %23
  %25 = call double @atan2(double %12, double %24)
  br label %26

26:                                               ; preds = %16, %21
  %.0 = phi double [ %20, %16 ], [ %25, %21 ]
  %27 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.d670f1160dc9cfadc7ceb9709a61362b, i32 11)
  %28 = fmul contract double %.0, 1.800000e+02
  %29 = fdiv contract double %28, 0x400921FB54442D18
  %30 = call i1 @_FortranAioOutputReal64(ptr %27, double %29)
  %31 = call i32 @_FortranAioEndIoStatement(ptr %27)
  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

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"}
