PROGRAM TAX
 IMPLICIT NONE
 INTEGER::N,max,a,b,X
 INTRINSIC INT
 READ(*,*)N
 max=N
 b=0
 
 DO X=1, max
  a=int(X*1.08)
  IF(a == N)THEN
  b=X
  END IF
 END DO
 IF(b > 0)THEN
  WRITE(*,*)b
 ELSE
  WRITE(*,*)":("
 END IF
 
END PROGRAM TAX

; 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.4059b018a5f1a8c402ff32cab462d7da = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2887/source.f\00"
@_QQcl.3A28 = linkonce constant [2 x i8] c":("
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.4059b018a5f1a8c402ff32cab462d7da, i32 5)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 4)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = load i32, ptr %1, align 4, !tbaa !3
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %0
  %7 = zext i32 %5 to i64
  %xtraiter = and i64 %7, 1
  %8 = icmp eq i32 %5, 1
  br i1 %8, label %._crit_edge.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %7, 4294967294
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %9 = phi i32 [ 1, %.lr.ph.preheader.new ], [ %19, %.lr.ph ]
  %.08 = phi i32 [ 0, %.lr.ph.preheader.new ], [ %spec.select.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %10 = sitofp i32 %9 to float
  %11 = fmul contract float %10, 0x3FF147AE20000000
  %12 = fptosi float %11 to i32
  %13 = icmp eq i32 %5, %12
  %spec.select = select i1 %13, i32 %9, i32 %.08
  %14 = add nuw i32 %9, 1
  %15 = sitofp i32 %14 to float
  %16 = fmul contract float %15, 0x3FF147AE20000000
  %17 = fptosi float %16 to i32
  %18 = icmp eq i32 %5, %17
  %spec.select.1 = select i1 %18, i32 %14, i32 %spec.select
  %19 = add nuw i32 %9, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1.not = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1.not, label %._crit_edge.unr-lcssa, label %.lr.ph

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph, %.lr.ph.preheader
  %spec.select.lcssa.ph = phi i32 [ undef, %.lr.ph.preheader ], [ %spec.select.1, %.lr.ph ]
  %.unr10 = phi i32 [ 1, %.lr.ph.preheader ], [ %19, %.lr.ph ]
  %.08.unr = phi i32 [ 0, %.lr.ph.preheader ], [ %spec.select.1, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.unr-lcssa
  %20 = sitofp i32 %.unr10 to float
  %21 = fmul contract float %20, 0x3FF147AE20000000
  %22 = fptosi float %21 to i32
  %23 = icmp eq i32 %5, %22
  %spec.select.epil = select i1 %23, i32 %.unr10, i32 %.08.unr
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %.lr.ph.epil
  %spec.select.lcssa = phi i32 [ %spec.select.lcssa.ph, %._crit_edge.unr-lcssa ], [ %spec.select.epil, %.lr.ph.epil ]
  %24 = icmp sgt i32 %spec.select.lcssa, 0
  br i1 %24, label %25, label %._crit_edge.thread

25:                                               ; preds = %._crit_edge
  %26 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.4059b018a5f1a8c402ff32cab462d7da, i32 16)
  %27 = call i1 @_FortranAioOutputInteger32(ptr %26, i32 %spec.select.lcssa)
  br label %30

._crit_edge.thread:                               ; preds = %0, %._crit_edge
  %28 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.4059b018a5f1a8c402ff32cab462d7da, i32 18)
  %29 = call i1 @_FortranAioOutputAscii(ptr %28, ptr nonnull @_QQcl.3A28, i64 2)
  br label %30

30:                                               ; preds = %25, %._crit_edge.thread
  %.sink = phi ptr [ %26, %25 ], [ %28, %._crit_edge.thread ]
  %31 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  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 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputAscii(ptr, ptr, i64) local_unnamed_addr

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