; LLVM IR from stan-dev/math :: lib/sundials_6.1.1/src/sunlinsol/sptfqmr (sunlinsol_sptfqmr)

; 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._generic_SUNLinearSolver = type { ptr, ptr, ptr }
%struct._SUNLinearSolverContent_SPTFQMR = type { i32, i32, i32, i32, double, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @SUNLinSolFree_SPTFQMR(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %7

6:                                                ; preds = %1
  store i32 0, ptr %2, align 4
  br label %201

7:                                                ; preds = %1
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %8, i32 0, i32 0
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = icmp ne ptr %10, null
  br i1 %11, label %12, label %188

12:                                               ; preds = %7
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %13, i32 0, i32 0
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %15, i32 0, i32 13
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %29

19:                                               ; preds = %12
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %22, i32 0, i32 13
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  call void @N_VDestroy(ptr noundef %24)
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %27, i32 0, i32 13
  store ptr null, ptr %28, align 8, !tbaa !11
  br label %29

29:                                               ; preds = %19, %12
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %32, i32 0, i32 14
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %46

36:                                               ; preds = %29
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %39, i32 0, i32 14
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  call void @N_VDestroy(ptr noundef %41)
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %44, i32 0, i32 14
  store ptr null, ptr %45, align 8, !tbaa !15
  br label %46

46:                                               ; preds = %36, %29
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %49, i32 0, i32 15
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %63

53:                                               ; preds = %46
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %56, i32 0, i32 15
  %58 = load ptr, ptr %57, align 8, !tbaa !16
  call void @N_VDestroy(ptr noundef %58)
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %61, i32 0, i32 15
  store ptr null, ptr %62, align 8, !tbaa !16
  br label %63

63:                                               ; preds = %53, %46
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %66, i32 0, i32 16
  %68 = load ptr, ptr %67, align 8, !tbaa !17
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %80

70:                                               ; preds = %63
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %73, i32 0, i32 16
  %75 = load ptr, ptr %74, align 8, !tbaa !17
  call void @N_VDestroy(ptr noundef %75)
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %78, i32 0, i32 16
  store ptr null, ptr %79, align 8, !tbaa !17
  br label %80

80:                                               ; preds = %70, %63
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %83, i32 0, i32 17
  %85 = load ptr, ptr %84, align 8, !tbaa !18
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %97

87:                                               ; preds = %80
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %90, i32 0, i32 17
  %92 = load ptr, ptr %91, align 8, !tbaa !18
  call void @N_VDestroy(ptr noundef %92)
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %95, i32 0, i32 17
  store ptr null, ptr %96, align 8, !tbaa !18
  br label %97

97:                                               ; preds = %87, %80
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %100, i32 0, i32 18
  %102 = load ptr, ptr %101, align 8, !tbaa !19
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %114

104:                                              ; preds = %97
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %107, i32 0, i32 18
  %109 = load ptr, ptr %108, align 8, !tbaa !19
  call void @N_VDestroyVectorArray(ptr noundef %109, i32 noundef 2)
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %112, i32 0, i32 18
  store ptr null, ptr %113, align 8, !tbaa !19
  br label %114

114:                                              ; preds = %104, %97
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %117, i32 0, i32 19
  %119 = load ptr, ptr %118, align 8, !tbaa !20
  %120 = icmp ne ptr %119, null
  br i1 %120, label %121, label %131

121:                                              ; preds = %114
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %124, i32 0, i32 19
  %126 = load ptr, ptr %125, align 8, !tbaa !20
  call void @N_VDestroy(ptr noundef %126)
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %129, i32 0, i32 19
  store ptr null, ptr %130, align 8, !tbaa !20
  br label %131

131:                                              ; preds = %121, %114
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %134, i32 0, i32 20
  %136 = load ptr, ptr %135, align 8, !tbaa !21
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %148

138:                                              ; preds = %131
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %139, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8, !tbaa !9
  %142 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %141, i32 0, i32 20
  %143 = load ptr, ptr %142, align 8, !tbaa !21
  call void @N_VDestroy(ptr noundef %143)
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !9
  %147 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %146, i32 0, i32 20
  store ptr null, ptr %147, align 8, !tbaa !21
  br label %148

148:                                              ; preds = %138, %131
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !9
  %152 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %151, i32 0, i32 21
  %153 = load ptr, ptr %152, align 8, !tbaa !22
  %154 = icmp ne ptr %153, null
  br i1 %154, label %155, label %165

155:                                              ; preds = %148
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !9
  %159 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %158, i32 0, i32 21
  %160 = load ptr, ptr %159, align 8, !tbaa !22
  call void @N_VDestroy(ptr noundef %160)
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %163, i32 0, i32 21
  store ptr null, ptr %164, align 8, !tbaa !22
  br label %165

165:                                              ; preds = %155, %148
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %166, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8, !tbaa !9
  %169 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %168, i32 0, i32 22
  %170 = load ptr, ptr %169, align 8, !tbaa !23
  %171 = icmp ne ptr %170, null
  br i1 %171, label %172, label %182

172:                                              ; preds = %165
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !9
  %176 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %175, i32 0, i32 22
  %177 = load ptr, ptr %176, align 8, !tbaa !23
  call void @N_VDestroy(ptr noundef %177)
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %178, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %180, i32 0, i32 22
  store ptr null, ptr %181, align 8, !tbaa !23
  br label %182

182:                                              ; preds = %172, %165
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %183, i32 0, i32 0
  %185 = load ptr, ptr %184, align 8, !tbaa !9
  call void @free(ptr noundef %185) #3
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %186, i32 0, i32 0
  store ptr null, ptr %187, align 8, !tbaa !9
  br label %188

188:                                              ; preds = %182, %7
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %189, i32 0, i32 1
  %191 = load ptr, ptr %190, align 8, !tbaa !24
  %192 = icmp ne ptr %191, null
  br i1 %192, label %193, label %199

193:                                              ; preds = %188
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %194, i32 0, i32 1
  %196 = load ptr, ptr %195, align 8, !tbaa !24
  call void @free(ptr noundef %196) #3
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %197, i32 0, i32 1
  store ptr null, ptr %198, align 8, !tbaa !24
  br label %199

199:                                              ; preds = %193, %188
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %200) #3
  store ptr null, ptr %3, align 8, !tbaa !5
  store i32 0, ptr %2, align 4
  br label %201

201:                                              ; preds = %199, %6
  %202 = load i32, ptr %2, align 4
  ret i32 %202
}

declare void @N_VDestroy(ptr noundef) #1

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

attributes #0 = { 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 = { "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 "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 }

!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, !6, i64 0}
!10 = !{!"_generic_SUNLinearSolver", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!12, !6, i64 88}
!12 = !{!"_SUNLinearSolverContent_SPTFQMR", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !14, i64 16, !13, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !13, i64 168, !6, i64 176}
!13 = !{!"int", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!12, !6, i64 96}
!16 = !{!12, !6, i64 104}
!17 = !{!12, !6, i64 112}
!18 = !{!12, !6, i64 120}
!19 = !{!12, !6, i64 128}
!20 = !{!12, !6, i64 136}
!21 = !{!12, !6, i64 144}
!22 = !{!12, !6, i64 152}
!23 = !{!12, !6, i64 160}
!24 = !{!10, !6, i64 8}


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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @SUNLinSolFree_SPTFQMR(ptr noundef %0) local_unnamed_addr #0 {
  %2 = icmp eq ptr %0, null
  br i1 %2, label %81, label %3

3:                                                ; preds = %1
  %4 = load ptr, ptr %0, align 8, !tbaa !5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %76, label %5

5:                                                ; preds = %3
  %6 = getelementptr inbounds i8, ptr %4, i64 88
  %7 = load ptr, ptr %6, align 8, !tbaa !10
  %.not50 = icmp eq ptr %7, null
  br i1 %.not50, label %11, label %8

8:                                                ; preds = %5
  tail call void @N_VDestroy(ptr noundef nonnull %7) #3
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 88
  store ptr null, ptr %10, align 8, !tbaa !10
  br label %11

11:                                               ; preds = %8, %5
  %12 = phi ptr [ %9, %8 ], [ %4, %5 ]
  %13 = getelementptr inbounds i8, ptr %12, i64 96
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  %.not51 = icmp eq ptr %14, null
  br i1 %.not51, label %18, label %15

15:                                               ; preds = %11
  tail call void @N_VDestroy(ptr noundef nonnull %14) #3
  %16 = load ptr, ptr %0, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 96
  store ptr null, ptr %17, align 8, !tbaa !14
  br label %18

18:                                               ; preds = %15, %11
  %19 = phi ptr [ %16, %15 ], [ %12, %11 ]
  %20 = getelementptr inbounds i8, ptr %19, i64 104
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %.not52 = icmp eq ptr %21, null
  br i1 %.not52, label %25, label %22

22:                                               ; preds = %18
  tail call void @N_VDestroy(ptr noundef nonnull %21) #3
  %23 = load ptr, ptr %0, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 104
  store ptr null, ptr %24, align 8, !tbaa !15
  br label %25

25:                                               ; preds = %22, %18
  %26 = phi ptr [ %23, %22 ], [ %19, %18 ]
  %27 = getelementptr inbounds i8, ptr %26, i64 112
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %.not53 = icmp eq ptr %28, null
  br i1 %.not53, label %32, label %29

29:                                               ; preds = %25
  tail call void @N_VDestroy(ptr noundef nonnull %28) #3
  %30 = load ptr, ptr %0, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i64 112
  store ptr null, ptr %31, align 8, !tbaa !16
  br label %32

32:                                               ; preds = %29, %25
  %33 = phi ptr [ %30, %29 ], [ %26, %25 ]
  %34 = getelementptr inbounds i8, ptr %33, i64 120
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  %.not54 = icmp eq ptr %35, null
  br i1 %.not54, label %39, label %36

36:                                               ; preds = %32
  tail call void @N_VDestroy(ptr noundef nonnull %35) #3
  %37 = load ptr, ptr %0, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 120
  store ptr null, ptr %38, align 8, !tbaa !17
  br label %39

39:                                               ; preds = %36, %32
  %40 = phi ptr [ %37, %36 ], [ %33, %32 ]
  %41 = getelementptr inbounds i8, ptr %40, i64 128
  %42 = load ptr, ptr %41, align 8, !tbaa !18
  %.not55 = icmp eq ptr %42, null
  br i1 %.not55, label %46, label %43

43:                                               ; preds = %39
  tail call void @N_VDestroyVectorArray(ptr noundef nonnull %42, i32 noundef 2) #3
  %44 = load ptr, ptr %0, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i64 128
  store ptr null, ptr %45, align 8, !tbaa !18
  br label %46

46:                                               ; preds = %43, %39
  %47 = phi ptr [ %44, %43 ], [ %40, %39 ]
  %48 = getelementptr inbounds i8, ptr %47, i64 136
  %49 = load ptr, ptr %48, align 8, !tbaa !19
  %.not56 = icmp eq ptr %49, null
  br i1 %.not56, label %53, label %50

50:                                               ; preds = %46
  tail call void @N_VDestroy(ptr noundef nonnull %49) #3
  %51 = load ptr, ptr %0, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %51, i64 136
  store ptr null, ptr %52, align 8, !tbaa !19
  br label %53

53:                                               ; preds = %50, %46
  %54 = phi ptr [ %51, %50 ], [ %47, %46 ]
  %55 = getelementptr inbounds i8, ptr %54, i64 144
  %56 = load ptr, ptr %55, align 8, !tbaa !20
  %.not57 = icmp eq ptr %56, null
  br i1 %.not57, label %60, label %57

57:                                               ; preds = %53
  tail call void @N_VDestroy(ptr noundef nonnull %56) #3
  %58 = load ptr, ptr %0, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 144
  store ptr null, ptr %59, align 8, !tbaa !20
  br label %60

60:                                               ; preds = %57, %53
  %61 = phi ptr [ %58, %57 ], [ %54, %53 ]
  %62 = getelementptr inbounds i8, ptr %61, i64 152
  %63 = load ptr, ptr %62, align 8, !tbaa !21
  %.not58 = icmp eq ptr %63, null
  br i1 %.not58, label %67, label %64

64:                                               ; preds = %60
  tail call void @N_VDestroy(ptr noundef nonnull %63) #3
  %65 = load ptr, ptr %0, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i64 152
  store ptr null, ptr %66, align 8, !tbaa !21
  br label %67

67:                                               ; preds = %64, %60
  %68 = phi ptr [ %65, %64 ], [ %61, %60 ]
  %69 = getelementptr inbounds i8, ptr %68, i64 160
  %70 = load ptr, ptr %69, align 8, !tbaa !22
  %.not59 = icmp eq ptr %70, null
  br i1 %.not59, label %74, label %71

71:                                               ; preds = %67
  tail call void @N_VDestroy(ptr noundef nonnull %70) #3
  %72 = load ptr, ptr %0, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 160
  store ptr null, ptr %73, align 8, !tbaa !22
  br label %74

74:                                               ; preds = %71, %67
  %75 = phi ptr [ %72, %71 ], [ %68, %67 ]
  tail call void @free(ptr noundef nonnull %75) #3
  store ptr null, ptr %0, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %74, %3
  %77 = getelementptr inbounds i8, ptr %0, i64 8
  %78 = load ptr, ptr %77, align 8, !tbaa !23
  %.not60 = icmp eq ptr %78, null
  br i1 %.not60, label %80, label %79

79:                                               ; preds = %76
  tail call void @free(ptr noundef nonnull %78) #3
  br label %80

80:                                               ; preds = %79, %76
  tail call void @free(ptr noundef nonnull %0) #3
  br label %81

81:                                               ; preds = %1, %80
  ret i32 0
}

declare void @N_VDestroy(ptr noundef) local_unnamed_addr #1

declare void @N_VDestroyVectorArray(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

attributes #0 = { 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 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 #3 = { 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 = !{!"_generic_SUNLinearSolver", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 88}
!11 = !{!"_SUNLinearSolverContent_SPTFQMR", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !13, i64 16, !12, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !12, i64 168, !7, i64 176}
!12 = !{!"int", !8, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = !{!11, !7, i64 96}
!15 = !{!11, !7, i64 104}
!16 = !{!11, !7, i64 112}
!17 = !{!11, !7, i64 120}
!18 = !{!11, !7, i64 128}
!19 = !{!11, !7, i64 136}
!20 = !{!11, !7, i64 144}
!21 = !{!11, !7, i64 152}
!22 = !{!11, !7, i64 160}
!23 = !{!6, !7, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass