; LLVM IR from facebookresearch/habitat-sim :: src/deps/basis-universal/encoder (basisu_gpu_texture)

; 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"

%"class.basisu::color_rgba" = type { %union.anon }
%union.anon = type { [4 x i8] }
%"class.basisu::pvrtc4_image" = type <{ i32, i32, %"class.basisu::vector2D", i32, i32, i8, [7 x i8] }>
%"class.basisu::vector2D" = type { i32, i32, %"class.basisu::vector.15" }
%"class.basisu::vector.15" = type { ptr, i32, i32 }
%"class.basisu::gpu_image" = type { i32, i32, i32, i32, i32, i32, i32, i32, %"class.basisu::vector.13" }
%"class.basisu::vector.13" = type { ptr, i32, i32 }

@_ZN6basisuL13g_black_colorE = external hidden global %"class.basisu::color_rgba", align 1
@.str.3 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._ZNK6basisu9gpu_image6unpackERNS_5imageE = external hidden unnamed_addr constant [46 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4)) unnamed_addr #1 align 2

; 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) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6basisu12unpack_blockENS_14texture_formatEPKvPNS_10color_rgbaE(i32 noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK6basisu9gpu_image6unpackERNS_5imageE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.basisu::pvrtc4_image", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [144 x %"class.basisu::color_rgba"], align 16
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = call noundef i32 @_ZNK6basisu9gpu_image15get_pixel_widthEv(ptr noundef nonnull align 8 dereferenceable(48) %16)
  %19 = call noundef i32 @_ZNK6basisu9gpu_image16get_pixel_heightEv(ptr noundef nonnull align 8 dereferenceable(48) %16)
  %20 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image6resizeEjjjRKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %18, i32 noundef %19, i32 noundef -1, ptr noundef nonnull align 1 dereferenceable(4) @_ZN6basisuL13g_black_colorE)
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image7set_allERKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 1 dereferenceable(4) @_ZN6basisuL13g_black_colorE)
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noundef i32 @_ZNK6basisu5image9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %23)
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %30

26:                                               ; preds = %2
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call noundef i32 @_ZNK6basisu5image10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %31, label %30

30:                                               ; preds = %26, %2
  store i1 true, ptr %3, align 1
  br label %150

31:                                               ; preds = %26
  %32 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !9
  %34 = icmp eq i32 %33, 11
  br i1 %34, label %39, label %35

35:                                               ; preds = %31
  %36 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !9
  %38 = icmp eq i32 %37, 12
  br i1 %38, label %39, label %68

39:                                               ; preds = %35, %31
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #6
  %40 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 1
  %41 = load i32, ptr %40, align 4, !tbaa !14
  %42 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 2
  %43 = load i32, ptr %42, align 8, !tbaa !15
  call void @_ZN6basisu12pvrtc4_imageC2Ejj(ptr noundef nonnull align 8 dereferenceable(41) %6, i32 noundef %41, i32 noundef %43)
  %44 = invoke noundef i32 @_ZNK6basisu9gpu_image16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(48) %16)
          to label %45 unwind label %50

45:                                               ; preds = %39
  %46 = invoke noundef i32 @_ZNK6basisu12pvrtc4_image16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(41) %6)
          to label %47 unwind label %50

47:                                               ; preds = %45
  %48 = icmp ne i32 %44, %46
  br i1 %48, label %49, label %54

49:                                               ; preds = %47
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %67

50:                                               ; preds = %64, %62, %60, %58, %56, %54, %45, %39
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %7, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %8, align 4
  call void @_ZN6basisu12pvrtc4_imageD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %6) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #6
  br label %152

54:                                               ; preds = %47
  %55 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu12pvrtc4_image10get_blocksEv(ptr noundef nonnull align 8 dereferenceable(41) %6)
          to label %56 unwind label %50

56:                                               ; preds = %54
  %57 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %55, i32 noundef 0)
          to label %58 unwind label %50

58:                                               ; preds = %56
  %59 = invoke noundef ptr @_ZNK6basisu9gpu_image7get_ptrEv(ptr noundef nonnull align 8 dereferenceable(48) %16)
          to label %60 unwind label %50

60:                                               ; preds = %58
  %61 = invoke noundef i32 @_ZNK6basisu9gpu_image17get_size_in_bytesEv(ptr noundef nonnull align 8 dereferenceable(48) %16)
          to label %62 unwind label %50

62:                                               ; preds = %60
  %63 = zext i32 %61 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 8 %59, i64 %63, i1 false)
  invoke void @_ZN6basisu12pvrtc4_image9deswizzleEv(ptr noundef nonnull align 8 dereferenceable(41) %6)
          to label %64 unwind label %50

64:                                               ; preds = %62
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK6basisu12pvrtc4_image17unpack_all_pixelsERNS_5imageE(ptr noundef nonnull align 8 dereferenceable(41) %6, ptr noundef nonnull align 8 dereferenceable(32) %65)
          to label %66 unwind label %50

66:                                               ; preds = %64
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %67

67:                                               ; preds = %66, %49
  call void @_ZN6basisu12pvrtc4_imageD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %6) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #6
  br label %150

68:                                               ; preds = %35
  %69 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 5
  %70 = load i32, ptr %69, align 4, !tbaa !16
  %71 = icmp ule i32 %70, 12
  br i1 %71, label %72, label %76

72:                                               ; preds = %68
  %73 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 6
  %74 = load i32, ptr %73, align 8, !tbaa !17
  %75 = icmp ule i32 %74, 12
  br label %76

76:                                               ; preds = %72, %68
  %77 = phi i1 [ false, %68 ], [ %75, %72 ]
  br i1 %77, label %78, label %79

78:                                               ; preds = %76
  br label %81

79:                                               ; preds = %76
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.3, i32 noundef 1227, ptr noundef @__PRETTY_FUNCTION__._ZNK6basisu9gpu_image6unpackERNS_5imageE) #7
  unreachable

80:                                               ; No predecessors!
  br label %81

81:                                               ; preds = %80, %78
  call void @llvm.lifetime.start.p0(i64 576, ptr %10) #6
  %82 = getelementptr inbounds [144 x %"class.basisu::color_rgba"], ptr %10, i32 0, i32 0
  %83 = getelementptr inbounds %"class.basisu::color_rgba", ptr %82, i64 144
  br label %84

84:                                               ; preds = %84, %81
  %85 = phi ptr [ %82, %81 ], [ %86, %84 ]
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %85)
  %86 = getelementptr inbounds %"class.basisu::color_rgba", ptr %85, i64 1
  %87 = icmp eq ptr %86, %83
  br i1 %87, label %88, label %84

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !18
  br label %89

89:                                               ; preds = %97, %88
  %90 = load i32, ptr %11, align 4, !tbaa !18
  %91 = icmp ult i32 %90, 144
  br i1 %91, label %93, label %92

92:                                               ; preds = %89
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %100

93:                                               ; preds = %89
  %94 = load i32, ptr %11, align 4, !tbaa !18
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds [144 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 %95
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %96, ptr align 1 @_ZN6basisuL13g_black_colorE, i64 4, i1 false), !tbaa.struct !19
  br label %97

97:                                               ; preds = %93
  %98 = load i32, ptr %11, align 4, !tbaa !18
  %99 = add i32 %98, 1
  store i32 %99, ptr %11, align 4, !tbaa !18
  br label %89, !llvm.loop !21

100:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  store i8 1, ptr %12, align 1, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !18
  br label %101

101:                                              ; preds = %144, %100
  %102 = load i32, ptr %13, align 4, !tbaa !18
  %103 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 4
  %104 = load i32, ptr %103, align 8, !tbaa !25
  %105 = icmp ult i32 %102, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %101
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %147

107:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !18
  br label %108

108:                                              ; preds = %140, %107
  %109 = load i32, ptr %14, align 4, !tbaa !18
  %110 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 3
  %111 = load i32, ptr %110, align 4, !tbaa !26
  %112 = icmp ult i32 %109, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %108
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %143

114:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %115 = load i32, ptr %14, align 4, !tbaa !18
  %116 = load i32, ptr %13, align 4, !tbaa !18
  %117 = call noundef ptr @_ZNK6basisu9gpu_image13get_block_ptrEjjj(ptr noundef nonnull align 8 dereferenceable(48) %16, i32 noundef %115, i32 noundef %116, i32 noundef 0)
  store ptr %117, ptr %15, align 8, !tbaa !5
  %118 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 0
  %119 = load i32, ptr %118, align 8, !tbaa !9
  %120 = load ptr, ptr %15, align 8, !tbaa !5
  %121 = getelementptr inbounds [144 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 0
  %122 = call noundef zeroext i1 @_ZN6basisu12unpack_blockENS_14texture_formatEPKvPNS_10color_rgbaE(i32 noundef %119, ptr noundef %120, ptr noundef %121)
  br i1 %122, label %124, label %123

123:                                              ; preds = %114
  store i8 0, ptr %12, align 1, !tbaa !23
  br label %124

124:                                              ; preds = %123, %114
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds [144 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 0
  %127 = load i32, ptr %14, align 4, !tbaa !18
  %128 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 5
  %129 = load i32, ptr %128, align 4, !tbaa !16
  %130 = mul i32 %127, %129
  %131 = load i32, ptr %13, align 4, !tbaa !18
  %132 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 6
  %133 = load i32, ptr %132, align 8, !tbaa !17
  %134 = mul i32 %131, %133
  %135 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 5
  %136 = load i32, ptr %135, align 4, !tbaa !16
  %137 = getelementptr inbounds %"class.basisu::gpu_image", ptr %16, i32 0, i32 6
  %138 = load i32, ptr %137, align 8, !tbaa !17
  %139 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image17set_block_clippedEPKNS_10color_rgbaEjjjj(ptr noundef nonnull align 8 dereferenceable(32) %125, ptr noundef %126, i32 noundef %130, i32 noundef %134, i32 noundef %136, i32 noundef %138)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %140

140:                                              ; preds = %124
  %141 = load i32, ptr %14, align 4, !tbaa !18
  %142 = add i32 %141, 1
  store i32 %142, ptr %14, align 4, !tbaa !18
  br label %108, !llvm.loop !27

143:                                              ; preds = %113
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %13, align 4, !tbaa !18
  %146 = add i32 %145, 1
  store i32 %146, ptr %13, align 4, !tbaa !18
  br label %101, !llvm.loop !28

147:                                              ; preds = %106
  %148 = load i8, ptr %12, align 1, !tbaa !23, !range !29, !noundef !30
  %149 = trunc i8 %148 to i1
  store i1 %149, ptr %3, align 1
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 576, ptr %10) #6
  br label %150

150:                                              ; preds = %147, %67, %30
  %151 = load i1, ptr %3, align 1
  ret i1 %151

152:                                              ; preds = %50
  %153 = load ptr, ptr %7, align 8
  %154 = load i32, ptr %8, align 4
  %155 = insertvalue { ptr, i32 } poison, ptr %153, 0
  %156 = insertvalue { ptr, i32 } %155, i32 %154, 1
  resume { ptr, i32 } %156
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image6resizeEjjjRKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 1 dereferenceable(4)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu9gpu_image15get_pixel_widthEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu9gpu_image16get_pixel_heightEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image7set_allERKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(4)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu5image9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu5image10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu12pvrtc4_imageC2Ejj(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef, i32 noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu9gpu_image16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu12pvrtc4_image16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(41)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu12pvrtc4_image10get_blocksEv(ptr noundef nonnull align 8 dereferenceable(41)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEixEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6basisu9gpu_image7get_ptrEv(ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6basisu9gpu_image17get_size_in_bytesEv(ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu12pvrtc4_image9deswizzleEv(ptr noundef nonnull align 8 dereferenceable(41)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6basisu12pvrtc4_image17unpack_all_pixelsERNS_5imageE(ptr noundef nonnull align 8 dereferenceable(41), ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu12pvrtc4_imageD2Ev(ptr noundef nonnull align 8 dereferenceable(41)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK6basisu9gpu_image13get_block_ptrEjjj(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef, i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image17set_block_clippedEPKNS_10color_rgbaEjjjj(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #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++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN6basisu9gpu_imageE", !11, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !13, i64 32}
!11 = !{!"_ZTSN6basisu14texture_formatE", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN6basisu6vectorImEE", !6, i64 0, !12, i64 8, !12, i64 12}
!14 = !{!10, !12, i64 4}
!15 = !{!10, !12, i64 8}
!16 = !{!10, !12, i64 20}
!17 = !{!10, !12, i64 24}
!18 = !{!12, !12, i64 0}
!19 = !{i64 0, i64 4, !20}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !24, i64 0}
!24 = !{!"bool", !7, i64 0}
!25 = !{!10, !12, i64 16}
!26 = !{!10, !12, i64 12}
!27 = distinct !{!27, !22}
!28 = distinct !{!28, !22}
!29 = !{i8 0, i8 2}
!30 = !{}


; 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"

%"class.basisu::color_rgba" = type { %union.anon }
%union.anon = type { [4 x i8] }
%"class.basisu::pvrtc4_image" = type <{ i32, i32, %"class.basisu::vector2D", i32, i32, i8, [7 x i8] }>
%"class.basisu::vector2D" = type { i32, i32, %"class.basisu::vector.15" }
%"class.basisu::vector.15" = type { ptr, i32, i32 }

@_ZN6basisuL13g_black_colorE = external hidden global %"class.basisu::color_rgba", align 1
@.str.3 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._ZNK6basisu9gpu_image6unpackERNS_5imageE = external hidden unnamed_addr constant [46 x i8], align 1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4)) unnamed_addr #1 align 2

; Function Attrs: mustprogress 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) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6basisu12unpack_blockENS_14texture_formatEPKvPNS_10color_rgbaE(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK6basisu9gpu_image6unpackERNS_5imageE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.basisu::pvrtc4_image", align 8
  %4 = alloca [144 x %"class.basisu::color_rgba"], align 16
  %5 = tail call noundef i32 @_ZNK6basisu9gpu_image15get_pixel_widthEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
  %6 = tail call noundef i32 @_ZNK6basisu9gpu_image16get_pixel_heightEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
  %7 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image6resizeEjjjRKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %5, i32 noundef %6, i32 noundef -1, ptr noundef nonnull align 1 dereferenceable(4) @_ZN6basisuL13g_black_colorE)
  %8 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image7set_allERKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 1 dereferenceable(4) @_ZN6basisuL13g_black_colorE)
  %9 = tail call noundef i32 @_ZNK6basisu5image9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %101, label %10

10:                                               ; preds = %2
  %11 = tail call noundef i32 @_ZNK6basisu5image10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.not28 = icmp eq i32 %11, 0
  br i1 %.not28, label %101, label %12

12:                                               ; preds = %10
  %13 = load i32, ptr %0, align 8, !tbaa !5
  %.off = add i32 %13, -11
  %switch = icmp ult i32 %.off, 2
  br i1 %switch, label %14, label %33

14:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #6
  %15 = getelementptr inbounds i8, ptr %0, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !13
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load i32, ptr %17, align 8, !tbaa !14
  call void @_ZN6basisu12pvrtc4_imageC2Ejj(ptr noundef nonnull align 8 dereferenceable(41) %3, i32 noundef %16, i32 noundef %18)
  %19 = call noundef i32 @_ZNK6basisu9gpu_image16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
  %20 = call noundef i32 @_ZNK6basisu12pvrtc4_image16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(41) %3)
  %.not30 = icmp eq i32 %19, %20
  br i1 %.not30, label %23, label %32

21:                                               ; preds = %31, %29, %27, %23
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6basisu12pvrtc4_imageD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  resume { ptr, i32 } %22

23:                                               ; preds = %14
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu12pvrtc4_image10get_blocksEv(ptr noundef nonnull align 8 dereferenceable(41) %3)
  %25 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %24, i32 noundef 0)
  %26 = invoke noundef ptr @_ZNK6basisu9gpu_image7get_ptrEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %27 unwind label %21

27:                                               ; preds = %23
  %28 = invoke noundef i32 @_ZNK6basisu9gpu_image17get_size_in_bytesEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %29 unwind label %21

29:                                               ; preds = %27
  %30 = zext i32 %28 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %25, ptr align 8 %26, i64 %30, i1 false)
  invoke void @_ZN6basisu12pvrtc4_image9deswizzleEv(ptr noundef nonnull align 8 dereferenceable(41) %3)
          to label %31 unwind label %21

31:                                               ; preds = %29
  invoke void @_ZNK6basisu12pvrtc4_image17unpack_all_pixelsERNS_5imageE(ptr noundef nonnull align 8 dereferenceable(41) %3, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %32 unwind label %21

32:                                               ; preds = %31, %14
  call void @_ZN6basisu12pvrtc4_imageD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  br label %101

33:                                               ; preds = %12
  %34 = getelementptr inbounds i8, ptr %0, i64 20
  %35 = load i32, ptr %34, align 4, !tbaa !15
  %36 = icmp ult i32 %35, 13
  br i1 %36, label %37, label %.critedge

37:                                               ; preds = %33
  %38 = getelementptr inbounds i8, ptr %0, i64 24
  %39 = load i32, ptr %38, align 8, !tbaa !16
  %40 = icmp ult i32 %39, 13
  br i1 %40, label %41, label %.critedge

.critedge:                                        ; preds = %33, %37
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, i32 noundef 1227, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK6basisu9gpu_image6unpackERNS_5imageE) #7
  unreachable

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 576, ptr nonnull %4) #6
  br label %42

42:                                               ; preds = %42, %41
  %.idx = phi i64 [ 0, %41 ], [ %.add, %42 ]
  %.ptr = getelementptr inbounds i8, ptr %4, i64 %.idx
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr)
  %.add = add nuw nsw i64 %.idx, 4
  %43 = icmp eq i64 %.add, 576
  br i1 %43, label %vector.ph, label %42

vector.ph:                                        ; preds = %42
  %44 = load i32, ptr @_ZN6basisuL13g_black_colorE, align 1, !tbaa !17
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %44, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %45 = getelementptr inbounds i8, ptr %4, i64 16
  store <4 x i32> %broadcast.splat, ptr %4, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %45, align 16, !tbaa !17
  %46 = getelementptr inbounds i8, ptr %4, i64 32
  %47 = getelementptr inbounds i8, ptr %4, i64 48
  store <4 x i32> %broadcast.splat, ptr %46, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %47, align 16, !tbaa !17
  %48 = getelementptr inbounds i8, ptr %4, i64 64
  %49 = getelementptr inbounds i8, ptr %4, i64 80
  store <4 x i32> %broadcast.splat, ptr %48, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %49, align 16, !tbaa !17
  %50 = getelementptr inbounds i8, ptr %4, i64 96
  %51 = getelementptr inbounds i8, ptr %4, i64 112
  store <4 x i32> %broadcast.splat, ptr %50, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %51, align 16, !tbaa !17
  %52 = getelementptr inbounds i8, ptr %4, i64 128
  %53 = getelementptr inbounds i8, ptr %4, i64 144
  store <4 x i32> %broadcast.splat, ptr %52, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %53, align 16, !tbaa !17
  %54 = getelementptr inbounds i8, ptr %4, i64 160
  %55 = getelementptr inbounds i8, ptr %4, i64 176
  store <4 x i32> %broadcast.splat, ptr %54, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %55, align 16, !tbaa !17
  %56 = getelementptr inbounds i8, ptr %4, i64 192
  %57 = getelementptr inbounds i8, ptr %4, i64 208
  store <4 x i32> %broadcast.splat, ptr %56, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %57, align 16, !tbaa !17
  %58 = getelementptr inbounds i8, ptr %4, i64 224
  %59 = getelementptr inbounds i8, ptr %4, i64 240
  store <4 x i32> %broadcast.splat, ptr %58, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %59, align 16, !tbaa !17
  %60 = getelementptr inbounds i8, ptr %4, i64 256
  %61 = getelementptr inbounds i8, ptr %4, i64 272
  store <4 x i32> %broadcast.splat, ptr %60, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %61, align 16, !tbaa !17
  %62 = getelementptr inbounds i8, ptr %4, i64 288
  %63 = getelementptr inbounds i8, ptr %4, i64 304
  store <4 x i32> %broadcast.splat, ptr %62, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %63, align 16, !tbaa !17
  %64 = getelementptr inbounds i8, ptr %4, i64 320
  %65 = getelementptr inbounds i8, ptr %4, i64 336
  store <4 x i32> %broadcast.splat, ptr %64, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %65, align 16, !tbaa !17
  %66 = getelementptr inbounds i8, ptr %4, i64 352
  %67 = getelementptr inbounds i8, ptr %4, i64 368
  store <4 x i32> %broadcast.splat, ptr %66, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %67, align 16, !tbaa !17
  %68 = getelementptr inbounds i8, ptr %4, i64 384
  %69 = getelementptr inbounds i8, ptr %4, i64 400
  store <4 x i32> %broadcast.splat, ptr %68, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %69, align 16, !tbaa !17
  %70 = getelementptr inbounds i8, ptr %4, i64 416
  %71 = getelementptr inbounds i8, ptr %4, i64 432
  store <4 x i32> %broadcast.splat, ptr %70, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %71, align 16, !tbaa !17
  %72 = getelementptr inbounds i8, ptr %4, i64 448
  %73 = getelementptr inbounds i8, ptr %4, i64 464
  store <4 x i32> %broadcast.splat, ptr %72, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %73, align 16, !tbaa !17
  %74 = getelementptr inbounds i8, ptr %4, i64 480
  %75 = getelementptr inbounds i8, ptr %4, i64 496
  store <4 x i32> %broadcast.splat, ptr %74, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %75, align 16, !tbaa !17
  %76 = getelementptr inbounds i8, ptr %4, i64 512
  %77 = getelementptr inbounds i8, ptr %4, i64 528
  store <4 x i32> %broadcast.splat, ptr %76, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %77, align 16, !tbaa !17
  %78 = getelementptr inbounds i8, ptr %4, i64 544
  %79 = getelementptr inbounds i8, ptr %4, i64 560
  store <4 x i32> %broadcast.splat, ptr %78, align 16, !tbaa !17
  store <4 x i32> %broadcast.splat, ptr %79, align 16, !tbaa !17
  %80 = getelementptr inbounds i8, ptr %0, i64 16
  %81 = load i32, ptr %80, align 8, !tbaa !18
  %.not40 = icmp eq i32 %81, 0
  br i1 %.not40, label %._crit_edge38, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %vector.ph
  %82 = getelementptr inbounds i8, ptr %0, i64 12
  %83 = load i32, ptr %82, align 4, !tbaa !19
  %.not41 = icmp eq i32 %83, 0
  br i1 %.not41, label %._crit_edge38, label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %84 = phi i32 [ %86, %._crit_edge ], [ %81, %.preheader.lr.ph ]
  %85 = phi i32 [ %87, %._crit_edge ], [ 1, %.preheader.lr.ph ]
  %.02337 = phi i32 [ %88, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.02436 = phi i1 [ %.125.lcssa, %._crit_edge ], [ true, %.preheader.lr.ph ]
  %.not42 = icmp eq i32 %85, 0
  br i1 %.not42, label %._crit_edge, label %.lr.ph

._crit_edge38:                                    ; preds = %._crit_edge, %.preheader.lr.ph, %vector.ph
  %.024.lcssa = phi i1 [ true, %vector.ph ], [ true, %.preheader.lr.ph ], [ %.125.lcssa, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 576, ptr nonnull %4) #6
  br label %101

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %80, align 8, !tbaa !18
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %86 = phi i32 [ %84, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %87 = phi i32 [ 0, %.preheader ], [ %99, %._crit_edge.loopexit ]
  %.125.lcssa = phi i1 [ %.02436, %.preheader ], [ %spec.select, %._crit_edge.loopexit ]
  %88 = add nuw i32 %.02337, 1
  %89 = icmp ult i32 %88, %86
  br i1 %89, label %.preheader, label %._crit_edge38, !llvm.loop !20

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.02235 = phi i32 [ %98, %.lr.ph ], [ 0, %.preheader ]
  %.12534 = phi i1 [ %spec.select, %.lr.ph ], [ %.02436, %.preheader ]
  %90 = call noundef ptr @_ZNK6basisu9gpu_image13get_block_ptrEjjj(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %.02235, i32 noundef %.02337, i32 noundef 0)
  %91 = load i32, ptr %0, align 8, !tbaa !5
  %92 = call noundef zeroext i1 @_ZN6basisu12unpack_blockENS_14texture_formatEPKvPNS_10color_rgbaE(i32 noundef %91, ptr noundef %90, ptr noundef nonnull %4)
  %spec.select = select i1 %92, i1 %.12534, i1 false
  %93 = load i32, ptr %34, align 4, !tbaa !15
  %94 = mul i32 %93, %.02235
  %95 = load i32, ptr %38, align 8, !tbaa !16
  %96 = mul i32 %95, %.02337
  %97 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image17set_block_clippedEPKNS_10color_rgbaEjjjj(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %4, i32 noundef %94, i32 noundef %96, i32 noundef %93, i32 noundef %95)
  %98 = add nuw i32 %.02235, 1
  %99 = load i32, ptr %82, align 4, !tbaa !19
  %100 = icmp ult i32 %98, %99
  br i1 %100, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !23

101:                                              ; preds = %2, %10, %._crit_edge38, %32
  %.1 = phi i1 [ %.not30, %32 ], [ %.024.lcssa, %._crit_edge38 ], [ true, %10 ], [ true, %2 ]
  ret i1 %.1
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image6resizeEjjjRKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu9gpu_image15get_pixel_widthEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu9gpu_image16get_pixel_heightEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image7set_allERKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu5image9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu5image10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu12pvrtc4_imageC2Ejj(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef, i32 noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu9gpu_image16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu12pvrtc4_image16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu12pvrtc4_image10get_blocksEv(ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEixEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6basisu9gpu_image7get_ptrEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6basisu9gpu_image17get_size_in_bytesEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu12pvrtc4_image9deswizzleEv(ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6basisu12pvrtc4_image17unpack_all_pixelsERNS_5imageE(ptr noundef nonnull align 8 dereferenceable(41), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu12pvrtc4_imageD2Ev(ptr noundef nonnull align 8 dereferenceable(41)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK6basisu9gpu_image13get_block_ptrEjjj(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN6basisu5image17set_block_clippedEPKNS_10color_rgbaEjjjj(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #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, !7, i64 0}
!6 = !{!"_ZTSN6basisu9gpu_imageE", !7, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !11, i64 32}
!7 = !{!"_ZTSN6basisu14texture_formatE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSN6basisu6vectorImEE", !12, i64 0, !10, i64 8, !10, i64 12}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !10, i64 4}
!14 = !{!6, !10, i64 8}
!15 = !{!6, !10, i64 20}
!16 = !{!6, !10, i64 24}
!17 = !{!8, !8, i64 0}
!18 = !{!6, !10, i64 16}
!19 = !{!6, !10, i64 12}
!20 = distinct !{!20, !21, !22}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.unswitch.partial.disable"}
!23 = distinct !{!23, !21}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass