; LLVM IR from Simple-XX/SimpleKernel :: src/drv/dtb/dtb.ll (ZN3DTB13fill_resourceEP10resource_tPKNS_6node_tEPKNS_6prop_tE)

; 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.resource_t = type <{ i8, [7 x i8], ptr, %struct.anon, i8, [7 x i8] }>
%struct.anon = type { i64, i64 }
%"struct.DTB::node_t" = type { %"struct.DTB::path_t", ptr, ptr, ptr, i32, i32, i32, i32, i8, [16 x %"struct.DTB::prop_t"], i64 }
%"struct.DTB::path_t" = type { [16 x ptr], i64 }
%"struct.DTB::prop_t" = type { ptr, i64, i64 }

@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: nounwind
declare i32 @strcmp(ptr noundef, ptr noundef) #1

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

declare i32 @err(ptr noundef, ...) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL9__bswap32j(i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3DTB13fill_resourceEP10resource_tPKNS_6node_tEPKNS_6prop_tE(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #4 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, 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 ptr %3, ptr %8, align 8, !tbaa !5
  %10 = load ptr, ptr %5, align 8
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.resource_t, ptr %11, i32 0, i32 2
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %65

15:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !13
  br label %16

16:                                               ; preds = %61, %15
  %17 = load i64, ptr %9, align 8, !tbaa !13
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.DTB::node_t", ptr %18, i32 0, i32 10
  %20 = load i64, ptr %19, align 8, !tbaa !14
  %21 = icmp ult i64 %17, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %64

23:                                               ; preds = %16
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.DTB::node_t", ptr %24, i32 0, i32 9
  %26 = load i64, ptr %9, align 8, !tbaa !13
  %27 = getelementptr inbounds [16 x %"struct.DTB::prop_t"], ptr %25, i64 0, i64 %26
  %28 = getelementptr inbounds %"struct.DTB::prop_t", ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !18
  %30 = call i32 @strcmp(ptr noundef %29, ptr noundef @.str.9) #5
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %42

32:                                               ; preds = %23
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.DTB::node_t", ptr %33, i32 0, i32 9
  %35 = load i64, ptr %9, align 8, !tbaa !13
  %36 = getelementptr inbounds [16 x %"struct.DTB::prop_t"], ptr %34, i64 0, i64 %35
  %37 = getelementptr inbounds %"struct.DTB::prop_t", ptr %36, i32 0, i32 1
  %38 = load i64, ptr %37, align 8, !tbaa !20
  %39 = inttoptr i64 %38 to ptr
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.resource_t, ptr %40, i32 0, i32 2
  store ptr %39, ptr %41, align 8, !tbaa !9
  br label %42

42:                                               ; preds = %32, %23
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.resource_t, ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %60

47:                                               ; preds = %42
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.DTB::node_t", ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds %"struct.DTB::path_t", ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.DTB::node_t", ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %"struct.DTB::path_t", ptr %52, i32 0, i32 1
  %54 = load i64, ptr %53, align 8, !tbaa !21
  %55 = sub i64 %54, 1
  %56 = getelementptr inbounds [16 x ptr], ptr %50, i64 0, i64 %55
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.resource_t, ptr %58, i32 0, i32 2
  store ptr %57, ptr %59, align 8, !tbaa !9
  br label %60

60:                                               ; preds = %47, %42
  br label %61

61:                                               ; preds = %60
  %62 = load i64, ptr %9, align 8, !tbaa !13
  %63 = add i64 %62, 1
  store i64 %63, ptr %9, align 8, !tbaa !13
  br label %16, !llvm.loop !22

64:                                               ; preds = %22
  br label %65

65:                                               ; preds = %64, %4
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.resource_t, ptr %66, i32 0, i32 0
  %68 = load i8, ptr %67, align 8, !tbaa !24
  %69 = zext i8 %68 to i32
  %70 = and i32 %69, 1
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %178

72:                                               ; preds = %65
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.resource_t, ptr %73, i32 0, i32 3
  %75 = getelementptr inbounds %struct.anon, ptr %74, i32 0, i32 1
  %76 = load i64, ptr %75, align 8, !tbaa !25
  %77 = icmp eq i64 %76, 0
  br i1 %77, label %78, label %178

78:                                               ; preds = %72
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.DTB::node_t", ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !26
  %82 = getelementptr inbounds %"struct.DTB::node_t", ptr %81, i32 0, i32 4
  %83 = load i32, ptr %82, align 8, !tbaa !27
  %84 = icmp eq i32 %83, 1
  br i1 %84, label %85, label %118

85:                                               ; preds = %78
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.DTB::node_t", ptr %86, i32 0, i32 2
  %88 = load ptr, ptr %87, align 8, !tbaa !26
  %89 = getelementptr inbounds %"struct.DTB::node_t", ptr %88, i32 0, i32 5
  %90 = load i32, ptr %89, align 4, !tbaa !28
  %91 = icmp eq i32 %90, 1
  br i1 %91, label %92, label %93

92:                                               ; preds = %85
  br label %95

93:                                               ; preds = %85
  %94 = call i32 (ptr, ...) @err(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 147, ptr noundef @.str.10)
  br label %95

95:                                               ; preds = %93, %92
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.DTB::prop_t", ptr %96, i32 0, i32 1
  %98 = load i64, ptr %97, align 8, !tbaa !20
  %99 = inttoptr i64 %98 to ptr
  %100 = getelementptr inbounds i32, ptr %99, i64 0
  %101 = load i32, ptr %100, align 4, !tbaa !29
  %102 = call noundef i32 @_ZL9__bswap32j(i32 noundef %101)
  %103 = zext i32 %102 to i64
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.resource_t, ptr %104, i32 0, i32 3
  %106 = getelementptr inbounds %struct.anon, ptr %105, i32 0, i32 0
  store i64 %103, ptr %106, align 8, !tbaa !30
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.DTB::prop_t", ptr %107, i32 0, i32 1
  %109 = load i64, ptr %108, align 8, !tbaa !20
  %110 = inttoptr i64 %109 to ptr
  %111 = getelementptr inbounds i32, ptr %110, i64 1
  %112 = load i32, ptr %111, align 4, !tbaa !29
  %113 = call noundef i32 @_ZL9__bswap32j(i32 noundef %112)
  %114 = zext i32 %113 to i64
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.resource_t, ptr %115, i32 0, i32 3
  %117 = getelementptr inbounds %struct.anon, ptr %116, i32 0, i32 1
  store i64 %114, ptr %117, align 8, !tbaa !25
  br label %177

118:                                              ; preds = %78
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.DTB::node_t", ptr %119, i32 0, i32 2
  %121 = load ptr, ptr %120, align 8, !tbaa !26
  %122 = getelementptr inbounds %"struct.DTB::node_t", ptr %121, i32 0, i32 4
  %123 = load i32, ptr %122, align 8, !tbaa !27
  %124 = icmp eq i32 %123, 2
  br i1 %124, label %125, label %174

125:                                              ; preds = %118
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.DTB::node_t", ptr %126, i32 0, i32 2
  %128 = load ptr, ptr %127, align 8, !tbaa !26
  %129 = getelementptr inbounds %"struct.DTB::node_t", ptr %128, i32 0, i32 5
  %130 = load i32, ptr %129, align 4, !tbaa !28
  %131 = icmp eq i32 %130, 2
  br i1 %131, label %132, label %133

132:                                              ; preds = %125
  br label %135

133:                                              ; preds = %125
  %134 = call i32 (ptr, ...) @err(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 152, ptr noundef @.str.11)
  br label %135

135:                                              ; preds = %133, %132
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.DTB::prop_t", ptr %136, i32 0, i32 1
  %138 = load i64, ptr %137, align 8, !tbaa !20
  %139 = inttoptr i64 %138 to ptr
  %140 = getelementptr inbounds i32, ptr %139, i64 0
  %141 = load i32, ptr %140, align 4, !tbaa !29
  %142 = call noundef i32 @_ZL9__bswap32j(i32 noundef %141)
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.DTB::prop_t", ptr %143, i32 0, i32 1
  %145 = load i64, ptr %144, align 8, !tbaa !20
  %146 = inttoptr i64 %145 to ptr
  %147 = getelementptr inbounds i32, ptr %146, i64 1
  %148 = load i32, ptr %147, align 4, !tbaa !29
  %149 = call noundef i32 @_ZL9__bswap32j(i32 noundef %148)
  %150 = add i32 %142, %149
  %151 = zext i32 %150 to i64
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.resource_t, ptr %152, i32 0, i32 3
  %154 = getelementptr inbounds %struct.anon, ptr %153, i32 0, i32 0
  store i64 %151, ptr %154, align 8, !tbaa !30
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  %156 = getelementptr inbounds %"struct.DTB::prop_t", ptr %155, i32 0, i32 1
  %157 = load i64, ptr %156, align 8, !tbaa !20
  %158 = inttoptr i64 %157 to ptr
  %159 = getelementptr inbounds i32, ptr %158, i64 2
  %160 = load i32, ptr %159, align 4, !tbaa !29
  %161 = call noundef i32 @_ZL9__bswap32j(i32 noundef %160)
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.DTB::prop_t", ptr %162, i32 0, i32 1
  %164 = load i64, ptr %163, align 8, !tbaa !20
  %165 = inttoptr i64 %164 to ptr
  %166 = getelementptr inbounds i32, ptr %165, i64 3
  %167 = load i32, ptr %166, align 4, !tbaa !29
  %168 = call noundef i32 @_ZL9__bswap32j(i32 noundef %167)
  %169 = add i32 %161, %168
  %170 = zext i32 %169 to i64
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.resource_t, ptr %171, i32 0, i32 3
  %173 = getelementptr inbounds %struct.anon, ptr %172, i32 0, i32 1
  store i64 %170, ptr %173, align 8, !tbaa !25
  br label %176

174:                                              ; preds = %118
  %175 = call i32 (ptr, ...) @err(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 159, ptr noundef @.str.12)
  br label %176

176:                                              ; preds = %174, %135
  br label %177

177:                                              ; preds = %176, %95
  br label %197

178:                                              ; preds = %72, %65
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.resource_t, ptr %179, i32 0, i32 0
  %181 = load i8, ptr %180, align 8, !tbaa !24
  %182 = zext i8 %181 to i32
  %183 = and i32 %182, 2
  %184 = icmp ne i32 %183, 0
  br i1 %184, label %185, label %196

185:                                              ; preds = %178
  %186 = load ptr, ptr %8, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.DTB::prop_t", ptr %186, i32 0, i32 1
  %188 = load i64, ptr %187, align 8, !tbaa !20
  %189 = inttoptr i64 %188 to ptr
  %190 = getelementptr inbounds i32, ptr %189, i64 0
  %191 = load i32, ptr %190, align 4, !tbaa !29
  %192 = call noundef i32 @_ZL9__bswap32j(i32 noundef %191)
  %193 = trunc i32 %192 to i8
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.resource_t, ptr %194, i32 0, i32 4
  store i8 %193, ptr %195, align 8, !tbaa !31
  br label %196

196:                                              ; preds = %185, %178
  br label %197

197:                                              ; preds = %196, %177
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 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 #4 = { 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 #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, !6, i64 8}
!10 = !{!"_ZTS10resource_t", !7, i64 0, !6, i64 8, !11, i64 16, !7, i64 32}
!11 = !{!"_ZTSN10resource_tUt0_E", !12, i64 0, !12, i64 8}
!12 = !{!"long", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !12, i64 568}
!15 = !{!"_ZTSN3DTB6node_tE", !16, i64 0, !6, i64 136, !6, i64 144, !6, i64 152, !17, i64 160, !17, i64 164, !17, i64 168, !17, i64 172, !7, i64 176, !7, i64 184, !12, i64 568}
!16 = !{!"_ZTSN3DTB6path_tE", !7, i64 0, !12, i64 128}
!17 = !{!"int", !7, i64 0}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSN3DTB6prop_tE", !6, i64 0, !12, i64 8, !12, i64 16}
!20 = !{!19, !12, i64 8}
!21 = !{!15, !12, i64 128}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!10, !7, i64 0}
!25 = !{!10, !12, i64 24}
!26 = !{!15, !6, i64 144}
!27 = !{!15, !17, i64 160}
!28 = !{!15, !17, i64 164}
!29 = !{!17, !17, i64 0}
!30 = !{!10, !12, i64 16}
!31 = !{!10, !7, i64 32}


; 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.DTB::prop_t" = type { ptr, i64, i64 }

@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #0

declare i32 @err(ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL9__bswap32j(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3DTB13fill_resourceEP10resource_tPKNS_6node_tEPKNS_6prop_tE(ptr nocapture noundef nonnull readnone align 1 dereferenceable(1) %0, ptr nocapture noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3) local_unnamed_addr #3 align 2 {
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = icmp eq ptr %6, null
  br i1 %7, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %4
  %8 = getelementptr inbounds i8, ptr %2, i64 568
  %9 = load i64, ptr %8, align 8, !tbaa !12
  %.not35 = icmp eq i64 %9, 0
  br i1 %.not35, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %10 = getelementptr inbounds i8, ptr %2, i64 184
  %11 = getelementptr inbounds i8, ptr %2, i64 128
  br label %12

12:                                               ; preds = %.lr.ph, %27
  %.pr = phi ptr [ null, %.lr.ph ], [ %.pr38, %27 ]
  %.034 = phi i64 [ 0, %.lr.ph ], [ %28, %27 ]
  %13 = getelementptr inbounds [16 x %"struct.DTB::prop_t"], ptr %10, i64 0, i64 %.034
  %14 = load ptr, ptr %13, align 8, !tbaa !16
  %15 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %14, ptr noundef nonnull dereferenceable(1) @.str.9) #4
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %thread-pre-split

17:                                               ; preds = %12
  %18 = getelementptr inbounds i8, ptr %13, i64 8
  %19 = load i64, ptr %18, align 8, !tbaa !18
  %20 = inttoptr i64 %19 to ptr
  store ptr %20, ptr %5, align 8, !tbaa !5
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %12, %17
  %.pr36 = phi ptr [ %20, %17 ], [ %.pr, %12 ]
  %21 = icmp eq ptr %.pr36, null
  br i1 %21, label %22, label %27

22:                                               ; preds = %thread-pre-split
  %23 = load i64, ptr %11, align 8, !tbaa !19
  %24 = add i64 %23, -1
  %25 = getelementptr inbounds [16 x ptr], ptr %2, i64 0, i64 %24
  %26 = load ptr, ptr %25, align 8, !tbaa !20
  store ptr %26, ptr %5, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %thread-pre-split, %22
  %.pr38 = phi ptr [ %.pr36, %thread-pre-split ], [ %26, %22 ]
  %28 = add nuw i64 %.034, 1
  %exitcond.not = icmp eq i64 %28, %9
  br i1 %exitcond.not, label %.loopexit, label %12, !llvm.loop !21

.loopexit:                                        ; preds = %27, %.preheader, %4
  %29 = load i8, ptr %1, align 8, !tbaa !23
  %30 = and i8 %29, 1
  %.not = icmp eq i8 %30, 0
  br i1 %.not, label %93, label %31

31:                                               ; preds = %.loopexit
  %32 = getelementptr inbounds i8, ptr %1, i64 16
  %33 = getelementptr inbounds i8, ptr %1, i64 24
  %34 = load i64, ptr %33, align 8, !tbaa !24
  %35 = icmp eq i64 %34, 0
  br i1 %35, label %36, label %93

36:                                               ; preds = %31
  %37 = getelementptr inbounds i8, ptr %2, i64 144
  %38 = load ptr, ptr %37, align 8, !tbaa !25
  %39 = getelementptr inbounds i8, ptr %38, i64 160
  %40 = load i32, ptr %39, align 8, !tbaa !26
  switch i32 %40, label %91 [
    i32 1, label %41
    i32 2, label %60
  ]

41:                                               ; preds = %36
  %42 = getelementptr inbounds i8, ptr %38, i64 164
  %43 = load i32, ptr %42, align 4, !tbaa !27
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %47, label %45

45:                                               ; preds = %41
  %46 = tail call i32 (ptr, ...) @err(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 147, ptr noundef nonnull @.str.10)
  br label %47

47:                                               ; preds = %41, %45
  %48 = getelementptr inbounds i8, ptr %3, i64 8
  %49 = load i64, ptr %48, align 8, !tbaa !18
  %50 = inttoptr i64 %49 to ptr
  %51 = load i32, ptr %50, align 4, !tbaa !28
  %52 = tail call noundef i32 @_ZL9__bswap32j(i32 noundef %51)
  %53 = zext i32 %52 to i64
  store i64 %53, ptr %32, align 8, !tbaa !29
  %54 = load i64, ptr %48, align 8, !tbaa !18
  %55 = inttoptr i64 %54 to ptr
  %56 = getelementptr inbounds i8, ptr %55, i64 4
  %57 = load i32, ptr %56, align 4, !tbaa !28
  %58 = tail call noundef i32 @_ZL9__bswap32j(i32 noundef %57)
  %59 = zext i32 %58 to i64
  store i64 %59, ptr %33, align 8, !tbaa !24
  br label %103

60:                                               ; preds = %36
  %61 = getelementptr inbounds i8, ptr %38, i64 164
  %62 = load i32, ptr %61, align 4, !tbaa !27
  %63 = icmp eq i32 %62, 2
  br i1 %63, label %66, label %64

64:                                               ; preds = %60
  %65 = tail call i32 (ptr, ...) @err(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 152, ptr noundef nonnull @.str.11)
  br label %66

66:                                               ; preds = %60, %64
  %67 = getelementptr inbounds i8, ptr %3, i64 8
  %68 = load i64, ptr %67, align 8, !tbaa !18
  %69 = inttoptr i64 %68 to ptr
  %70 = load i32, ptr %69, align 4, !tbaa !28
  %71 = tail call noundef i32 @_ZL9__bswap32j(i32 noundef %70)
  %72 = load i64, ptr %67, align 8, !tbaa !18
  %73 = inttoptr i64 %72 to ptr
  %74 = getelementptr inbounds i8, ptr %73, i64 4
  %75 = load i32, ptr %74, align 4, !tbaa !28
  %76 = tail call noundef i32 @_ZL9__bswap32j(i32 noundef %75)
  %77 = add i32 %76, %71
  %78 = zext i32 %77 to i64
  store i64 %78, ptr %32, align 8, !tbaa !29
  %79 = load i64, ptr %67, align 8, !tbaa !18
  %80 = inttoptr i64 %79 to ptr
  %81 = getelementptr inbounds i8, ptr %80, i64 8
  %82 = load i32, ptr %81, align 4, !tbaa !28
  %83 = tail call noundef i32 @_ZL9__bswap32j(i32 noundef %82)
  %84 = load i64, ptr %67, align 8, !tbaa !18
  %85 = inttoptr i64 %84 to ptr
  %86 = getelementptr inbounds i8, ptr %85, i64 12
  %87 = load i32, ptr %86, align 4, !tbaa !28
  %88 = tail call noundef i32 @_ZL9__bswap32j(i32 noundef %87)
  %89 = add i32 %88, %83
  %90 = zext i32 %89 to i64
  store i64 %90, ptr %33, align 8, !tbaa !24
  br label %103

91:                                               ; preds = %36
  %92 = tail call i32 (ptr, ...) @err(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 159, ptr noundef nonnull @.str.12)
  br label %103

93:                                               ; preds = %31, %.loopexit
  %94 = and i8 %29, 2
  %.not33 = icmp eq i8 %94, 0
  br i1 %.not33, label %103, label %95

95:                                               ; preds = %93
  %96 = getelementptr inbounds i8, ptr %3, i64 8
  %97 = load i64, ptr %96, align 8, !tbaa !18
  %98 = inttoptr i64 %97 to ptr
  %99 = load i32, ptr %98, align 4, !tbaa !28
  %100 = tail call noundef i32 @_ZL9__bswap32j(i32 noundef %99)
  %101 = trunc i32 %100 to i8
  %102 = getelementptr inbounds i8, ptr %1, i64 32
  store i8 %101, ptr %102, align 8, !tbaa !30
  br label %103

103:                                              ; preds = %93, %95, %47, %91, %66
  ret void
}

attributes #0 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { "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 = { inlinehint mustprogress 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 #3 = { 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 }

!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, !9, i64 8}
!6 = !{!"_ZTS10resource_t", !7, i64 0, !9, i64 8, !10, i64 16, !7, i64 32}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"_ZTSN10resource_tUt0_E", !11, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !11, i64 568}
!13 = !{!"_ZTSN3DTB6node_tE", !14, i64 0, !9, i64 136, !9, i64 144, !9, i64 152, !15, i64 160, !15, i64 164, !15, i64 168, !15, i64 172, !7, i64 176, !7, i64 184, !11, i64 568}
!14 = !{!"_ZTSN3DTB6path_tE", !7, i64 0, !11, i64 128}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !9, i64 0}
!17 = !{!"_ZTSN3DTB6prop_tE", !9, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!17, !11, i64 8}
!19 = !{!13, !11, i64 128}
!20 = !{!9, !9, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!6, !7, i64 0}
!24 = !{!6, !11, i64 24}
!25 = !{!13, !9, i64 144}
!26 = !{!13, !15, i64 160}
!27 = !{!13, !15, i64 164}
!28 = !{!15, !15, i64 0}
!29 = !{!6, !11, i64 16}
!30 = !{!6, !7, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass