; LLVM IR from jingweizhanghuai/Morn :: src/util (morn_sheet)

; 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.MSheet = type { i32, ptr, ptr, ptr }
%struct.MHandle = type { i32, i32, ptr, ptr }
%struct.HandleSheetRowList = type { ptr, i32, i32 }

@.str = external hidden unnamed_addr constant [77 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.mSheetRowList = external hidden unnamed_addr constant [14 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 void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

declare ptr @m_Malloc(i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @endSheetRowList(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local ptr @mSheetRowList(ptr noundef %0, i32 noundef %1) #4 {
  %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 ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %19, label %15

15:                                               ; preds = %12
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = ptrtoint ptr %16 to i64
  %18 = icmp eq i64 %17, -1
  br label %19

19:                                               ; preds = %15, %12
  %20 = phi i1 [ true, %12 ], [ %18, %15 ]
  %21 = zext i1 %20 to i32
  store i32 %21, ptr %6, align 4, !tbaa !9
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %26

24:                                               ; preds = %19
  %25 = load i32, ptr %6, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %25, i32 noundef -1, ptr noundef @.str, i32 noundef 243, ptr noundef @__FUNCTION__.mSheetRowList, ptr noundef @.str.1)
  br label %26

26:                                               ; preds = %24, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.MSheet, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = icmp sge i32 %29, %32
  %34 = zext i1 %33 to i32
  store i32 %34, ptr %7, align 4, !tbaa !9
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %28
  %38 = load i32, ptr %7, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %38, i32 noundef -1, ptr noundef @.str, i32 noundef 244, ptr noundef @__FUNCTION__.mSheetRowList, ptr noundef @.str.2)
  br label %39

39:                                               ; preds = %37, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %40

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = call ptr @GetHandle(ptr noundef %41, i32 noundef 16, i32 noundef 1085624534, ptr noundef @endSheetRowList)
  store ptr %42, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.MHandle, ptr %43, i32 0, i32 3
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  store ptr %45, ptr %9, align 8, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !9
  %47 = icmp slt i32 %46, 0
  br i1 %47, label %48, label %59

48:                                               ; preds = %40
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.HandleSheetRowList, ptr %49, i32 0, i32 2
  %51 = load i32, ptr %50, align 4, !tbaa !15
  store i32 %51, ptr %5, align 4, !tbaa !9
  %52 = load i32, ptr %5, align 4, !tbaa !9
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.MSheet, ptr %53, i32 0, i32 0
  %55 = load i32, ptr %54, align 8, !tbaa !11
  %56 = icmp eq i32 %52, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %48
  store ptr null, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %174

58:                                               ; preds = %48
  br label %59

59:                                               ; preds = %58, %40
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.MHandle, ptr %60, i32 0, i32 1
  %62 = load volatile i32, ptr %61, align 4, !tbaa !17
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %70, label %64

64:                                               ; preds = %59
  %65 = load i32, ptr %5, align 4, !tbaa !9
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.HandleSheetRowList, ptr %66, i32 0, i32 1
  %68 = load i32, ptr %67, align 8, !tbaa !18
  %69 = icmp sge i32 %65, %68
  br i1 %69, label %70, label %109

70:                                               ; preds = %64, %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.MSheet, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !11
  %74 = sext i32 %73 to i64
  %75 = mul i64 %74, 8
  %76 = trunc i64 %75 to i32
  %77 = call ptr @m_Malloc(i32 noundef %76)
  store ptr %77, ptr %11, align 8, !tbaa !5
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.MSheet, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = mul i64 %82, 8
  call void @llvm.memset.p0.i64(ptr align 8 %78, i8 0, i64 %83, i1 false)
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.HandleSheetRowList, ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 8, !tbaa !18
  %87 = icmp sgt i32 %86, 0
  br i1 %87, label %88, label %98

88:                                               ; preds = %70
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.HandleSheetRowList, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !19
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.HandleSheetRowList, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 8, !tbaa !18
  %96 = sext i32 %95 to i64
  %97 = mul i64 %96, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %89, ptr align 8 %92, i64 %97, i1 false)
  br label %98

98:                                               ; preds = %88, %70
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.HandleSheetRowList, ptr %100, i32 0, i32 0
  store ptr %99, ptr %101, align 8, !tbaa !19
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.MSheet, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 8, !tbaa !11
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.HandleSheetRowList, ptr %105, i32 0, i32 1
  store i32 %104, ptr %106, align 8, !tbaa !18
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.MHandle, ptr %107, i32 0, i32 1
  store volatile i32 1, ptr %108, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %109

109:                                              ; preds = %98, %64
  %110 = load i32, ptr %5, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.HandleSheetRowList, ptr %112, i32 0, i32 2
  store i32 %111, ptr %113, align 4, !tbaa !15
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.HandleSheetRowList, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !19
  %117 = load i32, ptr %5, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds ptr, ptr %116, i64 %118
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = icmp eq ptr %120, null
  br i1 %121, label %122, label %130

122:                                              ; preds = %109
  %123 = call ptr @ListCreate(i32 noundef -1, ptr noundef null)
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.HandleSheetRowList, ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !19
  %127 = load i32, ptr %5, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds ptr, ptr %126, i64 %128
  store ptr %123, ptr %129, align 8, !tbaa !5
  br label %130

130:                                              ; preds = %122, %109
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.HandleSheetRowList, ptr %131, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8, !tbaa !19
  %134 = load i32, ptr %5, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds ptr, ptr %133, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  call void @mListClear(ptr noundef %137)
  br label %138

138:                                              ; preds = %130
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.HandleSheetRowList, ptr %139, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8, !tbaa !19
  %142 = load i32, ptr %5, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds ptr, ptr %141, i64 %143
  %145 = load ptr, ptr %144, align 8, !tbaa !5
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.MSheet, ptr %146, i32 0, i32 3
  %148 = load ptr, ptr %147, align 8, !tbaa !20
  %149 = load i32, ptr %5, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds ptr, ptr %148, i64 %150
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  %153 = getelementptr inbounds ptr, ptr %152, i64 0
  %154 = ptrtoint ptr %153 to i64
  %155 = inttoptr i64 %154 to ptr
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.MSheet, ptr %156, i32 0, i32 2
  %158 = load ptr, ptr %157, align 8, !tbaa !21
  %159 = load i32, ptr %5, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds i32, ptr %158, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = trunc i64 %163 to i32
  call void @m_ListAppend(ptr noundef %145, ptr noundef %155, i32 noundef %164)
  br label %165

165:                                              ; preds = %138
  br label %166

166:                                              ; preds = %165
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.HandleSheetRowList, ptr %167, i32 0, i32 0
  %169 = load ptr, ptr %168, align 8, !tbaa !19
  %170 = load i32, ptr %5, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds ptr, ptr %169, i64 %171
  %173 = load ptr, ptr %172, align 8, !tbaa !5
  store ptr %173, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %174

174:                                              ; preds = %166, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %175 = load ptr, ptr %3, align 8
  ret ptr %175
}

declare ptr @ListCreate(i32 noundef, ptr noundef) #1

declare void @mListClear(ptr noundef) #1

declare void @m_ListAppend(ptr noundef, ptr noundef, i32 noundef) #1

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!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 = !{!"MSheet", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!14, !6, i64 16}
!14 = !{!"MHandle", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!15 = !{!16, !10, i64 12}
!16 = !{!"HandleSheetRowList", !6, i64 0, !10, i64 8, !10, i64 12}
!17 = !{!14, !10, i64 4}
!18 = !{!16, !10, i64 8}
!19 = !{!16, !6, i64 0}
!20 = !{!12, !6, i64 24}
!21 = !{!12, !6, i64 16}


; 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 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.mSheetRowList = external hidden unnamed_addr constant [14 x i8], align 1

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare ptr @m_Malloc(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress 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) #2

; Function Attrs: nounwind uwtable
declare dso_local void @endSheetRowList(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @mSheetRowList(ptr noundef %0, i32 noundef %1) local_unnamed_addr #3 {
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %8 [
    i64 -1, label %3
    i64 0, label %3
  ]

3:                                                ; preds = %2, %2
  %4 = icmp eq ptr %0, null
  %5 = icmp eq ptr %0, inttoptr (i64 -1 to ptr)
  %6 = or i1 %4, %5
  %7 = zext i1 %6 to i32
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %7, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 243, ptr noundef nonnull @__FUNCTION__.mSheetRowList, ptr noundef nonnull @.str.1) #4
  br label %8

8:                                                ; preds = %2, %3
  %9 = load i32, ptr %0, align 8, !tbaa !5
  %.not49 = icmp sgt i32 %9, %1
  br i1 %.not49, label %11, label %10

10:                                               ; preds = %8
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 244, ptr noundef nonnull @__FUNCTION__.mSheetRowList, ptr noundef nonnull @.str.2) #4
  br label %11

11:                                               ; preds = %10, %8
  %12 = tail call ptr @GetHandle(ptr noundef nonnull %0, i32 noundef 16, i32 noundef 1085624534, ptr noundef nonnull @endSheetRowList) #4
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = icmp slt i32 %1, 0
  br i1 %15, label %16, label %21

16:                                               ; preds = %11
  %17 = getelementptr inbounds i8, ptr %14, i64 12
  %18 = load i32, ptr %17, align 4, !tbaa !13
  %19 = load i32, ptr %0, align 8, !tbaa !5
  %20 = icmp eq i32 %18, %19
  br i1 %20, label %72, label %21

21:                                               ; preds = %16, %11
  %.045 = phi i32 [ %18, %16 ], [ %1, %11 ]
  %22 = getelementptr inbounds i8, ptr %12, i64 4
  %23 = load volatile i32, ptr %22, align 4, !tbaa !15
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %28, label %25

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %14, i64 8
  %27 = load i32, ptr %26, align 8, !tbaa !16
  %.not = icmp slt i32 %.045, %27
  br i1 %.not, label %._crit_edge, label %28

._crit_edge:                                      ; preds = %25
  %.pre = load ptr, ptr %14, align 8, !tbaa !17
  br label %44

28:                                               ; preds = %25, %21
  %29 = load i32, ptr %0, align 8, !tbaa !5
  %30 = shl i32 %29, 3
  %31 = tail call ptr @m_Malloc(i32 noundef %30) #4
  %32 = load i32, ptr %0, align 8, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = shl nsw i64 %33, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %31, i8 0, i64 %34, i1 false)
  %35 = getelementptr inbounds i8, ptr %14, i64 8
  %36 = load i32, ptr %35, align 8, !tbaa !16
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %38, label %42

38:                                               ; preds = %28
  %39 = load ptr, ptr %14, align 8, !tbaa !17
  %40 = zext nneg i32 %36 to i64
  %41 = shl nuw nsw i64 %40, 3
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %39, i64 %41, i1 false)
  br label %42

42:                                               ; preds = %38, %28
  store ptr %31, ptr %14, align 8, !tbaa !17
  %43 = load i32, ptr %0, align 8, !tbaa !5
  store i32 %43, ptr %35, align 8, !tbaa !16
  store volatile i32 1, ptr %22, align 4, !tbaa !15
  br label %44

44:                                               ; preds = %._crit_edge, %42
  %45 = phi ptr [ %.pre, %._crit_edge ], [ %31, %42 ]
  %46 = add nsw i32 %.045, 1
  %47 = getelementptr inbounds i8, ptr %14, i64 12
  store i32 %46, ptr %47, align 4, !tbaa !13
  %48 = sext i32 %.045 to i64
  %49 = getelementptr inbounds ptr, ptr %45, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = icmp eq ptr %50, null
  br i1 %51, label %52, label %56

52:                                               ; preds = %44
  %53 = tail call ptr @ListCreate(i32 noundef -1, ptr noundef null) #4
  %54 = load ptr, ptr %14, align 8, !tbaa !17
  %55 = getelementptr inbounds ptr, ptr %54, i64 %48
  store ptr %53, ptr %55, align 8, !tbaa !18
  %.pre50 = load ptr, ptr %14, align 8, !tbaa !17
  %.phi.trans.insert = getelementptr inbounds ptr, ptr %.pre50, i64 %48
  %.pre51 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !18
  br label %56

56:                                               ; preds = %52, %44
  %57 = phi ptr [ %.pre51, %52 ], [ %50, %44 ]
  tail call void @mListClear(ptr noundef %57) #4
  %58 = load ptr, ptr %14, align 8, !tbaa !17
  %59 = getelementptr inbounds ptr, ptr %58, i64 %48
  %60 = load ptr, ptr %59, align 8, !tbaa !18
  %61 = getelementptr inbounds i8, ptr %0, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !19
  %63 = getelementptr inbounds ptr, ptr %62, i64 %48
  %64 = load ptr, ptr %63, align 8, !tbaa !18
  %65 = getelementptr inbounds i8, ptr %0, i64 16
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  %67 = getelementptr inbounds i32, ptr %66, i64 %48
  %68 = load i32, ptr %67, align 4, !tbaa !21
  tail call void @m_ListAppend(ptr noundef %60, ptr noundef %64, i32 noundef %68) #4
  %69 = load ptr, ptr %14, align 8, !tbaa !17
  %70 = getelementptr inbounds ptr, ptr %69, i64 %48
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  br label %72

72:                                               ; preds = %16, %56
  %.0 = phi ptr [ %71, %56 ], [ null, %16 ]
  ret ptr %.0
}

declare ptr @ListCreate(i32 noundef, ptr noundef) local_unnamed_addr #0

declare void @mListClear(ptr noundef) local_unnamed_addr #0

declare void @m_ListAppend(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

attributes #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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = !{!6, !7, i64 0}
!6 = !{!"MSheet", !7, i64 0, !10, i64 8, !10, i64 16, !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 = !{!12, !10, i64 16}
!12 = !{!"MHandle", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!13 = !{!14, !7, i64 12}
!14 = !{!"HandleSheetRowList", !10, i64 0, !7, i64 8, !7, i64 12}
!15 = !{!12, !7, i64 4}
!16 = !{!14, !7, i64 8}
!17 = !{!14, !10, i64 0}
!18 = !{!10, !10, i64 0}
!19 = !{!6, !10, i64 24}
!20 = !{!6, !10, i64 16}
!21 = !{!7, !7, i64 0}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass