; LLVM IR from csviragh/robotsim :: src/utilities (obstacles)

; 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.obstacle_callback_data_t = type { ptr, double, [32 x i8] }
%struct.obstacles_t = type { [32 x %struct.obstacle_t], i32 }
%struct.obstacle_t = type { [32 x i8], [10 x [3 x double]], [2 x double], i32 }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @ParseObstacleFile(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.obstacle_callback_data_t, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #4
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 48, i1 false)
  %13 = getelementptr inbounds %struct.obstacle_callback_data_t, ptr %6, i32 0, i32 0
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %14, ptr %13, align 8, !tbaa !9
  %15 = getelementptr inbounds %struct.obstacle_callback_data_t, ptr %6, i32 0, i32 1
  %16 = getelementptr inbounds %struct.obstacle_callback_data_t, ptr %6, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.obstacles_t, ptr %17, i32 0, i32 1
  store i32 0, ptr %18, align 8, !tbaa !12
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = call i32 @IniParse(ptr noundef %19, ptr noundef @obstacle_callback, ptr noundef %6)
  store i32 %20, ptr %7, align 4, !tbaa !15
  %21 = load i32, ptr %7, align 4, !tbaa !15
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %27

23:                                               ; preds = %2
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = load i32, ptr %7, align 4, !tbaa !15
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %24, i32 noundef %25)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %134

27:                                               ; preds = %2
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.obstacles_t, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 8, !tbaa !12
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %30)
  store i32 0, ptr %8, align 4, !tbaa !15
  br label %32

32:                                               ; preds = %127, %27
  %33 = load i32, ptr %8, align 4, !tbaa !15
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.obstacles_t, ptr %34, i32 0, i32 1
  %36 = load i32, ptr %35, align 8, !tbaa !12
  %37 = icmp slt i32 %33, %36
  br i1 %37, label %38, label %130

38:                                               ; preds = %32
  store float 0.000000e+00, ptr %11, align 4, !tbaa !16
  store float 0.000000e+00, ptr %10, align 4, !tbaa !16
  store i32 0, ptr %9, align 4, !tbaa !15
  br label %39

39:                                               ; preds = %80, %38
  %40 = load i32, ptr %9, align 4, !tbaa !15
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.obstacles_t, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %8, align 4, !tbaa !15
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [32 x %struct.obstacle_t], ptr %42, i64 0, i64 %44
  %46 = getelementptr inbounds %struct.obstacle_t, ptr %45, i32 0, i32 3
  %47 = load i32, ptr %46, align 8, !tbaa !18
  %48 = icmp slt i32 %40, %47
  br i1 %48, label %49, label %83

49:                                               ; preds = %39
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.obstacles_t, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %8, align 4, !tbaa !15
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [32 x %struct.obstacle_t], ptr %51, i64 0, i64 %53
  %55 = getelementptr inbounds %struct.obstacle_t, ptr %54, i32 0, i32 1
  %56 = load i32, ptr %9, align 4, !tbaa !15
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [10 x [3 x double]], ptr %55, i64 0, i64 %57
  %59 = getelementptr inbounds [3 x double], ptr %58, i64 0, i64 0
  %60 = load double, ptr %59, align 8, !tbaa !20
  %61 = load float, ptr %10, align 4, !tbaa !16
  %62 = fpext float %61 to double
  %63 = fadd double %62, %60
  %64 = fptrunc double %63 to float
  store float %64, ptr %10, align 4, !tbaa !16
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.obstacles_t, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %8, align 4, !tbaa !15
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [32 x %struct.obstacle_t], ptr %66, i64 0, i64 %68
  %70 = getelementptr inbounds %struct.obstacle_t, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %9, align 4, !tbaa !15
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [10 x [3 x double]], ptr %70, i64 0, i64 %72
  %74 = getelementptr inbounds [3 x double], ptr %73, i64 0, i64 1
  %75 = load double, ptr %74, align 8, !tbaa !20
  %76 = load float, ptr %11, align 4, !tbaa !16
  %77 = fpext float %76 to double
  %78 = fadd double %77, %75
  %79 = fptrunc double %78 to float
  store float %79, ptr %11, align 4, !tbaa !16
  br label %80

80:                                               ; preds = %49
  %81 = load i32, ptr %9, align 4, !tbaa !15
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %9, align 4, !tbaa !15
  br label %39, !llvm.loop !21

83:                                               ; preds = %39
  %84 = load i32, ptr %9, align 4, !tbaa !15
  %85 = icmp eq i32 %84, 0
  br i1 %85, label %86, label %101

86:                                               ; preds = %83
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.obstacles_t, ptr %87, i32 0, i32 0
  %89 = load i32, ptr %8, align 4, !tbaa !15
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [32 x %struct.obstacle_t], ptr %88, i64 0, i64 %90
  %92 = getelementptr inbounds %struct.obstacle_t, ptr %91, i32 0, i32 2
  %93 = getelementptr inbounds [2 x double], ptr %92, i64 0, i64 0
  store double 0.000000e+00, ptr %93, align 8, !tbaa !20
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.obstacles_t, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %8, align 4, !tbaa !15
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [32 x %struct.obstacle_t], ptr %95, i64 0, i64 %97
  %99 = getelementptr inbounds %struct.obstacle_t, ptr %98, i32 0, i32 2
  %100 = getelementptr inbounds [2 x double], ptr %99, i64 0, i64 1
  store double 0.000000e+00, ptr %100, align 8, !tbaa !20
  br label %126

101:                                              ; preds = %83
  %102 = load float, ptr %10, align 4, !tbaa !16
  %103 = load i32, ptr %9, align 4, !tbaa !15
  %104 = sitofp i32 %103 to float
  %105 = fdiv float %102, %104
  %106 = fpext float %105 to double
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.obstacles_t, ptr %107, i32 0, i32 0
  %109 = load i32, ptr %8, align 4, !tbaa !15
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [32 x %struct.obstacle_t], ptr %108, i64 0, i64 %110
  %112 = getelementptr inbounds %struct.obstacle_t, ptr %111, i32 0, i32 2
  %113 = getelementptr inbounds [2 x double], ptr %112, i64 0, i64 0
  store double %106, ptr %113, align 8, !tbaa !20
  %114 = load float, ptr %11, align 4, !tbaa !16
  %115 = load i32, ptr %9, align 4, !tbaa !15
  %116 = sitofp i32 %115 to float
  %117 = fdiv float %114, %116
  %118 = fpext float %117 to double
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.obstacles_t, ptr %119, i32 0, i32 0
  %121 = load i32, ptr %8, align 4, !tbaa !15
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [32 x %struct.obstacle_t], ptr %120, i64 0, i64 %122
  %124 = getelementptr inbounds %struct.obstacle_t, ptr %123, i32 0, i32 2
  %125 = getelementptr inbounds [2 x double], ptr %124, i64 0, i64 1
  store double %118, ptr %125, align 8, !tbaa !20
  br label %126

126:                                              ; preds = %101, %86
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %8, align 4, !tbaa !15
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %8, align 4, !tbaa !15
  br label %32, !llvm.loop !23

130:                                              ; preds = %32
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.obstacles_t, ptr %131, i32 0, i32 1
  %133 = load i32, ptr %132, align 8, !tbaa !12
  store i32 %133, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %134

134:                                              ; preds = %130, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #4
  %135 = load i32, ptr %3, align 4
  ret i32 %135
}

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

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

declare i32 @IniParse(ptr noundef, ptr noundef, ptr noundef) #3

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

declare i32 @printf(ptr noundef, ...) #3

; 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 nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"", !6, i64 0, !11, i64 8, !7, i64 16}
!11 = !{!"double", !7, i64 0}
!12 = !{!13, !14, i64 9472}
!13 = !{!"", !7, i64 0, !14, i64 9472}
!14 = !{!"int", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!19, !14, i64 288}
!19 = !{!"", !7, i64 0, !7, i64 32, !7, i64 272, !14, i64 288}
!20 = !{!11, !11, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; 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.obstacle_callback_data_t = type { ptr, double, [32 x i8] }
%struct.obstacle_t = type { [32 x i8], [10 x [3 x double]], [2 x double], i32 }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @ParseObstacleFile(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.obstacle_callback_data_t, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #5
  %4 = getelementptr inbounds i8, ptr %3, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %4, i8 0, i64 40, i1 false)
  store ptr %1, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 9472
  store i32 0, ptr %5, align 8, !tbaa !11
  %6 = call i32 @IniParse(ptr noundef %0, ptr noundef nonnull @obstacle_callback, ptr noundef nonnull %3) #5
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %9, label %7

7:                                                ; preds = %2
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %0, i32 noundef %6)
  br label %.loopexit

9:                                                ; preds = %2
  %10 = load i32, ptr %5, align 8, !tbaa !11
  %11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %10)
  %12 = load i32, ptr %5, align 8, !tbaa !11
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %9
  %wide.trip.count57 = zext nneg i32 %12 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge.thread
  %indvars.iv54 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next55, %._crit_edge.thread ]
  %14 = getelementptr inbounds [32 x %struct.obstacle_t], ptr %1, i64 0, i64 %indvars.iv54
  %15 = getelementptr inbounds i8, ptr %14, i64 288
  %16 = load i32, ptr %15, align 8, !tbaa !14
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %.preheader
  %18 = getelementptr inbounds i8, ptr %14, i64 32
  %wide.trip.count = zext nneg i32 %16 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %19 = icmp ult i32 %16, 4
  br i1 %19, label %._crit_edge.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %20

20:                                               ; preds = %20, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %20 ]
  %21 = phi <2 x float> [ zeroinitializer, %.lr.ph.new ], [ %41, %20 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %20 ]
  %22 = getelementptr inbounds [10 x [3 x double]], ptr %18, i64 0, i64 %indvars.iv
  %23 = fpext <2 x float> %21 to <2 x double>
  %24 = load <2 x double>, ptr %22, align 8, !tbaa !16
  %25 = fadd <2 x double> %24, %23
  %26 = fptrunc <2 x double> %25 to <2 x float>
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %27 = getelementptr inbounds [10 x [3 x double]], ptr %18, i64 0, i64 %indvars.iv.next
  %28 = fpext <2 x float> %26 to <2 x double>
  %29 = load <2 x double>, ptr %27, align 8, !tbaa !16
  %30 = fadd <2 x double> %29, %28
  %31 = fptrunc <2 x double> %30 to <2 x float>
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %32 = getelementptr inbounds [10 x [3 x double]], ptr %18, i64 0, i64 %indvars.iv.next.1
  %33 = fpext <2 x float> %31 to <2 x double>
  %34 = load <2 x double>, ptr %32, align 8, !tbaa !16
  %35 = fadd <2 x double> %34, %33
  %36 = fptrunc <2 x double> %35 to <2 x float>
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %37 = getelementptr inbounds [10 x [3 x double]], ptr %18, i64 0, i64 %indvars.iv.next.2
  %38 = fpext <2 x float> %36 to <2 x double>
  %39 = load <2 x double>, ptr %37, align 8, !tbaa !16
  %40 = fadd <2 x double> %39, %38
  %41 = fptrunc <2 x double> %40 to <2 x float>
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.unr-lcssa, label %20, !llvm.loop !17

._crit_edge.unr-lcssa:                            ; preds = %20, %.lr.ph
  %.lcssa.ph = phi <2 x float> [ poison, %.lr.ph ], [ %41, %20 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %20 ]
  %.unr = phi <2 x float> [ zeroinitializer, %.lr.ph ], [ %41, %20 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.unr-lcssa ]
  %42 = phi <2 x float> [ %47, %.epil.preheader ], [ %.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.unr-lcssa ]
  %43 = getelementptr inbounds [10 x [3 x double]], ptr %18, i64 0, i64 %indvars.iv.epil
  %44 = fpext <2 x float> %42 to <2 x double>
  %45 = load <2 x double>, ptr %43, align 8, !tbaa !16
  %46 = fadd <2 x double> %45, %44
  %47 = fptrunc <2 x double> %46 to <2 x float>
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !19

._crit_edge:                                      ; preds = %.epil.preheader, %._crit_edge.unr-lcssa
  %.lcssa = phi <2 x float> [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %47, %.epil.preheader ]
  %48 = uitofp nneg i32 %16 to float
  %49 = insertelement <2 x float> poison, float %48, i64 0
  %50 = shufflevector <2 x float> %49, <2 x float> poison, <2 x i32> zeroinitializer
  %51 = fdiv <2 x float> %.lcssa, %50
  %52 = fpext <2 x float> %51 to <2 x double>
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.preheader, %._crit_edge
  %53 = phi <2 x double> [ %52, %._crit_edge ], [ zeroinitializer, %.preheader ]
  %54 = getelementptr inbounds i8, ptr %14, i64 272
  store <2 x double> %53, ptr %54, align 8
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond58.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count57
  br i1 %exitcond58.not, label %.loopexit, label %.preheader, !llvm.loop !21

.loopexit:                                        ; preds = %._crit_edge.thread, %9, %7
  %.039 = phi i32 [ 0, %7 ], [ %12, %9 ], [ %12, %._crit_edge.thread ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  ret i32 %.039
}

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

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

declare i32 @IniParse(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { nofree 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !8, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!12, !13, i64 9472}
!12 = !{!"", !8, i64 0, !13, i64 9472}
!13 = !{!"int", !8, i64 0}
!14 = !{!15, !13, i64 288}
!15 = !{!"", !8, i64 0, !8, i64 32, !8, i64 272, !13, i64 288}
!16 = !{!10, !10, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !18}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass