; LLVM IR from vectozavr/3dzavr :: engine/io/microui (microui)

; 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.mu_Vec2 = type { i32, i32 }
%struct.mu_Context = type { ptr, ptr, ptr, %struct.mu_Style, ptr, i32, i32, i32, %struct.mu_Rect, i32, i32, i32, ptr, ptr, ptr, [127 x i8], i32, %struct.anon, %struct.anon.0, %struct.anon.1, %struct.anon.2, %struct.anon.3, %struct.anon.4, [48 x %struct.mu_PoolItem], [48 x %struct.mu_Container], [48 x %struct.mu_PoolItem], %struct.mu_Vec2, %struct.mu_Vec2, %struct.mu_Vec2, %struct.mu_Vec2, i32, i32, i32, i32, [32 x i8] }
%struct.mu_Style = type { ptr, %struct.mu_Vec2, i32, i32, i32, i32, i32, i32, [14 x %struct.mu_Color] }
%struct.mu_Color = type { i8, i8, i8, i8 }
%struct.mu_Rect = type { i32, i32, i32, i32 }
%struct.anon = type { i32, [262144 x i8] }
%struct.anon.0 = type { i32, [32 x ptr] }
%struct.anon.1 = type { i32, [32 x ptr] }
%struct.anon.2 = type { i32, [32 x %struct.mu_Rect] }
%struct.anon.3 = type { i32, [32 x i32] }
%struct.anon.4 = type { i32, [16 x %struct.mu_Layout] }
%struct.mu_Layout = type { %struct.mu_Rect, %struct.mu_Rect, %struct.mu_Vec2, %struct.mu_Vec2, %struct.mu_Vec2, [16 x i32], i32, i32, i32, i32, i32 }
%struct.mu_Container = type { ptr, ptr, %struct.mu_Rect, %struct.mu_Rect, %struct.mu_Vec2, %struct.mu_Vec2, i32, i32 }
%struct.mu_PoolItem = type { i32, i32 }
%struct.mu_JumpCommand = type { %struct.mu_BaseCommand, ptr }
%struct.mu_BaseCommand = type { i32, i32 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @abort() #3

; Function Attrs: nounwind uwtable
define dso_local void @mu_end(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.mu_Vec2, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  br label %9

9:                                                ; preds = %1
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.mu_Context, ptr %10, i32 0, i32 19
  %12 = getelementptr inbounds %struct.anon.1, ptr %11, i32 0, i32 0
  %13 = load i32, ptr %12, align 8, !tbaa !9
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %18, label %15

15:                                               ; preds = %9
  %16 = load ptr, ptr @stderr, align 8, !tbaa !5
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 159, ptr noundef @.str.3) #6
  call void @abort() #7
  unreachable

18:                                               ; preds = %9
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %20
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.mu_Context, ptr %22, i32 0, i32 20
  %24 = getelementptr inbounds %struct.anon.2, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !17
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %30, label %27

27:                                               ; preds = %21
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 160, ptr noundef @.str.4) #6
  call void @abort() #7
  unreachable

30:                                               ; preds = %21
  br label %31

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %2, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.mu_Context, ptr %34, i32 0, i32 21
  %36 = getelementptr inbounds %struct.anon.3, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 4, !tbaa !18
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %42, label %39

39:                                               ; preds = %33
  %40 = load ptr, ptr @stderr, align 8, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 161, ptr noundef @.str.5) #6
  call void @abort() #7
  unreachable

42:                                               ; preds = %33
  br label %43

43:                                               ; preds = %42
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.mu_Context, ptr %46, i32 0, i32 22
  %48 = getelementptr inbounds %struct.anon.4, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !19
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %54, label %51

51:                                               ; preds = %45
  %52 = load ptr, ptr @stderr, align 8, !tbaa !5
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 162, ptr noundef @.str.6) #6
  call void @abort() #7
  unreachable

54:                                               ; preds = %45
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.mu_Context, ptr %57, i32 0, i32 14
  %59 = load ptr, ptr %58, align 8, !tbaa !20
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %84

61:                                               ; preds = %56
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.mu_Context, ptr %62, i32 0, i32 29
  %64 = getelementptr inbounds %struct.mu_Vec2, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !21
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.mu_Context, ptr %66, i32 0, i32 14
  %68 = load ptr, ptr %67, align 8, !tbaa !20
  %69 = getelementptr inbounds %struct.mu_Container, ptr %68, i32 0, i32 5
  %70 = getelementptr inbounds %struct.mu_Vec2, ptr %69, i32 0, i32 0
  %71 = load i32, ptr %70, align 8, !tbaa !22
  %72 = add nsw i32 %71, %65
  store i32 %72, ptr %70, align 8, !tbaa !22
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.mu_Context, ptr %73, i32 0, i32 29
  %75 = getelementptr inbounds %struct.mu_Vec2, ptr %74, i32 0, i32 1
  %76 = load i32, ptr %75, align 4, !tbaa !24
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.mu_Context, ptr %77, i32 0, i32 14
  %79 = load ptr, ptr %78, align 8, !tbaa !20
  %80 = getelementptr inbounds %struct.mu_Container, ptr %79, i32 0, i32 5
  %81 = getelementptr inbounds %struct.mu_Vec2, ptr %80, i32 0, i32 1
  %82 = load i32, ptr %81, align 4, !tbaa !25
  %83 = add nsw i32 %82, %76
  store i32 %83, ptr %81, align 4, !tbaa !25
  br label %84

84:                                               ; preds = %61, %56
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.mu_Context, ptr %85, i32 0, i32 10
  %87 = load i32, ptr %86, align 8, !tbaa !26
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %92, label %89

89:                                               ; preds = %84
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.mu_Context, ptr %90, i32 0, i32 6
  store i32 0, ptr %91, align 4, !tbaa !27
  br label %92

92:                                               ; preds = %89, %84
  %93 = load ptr, ptr %2, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.mu_Context, ptr %93, i32 0, i32 10
  store i32 0, ptr %94, align 8, !tbaa !26
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.mu_Context, ptr %95, i32 0, i32 31
  %97 = load i32, ptr %96, align 4, !tbaa !28
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %126

99:                                               ; preds = %92
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.mu_Context, ptr %100, i32 0, i32 13
  %102 = load ptr, ptr %101, align 8, !tbaa !29
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %126

104:                                              ; preds = %99
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.mu_Context, ptr %105, i32 0, i32 13
  %107 = load ptr, ptr %106, align 8, !tbaa !29
  %108 = getelementptr inbounds %struct.mu_Container, ptr %107, i32 0, i32 6
  %109 = load i32, ptr %108, align 8, !tbaa !30
  %110 = load ptr, ptr %2, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.mu_Context, ptr %110, i32 0, i32 9
  %112 = load i32, ptr %111, align 4, !tbaa !31
  %113 = icmp slt i32 %109, %112
  br i1 %113, label %114, label %126

114:                                              ; preds = %104
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.mu_Context, ptr %115, i32 0, i32 13
  %117 = load ptr, ptr %116, align 8, !tbaa !29
  %118 = getelementptr inbounds %struct.mu_Container, ptr %117, i32 0, i32 6
  %119 = load i32, ptr %118, align 8, !tbaa !30
  %120 = icmp sge i32 %119, 0
  br i1 %120, label %121, label %126

121:                                              ; preds = %114
  %122 = load ptr, ptr %2, align 8, !tbaa !5
  %123 = load ptr, ptr %2, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.mu_Context, ptr %123, i32 0, i32 13
  %125 = load ptr, ptr %124, align 8, !tbaa !29
  call void @mu_bring_to_front(ptr noundef %122, ptr noundef %125)
  br label %126

126:                                              ; preds = %121, %114, %104, %99, %92
  %127 = load ptr, ptr %2, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.mu_Context, ptr %127, i32 0, i32 33
  store i32 0, ptr %128, align 4, !tbaa !32
  %129 = load ptr, ptr %2, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.mu_Context, ptr %129, i32 0, i32 34
  %131 = getelementptr inbounds [32 x i8], ptr %130, i64 0, i64 0
  store i8 0, ptr %131, align 8, !tbaa !33
  %132 = load ptr, ptr %2, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.mu_Context, ptr %132, i32 0, i32 31
  store i32 0, ptr %133, align 4, !tbaa !28
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.mu_Context, ptr %134, i32 0, i32 29
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %136 = call i64 @mu_vec2(i32 noundef 0, i32 noundef 0)
  store i64 %136, ptr %5, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %135, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.mu_Context, ptr %137, i32 0, i32 27
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.mu_Context, ptr %139, i32 0, i32 26
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %138, ptr align 8 %140, i64 8, i1 false), !tbaa.struct !34
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.mu_Context, ptr %141, i32 0, i32 18
  %143 = getelementptr inbounds %struct.anon.0, ptr %142, i32 0, i32 0
  %144 = load i32, ptr %143, align 8, !tbaa !36
  store i32 %144, ptr %4, align 4, !tbaa !35
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.mu_Context, ptr %145, i32 0, i32 18
  %147 = getelementptr inbounds %struct.anon.0, ptr %146, i32 0, i32 1
  %148 = getelementptr inbounds [32 x ptr], ptr %147, i64 0, i64 0
  %149 = load i32, ptr %4, align 4, !tbaa !35
  %150 = sext i32 %149 to i64
  call void @qsort(ptr noundef %148, i64 noundef %150, i64 noundef 8, ptr noundef @compare_zindex)
  store i32 0, ptr %3, align 4, !tbaa !35
  br label %151

151:                                              ; preds = %214, %126
  %152 = load i32, ptr %3, align 4, !tbaa !35
  %153 = load i32, ptr %4, align 4, !tbaa !35
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %155, label %217

155:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.mu_Context, ptr %156, i32 0, i32 18
  %158 = getelementptr inbounds %struct.anon.0, ptr %157, i32 0, i32 1
  %159 = load i32, ptr %3, align 4, !tbaa !35
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [32 x ptr], ptr %158, i64 0, i64 %160
  %162 = load ptr, ptr %161, align 8, !tbaa !5
  store ptr %162, ptr %6, align 8, !tbaa !5
  %163 = load i32, ptr %3, align 4, !tbaa !35
  %164 = icmp eq i32 %163, 0
  br i1 %164, label %165, label %176

165:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %166 = load ptr, ptr %2, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.mu_Context, ptr %166, i32 0, i32 17
  %168 = getelementptr inbounds %struct.anon, ptr %167, i32 0, i32 1
  %169 = getelementptr inbounds [262144 x i8], ptr %168, i64 0, i64 0
  store ptr %169, ptr %7, align 8, !tbaa !5
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.mu_Container, ptr %170, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !37
  %173 = getelementptr inbounds i8, ptr %172, i64 16
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.mu_JumpCommand, ptr %174, i32 0, i32 1
  store ptr %173, ptr %175, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %193

176:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %177 = load ptr, ptr %2, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.mu_Context, ptr %177, i32 0, i32 18
  %179 = getelementptr inbounds %struct.anon.0, ptr %178, i32 0, i32 1
  %180 = load i32, ptr %3, align 4, !tbaa !35
  %181 = sub nsw i32 %180, 1
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [32 x ptr], ptr %179, i64 0, i64 %182
  %184 = load ptr, ptr %183, align 8, !tbaa !5
  store ptr %184, ptr %8, align 8, !tbaa !5
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.mu_Container, ptr %185, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8, !tbaa !37
  %188 = getelementptr inbounds i8, ptr %187, i64 16
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.mu_Container, ptr %189, i32 0, i32 1
  %191 = load ptr, ptr %190, align 8, !tbaa !38
  %192 = getelementptr inbounds %struct.mu_JumpCommand, ptr %191, i32 0, i32 1
  store ptr %188, ptr %192, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %193

193:                                              ; preds = %176, %165
  %194 = load i32, ptr %3, align 4, !tbaa !35
  %195 = load i32, ptr %4, align 4, !tbaa !35
  %196 = sub nsw i32 %195, 1
  %197 = icmp eq i32 %194, %196
  br i1 %197, label %198, label %213

198:                                              ; preds = %193
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.mu_Context, ptr %199, i32 0, i32 17
  %201 = getelementptr inbounds %struct.anon, ptr %200, i32 0, i32 1
  %202 = getelementptr inbounds [262144 x i8], ptr %201, i64 0, i64 0
  %203 = load ptr, ptr %2, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.mu_Context, ptr %203, i32 0, i32 17
  %205 = getelementptr inbounds %struct.anon, ptr %204, i32 0, i32 0
  %206 = load i32, ptr %205, align 4, !tbaa !39
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds i8, ptr %202, i64 %207
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.mu_Container, ptr %209, i32 0, i32 1
  %211 = load ptr, ptr %210, align 8, !tbaa !38
  %212 = getelementptr inbounds %struct.mu_JumpCommand, ptr %211, i32 0, i32 1
  store ptr %208, ptr %212, align 8, !tbaa !33
  br label %213

213:                                              ; preds = %198, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %214

214:                                              ; preds = %213
  %215 = load i32, ptr %3, align 4, !tbaa !35
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %3, align 4, !tbaa !35
  br label %151, !llvm.loop !40

217:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void
}

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

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

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

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #5

; Function Attrs: nounwind uwtable
declare hidden i32 @compare_zindex(ptr noundef, ptr noundef) #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { noreturn 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 #6 = { nounwind }
attributes #7 = { noreturn 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, !13, i64 262736}
!10 = !{!"mu_Context", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !6, i64 120, !13, i64 128, !13, i64 132, !13, i64 136, !14, i64 140, !13, i64 156, !13, i64 160, !13, i64 164, !6, i64 168, !6, i64 176, !6, i64 184, !7, i64 192, !13, i64 320, !15, i64 324, !16, i64 262472, !16, i64 262736, !15, i64 263000, !15, i64 263516, !15, i64 263648, !7, i64 265892, !7, i64 266280, !7, i64 269736, !12, i64 270120, !12, i64 270128, !12, i64 270136, !12, i64 270144, !13, i64 270152, !13, i64 270156, !13, i64 270160, !13, i64 270164, !7, i64 270168}
!11 = !{!"", !6, i64 0, !12, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !7, i64 40}
!12 = !{!"", !13, i64 0, !13, i64 4}
!13 = !{!"int", !7, i64 0}
!14 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!15 = !{!"", !13, i64 0, !7, i64 4}
!16 = !{!"", !13, i64 0, !7, i64 8}
!17 = !{!10, !13, i64 263000}
!18 = !{!10, !13, i64 263516}
!19 = !{!10, !13, i64 263648}
!20 = !{!10, !6, i64 184}
!21 = !{!10, !13, i64 270144}
!22 = !{!23, !13, i64 56}
!23 = !{!"", !6, i64 0, !6, i64 8, !14, i64 16, !14, i64 32, !12, i64 48, !12, i64 56, !13, i64 64, !13, i64 68}
!24 = !{!10, !13, i64 270148}
!25 = !{!23, !13, i64 60}
!26 = !{!10, !13, i64 160}
!27 = !{!10, !13, i64 132}
!28 = !{!10, !13, i64 270156}
!29 = !{!10, !6, i64 176}
!30 = !{!23, !13, i64 64}
!31 = !{!10, !13, i64 156}
!32 = !{!10, !13, i64 270164}
!33 = !{!7, !7, i64 0}
!34 = !{i64 0, i64 4, !35, i64 4, i64 4, !35}
!35 = !{!13, !13, i64 0}
!36 = !{!10, !13, i64 262472}
!37 = !{!23, !6, i64 0}
!38 = !{!23, !6, i64 8}
!39 = !{!10, !13, i64 324}
!40 = distinct !{!40, !41}
!41 = !{!"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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @mu_end(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 262736
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %4 = icmp eq i32 %3, 0
  br i1 %4, label %8, label %5

5:                                                ; preds = %1
  %6 = load ptr, ptr @stderr, align 8, !tbaa !16
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 159, ptr noundef nonnull @.str.3) #4
  tail call void @abort() #5
  unreachable

8:                                                ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 263000
  %10 = load i32, ptr %9, align 8, !tbaa !17
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %15, label %12

12:                                               ; preds = %8
  %13 = load ptr, ptr @stderr, align 8, !tbaa !16
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 160, ptr noundef nonnull @.str.4) #4
  tail call void @abort() #5
  unreachable

15:                                               ; preds = %8
  %16 = getelementptr inbounds i8, ptr %0, i64 263516
  %17 = load i32, ptr %16, align 4, !tbaa !18
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %22, label %19

19:                                               ; preds = %15
  %20 = load ptr, ptr @stderr, align 8, !tbaa !16
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 161, ptr noundef nonnull @.str.5) #4
  tail call void @abort() #5
  unreachable

22:                                               ; preds = %15
  %23 = getelementptr inbounds i8, ptr %0, i64 263648
  %24 = load i32, ptr %23, align 8, !tbaa !19
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %29, label %26

26:                                               ; preds = %22
  %27 = load ptr, ptr @stderr, align 8, !tbaa !16
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 162, ptr noundef nonnull @.str.6) #4
  tail call void @abort() #5
  unreachable

29:                                               ; preds = %22
  %30 = getelementptr inbounds i8, ptr %0, i64 184
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  %.not = icmp eq ptr %31, null
  br i1 %.not, label %38, label %32

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %0, i64 270144
  %34 = getelementptr inbounds i8, ptr %31, i64 56
  %35 = load <2 x i32>, ptr %33, align 8, !tbaa !21
  %36 = load <2 x i32>, ptr %34, align 8, !tbaa !21
  %37 = add nsw <2 x i32> %36, %35
  store <2 x i32> %37, ptr %34, align 8, !tbaa !21
  br label %38

38:                                               ; preds = %32, %29
  %39 = getelementptr inbounds i8, ptr %0, i64 160
  %40 = load i32, ptr %39, align 8, !tbaa !22
  %.not49 = icmp eq i32 %40, 0
  br i1 %.not49, label %41, label %43

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %0, i64 132
  store i32 0, ptr %42, align 4, !tbaa !23
  br label %43

43:                                               ; preds = %41, %38
  store i32 0, ptr %39, align 8, !tbaa !22
  %44 = getelementptr inbounds i8, ptr %0, i64 270156
  %45 = load i32, ptr %44, align 4, !tbaa !24
  %.not50 = icmp eq i32 %45, 0
  br i1 %.not50, label %57, label %46

46:                                               ; preds = %43
  %47 = getelementptr inbounds i8, ptr %0, i64 176
  %48 = load ptr, ptr %47, align 8, !tbaa !25
  %.not51 = icmp eq ptr %48, null
  br i1 %.not51, label %57, label %49

49:                                               ; preds = %46
  %50 = getelementptr inbounds i8, ptr %48, i64 64
  %51 = load i32, ptr %50, align 8, !tbaa !26
  %52 = getelementptr inbounds i8, ptr %0, i64 156
  %53 = load i32, ptr %52, align 4, !tbaa !28
  %54 = icmp slt i32 %51, %53
  %55 = icmp sgt i32 %51, -1
  %or.cond = and i1 %55, %54
  br i1 %or.cond, label %56, label %57

56:                                               ; preds = %49
  tail call void @mu_bring_to_front(ptr noundef nonnull %0, ptr noundef nonnull %48)
  br label %57

57:                                               ; preds = %56, %49, %46, %43
  %58 = getelementptr inbounds i8, ptr %0, i64 270164
  store i32 0, ptr %58, align 4, !tbaa !29
  %59 = getelementptr inbounds i8, ptr %0, i64 270168
  store i8 0, ptr %59, align 8, !tbaa !30
  store i32 0, ptr %44, align 4, !tbaa !24
  %60 = getelementptr inbounds i8, ptr %0, i64 270144
  %61 = tail call i64 @mu_vec2(i32 noundef 0, i32 noundef 0)
  store i64 %61, ptr %60, align 8
  %62 = getelementptr inbounds i8, ptr %0, i64 270128
  %63 = getelementptr inbounds i8, ptr %0, i64 270120
  %64 = load i64, ptr %63, align 8
  store i64 %64, ptr %62, align 8
  %65 = getelementptr inbounds i8, ptr %0, i64 262472
  %66 = load i32, ptr %65, align 8, !tbaa !31
  %67 = getelementptr inbounds i8, ptr %0, i64 262480
  %68 = sext i32 %66 to i64
  tail call void @qsort(ptr noundef nonnull %67, i64 noundef %68, i64 noundef 8, ptr noundef nonnull @compare_zindex) #6
  %69 = icmp sgt i32 %66, 0
  br i1 %69, label %70, label %._crit_edge

70:                                               ; preds = %57
  %71 = add nsw i32 %66, -1
  %72 = getelementptr inbounds i8, ptr %0, i64 324
  %73 = getelementptr inbounds i8, ptr %0, i64 328
  %74 = zext nneg i32 %71 to i64
  %75 = load ptr, ptr %67, align 8, !tbaa !16
  %76 = getelementptr inbounds i8, ptr %0, i64 336
  %77 = load ptr, ptr %75, align 8, !tbaa !32
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  store ptr %78, ptr %76, align 8, !tbaa !30
  %79 = icmp eq i32 %71, 0
  br i1 %79, label %.thread, label %.peel.next.preheader

.peel.next.preheader:                             ; preds = %70
  %wide.trip.count = zext nneg i32 %66 to i64
  %80 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %80, 1
  %81 = icmp eq i32 %66, 2
  br i1 %81, label %._crit_edge.loopexit.unr-lcssa, label %.peel.next.preheader.new

.peel.next.preheader.new:                         ; preds = %.peel.next.preheader
  %unroll_iter = and i64 %80, -2
  br label %.peel.next

.thread:                                          ; preds = %70
  %82 = load i32, ptr %72, align 4, !tbaa !33
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i8, ptr %73, i64 %83
  %85 = getelementptr inbounds i8, ptr %75, i64 8
  %86 = load ptr, ptr %85, align 8, !tbaa !34
  %87 = getelementptr inbounds i8, ptr %86, i64 8
  store ptr %84, ptr %87, align 8, !tbaa !30
  br label %._crit_edge

.peel.next:                                       ; preds = %123, %.peel.next.preheader.new
  %indvars.iv = phi i64 [ 1, %.peel.next.preheader.new ], [ %indvars.iv.next.1, %123 ]
  %niter = phi i64 [ 0, %.peel.next.preheader.new ], [ %niter.next.1, %123 ]
  %88 = getelementptr inbounds [32 x ptr], ptr %67, i64 0, i64 %indvars.iv
  %89 = load ptr, ptr %88, align 8, !tbaa !16
  %90 = add nsw i64 %indvars.iv, -1
  %91 = getelementptr inbounds [32 x ptr], ptr %67, i64 0, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !16
  %93 = load ptr, ptr %89, align 8, !tbaa !32
  %94 = getelementptr inbounds i8, ptr %93, i64 16
  %95 = getelementptr inbounds i8, ptr %92, i64 8
  %96 = load ptr, ptr %95, align 8, !tbaa !34
  %97 = getelementptr inbounds i8, ptr %96, i64 8
  store ptr %94, ptr %97, align 8, !tbaa !30
  %98 = icmp eq i64 %indvars.iv, %74
  br i1 %98, label %99, label %.peel.next.1

99:                                               ; preds = %.peel.next
  %100 = load i32, ptr %72, align 4, !tbaa !33
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i8, ptr %73, i64 %101
  %103 = getelementptr inbounds i8, ptr %89, i64 8
  %104 = load ptr, ptr %103, align 8, !tbaa !34
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  store ptr %102, ptr %105, align 8, !tbaa !30
  br label %.peel.next.1

.peel.next.1:                                     ; preds = %99, %.peel.next
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %106 = getelementptr inbounds [32 x ptr], ptr %67, i64 0, i64 %indvars.iv.next
  %107 = load ptr, ptr %106, align 8, !tbaa !16
  %108 = getelementptr inbounds [32 x ptr], ptr %67, i64 0, i64 %indvars.iv
  %109 = load ptr, ptr %108, align 8, !tbaa !16
  %110 = load ptr, ptr %107, align 8, !tbaa !32
  %111 = getelementptr inbounds i8, ptr %110, i64 16
  %112 = getelementptr inbounds i8, ptr %109, i64 8
  %113 = load ptr, ptr %112, align 8, !tbaa !34
  %114 = getelementptr inbounds i8, ptr %113, i64 8
  store ptr %111, ptr %114, align 8, !tbaa !30
  %115 = icmp eq i64 %indvars.iv.next, %74
  br i1 %115, label %116, label %123

116:                                              ; preds = %.peel.next.1
  %117 = load i32, ptr %72, align 4, !tbaa !33
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i8, ptr %73, i64 %118
  %120 = getelementptr inbounds i8, ptr %107, i64 8
  %121 = load ptr, ptr %120, align 8, !tbaa !34
  %122 = getelementptr inbounds i8, ptr %121, i64 8
  store ptr %119, ptr %122, align 8, !tbaa !30
  br label %123

123:                                              ; preds = %116, %.peel.next.1
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.peel.next, !llvm.loop !35

._crit_edge.loopexit.unr-lcssa:                   ; preds = %123, %.peel.next.preheader
  %indvars.iv.unr = phi i64 [ 1, %.peel.next.preheader ], [ %indvars.iv.next.1, %123 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.peel.next.epil

.peel.next.epil:                                  ; preds = %._crit_edge.loopexit.unr-lcssa
  %124 = getelementptr inbounds [32 x ptr], ptr %67, i64 0, i64 %indvars.iv.unr
  %125 = load ptr, ptr %124, align 8, !tbaa !16
  %126 = add nsw i64 %indvars.iv.unr, -1
  %127 = getelementptr inbounds [32 x ptr], ptr %67, i64 0, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !16
  %129 = load ptr, ptr %125, align 8, !tbaa !32
  %130 = getelementptr inbounds i8, ptr %129, i64 16
  %131 = getelementptr inbounds i8, ptr %128, i64 8
  %132 = load ptr, ptr %131, align 8, !tbaa !34
  %133 = getelementptr inbounds i8, ptr %132, i64 8
  store ptr %130, ptr %133, align 8, !tbaa !30
  %134 = icmp eq i64 %indvars.iv.unr, %74
  br i1 %134, label %135, label %._crit_edge

135:                                              ; preds = %.peel.next.epil
  %136 = load i32, ptr %72, align 4, !tbaa !33
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i8, ptr %73, i64 %137
  %139 = getelementptr inbounds i8, ptr %125, i64 8
  %140 = load ptr, ptr %139, align 8, !tbaa !34
  %141 = getelementptr inbounds i8, ptr %140, i64 8
  store ptr %138, ptr %141, align 8, !tbaa !30
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %135, %.peel.next.epil, %.thread, %57
  ret void
}

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

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i32 @compare_zindex(ptr noundef, ptr noundef) #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 = { 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 #2 = { noreturn 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 = { nofree "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 = { cold nounwind }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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, !12, i64 262736}
!6 = !{!"mu_Context", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 120, !12, i64 128, !12, i64 132, !12, i64 136, !13, i64 140, !12, i64 156, !12, i64 160, !12, i64 164, !7, i64 168, !7, i64 176, !7, i64 184, !8, i64 192, !12, i64 320, !14, i64 324, !15, i64 262472, !15, i64 262736, !14, i64 263000, !14, i64 263516, !14, i64 263648, !8, i64 265892, !8, i64 266280, !8, i64 269736, !11, i64 270120, !11, i64 270128, !11, i64 270136, !11, i64 270144, !12, i64 270152, !12, i64 270156, !12, i64 270160, !12, i64 270164, !8, i64 270168}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !7, i64 0, !11, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !8, i64 40}
!11 = !{!"", !12, i64 0, !12, i64 4}
!12 = !{!"int", !8, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!14 = !{!"", !12, i64 0, !8, i64 4}
!15 = !{!"", !12, i64 0, !8, i64 8}
!16 = !{!7, !7, i64 0}
!17 = !{!6, !12, i64 263000}
!18 = !{!6, !12, i64 263516}
!19 = !{!6, !12, i64 263648}
!20 = !{!6, !7, i64 184}
!21 = !{!12, !12, i64 0}
!22 = !{!6, !12, i64 160}
!23 = !{!6, !12, i64 132}
!24 = !{!6, !12, i64 270156}
!25 = !{!6, !7, i64 176}
!26 = !{!27, !12, i64 64}
!27 = !{!"", !7, i64 0, !7, i64 8, !13, i64 16, !13, i64 32, !11, i64 48, !11, i64 56, !12, i64 64, !12, i64 68}
!28 = !{!6, !12, i64 156}
!29 = !{!6, !12, i64 270164}
!30 = !{!8, !8, i64 0}
!31 = !{!6, !12, i64 262472}
!32 = !{!27, !7, i64 0}
!33 = !{!6, !12, i64 324}
!34 = !{!27, !7, i64 8}
!35 = distinct !{!35, !36, !37}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!"llvm.loop.peeled.count", i32 1}


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