; LLVM IR from xing1357/SimpleOS :: src (kernel)

; 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.KERNEL_MEMORY_MAP = type { %struct.anon, %struct.anon.0, %struct.anon.1 }
%struct.anon = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.anon.0 = type { i32 }
%struct.anon.1 = type { i32, i32, i32 }
%struct.MULTIBOOT_INFO = type { i32, i32, i32, i32, i32, i32, i32, %union.anon, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i64, i32, i32, i32, i8, i8 }
%union.anon = type { %struct.AOUT_SYMBOL_TABLE }
%struct.AOUT_SYMBOL_TABLE = type { i32, i32, i32, i32 }
%struct.MULTIBOOT_MEMORY_MAP = type { i32, i32, i32, i32, i32, i32 }

@__kernel_section_start = external global i8, align 1
@__kernel_section_end = external global i8, align 1
@__kernel_text_section_start = external global i8, align 1
@__kernel_text_section_end = external global i8, align 1
@__kernel_data_section_start = external global i8, align 1
@__kernel_data_section_end = external global i8, align 1
@__kernel_rodata_section_start = external global i8, align 1
@__kernel_rodata_section_end = external global i8, align 1
@__kernel_bss_section_start = external global i8, align 1
@__kernel_bss_section_end = external global i8, align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @get_kernel_memory_map(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  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 4, ptr %6) #2
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %2
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %137

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %13, i32 0, i32 0
  %15 = getelementptr inbounds %struct.anon, ptr %14, i32 0, i32 0
  store i32 ptrtoint (ptr @__kernel_section_start to i32), ptr %15, align 4, !tbaa !9
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %16, i32 0, i32 0
  %18 = getelementptr inbounds %struct.anon, ptr %17, i32 0, i32 1
  store i32 ptrtoint (ptr @__kernel_section_end to i32), ptr %18, align 4, !tbaa !15
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds %struct.anon, ptr %20, i32 0, i32 2
  store i32 sub (i32 ptrtoint (ptr @__kernel_section_end to i32), i32 ptrtoint (ptr @__kernel_section_start to i32)), ptr %21, align 4, !tbaa !16
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %22, i32 0, i32 0
  %24 = getelementptr inbounds %struct.anon, ptr %23, i32 0, i32 3
  store i32 ptrtoint (ptr @__kernel_text_section_start to i32), ptr %24, align 4, !tbaa !17
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %25, i32 0, i32 0
  %27 = getelementptr inbounds %struct.anon, ptr %26, i32 0, i32 4
  store i32 ptrtoint (ptr @__kernel_text_section_end to i32), ptr %27, align 4, !tbaa !18
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %28, i32 0, i32 0
  %30 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 5
  store i32 sub (i32 ptrtoint (ptr @__kernel_text_section_end to i32), i32 ptrtoint (ptr @__kernel_text_section_start to i32)), ptr %30, align 4, !tbaa !19
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %31, i32 0, i32 0
  %33 = getelementptr inbounds %struct.anon, ptr %32, i32 0, i32 6
  store i32 ptrtoint (ptr @__kernel_data_section_start to i32), ptr %33, align 4, !tbaa !20
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds %struct.anon, ptr %35, i32 0, i32 7
  store i32 ptrtoint (ptr @__kernel_data_section_end to i32), ptr %36, align 4, !tbaa !21
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds %struct.anon, ptr %38, i32 0, i32 8
  store i32 sub (i32 ptrtoint (ptr @__kernel_data_section_end to i32), i32 ptrtoint (ptr @__kernel_data_section_start to i32)), ptr %39, align 4, !tbaa !22
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds %struct.anon, ptr %41, i32 0, i32 9
  store i32 ptrtoint (ptr @__kernel_rodata_section_start to i32), ptr %42, align 4, !tbaa !23
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds %struct.anon, ptr %44, i32 0, i32 10
  store i32 ptrtoint (ptr @__kernel_rodata_section_end to i32), ptr %45, align 4, !tbaa !24
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds %struct.anon, ptr %47, i32 0, i32 11
  store i32 sub (i32 ptrtoint (ptr @__kernel_rodata_section_end to i32), i32 ptrtoint (ptr @__kernel_rodata_section_start to i32)), ptr %48, align 4, !tbaa !25
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds %struct.anon, ptr %50, i32 0, i32 12
  store i32 ptrtoint (ptr @__kernel_bss_section_start to i32), ptr %51, align 4, !tbaa !26
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %52, i32 0, i32 0
  %54 = getelementptr inbounds %struct.anon, ptr %53, i32 0, i32 13
  store i32 ptrtoint (ptr @__kernel_bss_section_end to i32), ptr %54, align 4, !tbaa !27
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds %struct.anon, ptr %56, i32 0, i32 14
  store i32 sub (i32 ptrtoint (ptr @__kernel_bss_section_end to i32), i32 ptrtoint (ptr @__kernel_bss_section_start to i32)), ptr %57, align 4, !tbaa !28
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.MULTIBOOT_INFO, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 4, !tbaa !29
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.MULTIBOOT_INFO, ptr %61, i32 0, i32 2
  %63 = load i32, ptr %62, align 8, !tbaa !33
  %64 = add i32 %60, %63
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %65, i32 0, i32 1
  %67 = getelementptr inbounds %struct.anon.0, ptr %66, i32 0, i32 0
  store i32 %64, ptr %67, align 4, !tbaa !34
  store i32 0, ptr %6, align 4, !tbaa !35
  br label %68

68:                                               ; preds = %131, %12
  %69 = load i32, ptr %6, align 4, !tbaa !35
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.MULTIBOOT_INFO, ptr %70, i32 0, i32 8
  %72 = load i32, ptr %71, align 4, !tbaa !36
  %73 = icmp ult i32 %69, %72
  br i1 %73, label %74, label %136

74:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.MULTIBOOT_INFO, ptr %75, i32 0, i32 9
  %77 = load i32, ptr %76, align 8, !tbaa !37
  %78 = load i32, ptr %6, align 4, !tbaa !35
  %79 = add i32 %77, %78
  %80 = zext i32 %79 to i64
  %81 = inttoptr i64 %80 to ptr
  store ptr %81, ptr %8, align 8, !tbaa !5
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.MULTIBOOT_MEMORY_MAP, ptr %82, i32 0, i32 5
  %84 = load i32, ptr %83, align 4, !tbaa !38
  %85 = icmp ne i32 %84, 1
  br i1 %85, label %86, label %87

86:                                               ; preds = %74
  store i32 4, ptr %7, align 4
  br label %128

87:                                               ; preds = %74
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.MULTIBOOT_MEMORY_MAP, ptr %88, i32 0, i32 1
  %90 = load i32, ptr %89, align 4, !tbaa !40
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds %struct.anon, ptr %92, i32 0, i32 3
  %94 = load i32, ptr %93, align 4, !tbaa !17
  %95 = icmp eq i32 %90, %94
  br i1 %95, label %96, label %127

96:                                               ; preds = %87
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %97, i32 0, i32 0
  %99 = getelementptr inbounds %struct.anon, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !15
  %101 = add i32 %100, 1048576
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %102, i32 0, i32 2
  %104 = getelementptr inbounds %struct.anon.1, ptr %103, i32 0, i32 0
  store i32 %101, ptr %104, align 4, !tbaa !41
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.MULTIBOOT_MEMORY_MAP, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 4, !tbaa !40
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.MULTIBOOT_MEMORY_MAP, ptr %108, i32 0, i32 3
  %110 = load i32, ptr %109, align 4, !tbaa !42
  %111 = add i32 %107, %110
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %112, i32 0, i32 2
  %114 = getelementptr inbounds %struct.anon.1, ptr %113, i32 0, i32 1
  store i32 %111, ptr %114, align 4, !tbaa !43
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %115, i32 0, i32 2
  %117 = getelementptr inbounds %struct.anon.1, ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !43
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %119, i32 0, i32 2
  %121 = getelementptr inbounds %struct.anon.1, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 4, !tbaa !41
  %123 = sub i32 %118, %122
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.KERNEL_MEMORY_MAP, ptr %124, i32 0, i32 2
  %126 = getelementptr inbounds %struct.anon.1, ptr %125, i32 0, i32 2
  store i32 %123, ptr %126, align 4, !tbaa !44
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %128

127:                                              ; preds = %87
  store i32 0, ptr %7, align 4
  br label %128

128:                                              ; preds = %127, %96, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  %129 = load i32, ptr %7, align 4
  switch i32 %129, label %137 [
    i32 0, label %130
    i32 4, label %131
  ]

130:                                              ; preds = %128
  br label %131

131:                                              ; preds = %130, %128
  %132 = load i32, ptr %6, align 4, !tbaa !35
  %133 = zext i32 %132 to i64
  %134 = add i64 %133, 24
  %135 = trunc i64 %134 to i32
  store i32 %135, ptr %6, align 4, !tbaa !35
  br label %68, !llvm.loop !45

136:                                              ; preds = %68
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %137

137:                                              ; preds = %136, %128, %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  %138 = load i32, ptr %3, align 4
  ret i32 %138
}

; 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 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 = { 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, !12, i64 0}
!10 = !{!"", !11, i64 0, !13, i64 60, !14, i64 64}
!11 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56}
!12 = !{!"int", !7, i64 0}
!13 = !{!"", !12, i64 0}
!14 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8}
!15 = !{!10, !12, i64 4}
!16 = !{!10, !12, i64 8}
!17 = !{!10, !12, i64 12}
!18 = !{!10, !12, i64 16}
!19 = !{!10, !12, i64 20}
!20 = !{!10, !12, i64 24}
!21 = !{!10, !12, i64 28}
!22 = !{!10, !12, i64 32}
!23 = !{!10, !12, i64 36}
!24 = !{!10, !12, i64 40}
!25 = !{!10, !12, i64 44}
!26 = !{!10, !12, i64 48}
!27 = !{!10, !12, i64 52}
!28 = !{!10, !12, i64 56}
!29 = !{!30, !12, i64 4}
!30 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !7, i64 28, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !31, i64 80, !31, i64 82, !31, i64 84, !31, i64 86, !32, i64 88, !12, i64 96, !12, i64 100, !12, i64 104, !7, i64 108, !7, i64 109}
!31 = !{!"short", !7, i64 0}
!32 = !{!"long long", !7, i64 0}
!33 = !{!30, !12, i64 8}
!34 = !{!10, !12, i64 60}
!35 = !{!12, !12, i64 0}
!36 = !{!30, !12, i64 44}
!37 = !{!30, !12, i64 48}
!38 = !{!39, !12, i64 20}
!39 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!40 = !{!39, !12, i64 4}
!41 = !{!10, !12, i64 64}
!42 = !{!39, !12, i64 12}
!43 = !{!10, !12, i64 68}
!44 = !{!10, !12, i64 72}
!45 = distinct !{!45, !46}
!46 = !{!"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"

@__kernel_section_start = external global i8, align 1
@__kernel_section_end = external global i8, align 1
@__kernel_text_section_start = external global i8, align 1
@__kernel_text_section_end = external global i8, align 1
@__kernel_data_section_start = external global i8, align 1
@__kernel_data_section_end = external global i8, align 1
@__kernel_rodata_section_start = external global i8, align 1
@__kernel_rodata_section_end = external global i8, align 1
@__kernel_bss_section_start = external global i8, align 1
@__kernel_bss_section_end = external global i8, align 1

; Function Attrs: nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local noundef i32 @get_kernel_memory_map(ptr noundef writeonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %.loopexit, label %4

4:                                                ; preds = %2
  store i32 ptrtoint (ptr @__kernel_section_start to i32), ptr %0, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 ptrtoint (ptr @__kernel_section_end to i32), ptr %5, align 4, !tbaa !13
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 sub (i32 ptrtoint (ptr @__kernel_section_end to i32), i32 ptrtoint (ptr @__kernel_section_start to i32)), ptr %6, align 4, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 ptrtoint (ptr @__kernel_text_section_start to i32), ptr %7, align 4, !tbaa !15
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 ptrtoint (ptr @__kernel_text_section_end to i32), ptr %8, align 4, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 sub (i32 ptrtoint (ptr @__kernel_text_section_end to i32), i32 ptrtoint (ptr @__kernel_text_section_start to i32)), ptr %9, align 4, !tbaa !17
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 ptrtoint (ptr @__kernel_data_section_start to i32), ptr %10, align 4, !tbaa !18
  %11 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 ptrtoint (ptr @__kernel_data_section_end to i32), ptr %11, align 4, !tbaa !19
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 sub (i32 ptrtoint (ptr @__kernel_data_section_end to i32), i32 ptrtoint (ptr @__kernel_data_section_start to i32)), ptr %12, align 4, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 ptrtoint (ptr @__kernel_rodata_section_start to i32), ptr %13, align 4, !tbaa !21
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  store i32 ptrtoint (ptr @__kernel_rodata_section_end to i32), ptr %14, align 4, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %0, i64 44
  store i32 sub (i32 ptrtoint (ptr @__kernel_rodata_section_end to i32), i32 ptrtoint (ptr @__kernel_rodata_section_start to i32)), ptr %15, align 4, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 ptrtoint (ptr @__kernel_bss_section_start to i32), ptr %16, align 4, !tbaa !24
  %17 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 ptrtoint (ptr @__kernel_bss_section_end to i32), ptr %17, align 4, !tbaa !25
  %18 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 sub (i32 ptrtoint (ptr @__kernel_bss_section_end to i32), i32 ptrtoint (ptr @__kernel_bss_section_start to i32)), ptr %18, align 4, !tbaa !26
  %19 = getelementptr inbounds i8, ptr %1, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !27
  %21 = getelementptr inbounds i8, ptr %1, i64 8
  %22 = load i32, ptr %21, align 8, !tbaa !31
  %23 = add i32 %22, %20
  %24 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 %23, ptr %24, align 4, !tbaa !32
  %25 = getelementptr inbounds i8, ptr %1, i64 44
  %26 = load i32, ptr %25, align 4, !tbaa !33
  %.not42 = icmp eq i32 %26, 0
  br i1 %.not42, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %27 = getelementptr inbounds i8, ptr %1, i64 48
  %28 = load i32, ptr %27, align 8, !tbaa !34
  br label %29

29:                                               ; preds = %.lr.ph, %47
  %.03741 = phi i32 [ 0, %.lr.ph ], [ %48, %47 ]
  %30 = add i32 %28, %.03741
  %31 = zext i32 %30 to i64
  %32 = inttoptr i64 %31 to ptr
  %33 = getelementptr inbounds i8, ptr %32, i64 20
  %34 = load i32, ptr %33, align 4, !tbaa !35
  %.not = icmp eq i32 %34, 1
  br i1 %.not, label %35, label %47

35:                                               ; preds = %29
  %36 = getelementptr inbounds i8, ptr %32, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !37
  %38 = icmp eq i32 %37, ptrtoint (ptr @__kernel_text_section_start to i32)
  br i1 %38, label %39, label %47

39:                                               ; preds = %35
  %40 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 add (i32 ptrtoint (ptr @__kernel_section_end to i32), i32 1048576), ptr %40, align 4, !tbaa !38
  %41 = getelementptr inbounds i8, ptr %32, i64 12
  %42 = load i32, ptr %41, align 4, !tbaa !39
  %43 = add i32 %42, ptrtoint (ptr @__kernel_text_section_start to i32)
  %44 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %43, ptr %44, align 4, !tbaa !40
  %45 = sub i32 %43, add (i32 ptrtoint (ptr @__kernel_section_end to i32), i32 1048576)
  %46 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 %45, ptr %46, align 4, !tbaa !41
  br label %.loopexit

47:                                               ; preds = %29, %35
  %48 = add i32 %.03741, 24
  %49 = icmp ult i32 %48, %26
  br i1 %49, label %29, label %.loopexit, !llvm.loop !42

.loopexit:                                        ; preds = %47, %4, %39, %2
  %.2 = phi i32 [ 0, %39 ], [ -1, %2 ], [ -1, %4 ], [ -1, %47 ]
  ret i32 %.2
}

attributes #0 = { nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) 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" }

!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, !8, i64 0}
!6 = !{!"", !7, i64 0, !11, i64 60, !12, i64 64}
!7 = !{!"", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28, !8, i64 32, !8, i64 36, !8, i64 40, !8, i64 44, !8, i64 48, !8, i64 52, !8, i64 56}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"", !8, i64 0}
!12 = !{!"", !8, i64 0, !8, i64 4, !8, i64 8}
!13 = !{!6, !8, i64 4}
!14 = !{!6, !8, i64 8}
!15 = !{!6, !8, i64 12}
!16 = !{!6, !8, i64 16}
!17 = !{!6, !8, i64 20}
!18 = !{!6, !8, i64 24}
!19 = !{!6, !8, i64 28}
!20 = !{!6, !8, i64 32}
!21 = !{!6, !8, i64 36}
!22 = !{!6, !8, i64 40}
!23 = !{!6, !8, i64 44}
!24 = !{!6, !8, i64 48}
!25 = !{!6, !8, i64 52}
!26 = !{!6, !8, i64 56}
!27 = !{!28, !8, i64 4}
!28 = !{!"", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !9, i64 28, !8, i64 44, !8, i64 48, !8, i64 52, !8, i64 56, !8, i64 60, !8, i64 64, !8, i64 68, !8, i64 72, !8, i64 76, !29, i64 80, !29, i64 82, !29, i64 84, !29, i64 86, !30, i64 88, !8, i64 96, !8, i64 100, !8, i64 104, !9, i64 108, !9, i64 109}
!29 = !{!"short", !9, i64 0}
!30 = !{!"long long", !9, i64 0}
!31 = !{!28, !8, i64 8}
!32 = !{!6, !8, i64 60}
!33 = !{!28, !8, i64 44}
!34 = !{!28, !8, i64 48}
!35 = !{!36, !8, i64 20}
!36 = !{!"", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20}
!37 = !{!36, !8, i64 4}
!38 = !{!6, !8, i64 64}
!39 = !{!36, !8, i64 12}
!40 = !{!6, !8, i64 68}
!41 = !{!6, !8, i64 72}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}


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