; LLVM IR from OpenFAST/openfast :: modules/map/src (mapapi)

; 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.Fd_t = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.MAP_InputType = type { ptr, ptr, i32, ptr, i32, ptr, i32 }

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

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

declare void @map_reset_universal_error(ptr noundef, ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @map_f_op(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #3 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.Fd_t, align 8
  %20 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.MAP_InputType, ptr %21, i32 0, i32 2
  %23 = load i32, ptr %22, align 8, !tbaa !11
  store i32 %23, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 6, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %24 = load ptr, ptr %14, align 8, !tbaa !5
  %25 = load ptr, ptr %13, align 8, !tbaa !5
  call void @map_reset_universal_error(ptr noundef %24, ptr noundef %25)
  %26 = call noalias ptr @malloc(i64 noundef 48) #6
  store ptr %26, ptr %20, align 8, !tbaa !5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %35, %7
  %28 = load i32, ptr %18, align 4, !tbaa !9
  %29 = icmp slt i32 %28, 6
  br i1 %29, label %30, label %38

30:                                               ; preds = %27
  %31 = load ptr, ptr %20, align 8, !tbaa !5
  %32 = load i32, ptr %18, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds double, ptr %31, i64 %33
  store double 0.000000e+00, ptr %34, align 8, !tbaa !13
  br label %35

35:                                               ; preds = %30
  %36 = load i32, ptr %18, align 4, !tbaa !9
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %18, align 4, !tbaa !9
  br label %27, !llvm.loop !15

38:                                               ; preds = %27
  %39 = load i32, ptr %16, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = mul i64 %40, 8
  %42 = call noalias ptr @malloc(i64 noundef %41) #6
  %43 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 0
  store ptr %42, ptr %43, align 8, !tbaa !17
  %44 = load i32, ptr %16, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = mul i64 %45, 8
  %47 = call noalias ptr @malloc(i64 noundef %46) #6
  %48 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 1
  store ptr %47, ptr %48, align 8, !tbaa !19
  %49 = load i32, ptr %16, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = mul i64 %50, 8
  %52 = call noalias ptr @malloc(i64 noundef %51) #6
  %53 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 2
  store ptr %52, ptr %53, align 8, !tbaa !20
  %54 = load i32, ptr %16, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = mul i64 %55, 8
  %57 = call noalias ptr @malloc(i64 noundef %56) #6
  %58 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 3
  store ptr %57, ptr %58, align 8, !tbaa !21
  %59 = load i32, ptr %16, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = mul i64 %60, 8
  %62 = call noalias ptr @malloc(i64 noundef %61) #6
  %63 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 4
  store ptr %62, ptr %63, align 8, !tbaa !22
  %64 = load i32, ptr %16, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = mul i64 %65, 8
  %67 = call noalias ptr @malloc(i64 noundef %66) #6
  %68 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 5
  store ptr %67, ptr %68, align 8, !tbaa !23
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %104, %38
  %70 = load i32, ptr %18, align 4, !tbaa !9
  %71 = load i32, ptr %16, align 4, !tbaa !9
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %73, label %107

73:                                               ; preds = %69
  %74 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !17
  %76 = load i32, ptr %18, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %75, i64 %77
  store double 0.000000e+00, ptr %78, align 8, !tbaa !13
  %79 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !19
  %81 = load i32, ptr %18, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds double, ptr %80, i64 %82
  store double 0.000000e+00, ptr %83, align 8, !tbaa !13
  %84 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !20
  %86 = load i32, ptr %18, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds double, ptr %85, i64 %87
  store double 0.000000e+00, ptr %88, align 8, !tbaa !13
  %89 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 3
  %90 = load ptr, ptr %89, align 8, !tbaa !21
  %91 = load i32, ptr %18, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds double, ptr %90, i64 %92
  store double 0.000000e+00, ptr %93, align 8, !tbaa !13
  %94 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !22
  %96 = load i32, ptr %18, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds double, ptr %95, i64 %97
  store double 0.000000e+00, ptr %98, align 8, !tbaa !13
  %99 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 5
  %100 = load ptr, ptr %99, align 8, !tbaa !23
  %101 = load i32, ptr %18, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds double, ptr %100, i64 %102
  store double 0.000000e+00, ptr %103, align 8, !tbaa !13
  br label %104

104:                                              ; preds = %73
  %105 = load i32, ptr %18, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %18, align 4, !tbaa !9
  br label %69, !llvm.loop !24

107:                                              ; preds = %69
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  %114 = load i32, ptr %16, align 4, !tbaa !9
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = call i32 @f_op_sequence(ptr noundef %109, ptr noundef %110, ptr noundef %111, ptr noundef %112, ptr noundef %113, ptr noundef %19, i32 noundef %114, ptr noundef %115, ptr noundef %116)
  store i32 %117, ptr %15, align 4, !tbaa !9
  %118 = load i32, ptr %15, align 4, !tbaa !9
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %123

120:                                              ; preds = %108
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %121, ptr noundef %122, i32 noundef 62)
  br label %134

123:                                              ; preds = %108
  %124 = load ptr, ptr %20, align 8, !tbaa !5
  %125 = load i32, ptr %16, align 4, !tbaa !9
  %126 = call i32 @calculate_sumforce(ptr noundef %124, ptr noundef %19, i32 noundef %125)
  store i32 %126, ptr %15, align 4, !tbaa !9
  %127 = load i32, ptr %15, align 4, !tbaa !9
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %132

129:                                              ; preds = %123
  %130 = load ptr, ptr %14, align 8, !tbaa !5
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %130, ptr noundef %131, i32 noundef 64)
  br label %134

132:                                              ; preds = %123
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133, %129, %120
  %135 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %142

138:                                              ; preds = %134
  %139 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !17
  call void @free(ptr noundef %140) #5
  %141 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 0
  store ptr null, ptr %141, align 8, !tbaa !17
  br label %142

142:                                              ; preds = %138, %134
  %143 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 1
  %144 = load ptr, ptr %143, align 8, !tbaa !19
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %150

146:                                              ; preds = %142
  %147 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !19
  call void @free(ptr noundef %148) #5
  %149 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 1
  store ptr null, ptr %149, align 8, !tbaa !19
  br label %150

150:                                              ; preds = %146, %142
  %151 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 2
  %152 = load ptr, ptr %151, align 8, !tbaa !20
  %153 = icmp ne ptr %152, null
  br i1 %153, label %154, label %158

154:                                              ; preds = %150
  %155 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 2
  %156 = load ptr, ptr %155, align 8, !tbaa !20
  call void @free(ptr noundef %156) #5
  %157 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 2
  store ptr null, ptr %157, align 8, !tbaa !20
  br label %158

158:                                              ; preds = %154, %150
  %159 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 3
  %160 = load ptr, ptr %159, align 8, !tbaa !21
  %161 = icmp ne ptr %160, null
  br i1 %161, label %162, label %166

162:                                              ; preds = %158
  %163 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 3
  %164 = load ptr, ptr %163, align 8, !tbaa !21
  call void @free(ptr noundef %164) #5
  %165 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 3
  store ptr null, ptr %165, align 8, !tbaa !21
  br label %166

166:                                              ; preds = %162, %158
  %167 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 4
  %168 = load ptr, ptr %167, align 8, !tbaa !22
  %169 = icmp ne ptr %168, null
  br i1 %169, label %170, label %174

170:                                              ; preds = %166
  %171 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 4
  %172 = load ptr, ptr %171, align 8, !tbaa !22
  call void @free(ptr noundef %172) #5
  %173 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 4
  store ptr null, ptr %173, align 8, !tbaa !22
  br label %174

174:                                              ; preds = %170, %166
  %175 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 5
  %176 = load ptr, ptr %175, align 8, !tbaa !23
  %177 = icmp ne ptr %176, null
  br i1 %177, label %178, label %182

178:                                              ; preds = %174
  %179 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 5
  %180 = load ptr, ptr %179, align 8, !tbaa !23
  call void @free(ptr noundef %180) #5
  %181 = getelementptr inbounds %struct.Fd_t, ptr %19, i32 0, i32 5
  store ptr null, ptr %181, align 8, !tbaa !23
  br label %182

182:                                              ; preds = %178, %174
  %183 = load ptr, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  ret ptr %183
}

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

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

declare i32 @calculate_sumforce(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 = { 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 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 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 }
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, !10, i64 16}
!12 = !{!"MAP_InputType", !6, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !6, i64 0}
!18 = !{!"Fd_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!19 = !{!18, !6, i64 8}
!20 = !{!18, !6, i64 16}
!21 = !{!18, !6, i64 24}
!22 = !{!18, !6, i64 32}
!23 = !{!18, !6, i64 40}
!24 = distinct !{!24, !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"

%struct.Fd_t = type { ptr, ptr, ptr, ptr, ptr, ptr }

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

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

declare void @map_reset_universal_error(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @set_universal_error(ptr noundef, 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

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @map_f_op(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #3 {
  %8 = alloca %struct.Fd_t, align 8
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = load i32, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #7
  tail call void @map_reset_universal_error(ptr noundef %6, ptr noundef %5) #7
  %calloc = tail call dereferenceable_or_null(48) ptr @calloc(i64 1, i64 48)
  %11 = sext i32 %10 to i64
  %12 = shl nsw i64 %11, 3
  %13 = tail call noalias ptr @malloc(i64 noundef %12) #8
  store ptr %13, ptr %8, align 8, !tbaa !11
  %14 = tail call noalias ptr @malloc(i64 noundef %12) #8
  %15 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %14, ptr %15, align 8, !tbaa !13
  %16 = tail call noalias ptr @malloc(i64 noundef %12) #8
  %17 = getelementptr inbounds i8, ptr %8, i64 16
  store ptr %16, ptr %17, align 8, !tbaa !14
  %18 = tail call noalias ptr @malloc(i64 noundef %12) #8
  %19 = getelementptr inbounds i8, ptr %8, i64 24
  store ptr %18, ptr %19, align 8, !tbaa !15
  %20 = tail call noalias ptr @malloc(i64 noundef %12) #8
  %21 = getelementptr inbounds i8, ptr %8, i64 32
  store ptr %20, ptr %21, align 8, !tbaa !16
  %22 = tail call noalias ptr @malloc(i64 noundef %12) #8
  %23 = getelementptr inbounds i8, ptr %8, i64 40
  store ptr %22, ptr %23, align 8, !tbaa !17
  %24 = icmp sgt i32 %10, 0
  br i1 %24, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %7
  %25 = zext nneg i32 %10 to i64
  %26 = shl nuw nsw i64 %25, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 %26, i1 false), !tbaa !18
  tail call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 %26, i1 false), !tbaa !18
  tail call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 %26, i1 false), !tbaa !18
  tail call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 %26, i1 false), !tbaa !18
  tail call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 %26, i1 false), !tbaa !18
  tail call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 %26, i1 false), !tbaa !18
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %7
  %27 = call i32 @f_op_sequence(ptr noundef %2, ptr noundef %1, ptr noundef nonnull %0, ptr noundef %3, ptr noundef %4, ptr noundef nonnull %8, i32 noundef %10, ptr noundef %6, ptr noundef %5) #7
  %.not = icmp eq i32 %27, 0
  br i1 %.not, label %28, label %.sink.split

28:                                               ; preds = %._crit_edge
  %29 = call i32 @calculate_sumforce(ptr noundef nonnull %calloc, ptr noundef nonnull %8, i32 noundef %10) #7
  %.not45 = icmp eq i32 %29, 0
  br i1 %.not45, label %30, label %.sink.split

.sink.split:                                      ; preds = %28, %._crit_edge
  %.sink = phi i32 [ 62, %._crit_edge ], [ 64, %28 ]
  call void @set_universal_error(ptr noundef %6, ptr noundef %5, i32 noundef %.sink) #7
  br label %30

30:                                               ; preds = %.sink.split, %28
  %31 = load ptr, ptr %8, align 8, !tbaa !11
  %.not46 = icmp eq ptr %31, null
  br i1 %.not46, label %33, label %32

32:                                               ; preds = %30
  call void @free(ptr noundef nonnull %31) #7
  store ptr null, ptr %8, align 8, !tbaa !11
  br label %33

33:                                               ; preds = %32, %30
  %34 = load ptr, ptr %15, align 8, !tbaa !13
  %.not47 = icmp eq ptr %34, null
  br i1 %.not47, label %36, label %35

35:                                               ; preds = %33
  call void @free(ptr noundef nonnull %34) #7
  store ptr null, ptr %15, align 8, !tbaa !13
  br label %36

36:                                               ; preds = %35, %33
  %37 = load ptr, ptr %17, align 8, !tbaa !14
  %.not48 = icmp eq ptr %37, null
  br i1 %.not48, label %39, label %38

38:                                               ; preds = %36
  call void @free(ptr noundef nonnull %37) #7
  store ptr null, ptr %17, align 8, !tbaa !14
  br label %39

39:                                               ; preds = %38, %36
  %40 = load ptr, ptr %19, align 8, !tbaa !15
  %.not49 = icmp eq ptr %40, null
  br i1 %.not49, label %42, label %41

41:                                               ; preds = %39
  call void @free(ptr noundef nonnull %40) #7
  store ptr null, ptr %19, align 8, !tbaa !15
  br label %42

42:                                               ; preds = %41, %39
  %43 = load ptr, ptr %21, align 8, !tbaa !16
  %.not50 = icmp eq ptr %43, null
  br i1 %.not50, label %45, label %44

44:                                               ; preds = %42
  call void @free(ptr noundef nonnull %43) #7
  store ptr null, ptr %21, align 8, !tbaa !16
  br label %45

45:                                               ; preds = %44, %42
  %46 = load ptr, ptr %23, align 8, !tbaa !17
  %.not51 = icmp eq ptr %46, null
  br i1 %.not51, label %48, label %47

47:                                               ; preds = %45
  call void @free(ptr noundef nonnull %46) #7
  br label %48

48:                                               ; preds = %47, %45
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  ret ptr %calloc
}

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

declare i32 @f_op_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @calculate_sumforce(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

; 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 #6

attributes #0 = { mustprogress 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 = { 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 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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #7 = { nounwind }
attributes #8 = { 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, !10, i64 16}
!6 = !{!"MAP_InputType", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"Fd_t", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!13 = !{!12, !7, i64 8}
!14 = !{!12, !7, i64 16}
!15 = !{!12, !7, i64 24}
!16 = !{!12, !7, i64 32}
!17 = !{!12, !7, i64 40}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass