; LLVM IR from Yinxiaoli/iros2015_folding :: src/folding_planner/src (Registration)

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

%"class.Eigen::CwiseBinaryOp" = type <{ ptr, ptr, [8 x i8] }>
%"class.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { %"struct.Eigen::internal::plain_array" }
%"struct.Eigen::internal::plain_array" = type { [2 x double] }
%"class.Eigen::CwiseBinaryOp.7" = type <{ ptr, %"class.Eigen::CwiseUnaryOp", [8 x i8] }>
%"class.Eigen::CwiseUnaryOp" = type { [8 x i8], %"class.Eigen::CwiseUnaryOp.19", %"struct.Eigen::internal::scalar_quotient1_op" }
%"class.Eigen::CwiseUnaryOp.19" = type { [8 x i8], %"class.Eigen::CwiseBinaryOp", %"struct.Eigen::internal::scalar_multiple_op" }
%"struct.Eigen::internal::scalar_multiple_op" = type { double }
%"struct.Eigen::internal::scalar_quotient1_op" = type { double }
%struct.SParameters = type { double, double, double, double, %"struct._BlueTail::_Image::SImage", %struct.SRegion, i32, double, double, double, double, i32, double }
%"struct._BlueTail::_Image::SImage" = type { i32, i32, ptr }
%struct.SRegion = type { double, double, double, double }

; 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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z19sampleDistanceFieldRKN9_BlueTail6_Image6SImageIdLi1EEERK7SRegionRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(16)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEmiIS2_EEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKS2_KT_EERKNS0_ISA_EE(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseBinaryOp") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z23integrateDF2OverSegmentPK11SParametersRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEES6_d(ptr noundef %0, ptr noundef nonnull align 16 dereferenceable(16) %1, ptr noundef nonnull align 16 dereferenceable(16) %2, double noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.Eigen::Matrix", align 16
  %14 = alloca %"class.Eigen::CwiseBinaryOp.7", align 8
  %15 = alloca %"class.Eigen::CwiseUnaryOp", align 8
  %16 = alloca %"class.Eigen::CwiseUnaryOp.19", align 8
  %17 = alloca %"class.Eigen::CwiseBinaryOp", align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.Eigen::Matrix", align 16
  %22 = alloca %"class.Eigen::CwiseBinaryOp.7", align 8
  %23 = alloca %"class.Eigen::CwiseUnaryOp", align 8
  %24 = alloca %"class.Eigen::CwiseUnaryOp.19", align 8
  %25 = alloca %"class.Eigen::CwiseBinaryOp", align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store double %3, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store double 0.000000e+00, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %32 = load double, ptr %8, align 8, !tbaa !9
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.SParameters, ptr %33, i32 0, i32 11
  %35 = load i32, ptr %34, align 8, !tbaa !11
  %36 = sitofp i32 %35 to double
  %37 = fdiv double %32, %36
  store double %37, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !16
  br label %38

38:                                               ; preds = %101, %4
  %39 = load i32, ptr %11, align 4, !tbaa !16
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.SParameters, ptr %40, i32 0, i32 11
  %42 = load i32, ptr %41, align 8, !tbaa !11
  %43 = icmp slt i32 %39, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %104

45:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %14) #5
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEmiIS2_EEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKS2_KT_EERKNS0_ISA_EE(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseBinaryOp") align 8 %17, ptr noundef nonnull align 1 dereferenceable(1) %47, ptr noundef nonnull align 1 dereferenceable(1) %48)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %49 = load i32, ptr %11, align 4, !tbaa !16
  %50 = sitofp i32 %49 to double
  store double %50, ptr %18, align 8, !tbaa !9
  call void @_ZNK5Eigen10MatrixBaseINS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEES7_EEEmlERKd(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseUnaryOp.19") align 8 %16, ptr noundef nonnull align 1 dereferenceable(1) %17, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.SParameters, ptr %51, i32 0, i32 11
  %53 = load i32, ptr %52, align 8, !tbaa !11
  %54 = sitofp i32 %53 to double
  store double %54, ptr %19, align 8, !tbaa !9
  call void @_ZNK5Eigen10MatrixBaseINS_12CwiseUnaryOpINS_8internal18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS2_20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEESA_EEEEEdvERKd(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseUnaryOp") align 8 %15, ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEplINS_12CwiseUnaryOpINS_8internal19scalar_quotient1_opIdEEKNS5_INS6_18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS6_20scalar_difference_opIdEEKS2_SE_EEEEEEEEKNSB_INS6_13scalar_sum_opIdEESE_KT_EERKNS0_ISM_EE(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseBinaryOp.7") align 8 %14, ptr noundef nonnull align 1 dereferenceable(1) %46, ptr noundef nonnull align 1 dereferenceable(1) %15)
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_13CwiseBinaryOpINS_8internal13scalar_sum_opIdEEKS1_KNS_12CwiseUnaryOpINS4_19scalar_quotient1_opIdEEKNS8_INS4_18scalar_multiple_opIdEEKNS3_INS4_20scalar_difference_opIdEES7_S7_EEEEEEEEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull align 1 dereferenceable(1) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %14) #5
  store ptr %13, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %22) #5
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #5
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEmiIS2_EEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKS2_KT_EERKNS0_ISA_EE(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseBinaryOp") align 8 %25, ptr noundef nonnull align 1 dereferenceable(1) %56, ptr noundef nonnull align 1 dereferenceable(1) %57)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %58 = load i32, ptr %11, align 4, !tbaa !16
  %59 = add nsw i32 %58, 1
  %60 = sitofp i32 %59 to double
  store double %60, ptr %26, align 8, !tbaa !9
  call void @_ZNK5Eigen10MatrixBaseINS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEES7_EEEmlERKd(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseUnaryOp.19") align 8 %24, ptr noundef nonnull align 1 dereferenceable(1) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.SParameters, ptr %61, i32 0, i32 11
  %63 = load i32, ptr %62, align 8, !tbaa !11
  %64 = sitofp i32 %63 to double
  store double %64, ptr %27, align 8, !tbaa !9
  call void @_ZNK5Eigen10MatrixBaseINS_12CwiseUnaryOpINS_8internal18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS2_20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEESA_EEEEEdvERKd(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseUnaryOp") align 8 %23, ptr noundef nonnull align 1 dereferenceable(1) %24, ptr noundef nonnull align 8 dereferenceable(8) %27)
  call void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEplINS_12CwiseUnaryOpINS_8internal19scalar_quotient1_opIdEEKNS5_INS6_18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS6_20scalar_difference_opIdEEKS2_SE_EEEEEEEEKNSB_INS6_13scalar_sum_opIdEESE_KT_EERKNS0_ISM_EE(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseBinaryOp.7") align 8 %22, ptr noundef nonnull align 1 dereferenceable(1) %55, ptr noundef nonnull align 1 dereferenceable(1) %23)
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_13CwiseBinaryOpINS_8internal13scalar_sum_opIdEEKS1_KNS_12CwiseUnaryOpINS4_19scalar_quotient1_opIdEEKNS8_INS4_18scalar_multiple_opIdEEKNS3_INS4_20scalar_difference_opIdEES7_S7_EEEEEEEEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16) %21, ptr noundef nonnull align 1 dereferenceable(1) %22)
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %22) #5
  store ptr %21, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.SParameters, ptr %65, i32 0, i32 4
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.SParameters, ptr %67, i32 0, i32 5
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = call noundef double @_Z19sampleDistanceFieldRKN9_BlueTail6_Image6SImageIdLi1EEERK7SRegionRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEE(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 8 dereferenceable(32) %68, ptr noundef nonnull align 16 dereferenceable(16) %69)
  store double %70, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.SParameters, ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.SParameters, ptr %73, i32 0, i32 5
  %75 = load ptr, ptr %20, align 8, !tbaa !5
  %76 = call noundef double @_Z19sampleDistanceFieldRKN9_BlueTail6_Image6SImageIdLi1EEERK7SRegionRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEE(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 8 dereferenceable(32) %74, ptr noundef nonnull align 16 dereferenceable(16) %75)
  store double %76, ptr %29, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %77 = load double, ptr %28, align 8, !tbaa !9
  %78 = call double @exp(double noundef %77) #5
  %79 = load double, ptr %28, align 8, !tbaa !9
  %80 = fneg double %79
  %81 = call double @exp(double noundef %80) #5
  %82 = fadd double %78, %81
  %83 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %82, double -1.000000e+00)
  store double %83, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %84 = load double, ptr %29, align 8, !tbaa !9
  %85 = call double @exp(double noundef %84) #5
  %86 = load double, ptr %29, align 8, !tbaa !9
  %87 = fneg double %86
  %88 = call double @exp(double noundef %87) #5
  %89 = fadd double %85, %88
  %90 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %89, double -1.000000e+00)
  store double %90, ptr %31, align 8, !tbaa !9
  %91 = load double, ptr %30, align 8, !tbaa !9
  %92 = load double, ptr %30, align 8, !tbaa !9
  %93 = load double, ptr %31, align 8, !tbaa !9
  %94 = load double, ptr %31, align 8, !tbaa !9
  %95 = fmul double %93, %94
  %96 = call double @llvm.fmuladd.f64(double %91, double %92, double %95)
  %97 = fmul double 5.000000e-01, %96
  %98 = load double, ptr %10, align 8, !tbaa !9
  %99 = load double, ptr %9, align 8, !tbaa !9
  %100 = call double @llvm.fmuladd.f64(double %97, double %98, double %99)
  store double %100, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %101

101:                                              ; preds = %45
  %102 = load i32, ptr %11, align 4, !tbaa !16
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %11, align 4, !tbaa !16
  br label %38, !llvm.loop !17

104:                                              ; preds = %44
  %105 = load double, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret double %105
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEplINS_12CwiseUnaryOpINS_8internal19scalar_quotient1_opIdEEKNS5_INS6_18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS6_20scalar_difference_opIdEEKS2_SE_EEEEEEEEKNSB_INS6_13scalar_sum_opIdEESE_KT_EERKNS0_ISM_EE(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseBinaryOp.7") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen10MatrixBaseINS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEES7_EEEmlERKd(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseUnaryOp.19") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen10MatrixBaseINS_12CwiseUnaryOpINS_8internal18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS2_20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEESA_EEEEEdvERKd(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseUnaryOp") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_13CwiseBinaryOpINS_8internal13scalar_sum_opIdEEKS1_KNS_12CwiseUnaryOpINS4_19scalar_quotient1_opIdEEKNS8_INS4_18scalar_multiple_opIdEEKNS3_INS4_20scalar_difference_opIdEES7_S7_EEEEEEEEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: nounwind
declare double @exp(double noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress 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 #3 = { inlinehint mustprogress 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !14, i64 120}
!12 = !{!"_ZTS11SParameters", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !15, i64 48, !14, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !14, i64 120, !10, i64 128}
!13 = !{!"_ZTSN9_BlueTail6_Image6SImageIdLi1EEE", !14, i64 0, !14, i64 4, !6, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTS7SRegion", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!16 = !{!14, !14, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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

%"class.Eigen::CwiseBinaryOp" = type <{ ptr, ptr, [8 x i8] }>
%"class.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { %"struct.Eigen::internal::plain_array" }
%"struct.Eigen::internal::plain_array" = type { [2 x double] }
%"class.Eigen::CwiseBinaryOp.7" = type <{ ptr, %"class.Eigen::CwiseUnaryOp", [8 x i8] }>
%"class.Eigen::CwiseUnaryOp" = type { [8 x i8], %"class.Eigen::CwiseUnaryOp.19", %"struct.Eigen::internal::scalar_quotient1_op" }
%"class.Eigen::CwiseUnaryOp.19" = type { [8 x i8], %"class.Eigen::CwiseBinaryOp", %"struct.Eigen::internal::scalar_multiple_op" }
%"struct.Eigen::internal::scalar_multiple_op" = type { double }
%"struct.Eigen::internal::scalar_quotient1_op" = type { double }

; 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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z19sampleDistanceFieldRKN9_BlueTail6_Image6SImageIdLi1EEERK7SRegionRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEmiIS2_EEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKS2_KT_EERKNS0_ISA_EE(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseBinaryOp") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z23integrateDF2OverSegmentPK11SParametersRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEES6_d(ptr noundef %0, ptr noundef nonnull align 16 dereferenceable(16) %1, ptr noundef nonnull align 16 dereferenceable(16) %2, double noundef %3) local_unnamed_addr #2 {
  %5 = alloca %"class.Eigen::Matrix", align 16
  %6 = alloca %"class.Eigen::CwiseBinaryOp.7", align 8
  %7 = alloca %"class.Eigen::CwiseUnaryOp", align 8
  %8 = alloca %"class.Eigen::CwiseUnaryOp.19", align 8
  %9 = alloca %"class.Eigen::CwiseBinaryOp", align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca %"class.Eigen::Matrix", align 16
  %13 = alloca %"class.Eigen::CwiseBinaryOp.7", align 8
  %14 = alloca %"class.Eigen::CwiseUnaryOp", align 8
  %15 = alloca %"class.Eigen::CwiseUnaryOp.19", align 8
  %16 = alloca %"class.Eigen::CwiseBinaryOp", align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = getelementptr inbounds i8, ptr %0, i64 120
  %20 = load i32, ptr %19, align 8, !tbaa !5
  %21 = sitofp i32 %20 to double
  %22 = fdiv double %3, %21
  %23 = icmp sgt i32 %20, 0
  br i1 %23, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %24 = getelementptr inbounds i8, ptr %0, i64 32
  %25 = getelementptr inbounds i8, ptr %0, i64 48
  br label %26

._crit_edge:                                      ; preds = %26, %4
  %.0.lcssa = phi double [ 0.000000e+00, %4 ], [ %49, %26 ]
  ret double %.0.lcssa

26:                                               ; preds = %.lr.ph, %26
  %.033 = phi double [ 0.000000e+00, %.lr.ph ], [ %49, %26 ]
  %.03132 = phi i32 [ 0, %.lr.ph ], [ %30, %26 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEmiIS2_EEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKS2_KT_EERKNS0_ISA_EE(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseBinaryOp") align 8 %9, ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 1 dereferenceable(1) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %27 = uitofp nneg i32 %.03132 to double
  store double %27, ptr %10, align 8, !tbaa !14
  call void @_ZNK5Eigen10MatrixBaseINS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEES7_EEEmlERKd(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseUnaryOp.19") align 8 %8, ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %28 = load i32, ptr %19, align 8, !tbaa !5
  %29 = sitofp i32 %28 to double
  store double %29, ptr %11, align 8, !tbaa !14
  call void @_ZNK5Eigen10MatrixBaseINS_12CwiseUnaryOpINS_8internal18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS2_20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEESA_EEEEEdvERKd(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseUnaryOp") align 8 %7, ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEplINS_12CwiseUnaryOpINS_8internal19scalar_quotient1_opIdEEKNS5_INS6_18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS6_20scalar_difference_opIdEEKS2_SE_EEEEEEEEKNSB_INS6_13scalar_sum_opIdEESE_KT_EERKNS0_ISM_EE(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseBinaryOp.7") align 8 %6, ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %7)
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_13CwiseBinaryOpINS_8internal13scalar_sum_opIdEEKS1_KNS_12CwiseUnaryOpINS4_19scalar_quotient1_opIdEEKNS8_INS4_18scalar_multiple_opIdEEKNS3_INS4_20scalar_difference_opIdEES7_S7_EEEEEEEEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #5
  call void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEmiIS2_EEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKS2_KT_EERKNS0_ISA_EE(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseBinaryOp") align 8 %16, ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 1 dereferenceable(1) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #5
  %30 = add nuw nsw i32 %.03132, 1
  %31 = uitofp nneg i32 %30 to double
  store double %31, ptr %17, align 8, !tbaa !14
  call void @_ZNK5Eigen10MatrixBaseINS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEES7_EEEmlERKd(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseUnaryOp.19") align 8 %15, ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  %32 = load i32, ptr %19, align 8, !tbaa !5
  %33 = sitofp i32 %32 to double
  store double %33, ptr %18, align 8, !tbaa !14
  call void @_ZNK5Eigen10MatrixBaseINS_12CwiseUnaryOpINS_8internal18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS2_20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEESA_EEEEEdvERKd(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseUnaryOp") align 8 %14, ptr noundef nonnull align 1 dereferenceable(1) %15, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEplINS_12CwiseUnaryOpINS_8internal19scalar_quotient1_opIdEEKNS5_INS6_18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS6_20scalar_difference_opIdEEKS2_SE_EEEEEEEEKNSB_INS6_13scalar_sum_opIdEESE_KT_EERKNS0_ISM_EE(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseBinaryOp.7") align 8 %13, ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %14)
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_13CwiseBinaryOpINS_8internal13scalar_sum_opIdEEKS1_KNS_12CwiseUnaryOpINS4_19scalar_quotient1_opIdEEKNS8_INS4_18scalar_multiple_opIdEEKNS3_INS4_20scalar_difference_opIdEES7_S7_EEEEEEEEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16) %12, ptr noundef nonnull align 1 dereferenceable(1) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %13) #5
  %34 = call noundef double @_Z19sampleDistanceFieldRKN9_BlueTail6_Image6SImageIdLi1EEERK7SRegionRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEE(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 16 dereferenceable(16) %5)
  %35 = call noundef double @_Z19sampleDistanceFieldRKN9_BlueTail6_Image6SImageIdLi1EEERK7SRegionRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEE(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 16 dereferenceable(16) %12)
  %36 = call double @exp(double noundef %34) #5
  %37 = fneg double %34
  %38 = call double @exp(double noundef %37) #5
  %39 = fadd double %36, %38
  %40 = call double @llvm.fmuladd.f64(double %39, double 5.000000e-01, double -1.000000e+00)
  %41 = call double @exp(double noundef %35) #5
  %42 = fneg double %35
  %43 = call double @exp(double noundef %42) #5
  %44 = fadd double %41, %43
  %45 = call double @llvm.fmuladd.f64(double %44, double 5.000000e-01, double -1.000000e+00)
  %46 = fmul double %45, %45
  %47 = call double @llvm.fmuladd.f64(double %40, double %40, double %46)
  %48 = fmul double %47, 5.000000e-01
  %49 = call double @llvm.fmuladd.f64(double %48, double %22, double %.033)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  %50 = load i32, ptr %19, align 8, !tbaa !5
  %51 = icmp slt i32 %30, %50
  br i1 %51, label %26, label %._crit_edge, !llvm.loop !15
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEplINS_12CwiseUnaryOpINS_8internal19scalar_quotient1_opIdEEKNS5_INS6_18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS6_20scalar_difference_opIdEEKS2_SE_EEEEEEEEKNSB_INS6_13scalar_sum_opIdEESE_KT_EERKNS0_ISM_EE(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseBinaryOp.7") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen10MatrixBaseINS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEES7_EEEmlERKd(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseUnaryOp.19") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen10MatrixBaseINS_12CwiseUnaryOpINS_8internal18scalar_multiple_opIdEEKNS_13CwiseBinaryOpINS2_20scalar_difference_opIdEEKNS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEESA_EEEEEdvERKd(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseUnaryOp") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_13CwiseBinaryOpINS_8internal13scalar_sum_opIdEEKS1_KNS_12CwiseUnaryOpINS4_19scalar_quotient1_opIdEEKNS8_INS4_18scalar_multiple_opIdEEKNS3_INS4_20scalar_difference_opIdEES7_S7_EEEEEEEEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @exp(double noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress 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 #3 = { inlinehint mustprogress 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 memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 120}
!6 = !{!"_ZTS11SParameters", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !13, i64 48, !11, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !11, i64 120, !7, i64 128}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN9_BlueTail6_Image6SImageIdLi1EEE", !11, i64 0, !11, i64 4, !12, i64 8}
!11 = !{!"int", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"_ZTS7SRegion", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass