; LLVM IR from stan-dev/math :: lib/sundials_6.1.1/src/sunnonlinsol/fixedpoint (sunnonlinsol_fixedpoint)

; 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_N_Vector = type { ptr, ptr, ptr }
%struct._generic_N_Vector_Ops = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._generic_SUNNonlinearSolver = type { ptr, ptr, ptr }
%struct._generic_SUNNonlinearSolver_Ops = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._SUNNonlinearSolverContent_FixedPoint = type { ptr, ptr, i32, ptr, i32, double, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i64, ptr, i32, ptr }

; Function Attrs: nounwind uwtable
define dso_local ptr @SUNNonlinSol_FixedPoint(ptr noundef %0, i32 noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %3
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %144

15:                                               ; preds = %3
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct._generic_N_Vector, ptr %16, i32 0, i32 1
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %18, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = icmp eq ptr %20, null
  br i1 %21, label %50, label %22

22:                                               ; preds = %15
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._generic_N_Vector, ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %25, i32 0, i32 3
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = icmp eq ptr %27, null
  br i1 %28, label %50, label %29

29:                                               ; preds = %22
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._generic_N_Vector, ptr %30, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %32, i32 0, i32 14
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = icmp eq ptr %34, null
  br i1 %35, label %50, label %36

36:                                               ; preds = %29
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._generic_N_Vector, ptr %37, i32 0, i32 1
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %39, i32 0, i32 10
  %41 = load ptr, ptr %40, align 8, !tbaa !17
  %42 = icmp eq ptr %41, null
  br i1 %42, label %50, label %43

43:                                               ; preds = %36
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._generic_N_Vector, ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !11
  %47 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %46, i32 0, i32 18
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %51

50:                                               ; preds = %43, %36, %29, %22, %15
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %144

51:                                               ; preds = %43
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = call ptr @SUNNonlinSolNewEmpty(ptr noundef %52)
  store ptr %53, ptr %8, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = icmp eq ptr %54, null
  br i1 %55, label %56, label %57

56:                                               ; preds = %51
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %144

57:                                               ; preds = %51
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %60, i32 0, i32 0
  store ptr @SUNNonlinSolGetType_FixedPoint, ptr %61, align 8, !tbaa !21
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %62, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !19
  %65 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %64, i32 0, i32 1
  store ptr @SUNNonlinSolInitialize_FixedPoint, ptr %65, align 8, !tbaa !23
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %66, i32 0, i32 1
  %68 = load ptr, ptr %67, align 8, !tbaa !19
  %69 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %68, i32 0, i32 3
  store ptr @SUNNonlinSolSolve_FixedPoint, ptr %69, align 8, !tbaa !24
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %70, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !19
  %73 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %72, i32 0, i32 4
  store ptr @SUNNonlinSolFree_FixedPoint, ptr %73, align 8, !tbaa !25
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !19
  %77 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %76, i32 0, i32 5
  store ptr @SUNNonlinSolSetSysFn_FixedPoint, ptr %77, align 8, !tbaa !26
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %78, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !19
  %81 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %80, i32 0, i32 8
  store ptr @SUNNonlinSolSetConvTestFn_FixedPoint, ptr %81, align 8, !tbaa !27
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %82, i32 0, i32 1
  %84 = load ptr, ptr %83, align 8, !tbaa !19
  %85 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %84, i32 0, i32 9
  store ptr @SUNNonlinSolSetMaxIters_FixedPoint, ptr %85, align 8, !tbaa !28
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !19
  %89 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %88, i32 0, i32 10
  store ptr @SUNNonlinSolGetNumIters_FixedPoint, ptr %89, align 8, !tbaa !29
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !19
  %93 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %92, i32 0, i32 11
  store ptr @SUNNonlinSolGetCurIter_FixedPoint, ptr %93, align 8, !tbaa !30
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8, !tbaa !19
  %97 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %96, i32 0, i32 12
  store ptr @SUNNonlinSolGetNumConvFails_FixedPoint, ptr %97, align 8, !tbaa !31
  store ptr null, ptr %9, align 8, !tbaa !5
  %98 = call noalias ptr @malloc(i64 noundef 192) #6
  store ptr %98, ptr %9, align 8, !tbaa !5
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = icmp eq ptr %99, null
  br i1 %100, label %101, label %104

101:                                              ; preds = %57
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = call i32 @SUNNonlinSolFree(ptr noundef %102)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %144

104:                                              ; preds = %57
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %105, i8 0, i64 192, i1 false)
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %107, i32 0, i32 0
  store ptr %106, ptr %108, align 8, !tbaa !32
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %109, i32 0, i32 0
  store ptr null, ptr %110, align 8, !tbaa !33
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %111, i32 0, i32 1
  store ptr null, ptr %112, align 8, !tbaa !37
  %113 = load i32, ptr %6, align 4, !tbaa !9
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %114, i32 0, i32 2
  store i32 %113, ptr %115, align 8, !tbaa !38
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %116, i32 0, i32 4
  store i32 0, ptr %117, align 8, !tbaa !39
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %118, i32 0, i32 5
  store double 1.000000e+00, ptr %119, align 8, !tbaa !40
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %120, i32 0, i32 18
  store i32 0, ptr %121, align 8, !tbaa !41
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %122, i32 0, i32 19
  store i32 3, ptr %123, align 4, !tbaa !42
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %124, i32 0, i32 20
  store i64 0, ptr %125, align 8, !tbaa !43
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %126, i32 0, i32 21
  store i64 0, ptr %127, align 8, !tbaa !44
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %128, i32 0, i32 22
  store ptr null, ptr %129, align 8, !tbaa !45
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %130, i32 0, i32 23
  store i32 0, ptr %131, align 8, !tbaa !46
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._SUNNonlinearSolverContent_FixedPoint, ptr %132, i32 0, i32 24
  store ptr null, ptr %133, align 8, !tbaa !47
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = call i32 @AllocateContent(ptr noundef %134, ptr noundef %135)
  store i32 %136, ptr %10, align 4, !tbaa !9
  %137 = load i32, ptr %10, align 4, !tbaa !9
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %142

139:                                              ; preds = %104
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = call i32 @SUNNonlinSolFree(ptr noundef %140)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %144

142:                                              ; preds = %104
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %143, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %144

144:                                              ; preds = %142, %139, %101, %56, %50, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %145 = load ptr, ptr %4, align 8
  ret ptr %145
}

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

declare ptr @SUNNonlinSolNewEmpty(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolGetType_FixedPoint(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolInitialize_FixedPoint(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolSolve_FixedPoint(ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolFree_FixedPoint(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolSetSysFn_FixedPoint(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolSetConvTestFn_FixedPoint(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolSetMaxIters_FixedPoint(ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolGetNumIters_FixedPoint(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolGetCurIter_FixedPoint(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolGetNumConvFails_FixedPoint(ptr noundef, ptr noundef) #0

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

declare i32 @SUNNonlinSolFree(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare hidden i32 @AllocateContent(ptr noundef, ptr noundef) #0

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { 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, !6, i64 8}
!12 = !{!"_generic_N_Vector", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!14, !6, i64 8}
!14 = !{!"_generic_N_Vector_Ops", !6, i64 0, !6, i64 8, !6, i64 16, !6, 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, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432}
!15 = !{!14, !6, i64 24}
!16 = !{!14, !6, i64 112}
!17 = !{!14, !6, i64 80}
!18 = !{!14, !6, i64 144}
!19 = !{!20, !6, i64 8}
!20 = !{!"_generic_SUNNonlinearSolver", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!22, !6, i64 0}
!22 = !{!"_generic_SUNNonlinearSolver_Ops", !6, i64 0, !6, i64 8, !6, i64 16, !6, 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}
!23 = !{!22, !6, i64 8}
!24 = !{!22, !6, i64 24}
!25 = !{!22, !6, i64 32}
!26 = !{!22, !6, i64 40}
!27 = !{!22, !6, i64 64}
!28 = !{!22, !6, i64 72}
!29 = !{!22, !6, i64 80}
!30 = !{!22, !6, i64 88}
!31 = !{!22, !6, i64 96}
!32 = !{!20, !6, i64 0}
!33 = !{!34, !6, i64 0}
!34 = !{!"_SUNNonlinearSolverContent_FixedPoint", !6, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !35, 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, !10, i64 144, !10, i64 148, !36, i64 152, !36, i64 160, !6, i64 168, !10, i64 176, !6, i64 184}
!35 = !{!"double", !7, i64 0}
!36 = !{!"long", !7, i64 0}
!37 = !{!34, !6, i64 8}
!38 = !{!34, !10, i64 16}
!39 = !{!34, !10, i64 32}
!40 = !{!34, !35, i64 40}
!41 = !{!34, !10, i64 144}
!42 = !{!34, !10, i64 148}
!43 = !{!34, !36, i64 152}
!44 = !{!34, !36, i64 160}
!45 = !{!34, !6, i64 168}
!46 = !{!34, !10, i64 176}
!47 = !{!34, !6, i64 184}


; 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 ptr @SUNNonlinSol_FixedPoint(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = icmp eq ptr %0, null
  br i1 %4, label %49, label %5

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

11:                                               ; preds = %5
  %12 = getelementptr inbounds i8, ptr %7, i64 24
  %13 = load ptr, ptr %12, align 8, !tbaa !12
  %14 = icmp eq ptr %13, null
  br i1 %14, label %49, label %15

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %7, i64 112
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %18 = icmp eq ptr %17, null
  br i1 %18, label %49, label %19

19:                                               ; preds = %15
  %20 = getelementptr inbounds i8, ptr %7, i64 80
  %21 = load ptr, ptr %20, align 8, !tbaa !14
  %22 = icmp eq ptr %21, null
  br i1 %22, label %49, label %23

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %7, i64 144
  %25 = load ptr, ptr %24, align 8, !tbaa !15
  %26 = icmp eq ptr %25, null
  br i1 %26, label %49, label %27

27:                                               ; preds = %23
  %28 = tail call ptr @SUNNonlinSolNewEmpty(ptr noundef %2) #3
  %29 = icmp eq ptr %28, null
  br i1 %29, label %49, label %30

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %28, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  store ptr @SUNNonlinSolGetType_FixedPoint, ptr %32, align 8, !tbaa !18
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  store ptr @SUNNonlinSolInitialize_FixedPoint, ptr %33, align 8, !tbaa !20
  %34 = getelementptr inbounds i8, ptr %32, i64 24
  store ptr @SUNNonlinSolSolve_FixedPoint, ptr %34, align 8, !tbaa !21
  %35 = getelementptr inbounds i8, ptr %32, i64 32
  store ptr @SUNNonlinSolFree_FixedPoint, ptr %35, align 8, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %32, i64 40
  store ptr @SUNNonlinSolSetSysFn_FixedPoint, ptr %36, align 8, !tbaa !23
  %37 = getelementptr inbounds i8, ptr %32, i64 64
  store ptr @SUNNonlinSolSetConvTestFn_FixedPoint, ptr %37, align 8, !tbaa !24
  %38 = getelementptr inbounds i8, ptr %32, i64 72
  store ptr @SUNNonlinSolSetMaxIters_FixedPoint, ptr %38, align 8, !tbaa !25
  %39 = getelementptr inbounds i8, ptr %32, i64 80
  store ptr @SUNNonlinSolGetNumIters_FixedPoint, ptr %39, align 8, !tbaa !26
  %40 = getelementptr inbounds i8, ptr %32, i64 88
  store ptr @SUNNonlinSolGetCurIter_FixedPoint, ptr %40, align 8, !tbaa !27
  %41 = getelementptr inbounds i8, ptr %32, i64 96
  store ptr @SUNNonlinSolGetNumConvFails_FixedPoint, ptr %41, align 8, !tbaa !28
  %calloc = tail call dereferenceable_or_null(192) ptr @calloc(i64 1, i64 192)
  %42 = icmp eq ptr %calloc, null
  br i1 %42, label %.sink.split, label %43

43:                                               ; preds = %30
  store ptr %calloc, ptr %28, align 8, !tbaa !29
  %44 = getelementptr inbounds i8, ptr %calloc, i64 16
  store i32 %1, ptr %44, align 8, !tbaa !30
  %45 = getelementptr inbounds i8, ptr %calloc, i64 40
  store double 1.000000e+00, ptr %45, align 8, !tbaa !35
  %46 = getelementptr inbounds i8, ptr %calloc, i64 148
  store i32 3, ptr %46, align 4, !tbaa !36
  %47 = tail call i32 @AllocateContent(ptr noundef nonnull %28, ptr noundef nonnull %0)
  %.not = icmp eq i32 %47, 0
  br i1 %.not, label %49, label %.sink.split

.sink.split:                                      ; preds = %43, %30
  %48 = tail call i32 @SUNNonlinSolFree(ptr noundef nonnull %28) #3
  br label %49

49:                                               ; preds = %.sink.split, %43, %27, %5, %11, %15, %19, %23, %3
  %.0 = phi ptr [ null, %3 ], [ null, %23 ], [ null, %19 ], [ null, %15 ], [ null, %11 ], [ null, %5 ], [ null, %27 ], [ %28, %43 ], [ null, %.sink.split ]
  ret ptr %.0
}

declare ptr @SUNNonlinSolNewEmpty(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolGetType_FixedPoint(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolInitialize_FixedPoint(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolSolve_FixedPoint(ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolFree_FixedPoint(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolSetSysFn_FixedPoint(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolSetConvTestFn_FixedPoint(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolSetMaxIters_FixedPoint(ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolGetNumIters_FixedPoint(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolGetCurIter_FixedPoint(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNNonlinSolGetNumConvFails_FixedPoint(ptr noundef, ptr noundef) #0

declare i32 @SUNNonlinSolFree(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @AllocateContent(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 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 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
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 8}
!6 = !{!"_generic_N_Vector", !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 8}
!11 = !{!"_generic_N_Vector_Ops", !7, i64 0, !7, i64 8, !7, i64 16, !7, 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, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432}
!12 = !{!11, !7, i64 24}
!13 = !{!11, !7, i64 112}
!14 = !{!11, !7, i64 80}
!15 = !{!11, !7, i64 144}
!16 = !{!17, !7, i64 8}
!17 = !{!"_generic_SUNNonlinearSolver", !7, i64 0, !7, i64 8, !7, i64 16}
!18 = !{!19, !7, i64 0}
!19 = !{!"_generic_SUNNonlinearSolver_Ops", !7, i64 0, !7, i64 8, !7, i64 16, !7, 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}
!20 = !{!19, !7, i64 8}
!21 = !{!19, !7, i64 24}
!22 = !{!19, !7, i64 32}
!23 = !{!19, !7, i64 40}
!24 = !{!19, !7, i64 64}
!25 = !{!19, !7, i64 72}
!26 = !{!19, !7, i64 80}
!27 = !{!19, !7, i64 88}
!28 = !{!19, !7, i64 96}
!29 = !{!17, !7, i64 0}
!30 = !{!31, !32, i64 16}
!31 = !{!"_SUNNonlinearSolverContent_FixedPoint", !7, i64 0, !7, i64 8, !32, i64 16, !7, i64 24, !32, i64 32, !33, 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, !32, i64 144, !32, i64 148, !34, i64 152, !34, i64 160, !7, i64 168, !32, i64 176, !7, i64 184}
!32 = !{!"int", !8, i64 0}
!33 = !{!"double", !8, i64 0}
!34 = !{!"long", !8, i64 0}
!35 = !{!31, !33, i64 40}
!36 = !{!31, !32, i64 148}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass