; LLVM IR from darnstrom/daqp :: src (bnb)

; 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.DAQPWorkspace = type { ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, ptr, ptr, ptr, ptr, i32, ptr, i32, i32, i32, double, ptr, ptr, i32, ptr }
%struct.DAQPSettings = type { double, double, double, double, double, i32, i32, double, double, double, double, double, double }
%struct.DAQPBnB = type { ptr, i32, i32, ptr, i32, ptr, i32, i32, ptr, i32, i32 }
%struct.DAQPNode = type { i32, i32, i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local i32 @daqp_bnb(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.DAQPWorkspace, ptr %11, i32 0, i32 28
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = getelementptr inbounds %struct.DAQPSettings, ptr %13, i32 0, i32 7
  %15 = load double, ptr %14, align 8, !tbaa !13
  store double %15, ptr %8, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.DAQPWorkspace, ptr %16, i32 0, i32 28
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = getelementptr inbounds %struct.DAQPSettings, ptr %18, i32 0, i32 11
  %20 = load double, ptr %19, align 8, !tbaa !16
  %21 = fadd double 1.000000e+00, %20
  %22 = fdiv double 1.000000e+00, %21
  store double %22, ptr %9, align 8, !tbaa !15
  %23 = load double, ptr %8, align 8, !tbaa !15
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.DAQPWorkspace, ptr %24, i32 0, i32 28
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.DAQPSettings, ptr %26, i32 0, i32 12
  %28 = load double, ptr %27, align 8, !tbaa !17
  %29 = fsub double %23, %28
  %30 = load double, ptr %9, align 8, !tbaa !15
  %31 = fmul double %29, %30
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.DAQPWorkspace, ptr %32, i32 0, i32 28
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.DAQPSettings, ptr %34, i32 0, i32 7
  store double %31, ptr %35, align 8, !tbaa !13
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.DAQPWorkspace, ptr %36, i32 0, i32 24
  %38 = load i32, ptr %37, align 8, !tbaa !18
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.DAQPWorkspace, ptr %39, i32 0, i32 29
  %41 = load ptr, ptr %40, align 8, !tbaa !19
  %42 = getelementptr inbounds %struct.DAQPBnB, ptr %41, i32 0, i32 2
  store i32 %38, ptr %42, align 4, !tbaa !20
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.DAQPWorkspace, ptr %43, i32 0, i32 29
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  %46 = getelementptr inbounds %struct.DAQPBnB, ptr %45, i32 0, i32 10
  store i32 0, ptr %46, align 4, !tbaa !22
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.DAQPWorkspace, ptr %47, i32 0, i32 29
  %49 = load ptr, ptr %48, align 8, !tbaa !19
  %50 = getelementptr inbounds %struct.DAQPBnB, ptr %49, i32 0, i32 9
  store i32 0, ptr %50, align 8, !tbaa !23
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.DAQPWorkspace, ptr %51, i32 0, i32 29
  %53 = load ptr, ptr %52, align 8, !tbaa !19
  %54 = getelementptr inbounds %struct.DAQPBnB, ptr %53, i32 0, i32 3
  %55 = load ptr, ptr %54, align 8, !tbaa !24
  %56 = getelementptr inbounds %struct.DAQPNode, ptr %55, i64 0
  %57 = getelementptr inbounds %struct.DAQPNode, ptr %56, i32 0, i32 1
  store i32 -1, ptr %57, align 4, !tbaa !25
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.DAQPWorkspace, ptr %58, i32 0, i32 29
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = getelementptr inbounds %struct.DAQPBnB, ptr %60, i32 0, i32 3
  %62 = load ptr, ptr %61, align 8, !tbaa !24
  %63 = getelementptr inbounds %struct.DAQPNode, ptr %62, i64 0
  %64 = getelementptr inbounds %struct.DAQPNode, ptr %63, i32 0, i32 2
  store i32 0, ptr %64, align 4, !tbaa !27
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.DAQPWorkspace, ptr %65, i32 0, i32 29
  %67 = load ptr, ptr %66, align 8, !tbaa !19
  %68 = getelementptr inbounds %struct.DAQPBnB, ptr %67, i32 0, i32 3
  %69 = load ptr, ptr %68, align 8, !tbaa !24
  %70 = getelementptr inbounds %struct.DAQPNode, ptr %69, i64 0
  %71 = getelementptr inbounds %struct.DAQPNode, ptr %70, i32 0, i32 3
  store i32 0, ptr %71, align 4, !tbaa !28
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.DAQPWorkspace, ptr %72, i32 0, i32 29
  %74 = load ptr, ptr %73, align 8, !tbaa !19
  %75 = getelementptr inbounds %struct.DAQPBnB, ptr %74, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !24
  %77 = getelementptr inbounds %struct.DAQPNode, ptr %76, i64 0
  %78 = getelementptr inbounds %struct.DAQPNode, ptr %77, i32 0, i32 0
  store i32 0, ptr %78, align 4, !tbaa !29
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.DAQPWorkspace, ptr %79, i32 0, i32 29
  %81 = load ptr, ptr %80, align 8, !tbaa !19
  %82 = getelementptr inbounds %struct.DAQPBnB, ptr %81, i32 0, i32 4
  store i32 1, ptr %82, align 8, !tbaa !30
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.DAQPWorkspace, ptr %83, i32 0, i32 29
  %85 = load ptr, ptr %84, align 8, !tbaa !19
  %86 = getelementptr inbounds %struct.DAQPBnB, ptr %85, i32 0, i32 2
  %87 = load i32, ptr %86, align 4, !tbaa !20
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.DAQPWorkspace, ptr %88, i32 0, i32 29
  %90 = load ptr, ptr %89, align 8, !tbaa !19
  %91 = getelementptr inbounds %struct.DAQPBnB, ptr %90, i32 0, i32 7
  store i32 %87, ptr %91, align 4, !tbaa !31
  br label %92

92:                                               ; preds = %161, %118, %1
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.DAQPWorkspace, ptr %93, i32 0, i32 29
  %95 = load ptr, ptr %94, align 8, !tbaa !19
  %96 = getelementptr inbounds %struct.DAQPBnB, ptr %95, i32 0, i32 4
  %97 = load i32, ptr %96, align 8, !tbaa !30
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %99, label %162

99:                                               ; preds = %92
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.DAQPWorkspace, ptr %100, i32 0, i32 29
  %102 = load ptr, ptr %101, align 8, !tbaa !19
  %103 = getelementptr inbounds %struct.DAQPBnB, ptr %102, i32 0, i32 3
  %104 = load ptr, ptr %103, align 8, !tbaa !24
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.DAQPWorkspace, ptr %105, i32 0, i32 29
  %107 = load ptr, ptr %106, align 8, !tbaa !19
  %108 = getelementptr inbounds %struct.DAQPBnB, ptr %107, i32 0, i32 4
  %109 = load i32, ptr %108, align 8, !tbaa !30
  %110 = add nsw i32 %109, -1
  store i32 %110, ptr %108, align 8, !tbaa !30
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds %struct.DAQPNode, ptr %104, i64 %111
  store ptr %112, ptr %6, align 8, !tbaa !5
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = call i32 @process_node(ptr noundef %113, ptr noundef %114)
  store i32 %115, ptr %5, align 4, !tbaa !32
  %116 = load i32, ptr %5, align 4, !tbaa !32
  %117 = icmp eq i32 %116, -1
  br i1 %117, label %118, label %119

118:                                              ; preds = %99
  br label %92, !llvm.loop !33

119:                                              ; preds = %99
  %120 = load i32, ptr %5, align 4, !tbaa !32
  %121 = icmp slt i32 %120, 0
  br i1 %121, label %122, label %124

122:                                              ; preds = %119
  %123 = load i32, ptr %5, align 4, !tbaa !32
  store i32 %123, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %206

124:                                              ; preds = %119
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = call i32 @get_branch_id(ptr noundef %125)
  store i32 %126, ptr %4, align 4, !tbaa !32
  %127 = load i32, ptr %4, align 4, !tbaa !32
  %128 = icmp eq i32 %127, -1
  br i1 %128, label %129, label %157

129:                                              ; preds = %124
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.DAQPWorkspace, ptr %130, i32 0, i32 17
  %132 = load double, ptr %131, align 8, !tbaa !35
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.DAQPWorkspace, ptr %133, i32 0, i32 28
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  %136 = getelementptr inbounds %struct.DAQPSettings, ptr %135, i32 0, i32 12
  %137 = load double, ptr %136, align 8, !tbaa !17
  %138 = fneg double %137
  %139 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %132, double %138)
  %140 = load double, ptr %9, align 8, !tbaa !15
  %141 = fmul double %139, %140
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.DAQPWorkspace, ptr %142, i32 0, i32 28
  %144 = load ptr, ptr %143, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.DAQPSettings, ptr %144, i32 0, i32 7
  store double %141, ptr %145, align 8, !tbaa !13
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.DAQPWorkspace, ptr %146, i32 0, i32 13
  %148 = load ptr, ptr %147, align 8, !tbaa !36
  store ptr %148, ptr %7, align 8, !tbaa !5
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.DAQPWorkspace, ptr %149, i32 0, i32 16
  %151 = load ptr, ptr %150, align 8, !tbaa !37
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.DAQPWorkspace, ptr %152, i32 0, i32 13
  store ptr %151, ptr %153, align 8, !tbaa !36
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.DAQPWorkspace, ptr %155, i32 0, i32 16
  store ptr %154, ptr %156, align 8, !tbaa !37
  br label %161

157:                                              ; preds = %124
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = load i32, ptr %4, align 4, !tbaa !32
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  call void @spawn_children(ptr noundef %158, i32 noundef %159, ptr noundef %160)
  br label %161

161:                                              ; preds = %157, %129
  br label %92, !llvm.loop !33

162:                                              ; preds = %92
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.DAQPWorkspace, ptr %163, i32 0, i32 29
  %165 = load ptr, ptr %164, align 8, !tbaa !19
  %166 = getelementptr inbounds %struct.DAQPBnB, ptr %165, i32 0, i32 10
  %167 = load i32, ptr %166, align 4, !tbaa !22
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.DAQPWorkspace, ptr %168, i32 0, i32 25
  store i32 %167, ptr %169, align 4, !tbaa !38
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.DAQPWorkspace, ptr %170, i32 0, i32 28
  %172 = load ptr, ptr %171, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.DAQPSettings, ptr %172, i32 0, i32 7
  %174 = load double, ptr %173, align 8, !tbaa !13
  %175 = fmul double 2.000000e+00, %174
  %176 = load double, ptr %9, align 8, !tbaa !15
  %177 = fdiv double %175, %176
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.DAQPWorkspace, ptr %178, i32 0, i32 28
  %180 = load ptr, ptr %179, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct.DAQPSettings, ptr %180, i32 0, i32 12
  %182 = load double, ptr %181, align 8, !tbaa !17
  %183 = fadd double %177, %182
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.DAQPWorkspace, ptr %184, i32 0, i32 17
  store double %183, ptr %185, align 8, !tbaa !35
  %186 = load double, ptr %8, align 8, !tbaa !15
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.DAQPWorkspace, ptr %187, i32 0, i32 28
  %189 = load ptr, ptr %188, align 8, !tbaa !9
  %190 = getelementptr inbounds %struct.DAQPSettings, ptr %189, i32 0, i32 7
  store double %186, ptr %190, align 8, !tbaa !13
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  %192 = icmp eq ptr %191, null
  br i1 %192, label %193, label %194

193:                                              ; preds = %162
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %206

194:                                              ; preds = %162
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.DAQPWorkspace, ptr %195, i32 0, i32 16
  %197 = load ptr, ptr %196, align 8, !tbaa !37
  store ptr %197, ptr %7, align 8, !tbaa !5
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.DAQPWorkspace, ptr %198, i32 0, i32 13
  %200 = load ptr, ptr %199, align 8, !tbaa !36
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.DAQPWorkspace, ptr %201, i32 0, i32 16
  store ptr %200, ptr %202, align 8, !tbaa !37
  %203 = load ptr, ptr %7, align 8, !tbaa !5
  %204 = load ptr, ptr %3, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.DAQPWorkspace, ptr %204, i32 0, i32 13
  store ptr %203, ptr %205, align 8, !tbaa !36
  store i32 1, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %206

206:                                              ; preds = %194, %193, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  %207 = load i32, ptr %2, align 4
  ret i32 %207
}

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nounwind uwtable
declare dso_local void @spawn_children(ptr noundef, i32 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 208}
!10 = !{!"", !6, i64 0, !11, i64 8, !11, i64 12, !11, 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, !12, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !11, i64 168, !6, i64 176, !11, i64 184, !11, i64 188, !11, i64 192, !12, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !6, i64 232}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 48}
!14 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !11, i64 40, !11, i64 44, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88}
!15 = !{!12, !12, i64 0}
!16 = !{!14, !12, i64 80}
!17 = !{!14, !12, i64 88}
!18 = !{!10, !11, i64 184}
!19 = !{!10, !6, i64 216}
!20 = !{!21, !11, i64 12}
!21 = !{!"", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16, !11, i64 24, !6, i64 32, !11, i64 40, !11, i64 44, !6, i64 48, !11, i64 56, !11, i64 60}
!22 = !{!21, !11, i64 60}
!23 = !{!21, !11, i64 56}
!24 = !{!21, !6, i64 16}
!25 = !{!26, !11, i64 4}
!26 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!27 = !{!26, !11, i64 8}
!28 = !{!26, !11, i64 12}
!29 = !{!26, !11, i64 0}
!30 = !{!21, !11, i64 24}
!31 = !{!21, !11, i64 44}
!32 = !{!11, !11, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!10, !12, i64 128}
!36 = !{!10, !6, i64 96}
!37 = !{!10, !6, i64 120}
!38 = !{!10, !11, i64 188}


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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -2147483648, 2) i32 @daqp_bnb(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 208
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 48
  %5 = load double, ptr %4, align 8, !tbaa !12
  %6 = getelementptr inbounds i8, ptr %3, i64 80
  %7 = load double, ptr %6, align 8, !tbaa !14
  %8 = fadd double %7, 1.000000e+00
  %9 = fdiv double 1.000000e+00, %8
  %10 = getelementptr inbounds i8, ptr %3, i64 88
  %11 = load double, ptr %10, align 8, !tbaa !15
  %12 = fsub double %5, %11
  %13 = fmul double %12, %9
  store double %13, ptr %4, align 8, !tbaa !12
  %14 = getelementptr inbounds i8, ptr %0, i64 184
  %15 = load i32, ptr %14, align 8, !tbaa !16
  %16 = getelementptr inbounds i8, ptr %0, i64 216
  %17 = load ptr, ptr %16, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %17, i64 12
  store i32 %15, ptr %18, align 4, !tbaa !18
  %19 = getelementptr inbounds i8, ptr %17, i64 60
  store i32 0, ptr %19, align 4, !tbaa !20
  %20 = getelementptr inbounds i8, ptr %17, i64 56
  store i32 0, ptr %20, align 8, !tbaa !21
  %21 = getelementptr inbounds i8, ptr %17, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !22
  store <4 x i32> <i32 0, i32 -1, i32 0, i32 0>, ptr %22, align 4, !tbaa !23
  %23 = getelementptr inbounds i8, ptr %17, i64 24
  store i32 1, ptr %23, align 8, !tbaa !24
  %24 = getelementptr inbounds i8, ptr %17, i64 44
  store i32 %15, ptr %24, align 4, !tbaa !25
  %25 = getelementptr inbounds i8, ptr %0, i64 128
  %26 = getelementptr inbounds i8, ptr %0, i64 96
  %27 = getelementptr inbounds i8, ptr %0, i64 120
  br label %.outer.outer

.outer.outer:                                     ; preds = %46, %1
  %.053.ph.ph = phi ptr [ %55, %46 ], [ null, %1 ]
  br label %.outer

.outer:                                           ; preds = %.outer.outer, %57
  br label %28

28:                                               ; preds = %.outer, %33
  %29 = load ptr, ptr %16, align 8, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %29, i64 24
  %31 = load i32, ptr %30, align 8, !tbaa !24
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %33, label %58

33:                                               ; preds = %28
  %34 = getelementptr inbounds i8, ptr %29, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !22
  %36 = add nsw i32 %31, -1
  store i32 %36, ptr %30, align 8, !tbaa !24
  %37 = zext nneg i32 %36 to i64
  %38 = getelementptr inbounds %struct.DAQPNode, ptr %35, i64 %37
  %39 = tail call i32 @process_node(ptr noundef %38, ptr noundef nonnull %0)
  %40 = icmp eq i32 %39, -1
  br i1 %40, label %28, label %41, !llvm.loop !26

41:                                               ; preds = %33
  %42 = icmp slt i32 %39, 0
  br i1 %42, label %.loopexit, label %43

43:                                               ; preds = %41
  %44 = tail call i32 @get_branch_id(ptr noundef nonnull %0)
  %45 = icmp eq i32 %44, -1
  br i1 %45, label %46, label %57

46:                                               ; preds = %43
  %47 = load double, ptr %25, align 8, !tbaa !28
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 88
  %50 = load double, ptr %49, align 8, !tbaa !15
  %51 = fneg double %50
  %52 = tail call double @llvm.fmuladd.f64(double %47, double 5.000000e-01, double %51)
  %53 = fmul double %9, %52
  %54 = getelementptr inbounds i8, ptr %48, i64 48
  store double %53, ptr %54, align 8, !tbaa !12
  %55 = load ptr, ptr %26, align 8, !tbaa !29
  %56 = load ptr, ptr %27, align 8, !tbaa !30
  store ptr %56, ptr %26, align 8, !tbaa !29
  store ptr %55, ptr %27, align 8, !tbaa !30
  br label %.outer.outer, !llvm.loop !26

57:                                               ; preds = %43
  tail call void @spawn_children(ptr noundef %38, i32 noundef %44, ptr noundef %0)
  br label %.outer, !llvm.loop !26

58:                                               ; preds = %28
  %59 = getelementptr inbounds i8, ptr %29, i64 60
  %60 = load i32, ptr %59, align 4, !tbaa !20
  %61 = getelementptr inbounds i8, ptr %0, i64 188
  store i32 %60, ptr %61, align 4, !tbaa !31
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 48
  %64 = load double, ptr %63, align 8, !tbaa !12
  %65 = fmul double %64, 2.000000e+00
  %66 = fdiv double %65, %9
  %67 = getelementptr inbounds i8, ptr %62, i64 88
  %68 = load double, ptr %67, align 8, !tbaa !15
  %69 = fadd double %68, %66
  store double %69, ptr %25, align 8, !tbaa !28
  store double %5, ptr %63, align 8, !tbaa !12
  %70 = icmp eq ptr %.053.ph.ph, null
  br i1 %70, label %.loopexit, label %71

71:                                               ; preds = %58
  %72 = load ptr, ptr %27, align 8, !tbaa !30
  %73 = load ptr, ptr %26, align 8, !tbaa !29
  store ptr %73, ptr %27, align 8, !tbaa !30
  store ptr %72, ptr %26, align 8, !tbaa !29
  br label %.loopexit

.loopexit:                                        ; preds = %41, %58, %71
  %.0 = phi i32 [ 1, %71 ], [ -1, %58 ], [ %39, %41 ]
  ret i32 %.0
}

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

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

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 208}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12, !10, 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, !11, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !10, i64 168, !7, i64 176, !10, i64 184, !10, i64 188, !10, i64 192, !11, i64 200, !7, i64 208, !7, i64 216, !10, i64 224, !7, i64 232}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!13, !11, i64 48}
!13 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88}
!14 = !{!13, !11, i64 80}
!15 = !{!13, !11, i64 88}
!16 = !{!6, !10, i64 184}
!17 = !{!6, !7, i64 216}
!18 = !{!19, !10, i64 12}
!19 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !7, i64 48, !10, i64 56, !10, i64 60}
!20 = !{!19, !10, i64 60}
!21 = !{!19, !10, i64 56}
!22 = !{!19, !7, i64 16}
!23 = !{!10, !10, i64 0}
!24 = !{!19, !10, i64 24}
!25 = !{!19, !10, i64 44}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!6, !11, i64 128}
!29 = !{!6, !7, i64 96}
!30 = !{!6, !7, i64 120}
!31 = !{!6, !10, i64 188}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass