; LLVM IR from openxrlab/xrsfm :: 3rdparty/apriltag/common (pam)

; 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.pam = type { i32, i32, i32, i32, i32, i32, ptr }

@.str.19 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__.pam_convert = external hidden unnamed_addr constant [33 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [27 x i8], align 1

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

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local ptr @pam_copy(ptr noundef) #5

; Function Attrs: nounwind uwtable
define dso_local ptr @pam_convert(ptr noundef %0, i32 noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %12 = load i32, ptr %5, align 4, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.pam, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = icmp eq i32 %12, %15
  br i1 %16, label %17, label %20

17:                                               ; preds = %2
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = call ptr @pam_copy(ptr noundef %18)
  store ptr %19, ptr %3, align 8
  br label %202

20:                                               ; preds = %2
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = icmp eq i32 %21, 5001
  br i1 %22, label %23, label %24

23:                                               ; preds = %20
  br label %25

24:                                               ; preds = %20
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str.19, i32 noundef 223, ptr noundef @__PRETTY_FUNCTION__.pam_convert) #6
  unreachable

25:                                               ; preds = %23
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.pam, ptr %26, i32 0, i32 4
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = icmp eq i32 %28, 255
  br i1 %29, label %30, label %31

30:                                               ; preds = %25
  br label %32

31:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.19, i32 noundef 224, ptr noundef @__PRETTY_FUNCTION__.pam_convert) #6
  unreachable

32:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.pam, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !14
  store i32 %35, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.pam, ptr %36, i32 0, i32 2
  %38 = load i32, ptr %37, align 8, !tbaa !15
  store i32 %38, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %39 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 32) #8
  store ptr %39, ptr %8, align 8, !tbaa !5
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.pam, ptr %41, i32 0, i32 0
  store i32 %40, ptr %42, align 8, !tbaa !11
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.pam, ptr %44, i32 0, i32 1
  store i32 %43, ptr %45, align 4, !tbaa !14
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.pam, ptr %47, i32 0, i32 2
  store i32 %46, ptr %48, align 8, !tbaa !15
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.pam, ptr %49, i32 0, i32 4
  %51 = load i32, ptr %50, align 8, !tbaa !13
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.pam, ptr %52, i32 0, i32 4
  store i32 %51, ptr %53, align 8, !tbaa !13
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.pam, ptr %54, i32 0, i32 3
  store i32 4, ptr %55, align 4, !tbaa !16
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = mul nsw i32 4, %56
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = mul nsw i32 %57, %58
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.pam, ptr %60, i32 0, i32 5
  store i32 %59, ptr %61, align 4, !tbaa !17
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.pam, ptr %62, i32 0, i32 5
  %64 = load i32, ptr %63, align 4, !tbaa !17
  %65 = sext i32 %64 to i64
  %66 = call noalias ptr @malloc(i64 noundef %65) #9
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.pam, ptr %67, i32 0, i32 6
  store ptr %66, ptr %68, align 8, !tbaa !18
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.pam, ptr %69, i32 0, i32 0
  %71 = load i32, ptr %70, align 8, !tbaa !11
  %72 = icmp eq i32 %71, 5002
  br i1 %72, label %73, label %195

73:                                               ; preds = %32
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.pam, ptr %74, i32 0, i32 3
  %76 = load i32, ptr %75, align 4, !tbaa !16
  %77 = icmp eq i32 %76, 3
  br i1 %77, label %78, label %79

78:                                               ; preds = %73
  br label %80

79:                                               ; preds = %73
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.19, i32 noundef 239, ptr noundef @__PRETTY_FUNCTION__.pam_convert) #6
  unreachable

80:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %191, %80
  %82 = load i32, ptr %9, align 4, !tbaa !9
  %83 = load i32, ptr %7, align 4, !tbaa !9
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %194

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %187, %86
  %88 = load i32, ptr %11, align 4, !tbaa !9
  %89 = load i32, ptr %6, align 4, !tbaa !9
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %190

92:                                               ; preds = %87
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.pam, ptr %93, i32 0, i32 6
  %95 = load ptr, ptr %94, align 8, !tbaa !18
  %96 = load i32, ptr %9, align 4, !tbaa !9
  %97 = mul nsw i32 %96, 3
  %98 = load i32, ptr %6, align 4, !tbaa !9
  %99 = mul nsw i32 %97, %98
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = mul nsw i32 3, %100
  %102 = add nsw i32 %99, %101
  %103 = add nsw i32 %102, 0
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i8, ptr %95, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !19
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.pam, ptr %107, i32 0, i32 6
  %109 = load ptr, ptr %108, align 8, !tbaa !18
  %110 = load i32, ptr %9, align 4, !tbaa !9
  %111 = mul nsw i32 %110, 4
  %112 = load i32, ptr %6, align 4, !tbaa !9
  %113 = mul nsw i32 %111, %112
  %114 = load i32, ptr %11, align 4, !tbaa !9
  %115 = mul nsw i32 4, %114
  %116 = add nsw i32 %113, %115
  %117 = add nsw i32 %116, 0
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i8, ptr %109, i64 %118
  store i8 %106, ptr %119, align 1, !tbaa !19
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.pam, ptr %120, i32 0, i32 6
  %122 = load ptr, ptr %121, align 8, !tbaa !18
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = mul nsw i32 %123, 3
  %125 = load i32, ptr %6, align 4, !tbaa !9
  %126 = mul nsw i32 %124, %125
  %127 = load i32, ptr %11, align 4, !tbaa !9
  %128 = mul nsw i32 3, %127
  %129 = add nsw i32 %126, %128
  %130 = add nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i8, ptr %122, i64 %131
  %133 = load i8, ptr %132, align 1, !tbaa !19
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.pam, ptr %134, i32 0, i32 6
  %136 = load ptr, ptr %135, align 8, !tbaa !18
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = mul nsw i32 %137, 4
  %139 = load i32, ptr %6, align 4, !tbaa !9
  %140 = mul nsw i32 %138, %139
  %141 = load i32, ptr %11, align 4, !tbaa !9
  %142 = mul nsw i32 4, %141
  %143 = add nsw i32 %140, %142
  %144 = add nsw i32 %143, 1
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %136, i64 %145
  store i8 %133, ptr %146, align 1, !tbaa !19
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.pam, ptr %147, i32 0, i32 6
  %149 = load ptr, ptr %148, align 8, !tbaa !18
  %150 = load i32, ptr %9, align 4, !tbaa !9
  %151 = mul nsw i32 %150, 3
  %152 = load i32, ptr %6, align 4, !tbaa !9
  %153 = mul nsw i32 %151, %152
  %154 = load i32, ptr %11, align 4, !tbaa !9
  %155 = mul nsw i32 3, %154
  %156 = add nsw i32 %153, %155
  %157 = add nsw i32 %156, 2
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i8, ptr %149, i64 %158
  %160 = load i8, ptr %159, align 1, !tbaa !19
  %161 = load ptr, ptr %8, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.pam, ptr %161, i32 0, i32 6
  %163 = load ptr, ptr %162, align 8, !tbaa !18
  %164 = load i32, ptr %9, align 4, !tbaa !9
  %165 = mul nsw i32 %164, 4
  %166 = load i32, ptr %6, align 4, !tbaa !9
  %167 = mul nsw i32 %165, %166
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = mul nsw i32 4, %168
  %170 = add nsw i32 %167, %169
  %171 = add nsw i32 %170, 2
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i8, ptr %163, i64 %172
  store i8 %160, ptr %173, align 1, !tbaa !19
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.pam, ptr %174, i32 0, i32 6
  %176 = load ptr, ptr %175, align 8, !tbaa !18
  %177 = load i32, ptr %9, align 4, !tbaa !9
  %178 = mul nsw i32 %177, 4
  %179 = load i32, ptr %6, align 4, !tbaa !9
  %180 = mul nsw i32 %178, %179
  %181 = load i32, ptr %11, align 4, !tbaa !9
  %182 = mul nsw i32 4, %181
  %183 = add nsw i32 %180, %182
  %184 = add nsw i32 %183, 3
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds i8, ptr %176, i64 %185
  store i8 -1, ptr %186, align 1, !tbaa !19
  br label %187

187:                                              ; preds = %92
  %188 = load i32, ptr %11, align 4, !tbaa !9
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %11, align 4, !tbaa !9
  br label %87, !llvm.loop !20

190:                                              ; preds = %91
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %9, align 4, !tbaa !9
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %9, align 4, !tbaa !9
  br label %81, !llvm.loop !22

194:                                              ; preds = %85
  br label %200

195:                                              ; preds = %32
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.pam, ptr %196, i32 0, i32 0
  %198 = load i32, ptr %197, align 8, !tbaa !11
  %199 = call i32 (ptr, ...) @printf(ptr noundef @.str.27, i32 noundef %198)
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str.19, i32 noundef 253, ptr noundef @__PRETTY_FUNCTION__.pam_convert) #6
  unreachable

200:                                              ; preds = %194
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %201, ptr %3, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %202

202:                                              ; preds = %200, %17
  %203 = load ptr, ptr %3, align 8
  ret ptr %203
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { nounwind allocsize(0,1) "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 = { noreturn nounwind "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 allocsize(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 #5 = { 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 #6 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }
attributes #9 = { nounwind allocsize(0) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"pam", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !10, i64 4}
!15 = !{!12, !10, i64 8}
!16 = !{!12, !10, i64 12}
!17 = !{!12, !10, i64 20}
!18 = !{!12, !6, i64 24}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


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

@.str.19 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__.pam_convert = external hidden unnamed_addr constant [33 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local ptr @pam_copy(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local ptr @pam_convert(ptr noundef %0, i32 noundef %1) local_unnamed_addr #4 {
  %3 = load i32, ptr %0, align 8, !tbaa !5
  %4 = icmp eq i32 %3, %1
  br i1 %4, label %5, label %7

5:                                                ; preds = %2
  %6 = tail call ptr @pam_copy(ptr noundef nonnull %0)
  br label %.loopexit

7:                                                ; preds = %2
  %8 = icmp eq i32 %1, 5001
  br i1 %8, label %10, label %9

9:                                                ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.19, i32 noundef 223, ptr noundef nonnull @__PRETTY_FUNCTION__.pam_convert) #5
  unreachable

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = load i32, ptr %11, align 8, !tbaa !11
  %13 = icmp eq i32 %12, 255
  br i1 %13, label %15, label %14

14:                                               ; preds = %10
  tail call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.19, i32 noundef 224, ptr noundef nonnull @__PRETTY_FUNCTION__.pam_convert) #5
  unreachable

15:                                               ; preds = %10
  %16 = getelementptr inbounds i8, ptr %0, i64 4
  %17 = load i32, ptr %16, align 4, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = load i32, ptr %18, align 8, !tbaa !13
  %20 = tail call noalias dereferenceable_or_null(32) ptr @calloc(i64 noundef 1, i64 noundef 32) #6
  store i32 5001, ptr %20, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 4
  store i32 %17, ptr %21, align 4, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %20, i64 8
  store i32 %19, ptr %22, align 8, !tbaa !13
  %23 = getelementptr inbounds i8, ptr %20, i64 16
  store i32 255, ptr %23, align 8, !tbaa !11
  %24 = getelementptr inbounds i8, ptr %20, i64 12
  store i32 4, ptr %24, align 4, !tbaa !14
  %25 = shl i32 %17, 2
  %26 = mul nsw i32 %25, %19
  %27 = getelementptr inbounds i8, ptr %20, i64 20
  store i32 %26, ptr %27, align 4, !tbaa !15
  %28 = sext i32 %26 to i64
  %29 = tail call noalias ptr @malloc(i64 noundef %28) #7
  %30 = getelementptr inbounds i8, ptr %20, i64 24
  store ptr %29, ptr %30, align 8, !tbaa !16
  %31 = icmp eq i32 %3, 5002
  br i1 %31, label %32, label %62

32:                                               ; preds = %15
  %33 = getelementptr inbounds i8, ptr %0, i64 12
  %34 = load i32, ptr %33, align 4, !tbaa !14
  %35 = icmp eq i32 %34, 3
  br i1 %35, label %.preheader64, label %61

.preheader64:                                     ; preds = %32
  %36 = icmp sgt i32 %19, 0
  %37 = icmp sgt i32 %17, 0
  %or.cond = and i1 %36, %37
  br i1 %or.cond, label %.preheader.lr.ph.split.us, label %.loopexit

.preheader.lr.ph.split.us:                        ; preds = %.preheader64
  %38 = getelementptr inbounds i8, ptr %0, i64 24
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  %wide.trip.count73 = zext nneg i32 %19 to i64
  %wide.trip.count = zext nneg i32 %17 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph.split.us
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %._crit_edge.us ], [ 0, %.preheader.lr.ph.split.us ]
  %40 = trunc nuw nsw i64 %indvars.iv70 to i32
  %factor.op.mul.reass.us = mul i32 %25, %40
  %41 = mul i32 %17, %40
  %42 = sext i32 %factor.op.mul.reass.us to i64
  br label %43

43:                                               ; preds = %.preheader.us, %43
  %indvars.iv = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next, %43 ]
  %44 = trunc nuw nsw i64 %indvars.iv to i32
  %reass.add.us = add i32 %41, %44
  %reass.mul.us = mul i32 %reass.add.us, 3
  %45 = sext i32 %reass.mul.us to i64
  %46 = getelementptr inbounds i8, ptr %39, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !17
  %48 = shl nsw i64 %indvars.iv, 2
  %49 = add nsw i64 %48, %42
  %50 = getelementptr inbounds i8, ptr %29, i64 %49
  store i8 %47, ptr %50, align 1, !tbaa !17
  %51 = getelementptr i8, ptr %46, i64 1
  %52 = load i8, ptr %51, align 1, !tbaa !17
  %53 = or disjoint i64 %49, 1
  %54 = getelementptr inbounds i8, ptr %29, i64 %53
  store i8 %52, ptr %54, align 1, !tbaa !17
  %55 = getelementptr i8, ptr %46, i64 2
  %56 = load i8, ptr %55, align 1, !tbaa !17
  %57 = or disjoint i64 %49, 2
  %58 = getelementptr inbounds i8, ptr %29, i64 %57
  store i8 %56, ptr %58, align 1, !tbaa !17
  %59 = or disjoint i64 %49, 3
  %60 = getelementptr inbounds i8, ptr %29, i64 %59
  store i8 -1, ptr %60, align 1, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %43, !llvm.loop !18

._crit_edge.us:                                   ; preds = %43
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73
  br i1 %exitcond74.not, label %.loopexit, label %.preheader.us, !llvm.loop !20

61:                                               ; preds = %32
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.19, i32 noundef 239, ptr noundef nonnull @__PRETTY_FUNCTION__.pam_convert) #5
  unreachable

62:                                               ; preds = %15
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27, i32 noundef %3)
  tail call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.19, i32 noundef 253, ptr noundef nonnull @__PRETTY_FUNCTION__.pam_convert) #5
  unreachable

.loopexit:                                        ; preds = %._crit_edge.us, %.preheader64, %5
  %.060 = phi ptr [ %6, %5 ], [ %20, %.preheader64 ], [ %20, %._crit_edge.us ]
  ret ptr %.060
}

attributes #0 = { nofree nounwind "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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { noreturn nounwind "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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 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 #5 = { noreturn nounwind }
attributes #6 = { nounwind allocsize(0,1) }
attributes #7 = { nounwind allocsize(0) }

!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, !7, i64 0}
!6 = !{!"pam", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 16}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !7, i64 12}
!15 = !{!6, !7, i64 20}
!16 = !{!6, !10, i64 24}
!17 = !{!8, !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass