program sample
implicit none
character A*3,S*3,B*3
read(*,*) S
A="ABC"
B="ARC"
If (S==A) then
   write(*,*) "ARC"
else if (S==B) then
write(*,*) "ABC"
end if
stop
end program sample
; 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.b98c0c39162af6932a513a10978385e0 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_1473/source.f\00"
@_QQcl.414243 = linkonce constant [3 x i8] c"ABC"
@_QQcl.415243 = linkonce constant [3 x i8] c"ARC"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca [3 x i8], align 1
  %2 = alloca [3 x i8], align 1
  %3 = alloca [3 x i8], align 1
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.b98c0c39162af6932a513a10978385e0, i32 4)
  %5 = call i1 @_FortranAioInputAscii(ptr %4, ptr nonnull %3, i64 3)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %1, ptr noundef nonnull align 1 dereferenceable(3) @_QQcl.414243, i64 3, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %2, ptr noundef nonnull align 1 dereferenceable(3) @_QQcl.415243, i64 3, i1 false)
  %7 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %3, ptr nonnull %1, i64 3, i64 3)
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %.sink.split, label %9

9:                                                ; preds = %0
  %10 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %3, ptr nonnull %2, i64 3, i64 3)
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %.sink.split, label %15

.sink.split:                                      ; preds = %9, %0
  %.sink = phi i32 [ 8, %0 ], [ 10, %9 ]
  %_QQcl.415243.sink = phi ptr [ @_QQcl.415243, %0 ], [ @_QQcl.414243, %9 ]
  %12 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.b98c0c39162af6932a513a10978385e0, i32 %.sink)
  %13 = call i1 @_FortranAioOutputAscii(ptr %12, ptr nonnull %_QQcl.415243.sink, i64 3)
  %14 = call i32 @_FortranAioEndIoStatement(ptr %12)
  br label %15

15:                                               ; preds = %.sink.split, %9
  %16 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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

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

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare i32 @_FortranACharacterCompareScalar1(ptr, ptr, i64, i64) local_unnamed_addr

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

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

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

attributes #0 = { noreturn }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }

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