; LLVM IR from TharushaDinujaya/MicroMouse :: src/solver.ll (Z20updateFullFloodArrayPA14_iS0_)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Point = type { i32, i32 }

@_ZZ20updateFullFloodArrayPA14_iS0_E1q = external hidden global ptr, align 8
@_ZGVZ20updateFullFloodArrayPA14_iS0_E1q = external hidden global i64, align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z10isLeftWallPA14_i5Point(ptr noundef, i64) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11isRightWallPA14_i5Point(ptr noundef, i64) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11isFrontWallPA14_i5Point(ptr noundef, i64) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z10isBackWallPA14_i5Point(ptr noundef, i64) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z20updateFullFloodArrayPA14_iS0_(ptr noundef %0, ptr noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.Point, align 4
  %8 = alloca %struct.Point, align 4
  %9 = alloca %struct.Point, align 4
  %10 = alloca %struct.Point, align 4
  %11 = alloca %struct.Point, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.Point, align 4
  %14 = alloca %struct.Point, align 4
  %15 = alloca %struct.Point, align 4
  %16 = alloca %struct.Point, align 4
  %17 = alloca %struct.Point, align 4
  %18 = alloca %struct.Point, align 4
  %19 = alloca %struct.Point, align 4
  %20 = alloca %struct.Point, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %21 = load atomic i8, ptr @_ZGVZ20updateFullFloodArrayPA14_iS0_E1q acquire, align 8
  %22 = icmp eq i8 %21, 0
  br i1 %22, label %23, label %29, !prof !9

23:                                               ; preds = %2
  %24 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ20updateFullFloodArrayPA14_iS0_E1q) #3
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %29

26:                                               ; preds = %23
  %27 = invoke noundef ptr @_Z11createQueuei(i32 noundef 20)
          to label %28 unwind label %102

28:                                               ; preds = %26
  store ptr %27, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  call void @__cxa_guard_release(ptr @_ZGVZ20updateFullFloodArrayPA14_iS0_E1q) #3
  br label %29

29:                                               ; preds = %28, %23, %2
  %30 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  call void @_Z10resetQueueP5Queue(ptr noundef %30)
  %31 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 0
  store i32 7, ptr %32, align 4, !tbaa !10
  %33 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 1
  store i32 7, ptr %33, align 4, !tbaa !13
  %34 = load i64, ptr %7, align 4
  call void @_Z7enqueueP5Queue5Point(ptr noundef %31, i64 %34)
  %35 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 0
  store i32 8, ptr %36, align 4, !tbaa !10
  %37 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 1
  store i32 7, ptr %37, align 4, !tbaa !13
  %38 = load i64, ptr %8, align 4
  call void @_Z7enqueueP5Queue5Point(ptr noundef %35, i64 %38)
  %39 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 0
  store i32 7, ptr %40, align 4, !tbaa !10
  %41 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 1
  store i32 8, ptr %41, align 4, !tbaa !13
  %42 = load i64, ptr %9, align 4
  call void @_Z7enqueueP5Queue5Point(ptr noundef %39, i64 %42)
  %43 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.Point, ptr %10, i32 0, i32 0
  store i32 8, ptr %44, align 4, !tbaa !10
  %45 = getelementptr inbounds %struct.Point, ptr %10, i32 0, i32 1
  store i32 8, ptr %45, align 4, !tbaa !13
  %46 = load i64, ptr %10, align 4
  call void @_Z7enqueueP5Queue5Point(ptr noundef %43, i64 %46)
  br label %47

47:                                               ; preds = %223, %29
  %48 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  %49 = call noundef zeroext i1 @_Z5emptyP5Queue(ptr noundef %48)
  %50 = xor i1 %49, true
  br i1 %50, label %51, label %224

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %52 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  %53 = call i64 @_Z7dequeueP5Queue(ptr noundef %52)
  store i64 %53, ptr %11, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %56 = load i32, ptr %55, align 4, !tbaa !10
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [14 x i32], ptr %54, i64 %57
  %59 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %60 = load i32, ptr %59, align 4, !tbaa !13
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [14 x i32], ptr %58, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !14
  store i32 %63, ptr %12, align 4, !tbaa !14
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !15
  %65 = load i64, ptr %13, align 4
  %66 = call noundef zeroext i1 @_Z10isLeftWallPA14_i5Point(ptr noundef %64, i64 %65)
  br i1 %66, label %106, label %67

67:                                               ; preds = %51
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %70 = load i32, ptr %69, align 4, !tbaa !10
  %71 = sub nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [14 x i32], ptr %68, i64 %72
  %74 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !13
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [14 x i32], ptr %73, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !14
  %79 = icmp eq i32 %78, 9999
  br i1 %79, label %80, label %106

80:                                               ; preds = %67
  %81 = load i32, ptr %12, align 4, !tbaa !14
  %82 = add nsw i32 %81, 1
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %85 = load i32, ptr %84, align 4, !tbaa !10
  %86 = sub nsw i32 %85, 1
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [14 x i32], ptr %83, i64 %87
  %89 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %90 = load i32, ptr %89, align 4, !tbaa !13
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [14 x i32], ptr %88, i64 0, i64 %91
  store i32 %82, ptr %92, align 4, !tbaa !14
  %93 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.Point, ptr %14, i32 0, i32 0
  %95 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %96 = load i32, ptr %95, align 4, !tbaa !10
  %97 = sub nsw i32 %96, 1
  store i32 %97, ptr %94, align 4, !tbaa !10
  %98 = getelementptr inbounds %struct.Point, ptr %14, i32 0, i32 1
  %99 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !13
  store i32 %100, ptr %98, align 4, !tbaa !13
  %101 = load i64, ptr %14, align 4
  call void @_Z7enqueueP5Queue5Point(ptr noundef %93, i64 %101)
  br label %106

102:                                              ; preds = %26
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %5, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %6, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ20updateFullFloodArrayPA14_iS0_E1q) #3
  br label %225

106:                                              ; preds = %80, %67, %51
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !15
  %108 = load i64, ptr %15, align 4
  %109 = call noundef zeroext i1 @_Z11isRightWallPA14_i5Point(ptr noundef %107, i64 %108)
  br i1 %109, label %145, label %110

110:                                              ; preds = %106
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %113 = load i32, ptr %112, align 4, !tbaa !10
  %114 = add nsw i32 %113, 1
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [14 x i32], ptr %111, i64 %115
  %117 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !13
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [14 x i32], ptr %116, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !14
  %122 = icmp eq i32 %121, 9999
  br i1 %122, label %123, label %145

123:                                              ; preds = %110
  %124 = load i32, ptr %12, align 4, !tbaa !14
  %125 = add nsw i32 %124, 1
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %128 = load i32, ptr %127, align 4, !tbaa !10
  %129 = add nsw i32 %128, 1
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [14 x i32], ptr %126, i64 %130
  %132 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %133 = load i32, ptr %132, align 4, !tbaa !13
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [14 x i32], ptr %131, i64 0, i64 %134
  store i32 %125, ptr %135, align 4, !tbaa !14
  %136 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.Point, ptr %16, i32 0, i32 0
  %138 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %139 = load i32, ptr %138, align 4, !tbaa !10
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %137, align 4, !tbaa !10
  %141 = getelementptr inbounds %struct.Point, ptr %16, i32 0, i32 1
  %142 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !13
  store i32 %143, ptr %141, align 4, !tbaa !13
  %144 = load i64, ptr %16, align 4
  call void @_Z7enqueueP5Queue5Point(ptr noundef %136, i64 %144)
  br label %145

145:                                              ; preds = %123, %110, %106
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !15
  %147 = load i64, ptr %17, align 4
  %148 = call noundef zeroext i1 @_Z11isFrontWallPA14_i5Point(ptr noundef %146, i64 %147)
  br i1 %148, label %184, label %149

149:                                              ; preds = %145
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %152 = load i32, ptr %151, align 4, !tbaa !10
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [14 x i32], ptr %150, i64 %153
  %155 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %156 = load i32, ptr %155, align 4, !tbaa !13
  %157 = add nsw i32 %156, 1
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [14 x i32], ptr %154, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !14
  %161 = icmp eq i32 %160, 9999
  br i1 %161, label %162, label %184

162:                                              ; preds = %149
  %163 = load i32, ptr %12, align 4, !tbaa !14
  %164 = add nsw i32 %163, 1
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %167 = load i32, ptr %166, align 4, !tbaa !10
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [14 x i32], ptr %165, i64 %168
  %170 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %171 = load i32, ptr %170, align 4, !tbaa !13
  %172 = add nsw i32 %171, 1
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [14 x i32], ptr %169, i64 0, i64 %173
  store i32 %164, ptr %174, align 4, !tbaa !14
  %175 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 0
  %177 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %178 = load i32, ptr %177, align 4, !tbaa !10
  store i32 %178, ptr %176, align 4, !tbaa !10
  %179 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 1
  %180 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !13
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %179, align 4, !tbaa !13
  %183 = load i64, ptr %18, align 4
  call void @_Z7enqueueP5Queue5Point(ptr noundef %175, i64 %183)
  br label %184

184:                                              ; preds = %162, %149, %145
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !15
  %186 = load i64, ptr %19, align 4
  %187 = call noundef zeroext i1 @_Z10isBackWallPA14_i5Point(ptr noundef %185, i64 %186)
  br i1 %187, label %223, label %188

188:                                              ; preds = %184
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %191 = load i32, ptr %190, align 4, !tbaa !10
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [14 x i32], ptr %189, i64 %192
  %194 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %195 = load i32, ptr %194, align 4, !tbaa !13
  %196 = sub nsw i32 %195, 1
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [14 x i32], ptr %193, i64 0, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !14
  %200 = icmp eq i32 %199, 9999
  br i1 %200, label %201, label %223

201:                                              ; preds = %188
  %202 = load i32, ptr %12, align 4, !tbaa !14
  %203 = add nsw i32 %202, 1
  %204 = load ptr, ptr %3, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %206 = load i32, ptr %205, align 4, !tbaa !10
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [14 x i32], ptr %204, i64 %207
  %209 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %210 = load i32, ptr %209, align 4, !tbaa !13
  %211 = sub nsw i32 %210, 1
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [14 x i32], ptr %208, i64 0, i64 %212
  store i32 %203, ptr %213, align 4, !tbaa !14
  %214 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.Point, ptr %20, i32 0, i32 0
  %216 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %217 = load i32, ptr %216, align 4, !tbaa !10
  store i32 %217, ptr %215, align 4, !tbaa !10
  %218 = getelementptr inbounds %struct.Point, ptr %20, i32 0, i32 1
  %219 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !13
  %221 = sub nsw i32 %220, 1
  store i32 %221, ptr %218, align 4, !tbaa !13
  %222 = load i64, ptr %20, align 4
  call void @_Z7enqueueP5Queue5Point(ptr noundef %214, i64 %222)
  br label %223

223:                                              ; preds = %201, %188, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %47, !llvm.loop !16

224:                                              ; preds = %47
  ret void

225:                                              ; preds = %102
  %226 = load ptr, ptr %5, align 8
  %227 = load i32, ptr %6, align 4
  %228 = insertvalue { ptr, i32 } poison, ptr %226, 0
  %229 = insertvalue { ptr, i32 } %228, i32 %227, 1
  resume { ptr, i32 } %229
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #3

declare noundef ptr @_Z11createQueuei(i32 noundef) #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #3

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #3

declare void @_Z10resetQueueP5Queue(ptr noundef) #4

declare void @_Z7enqueueP5Queue5Point(ptr noundef, i64) #4

declare noundef zeroext i1 @_Z5emptyP5Queue(ptr noundef) #4

declare i64 @_Z7dequeueP5Queue(ptr noundef) #4

; 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) #5

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"branch_weights", i32 1, i32 1048575}
!10 = !{!11, !12, i64 0}
!11 = !{!"_ZTS5Point", !12, i64 0, !12, i64 4}
!12 = !{!"int", !7, i64 0}
!13 = !{!11, !12, i64 4}
!14 = !{!12, !12, i64 0}
!15 = !{i64 0, i64 4, !14, i64 4, i64 4, !14}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@_ZZ20updateFullFloodArrayPA14_iS0_E1q = external hidden local_unnamed_addr global ptr, align 8
@_ZGVZ20updateFullFloodArrayPA14_iS0_E1q = external hidden global i64, align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z10isLeftWallPA14_i5Point(ptr noundef, i64) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11isRightWallPA14_i5Point(ptr noundef, i64) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11isFrontWallPA14_i5Point(ptr noundef, i64) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z10isBackWallPA14_i5Point(ptr noundef, i64) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z20updateFullFloodArrayPA14_iS0_(ptr nocapture noundef %0, ptr noundef %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = load atomic i8, ptr @_ZGVZ20updateFullFloodArrayPA14_iS0_E1q acquire, align 8
  %4 = icmp eq i8 %3, 0
  br i1 %4, label %5, label %10, !prof !5

5:                                                ; preds = %2
  %6 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ20updateFullFloodArrayPA14_iS0_E1q) #4
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %10, label %7

7:                                                ; preds = %5
  %8 = invoke noundef ptr @_Z11createQueuei(i32 noundef 20)
          to label %9 unwind label %34

9:                                                ; preds = %7
  store ptr %8, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ20updateFullFloodArrayPA14_iS0_E1q) #4
  br label %10

10:                                               ; preds = %9, %5, %2
  %11 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  tail call void @_Z10resetQueueP5Queue(ptr noundef %11)
  %12 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  tail call void @_Z7enqueueP5Queue5Point(ptr noundef %12, i64 30064771079)
  %13 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  tail call void @_Z7enqueueP5Queue5Point(ptr noundef %13, i64 30064771080)
  %14 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  tail call void @_Z7enqueueP5Queue5Point(ptr noundef %14, i64 34359738375)
  %15 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  tail call void @_Z7enqueueP5Queue5Point(ptr noundef %15, i64 34359738376)
  %16 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  %17 = tail call noundef zeroext i1 @_Z5emptyP5Queue(ptr noundef %16)
  br i1 %17, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %10, %69
  %18 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  %19 = tail call i64 @_Z7dequeueP5Queue(ptr noundef %18)
  %.sroa.014.0.extract.trunc = trunc i64 %19 to i32
  %.sroa.20.0.extract.shift = lshr i64 %19, 32
  %.sroa.20.0.extract.trunc = trunc nuw i64 %.sroa.20.0.extract.shift to i32
  %sext = shl i64 %19, 32
  %20 = ashr exact i64 %sext, 32
  %21 = ashr i64 %19, 32
  %22 = getelementptr inbounds [14 x i32], ptr %0, i64 %20, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !10
  %.sroa.20.0.insert.shift45 = and i64 %19, -4294967296
  %.sroa.014.0.insert.ext33 = and i64 %19, 4294967295
  %24 = tail call noundef zeroext i1 @_Z10isLeftWallPA14_i5Point(ptr noundef %1, i64 %19)
  br i1 %24, label %36, label %25

25:                                               ; preds = %.lr.ph
  %26 = add nsw i32 %.sroa.014.0.extract.trunc, -1
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [14 x i32], ptr %0, i64 %27, i64 %21
  %29 = load i32, ptr %28, align 4, !tbaa !10
  %30 = icmp eq i32 %29, 9999
  br i1 %30, label %31, label %36

31:                                               ; preds = %25
  %32 = add nsw i32 %23, 1
  store i32 %32, ptr %28, align 4, !tbaa !10
  %33 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  %.sroa.08.0.insert.ext = zext i32 %26 to i64
  %.sroa.08.0.insert.insert = or disjoint i64 %.sroa.20.0.insert.shift45, %.sroa.08.0.insert.ext
  tail call void @_Z7enqueueP5Queue5Point(ptr noundef %33, i64 %.sroa.08.0.insert.insert)
  br label %36

34:                                               ; preds = %7
  %35 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_guard_abort(ptr nonnull @_ZGVZ20updateFullFloodArrayPA14_iS0_E1q) #4
  resume { ptr, i32 } %35

36:                                               ; preds = %31, %25, %.lr.ph
  %37 = tail call noundef zeroext i1 @_Z11isRightWallPA14_i5Point(ptr noundef %1, i64 %19)
  br i1 %37, label %47, label %38

38:                                               ; preds = %36
  %39 = add nsw i32 %.sroa.014.0.extract.trunc, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [14 x i32], ptr %0, i64 %40, i64 %21
  %42 = load i32, ptr %41, align 4, !tbaa !10
  %43 = icmp eq i32 %42, 9999
  br i1 %43, label %44, label %47

44:                                               ; preds = %38
  %45 = add nsw i32 %23, 1
  store i32 %45, ptr %41, align 4, !tbaa !10
  %46 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  %.sroa.05.0.insert.ext = zext i32 %39 to i64
  %.sroa.05.0.insert.insert = or disjoint i64 %.sroa.20.0.insert.shift45, %.sroa.05.0.insert.ext
  tail call void @_Z7enqueueP5Queue5Point(ptr noundef %46, i64 %.sroa.05.0.insert.insert)
  br label %47

47:                                               ; preds = %44, %38, %36
  %48 = tail call noundef zeroext i1 @_Z11isFrontWallPA14_i5Point(ptr noundef %1, i64 %19)
  br i1 %48, label %58, label %49

49:                                               ; preds = %47
  %50 = add nsw i32 %.sroa.20.0.extract.trunc, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [14 x i32], ptr %0, i64 %20, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !10
  %54 = icmp eq i32 %53, 9999
  br i1 %54, label %55, label %58

55:                                               ; preds = %49
  %56 = add nsw i32 %23, 1
  store i32 %56, ptr %52, align 4, !tbaa !10
  %57 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  %.sroa.23.0.insert.ext = zext i32 %50 to i64
  %.sroa.23.0.insert.shift = shl nuw i64 %.sroa.23.0.insert.ext, 32
  %.sroa.02.0.insert.insert = or disjoint i64 %.sroa.23.0.insert.shift, %.sroa.014.0.insert.ext33
  tail call void @_Z7enqueueP5Queue5Point(ptr noundef %57, i64 %.sroa.02.0.insert.insert)
  br label %58

58:                                               ; preds = %55, %49, %47
  %59 = tail call noundef zeroext i1 @_Z10isBackWallPA14_i5Point(ptr noundef %1, i64 %19)
  br i1 %59, label %69, label %60

60:                                               ; preds = %58
  %61 = add nsw i32 %.sroa.20.0.extract.trunc, -1
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [14 x i32], ptr %0, i64 %20, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !10
  %65 = icmp eq i32 %64, 9999
  br i1 %65, label %66, label %69

66:                                               ; preds = %60
  %67 = add nsw i32 %23, 1
  store i32 %67, ptr %63, align 4, !tbaa !10
  %68 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  %.sroa.2.0.insert.ext = zext i32 %61 to i64
  %.sroa.2.0.insert.shift = shl nuw i64 %.sroa.2.0.insert.ext, 32
  %.sroa.0.0.insert.insert = or disjoint i64 %.sroa.2.0.insert.shift, %.sroa.014.0.insert.ext33
  tail call void @_Z7enqueueP5Queue5Point(ptr noundef %68, i64 %.sroa.0.0.insert.insert)
  br label %69

69:                                               ; preds = %66, %60, %58
  %70 = load ptr, ptr @_ZZ20updateFullFloodArrayPA14_iS0_E1q, align 8, !tbaa !6
  %71 = tail call noundef zeroext i1 @_Z5emptyP5Queue(ptr noundef %70)
  br i1 %71, label %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %69, %10
  ret void
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #2

declare noundef ptr @_Z11createQueuei(i32 noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #2

declare void @_Z10resetQueueP5Queue(ptr noundef) local_unnamed_addr #3

declare void @_Z7enqueueP5Queue5Point(ptr noundef, i64) local_unnamed_addr #3

declare noundef zeroext i1 @_Z5emptyP5Queue(ptr noundef) local_unnamed_addr #3

declare i64 @_Z7dequeueP5Queue(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass