; LLVM IR from aap/librw :: src/gl/wdgl.ll (ZN2rw4wdgl14skinInstanceCBEPNS_8GeometryEij)

; 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.rw::Geometry" = type { %"struct.rw::Object", i32, i16, i32, i32, i32, i32, ptr, ptr, [8 x ptr], ptr, %"struct.rw::MaterialList", ptr, ptr, i32 }
%"struct.rw::Object" = type { i8, i8, i8, i8, ptr }
%"struct.rw::MaterialList" = type { ptr, i32, i32 }
%"struct.rw::wdgl::InstanceDataHeader" = type { %"struct.rw::InstanceDataHeader", i32, ptr, i32, ptr, i32, i32 }
%"struct.rw::InstanceDataHeader" = type { i32 }
%"struct.rw::wdgl::AttribDesc" = type { i32, i32, i32, i32, i32, i32 }
%"struct.rw::Skin" = type { i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }

@.str.12 = external hidden unnamed_addr constant [75 x i8], align 1

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

; 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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN2rw4wdgl14skinInstanceCBEPNS_8GeometryEij(ptr noundef %0, i32 noundef %1, i32 noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.rw::Geometry", ptr %17, i32 0, i32 13
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  store ptr %19, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.rw::wdgl::InstanceDataHeader", ptr %20, i32 0, i32 2
  %22 = load ptr, ptr %21, align 8, !tbaa !16
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %22, i64 %24
  store ptr %25, ptr %9, align 8, !tbaa !5
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %26, i32 0, i32 0
  store i32 4, ptr %27, align 4, !tbaa !19
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %28, i32 0, i32 1
  store i32 2, ptr %29, align 4, !tbaa !21
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %30, i32 0, i32 2
  store i32 1, ptr %31, align 4, !tbaa !22
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %32, i32 0, i32 3
  store i32 4, ptr %33, align 4, !tbaa !23
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %35, i32 0, i32 5
  store i32 %34, ptr %36, align 4, !tbaa !24
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = add i32 %37, 4
  store i32 %38, ptr %7, align 4, !tbaa !9
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %39, i32 1
  store ptr %40, ptr %9, align 8, !tbaa !5
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %41, i32 0, i32 0
  store i32 5, ptr %42, align 4, !tbaa !19
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %43, i32 0, i32 1
  store i32 2, ptr %44, align 4, !tbaa !21
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %45, i32 0, i32 2
  store i32 0, ptr %46, align 4, !tbaa !22
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %47, i32 0, i32 3
  store i32 4, ptr %48, align 4, !tbaa !23
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %50, i32 0, i32 5
  store i32 %49, ptr %51, align 4, !tbaa !24
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = add i32 %52, 4
  store i32 %53, ptr %7, align 4, !tbaa !9
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.rw::Geometry", ptr %55, i32 0, i32 4
  %57 = load i32, ptr %56, align 4, !tbaa !25
  %58 = mul i32 %54, %57
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.rw::wdgl::InstanceDataHeader", ptr %59, i32 0, i32 3
  store i32 %58, ptr %60, align 8, !tbaa !26
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.rw::wdgl::InstanceDataHeader", ptr %61, i32 0, i32 3
  %63 = load i32, ptr %62, align 8, !tbaa !26
  %64 = zext i32 %63 to i64
  %65 = mul i64 %64, 1
  %66 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %65, i32 noundef 196623, ptr noundef @.str.12)
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.rw::wdgl::InstanceDataHeader", ptr %67, i32 0, i32 4
  store ptr %66, ptr %68, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = call noundef ptr @_ZN2rw4Skin3getEPKNS_8GeometryE(ptr noundef %69)
  store ptr %70, ptr %10, align 8, !tbaa !5
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = icmp eq ptr %71, null
  br i1 %72, label %73, label %74

73:                                               ; preds = %3
  store i32 8, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %150

74:                                               ; preds = %3
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.rw::wdgl::InstanceDataHeader", ptr %75, i32 0, i32 2
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %77, i64 %79
  store ptr %80, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.rw::wdgl::InstanceDataHeader", ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !27
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %84, i64 0
  %86 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %85, i32 0, i32 5
  %87 = load i32, ptr %86, align 4, !tbaa !24
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %83, i64 %88
  store ptr %89, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.rw::wdgl::InstanceDataHeader", ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !27
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %93, i64 1
  %95 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %94, i32 0, i32 5
  %96 = load i32, ptr %95, align 4, !tbaa !24
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds i8, ptr %92, i64 %97
  store ptr %98, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.rw::Skin", ptr %99, i32 0, i32 5
  %101 = load ptr, ptr %100, align 8, !tbaa !28
  store ptr %101, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.rw::Skin", ptr %102, i32 0, i32 6
  %104 = load ptr, ptr %103, align 8, !tbaa !30
  store ptr %104, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %146, %74
  %106 = load i32, ptr %16, align 4, !tbaa !9
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.rw::Geometry", ptr %107, i32 0, i32 4
  %109 = load i32, ptr %108, align 4, !tbaa !25
  %110 = icmp slt i32 %106, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %105
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %149

112:                                              ; preds = %105
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  %114 = load ptr, ptr %15, align 8, !tbaa !5
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN2rw4wdgl10packattribEPhPfPNS0_10AttribDescEf(ptr noundef %113, ptr noundef %114, ptr noundef %115, float noundef 1.000000e+00)
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = getelementptr inbounds float, ptr %116, i64 4
  store ptr %117, ptr %15, align 8, !tbaa !5
  %118 = load i32, ptr %7, align 4, !tbaa !9
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = zext i32 %118 to i64
  %121 = getelementptr inbounds i8, ptr %119, i64 %120
  store ptr %121, ptr %12, align 8, !tbaa !5
  %122 = load ptr, ptr %14, align 8, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %122, i32 1
  store ptr %123, ptr %14, align 8, !tbaa !5
  %124 = load i8, ptr %122, align 1, !tbaa !31
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = getelementptr inbounds i8, ptr %125, i64 0
  store i8 %124, ptr %126, align 1, !tbaa !31
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = getelementptr inbounds i8, ptr %127, i32 1
  store ptr %128, ptr %14, align 8, !tbaa !5
  %129 = load i8, ptr %127, align 1, !tbaa !31
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %130, i64 1
  store i8 %129, ptr %131, align 1, !tbaa !31
  %132 = load ptr, ptr %14, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i32 1
  store ptr %133, ptr %14, align 8, !tbaa !5
  %134 = load i8, ptr %132, align 1, !tbaa !31
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  %136 = getelementptr inbounds i8, ptr %135, i64 2
  store i8 %134, ptr %136, align 1, !tbaa !31
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  %138 = getelementptr inbounds i8, ptr %137, i32 1
  store ptr %138, ptr %14, align 8, !tbaa !5
  %139 = load i8, ptr %137, align 1, !tbaa !31
  %140 = load ptr, ptr %13, align 8, !tbaa !5
  %141 = getelementptr inbounds i8, ptr %140, i64 3
  store i8 %139, ptr %141, align 1, !tbaa !31
  %142 = load i32, ptr %7, align 4, !tbaa !9
  %143 = load ptr, ptr %13, align 8, !tbaa !5
  %144 = zext i32 %142 to i64
  %145 = getelementptr inbounds i8, ptr %143, i64 %144
  store ptr %145, ptr %13, align 8, !tbaa !5
  br label %146

146:                                              ; preds = %112
  %147 = load i32, ptr %16, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %16, align 4, !tbaa !9
  br label %105, !llvm.loop !32

149:                                              ; preds = %111
  store i32 8, ptr %4, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %150

150:                                              ; preds = %149, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %151 = load i32, ptr %4, align 4
  ret i32 %151
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw4Skin3getEPKNS_8GeometryE(ptr noundef) #0 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 152}
!12 = !{!"_ZTSN2rw8GeometryE", !13, i64 0, !10, i64 16, !14, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48, !7, i64 56, !6, i64 120, !15, i64 128, !6, i64 144, !6, i64 152, !10, i64 160}
!13 = !{!"_ZTSN2rw6ObjectE", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !6, i64 8}
!14 = !{!"short", !7, i64 0}
!15 = !{!"_ZTSN2rw12MaterialListE", !6, i64 0, !10, i64 8, !10, i64 12}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ZTSN2rw4wdgl18InstanceDataHeaderE", !18, i64 0, !10, i64 4, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !10, i64 36}
!18 = !{!"_ZTSN2rw18InstanceDataHeaderE", !10, i64 0}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTSN2rw4wdgl10AttribDescE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!21 = !{!20, !10, i64 4}
!22 = !{!20, !10, i64 8}
!23 = !{!20, !10, i64 12}
!24 = !{!20, !10, i64 20}
!25 = !{!12, !10, i64 28}
!26 = !{!17, !10, i64 16}
!27 = !{!17, !6, i64 24}
!28 = !{!29, !6, i64 32}
!29 = !{!"_ZTSN2rw4SkinE", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !10, i64 104}
!30 = !{!29, !6, i64 40}
!31 = !{!7, !7, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"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"

%"struct.rw::wdgl::AttribDesc" = type { i32, i32, i32, i32, i32, i32 }

@.str.12 = external hidden unnamed_addr constant [75 x i8], align 1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN2rw4wdgl14skinInstanceCBEPNS_8GeometryEij(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 152
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !14
  %8 = sext i32 %1 to i64
  %9 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %7, i64 %8
  store <4 x i32> <i32 4, i32 2, i32 1, i32 4>, ptr %9, align 4, !tbaa !17
  %10 = getelementptr inbounds i8, ptr %9, i64 20
  store i32 %2, ptr %10, align 4, !tbaa !18
  %11 = add i32 %2, 4
  %12 = getelementptr inbounds i8, ptr %9, i64 24
  store <4 x i32> <i32 5, i32 2, i32 0, i32 4>, ptr %12, align 4, !tbaa !17
  %13 = getelementptr inbounds i8, ptr %9, i64 44
  store i32 %11, ptr %13, align 4, !tbaa !18
  %14 = add i32 %2, 8
  %15 = getelementptr inbounds i8, ptr %0, i64 28
  %16 = load i32, ptr %15, align 4, !tbaa !20
  %17 = mul i32 %16, %14
  %18 = getelementptr inbounds i8, ptr %5, i64 16
  store i32 %17, ptr %18, align 8, !tbaa !21
  %19 = zext i32 %17 to i64
  %20 = tail call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %19, i32 noundef 196623, ptr noundef nonnull @.str.12)
  %21 = getelementptr inbounds i8, ptr %5, i64 24
  store ptr %20, ptr %21, align 8, !tbaa !22
  %22 = tail call noundef ptr @_ZN2rw4Skin3getEPKNS_8GeometryE(ptr noundef %0)
  %23 = icmp eq ptr %22, null
  br i1 %23, label %.loopexit, label %24

24:                                               ; preds = %3
  %25 = load ptr, ptr %6, align 8, !tbaa !14
  %26 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %25, i64 %8
  %27 = load i32, ptr %15, align 4, !tbaa !20
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %24
  %29 = getelementptr inbounds i8, ptr %22, i64 40
  %30 = load ptr, ptr %29, align 8, !tbaa !23
  %31 = getelementptr inbounds i8, ptr %22, i64 32
  %32 = load ptr, ptr %31, align 8, !tbaa !25
  %33 = load ptr, ptr %21, align 8, !tbaa !22
  %34 = getelementptr inbounds i8, ptr %26, i64 44
  %35 = load i32, ptr %34, align 4, !tbaa !18
  %36 = zext i32 %35 to i64
  %37 = getelementptr inbounds i8, ptr %33, i64 %36
  %38 = getelementptr inbounds i8, ptr %26, i64 20
  %39 = load i32, ptr %38, align 4, !tbaa !18
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds i8, ptr %33, i64 %40
  %42 = zext i32 %14 to i64
  br label %43

43:                                               ; preds = %.lr.ph, %43
  %.062 = phi i32 [ 0, %.lr.ph ], [ %58, %43 ]
  %.05261 = phi ptr [ %30, %.lr.ph ], [ %44, %43 ]
  %.05360 = phi ptr [ %32, %.lr.ph ], [ %54, %43 ]
  %.05459 = phi ptr [ %37, %.lr.ph ], [ %57, %43 ]
  %.05558 = phi ptr [ %41, %.lr.ph ], [ %45, %43 ]
  tail call void @_ZN2rw4wdgl10packattribEPhPfPNS0_10AttribDescEf(ptr noundef %.05558, ptr noundef %.05261, ptr noundef %26, float noundef 1.000000e+00)
  %44 = getelementptr inbounds i8, ptr %.05261, i64 16
  %45 = getelementptr inbounds i8, ptr %.05558, i64 %42
  %46 = getelementptr inbounds i8, ptr %.05360, i64 1
  %47 = load i8, ptr %.05360, align 1, !tbaa !26
  store i8 %47, ptr %.05459, align 1, !tbaa !26
  %48 = getelementptr inbounds i8, ptr %.05360, i64 2
  %49 = load i8, ptr %46, align 1, !tbaa !26
  %50 = getelementptr inbounds i8, ptr %.05459, i64 1
  store i8 %49, ptr %50, align 1, !tbaa !26
  %51 = getelementptr inbounds i8, ptr %.05360, i64 3
  %52 = load i8, ptr %48, align 1, !tbaa !26
  %53 = getelementptr inbounds i8, ptr %.05459, i64 2
  store i8 %52, ptr %53, align 1, !tbaa !26
  %54 = getelementptr inbounds i8, ptr %.05360, i64 4
  %55 = load i8, ptr %51, align 1, !tbaa !26
  %56 = getelementptr inbounds i8, ptr %.05459, i64 3
  store i8 %55, ptr %56, align 1, !tbaa !26
  %57 = getelementptr inbounds i8, ptr %.05459, i64 %42
  %58 = add nuw nsw i32 %.062, 1
  %59 = load i32, ptr %15, align 4, !tbaa !20
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %43, label %.loopexit, !llvm.loop !27

.loopexit:                                        ; preds = %43, %24, %3
  ret i32 8
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw4Skin3getEPKNS_8GeometryE(ptr noundef) local_unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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, !10, i64 152}
!6 = !{!"_ZTSN2rw8GeometryE", !7, i64 0, !11, i64 16, !12, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !10, i64 40, !10, i64 48, !8, i64 56, !10, i64 120, !13, i64 128, !10, i64 144, !10, i64 152, !11, i64 160}
!7 = !{!"_ZTSN2rw6ObjectE", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !10, i64 8}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!"_ZTSN2rw12MaterialListE", !10, i64 0, !11, i64 8, !11, i64 12}
!14 = !{!15, !10, i64 8}
!15 = !{!"_ZTSN2rw4wdgl18InstanceDataHeaderE", !16, i64 0, !11, i64 4, !10, i64 8, !11, i64 16, !10, i64 24, !11, i64 32, !11, i64 36}
!16 = !{!"_ZTSN2rw18InstanceDataHeaderE", !11, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !11, i64 20}
!19 = !{!"_ZTSN2rw4wdgl10AttribDescE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!20 = !{!6, !11, i64 28}
!21 = !{!15, !11, i64 16}
!22 = !{!15, !10, i64 24}
!23 = !{!24, !10, i64 40}
!24 = !{!"_ZTSN2rw4SkinE", !11, i64 0, !11, i64 4, !11, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !11, i64 104}
!25 = !{!24, !10, i64 32}
!26 = !{!8, !8, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass