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

; 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::basisu_file" = type <{ %"struct.basist::basis_file_header", [3 x i8], %"class.basisu::vector", %"class.basisu::vector.3", i32, i32, i32, i32, i32, i32, i32, [4 x i8] }>
%"struct.basist::basis_file_header" = type { %"struct.basisu::packed_uint", %"struct.basisu::packed_uint", %"struct.basisu::packed_uint", %"struct.basisu::packed_uint", %"struct.basisu::packed_uint.0", %"struct.basisu::packed_uint", %"struct.basisu::packed_uint.1", %"struct.basisu::packed_uint.1", %"struct.basisu::packed_uint.2", %"struct.basisu::packed_uint", %"struct.basisu::packed_uint.2", %"struct.basisu::packed_uint.1", %"struct.basisu::packed_uint.0", %"struct.basisu::packed_uint.0", %"struct.basisu::packed_uint.0", %"struct.basisu::packed_uint", %"struct.basisu::packed_uint.0", %"struct.basisu::packed_uint.1", %"struct.basisu::packed_uint", %"struct.basisu::packed_uint.0", %"struct.basisu::packed_uint.1", %"struct.basisu::packed_uint.0", %"struct.basisu::packed_uint.0", %"struct.basisu::packed_uint.0", %"struct.basisu::packed_uint.0", %"struct.basisu::packed_uint.0" }
%"struct.basisu::packed_uint.2" = type { [1 x i8] }
%"struct.basisu::packed_uint" = type { [2 x i8] }
%"struct.basisu::packed_uint.1" = type { [3 x i8] }
%"struct.basisu::packed_uint.0" = type { [4 x i8] }
%"class.basisu::vector" = type { ptr, i32, i32 }
%"class.basisu::vector.3" = type { ptr, i32, i32 }
%"struct.basisu::basisu_backend_output" = type { i32, i8, i8, i8, i32, i32, %"class.basisu::vector.3", %"class.basisu::vector.3", %"class.basisu::vector.5", %"class.basisu::vector.3", %"class.basisu::vector.7", %"class.basisu::vector.9" }
%"class.basisu::vector.5" = type { ptr, i32, i32 }
%"class.basisu::vector.7" = type { ptr, i32, i32 }
%"class.basisu::vector.9" = type { ptr, i32, i32 }
%"struct.basisu::basisu_backend_slice_desc" = type <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, [2 x i8] }>

@.str = external hidden unnamed_addr constant [64 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [117 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj = external hidden unnamed_addr constant [135 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef nonnull align 8 dereferenceable(112) %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i1 noundef zeroext %5, i32 noundef %6) #0 align 2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !11
  store i32 %4, ptr %12, align 4, !tbaa !11
  %18 = zext i1 %5 to i8
  store i8 %18, ptr %13, align 1, !tbaa !13
  store i32 %6, ptr %14, align 4, !tbaa !11
  %19 = load ptr, ptr %8, align 8
  %20 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %20, i32 0, i32 2
  %22 = call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %21, i64 noundef 77)
  %23 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 10
  %24 = load i32, ptr %23, align 8, !tbaa !15
  %25 = zext i32 %24 to i64
  %26 = sub i64 %25, 77
  %27 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %28 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %27, i32 0, i32 4
  %29 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %28, i64 noundef %26)
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %30, i32 0, i32 8
  %32 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %31)
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %35 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %34, i32 0, i32 6
  %36 = call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %35, i64 noundef %33)
  %37 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %38 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %37, i32 0, i32 7
  %39 = call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %38, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %40

40:                                               ; preds = %64, %7
  %41 = load i32, ptr %15, align 4, !tbaa !11
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %42, i32 0, i32 8
  %44 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %43)
  %45 = icmp ult i32 %41, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %67

47:                                               ; preds = %40
  %48 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %49 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %48, i32 0, i32 7
  %50 = call noundef i32 @_ZNK6basisu11packed_uintILj3EEcvjEv(ptr noundef nonnull align 1 dereferenceable(3) %49)
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %51, i32 0, i32 8
  %53 = load i32, ptr %15, align 4, !tbaa !11
  %54 = zext i32 %53 to i64
  %55 = call noundef nonnull align 4 dereferenceable(46) ptr @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %52, i64 noundef %54)
  %56 = getelementptr inbounds %"struct.basisu::basisu_backend_slice_desc", ptr %55, i32 0, i32 9
  %57 = load i32, ptr %56, align 4, !tbaa !24
  %58 = add i32 %57, 1
  %59 = call noundef i32 @_ZN6basisu7maximumIjEET_S1_S1_(i32 noundef %50, i32 noundef %58)
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %62 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %61, i32 0, i32 7
  %63 = call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %62, i64 noundef %60)
  br label %64

64:                                               ; preds = %47
  %65 = load i32, ptr %15, align 4, !tbaa !11
  %66 = add i32 %65, 1
  store i32 %66, ptr %15, align 4, !tbaa !11
  br label %40, !llvm.loop !26

67:                                               ; preds = %46
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %68, i32 0, i32 0
  %70 = load i32, ptr %69, align 8, !tbaa !28
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %73 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %72, i32 0, i32 8
  %74 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu11packed_uintILj1EEaSEm(ptr noundef nonnull align 1 dereferenceable(1) %73, i64 noundef %71)
  %75 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %76 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %75, i32 0, i32 9
  %77 = call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %76, i64 noundef 0)
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %78, i32 0, i32 1
  %80 = load i8, ptr %79, align 4, !tbaa !34, !range !35, !noundef !36
  %81 = trunc i8 %80 to i1
  br i1 %81, label %82, label %99

82:                                               ; preds = %67
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %83, i32 0, i32 0
  %85 = load i32, ptr %84, align 8, !tbaa !28
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %82
  br label %90

88:                                               ; preds = %82
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.3, i32 noundef 40, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj) #5
  unreachable

89:                                               ; No predecessors!
  br label %90

90:                                               ; preds = %89, %87
  %91 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %92 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %91, i32 0, i32 9
  %93 = call noundef i32 @_ZNK6basisu11packed_uintILj2EEcvjEv(ptr noundef nonnull align 1 dereferenceable(2) %92)
  %94 = or i32 %93, 1
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %97 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %96, i32 0, i32 9
  %98 = call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %97, i64 noundef %95)
  br label %108

99:                                               ; preds = %67
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 8, !tbaa !28
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %105

104:                                              ; preds = %99
  br label %107

105:                                              ; preds = %99
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 45, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj) #5
  unreachable

106:                                              ; No predecessors!
  br label %107

107:                                              ; preds = %106, %104
  br label %108

108:                                              ; preds = %107, %90
  %109 = load i8, ptr %13, align 1, !tbaa !13, !range !35, !noundef !36
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %120

111:                                              ; preds = %108
  %112 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %113 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %112, i32 0, i32 9
  %114 = call noundef i32 @_ZNK6basisu11packed_uintILj2EEcvjEv(ptr noundef nonnull align 1 dereferenceable(2) %113)
  %115 = or i32 %114, 2
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %118 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %117, i32 0, i32 9
  %119 = call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %118, i64 noundef %116)
  br label %120

120:                                              ; preds = %111, %108
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %121, i32 0, i32 2
  %123 = load i8, ptr %122, align 1, !tbaa !37, !range !35, !noundef !36
  %124 = trunc i8 %123 to i1
  br i1 %124, label %125, label %134

125:                                              ; preds = %120
  %126 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %127 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %126, i32 0, i32 9
  %128 = call noundef i32 @_ZNK6basisu11packed_uintILj2EEcvjEv(ptr noundef nonnull align 1 dereferenceable(2) %127)
  %129 = or i32 %128, 8
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %132 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %131, i32 0, i32 9
  %133 = call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %132, i64 noundef %130)
  br label %134

134:                                              ; preds = %125, %120
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %135, i32 0, i32 3
  %137 = load i8, ptr %136, align 2, !tbaa !38, !range !35, !noundef !36
  %138 = trunc i8 %137 to i1
  br i1 %138, label %139, label %148

139:                                              ; preds = %134
  %140 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %141 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %140, i32 0, i32 9
  %142 = call noundef i32 @_ZNK6basisu11packed_uintILj2EEcvjEv(ptr noundef nonnull align 1 dereferenceable(2) %141)
  %143 = or i32 %142, 16
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %146 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %145, i32 0, i32 9
  %147 = call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %146, i64 noundef %144)
  br label %148

148:                                              ; preds = %139, %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %149

149:                                              ; preds = %175, %148
  %150 = load i32, ptr %16, align 4, !tbaa !11
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %151, i32 0, i32 8
  %153 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %152)
  %154 = icmp ult i32 %150, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %149
  store i32 5, ptr %17, align 4
  br label %178

156:                                              ; preds = %149
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %157, i32 0, i32 8
  %159 = load i32, ptr %16, align 4, !tbaa !11
  %160 = zext i32 %159 to i64
  %161 = call noundef nonnull align 4 dereferenceable(46) ptr @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %158, i64 noundef %160)
  %162 = getelementptr inbounds %"struct.basisu::basisu_backend_slice_desc", ptr %161, i32 0, i32 11
  %163 = load i8, ptr %162, align 4, !tbaa !39, !range !35, !noundef !36
  %164 = trunc i8 %163 to i1
  br i1 %164, label %165, label %174

165:                                              ; preds = %156
  %166 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %167 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %166, i32 0, i32 9
  %168 = call noundef i32 @_ZNK6basisu11packed_uintILj2EEcvjEv(ptr noundef nonnull align 1 dereferenceable(2) %167)
  %169 = or i32 %168, 4
  %170 = zext i32 %169 to i64
  %171 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %172 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %171, i32 0, i32 9
  %173 = call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %172, i64 noundef %170)
  store i32 5, ptr %17, align 4
  br label %178

174:                                              ; preds = %156
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %16, align 4, !tbaa !11
  %177 = add i32 %176, 1
  store i32 %177, ptr %16, align 4, !tbaa !11
  br label %149, !llvm.loop !40

178:                                              ; preds = %165, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %10, align 4, !tbaa !9
  %181 = trunc i32 %180 to i8
  %182 = zext i8 %181 to i64
  %183 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %184 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %183, i32 0, i32 10
  %185 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu11packed_uintILj1EEaSEm(ptr noundef nonnull align 1 dereferenceable(1) %184, i64 noundef %182)
  %186 = load i32, ptr %14, align 4, !tbaa !11
  %187 = call noundef i32 @_ZN6basisu5clampIjEET_S1_S1_S1_(i32 noundef %186, i32 noundef 0, i32 noundef 16777215)
  %188 = zext i32 %187 to i64
  %189 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %190 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %189, i32 0, i32 11
  %191 = call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %190, i64 noundef %188)
  %192 = load i32, ptr %11, align 4, !tbaa !11
  %193 = zext i32 %192 to i64
  %194 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %195 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %194, i32 0, i32 13
  %196 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %195, i64 noundef %193)
  %197 = load i32, ptr %12, align 4, !tbaa !11
  %198 = zext i32 %197 to i64
  %199 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %200 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %199, i32 0, i32 14
  %201 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %200, i64 noundef %198)
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  %203 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %202, i32 0, i32 4
  %204 = load i32, ptr %203, align 8, !tbaa !41
  %205 = zext i32 %204 to i64
  %206 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %207 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %206, i32 0, i32 15
  %208 = call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %207, i64 noundef %205)
  %209 = load ptr, ptr %9, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %209, i32 0, i32 2
  %211 = load i8, ptr %210, align 1, !tbaa !37, !range !35, !noundef !36
  %212 = trunc i8 %211 to i1
  br i1 %212, label %227, label %213

213:                                              ; preds = %179
  %214 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 6
  %215 = load i32, ptr %214, align 8, !tbaa !42
  %216 = zext i32 %215 to i64
  %217 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %218 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %217, i32 0, i32 16
  %219 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %218, i64 noundef %216)
  %220 = load ptr, ptr %9, align 8, !tbaa !5
  %221 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %220, i32 0, i32 6
  %222 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %221)
  %223 = zext i32 %222 to i64
  %224 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %225 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %224, i32 0, i32 17
  %226 = call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %225, i64 noundef %223)
  br label %236

227:                                              ; preds = %179
  %228 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 6
  %229 = load i32, ptr %228, align 8, !tbaa !42
  %230 = icmp ne i32 %229, 0
  %231 = xor i1 %230, true
  br i1 %231, label %232, label %233

232:                                              ; preds = %227
  br label %235

233:                                              ; preds = %227
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.3, i32 noundef 78, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj) #5
  unreachable

234:                                              ; No predecessors!
  br label %235

235:                                              ; preds = %234, %232
  br label %236

236:                                              ; preds = %235, %213
  %237 = load ptr, ptr %9, align 8, !tbaa !5
  %238 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %237, i32 0, i32 5
  %239 = load i32, ptr %238, align 4, !tbaa !43
  %240 = zext i32 %239 to i64
  %241 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %242 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %241, i32 0, i32 18
  %243 = call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %242, i64 noundef %240)
  %244 = load ptr, ptr %9, align 8, !tbaa !5
  %245 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %244, i32 0, i32 2
  %246 = load i8, ptr %245, align 1, !tbaa !37, !range !35, !noundef !36
  %247 = trunc i8 %246 to i1
  br i1 %247, label %262, label %248

248:                                              ; preds = %236
  %249 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 7
  %250 = load i32, ptr %249, align 4, !tbaa !44
  %251 = zext i32 %250 to i64
  %252 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %253 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %252, i32 0, i32 19
  %254 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %253, i64 noundef %251)
  %255 = load ptr, ptr %9, align 8, !tbaa !5
  %256 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %255, i32 0, i32 7
  %257 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %256)
  %258 = zext i32 %257 to i64
  %259 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %260 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %259, i32 0, i32 20
  %261 = call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %260, i64 noundef %258)
  br label %271

262:                                              ; preds = %236
  %263 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 7
  %264 = load i32, ptr %263, align 4, !tbaa !44
  %265 = icmp ne i32 %264, 0
  %266 = xor i1 %265, true
  br i1 %266, label %267, label %268

267:                                              ; preds = %262
  br label %270

268:                                              ; preds = %262
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 89, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj) #5
  unreachable

269:                                              ; No predecessors!
  br label %270

270:                                              ; preds = %269, %267
  br label %271

271:                                              ; preds = %270, %248
  %272 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 8
  %273 = load i32, ptr %272, align 8, !tbaa !45
  %274 = zext i32 %273 to i64
  %275 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %276 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %275, i32 0, i32 21
  %277 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %276, i64 noundef %274)
  %278 = load ptr, ptr %9, align 8, !tbaa !5
  %279 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %278, i32 0, i32 9
  %280 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %279)
  %281 = zext i32 %280 to i64
  %282 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %283 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %282, i32 0, i32 22
  %284 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %283, i64 noundef %281)
  %285 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 5
  %286 = load i32, ptr %285, align 4, !tbaa !46
  %287 = zext i32 %286 to i64
  %288 = getelementptr inbounds %"class.basisu::basisu_file", ptr %19, i32 0, i32 0
  %289 = getelementptr inbounds %"struct.basist::basis_file_header", ptr %288, i32 0, i32 23
  %290 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %289, i64 noundef %287)
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2), i64 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4), i64 noundef) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3), i64 noundef) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6basisu7maximumIjEET_S1_S1_(i32 noundef, i32 noundef) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(46) ptr @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu11packed_uintILj1EEaSEm(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6basisu5clampIjEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) #1

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

attributes #0 = { 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 #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 nosync 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 = { nounwind }
attributes #5 = { 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, !10, i64 0}
!10 = !{!"_ZTSN6basist18basis_texture_typeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !12, i64 136}
!16 = !{!"_ZTSN6basisu11basisu_fileE", !17, i64 0, !22, i64 80, !23, i64 96, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136}
!17 = !{!"_ZTSN6basist17basis_file_headerE", !18, i64 0, !18, i64 2, !18, i64 4, !18, i64 6, !19, i64 8, !18, i64 12, !20, i64 14, !20, i64 17, !21, i64 20, !18, i64 21, !21, i64 23, !20, i64 24, !19, i64 27, !19, i64 31, !19, i64 35, !18, i64 39, !19, i64 41, !20, i64 45, !18, i64 48, !19, i64 50, !20, i64 54, !19, i64 57, !19, i64 61, !19, i64 65, !19, i64 69, !19, i64 73}
!18 = !{!"_ZTSN6basisu11packed_uintILj2EEE", !7, i64 0}
!19 = !{!"_ZTSN6basisu11packed_uintILj4EEE", !7, i64 0}
!20 = !{!"_ZTSN6basisu11packed_uintILj3EEE", !7, i64 0}
!21 = !{!"_ZTSN6basisu11packed_uintILj1EEE", !7, i64 0}
!22 = !{!"_ZTSN6basisu6vectorIN6basist16basis_slice_descEEE", !6, i64 0, !12, i64 8, !12, i64 12}
!23 = !{!"_ZTSN6basisu6vectorIhEE", !6, i64 0, !12, i64 8, !12, i64 12}
!24 = !{!25, !12, i64 36}
!25 = !{!"_ZTSN6basisu25basisu_backend_slice_descE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !14, i64 44, !14, i64 45}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !30, i64 0}
!29 = !{!"_ZTSN6basisu21basisu_backend_outputE", !30, i64 0, !14, i64 4, !14, i64 5, !14, i64 6, !12, i64 8, !12, i64 12, !23, i64 16, !23, i64 32, !31, i64 48, !23, i64 64, !32, i64 80, !33, i64 96}
!30 = !{!"_ZTSN6basist16basis_tex_formatE", !7, i64 0}
!31 = !{!"_ZTSN6basisu6vectorINS_25basisu_backend_slice_descEEE", !6, i64 0, !12, i64 8, !12, i64 12}
!32 = !{!"_ZTSN6basisu6vectorINS0_IhEEEE", !6, i64 0, !12, i64 8, !12, i64 12}
!33 = !{!"_ZTSN6basisu6vectorItEE", !6, i64 0, !12, i64 8, !12, i64 12}
!34 = !{!29, !14, i64 4}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = !{!29, !14, i64 5}
!38 = !{!29, !14, i64 6}
!39 = !{!25, !14, i64 44}
!40 = distinct !{!40, !27}
!41 = !{!29, !12, i64 8}
!42 = !{!16, !12, i64 120}
!43 = !{!29, !12, i64 12}
!44 = !{!16, !12, i64 124}
!45 = !{!16, !12, i64 128}
!46 = !{!16, !12, i64 116}


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

@.str = external hidden unnamed_addr constant [64 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [117 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj = external hidden unnamed_addr constant [135 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef nonnull align 8 dereferenceable(112) %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i1 noundef zeroext %5, i32 noundef %6) local_unnamed_addr #0 align 2 {
  %8 = getelementptr inbounds i8, ptr %0, i64 4
  %9 = tail call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %8, i64 noundef 77)
  %10 = getelementptr inbounds i8, ptr %0, i64 136
  %11 = load i32, ptr %10, align 8, !tbaa !5
  %12 = zext i32 %11 to i64
  %13 = add nsw i64 %12, -77
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %14, i64 noundef %13)
  %16 = getelementptr inbounds i8, ptr %1, i64 48
  %17 = tail call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %16)
  %18 = zext i32 %17 to i64
  %19 = getelementptr inbounds i8, ptr %0, i64 14
  %20 = tail call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %19, i64 noundef %18)
  %21 = getelementptr inbounds i8, ptr %0, i64 17
  %22 = tail call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %21, i64 noundef 0)
  %23 = tail call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %16)
  %.not36 = icmp eq i32 %23, 0
  br i1 %.not36, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %7
  %24 = load i32, ptr %1, align 8, !tbaa !18
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds i8, ptr %0, i64 20
  %27 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu11packed_uintILj1EEaSEm(ptr noundef nonnull align 1 dereferenceable(1) %26, i64 noundef %25)
  %28 = getelementptr inbounds i8, ptr %0, i64 21
  %29 = tail call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %28, i64 noundef 0)
  %30 = getelementptr inbounds i8, ptr %1, i64 4
  %31 = load i8, ptr %30, align 4, !tbaa !25, !range !26, !noundef !27
  %32 = trunc nuw i8 %31 to i1
  %33 = load i32, ptr %1, align 8, !tbaa !18
  %34 = icmp eq i32 %33, 0
  br i1 %32, label %46, label %53

.lr.ph:                                           ; preds = %7, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %7 ]
  %35 = tail call noundef i32 @_ZNK6basisu11packed_uintILj3EEcvjEv(ptr noundef nonnull align 1 dereferenceable(3) %21)
  %36 = tail call noundef nonnull align 4 dereferenceable(46) ptr @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %16, i64 noundef %indvars.iv)
  %37 = getelementptr inbounds i8, ptr %36, i64 36
  %38 = load i32, ptr %37, align 4, !tbaa !28
  %39 = add i32 %38, 1
  %40 = tail call noundef i32 @_ZN6basisu7maximumIjEET_S1_S1_(i32 noundef %35, i32 noundef %39)
  %41 = zext i32 %40 to i64
  %42 = tail call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %21, i64 noundef %41)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %43 = tail call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %16)
  %44 = zext i32 %43 to i64
  %45 = icmp ult i64 %indvars.iv.next, %44
  br i1 %45, label %.lr.ph, label %._crit_edge, !llvm.loop !30

46:                                               ; preds = %._crit_edge
  br i1 %34, label %48, label %47

47:                                               ; preds = %46
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.3, i32 noundef 40, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj) #3
  unreachable

48:                                               ; preds = %46
  %49 = tail call noundef i32 @_ZNK6basisu11packed_uintILj2EEcvjEv(ptr noundef nonnull align 1 dereferenceable(2) %28)
  %50 = or i32 %49, 1
  %51 = zext i32 %50 to i64
  %52 = tail call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %28, i64 noundef %51)
  br label %55

53:                                               ; preds = %._crit_edge
  br i1 %34, label %54, label %55

54:                                               ; preds = %53
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 45, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj) #3
  unreachable

55:                                               ; preds = %53, %48
  br i1 %5, label %56, label %61

56:                                               ; preds = %55
  %57 = tail call noundef i32 @_ZNK6basisu11packed_uintILj2EEcvjEv(ptr noundef nonnull align 1 dereferenceable(2) %28)
  %58 = or i32 %57, 2
  %59 = zext i32 %58 to i64
  %60 = tail call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %28, i64 noundef %59)
  br label %61

61:                                               ; preds = %56, %55
  %62 = getelementptr inbounds i8, ptr %1, i64 5
  %63 = load i8, ptr %62, align 1, !tbaa !32, !range !26, !noundef !27
  %64 = trunc nuw i8 %63 to i1
  br i1 %64, label %65, label %70

65:                                               ; preds = %61
  %66 = tail call noundef i32 @_ZNK6basisu11packed_uintILj2EEcvjEv(ptr noundef nonnull align 1 dereferenceable(2) %28)
  %67 = or i32 %66, 8
  %68 = zext i32 %67 to i64
  %69 = tail call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %28, i64 noundef %68)
  br label %70

70:                                               ; preds = %65, %61
  %71 = getelementptr inbounds i8, ptr %1, i64 6
  %72 = load i8, ptr %71, align 2, !tbaa !33, !range !26, !noundef !27
  %73 = trunc nuw i8 %72 to i1
  br i1 %73, label %74, label %79

74:                                               ; preds = %70
  %75 = tail call noundef i32 @_ZNK6basisu11packed_uintILj2EEcvjEv(ptr noundef nonnull align 1 dereferenceable(2) %28)
  %76 = or i32 %75, 16
  %77 = zext i32 %76 to i64
  %78 = tail call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %28, i64 noundef %77)
  br label %79

79:                                               ; preds = %74, %70
  %80 = tail call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %16)
  %.not37 = icmp eq i32 %80, 0
  br i1 %.not37, label %.loopexit, label %.lr.ph35

81:                                               ; preds = %.lr.ph35
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %82 = tail call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %16)
  %83 = zext i32 %82 to i64
  %84 = icmp ult i64 %indvars.iv.next40, %83
  br i1 %84, label %.lr.ph35, label %.loopexit, !llvm.loop !34

.lr.ph35:                                         ; preds = %79, %81
  %indvars.iv39 = phi i64 [ %indvars.iv.next40, %81 ], [ 0, %79 ]
  %85 = tail call noundef nonnull align 4 dereferenceable(46) ptr @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %16, i64 noundef %indvars.iv39)
  %86 = getelementptr inbounds i8, ptr %85, i64 44
  %87 = load i8, ptr %86, align 4, !tbaa !35, !range !26, !noundef !27
  %88 = trunc nuw i8 %87 to i1
  br i1 %88, label %89, label %81

89:                                               ; preds = %.lr.ph35
  %90 = tail call noundef i32 @_ZNK6basisu11packed_uintILj2EEcvjEv(ptr noundef nonnull align 1 dereferenceable(2) %28)
  %91 = or i32 %90, 4
  %92 = zext i32 %91 to i64
  %93 = tail call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %28, i64 noundef %92)
  br label %.loopexit

.loopexit:                                        ; preds = %81, %79, %89
  %94 = and i32 %2, 255
  %95 = zext nneg i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %0, i64 23
  %97 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu11packed_uintILj1EEaSEm(ptr noundef nonnull align 1 dereferenceable(1) %96, i64 noundef %95)
  %98 = tail call noundef i32 @_ZN6basisu5clampIjEET_S1_S1_S1_(i32 noundef %6, i32 noundef 0, i32 noundef 16777215)
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds i8, ptr %0, i64 24
  %101 = tail call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %100, i64 noundef %99)
  %102 = zext i32 %3 to i64
  %103 = getelementptr inbounds i8, ptr %0, i64 31
  %104 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %103, i64 noundef %102)
  %105 = zext i32 %4 to i64
  %106 = getelementptr inbounds i8, ptr %0, i64 35
  %107 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %106, i64 noundef %105)
  %108 = getelementptr inbounds i8, ptr %1, i64 8
  %109 = load i32, ptr %108, align 8, !tbaa !36
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds i8, ptr %0, i64 39
  %112 = tail call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %111, i64 noundef %110)
  %113 = load i8, ptr %62, align 1, !tbaa !32, !range !26, !noundef !27
  %114 = trunc nuw i8 %113 to i1
  %115 = getelementptr inbounds i8, ptr %0, i64 120
  %116 = load i32, ptr %115, align 8, !tbaa !37
  br i1 %114, label %126, label %117

117:                                              ; preds = %.loopexit
  %118 = zext i32 %116 to i64
  %119 = getelementptr inbounds i8, ptr %0, i64 41
  %120 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %119, i64 noundef %118)
  %121 = getelementptr inbounds i8, ptr %1, i64 16
  %122 = tail call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %121)
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds i8, ptr %0, i64 45
  %125 = tail call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %124, i64 noundef %123)
  br label %128

126:                                              ; preds = %.loopexit
  %.not30 = icmp eq i32 %116, 0
  br i1 %.not30, label %128, label %127

127:                                              ; preds = %126
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, i32 noundef 78, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj) #3
  unreachable

128:                                              ; preds = %126, %117
  %129 = getelementptr inbounds i8, ptr %1, i64 12
  %130 = load i32, ptr %129, align 4, !tbaa !38
  %131 = zext i32 %130 to i64
  %132 = getelementptr inbounds i8, ptr %0, i64 48
  %133 = tail call noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2) %132, i64 noundef %131)
  %134 = load i8, ptr %62, align 1, !tbaa !32, !range !26, !noundef !27
  %135 = trunc nuw i8 %134 to i1
  %136 = getelementptr inbounds i8, ptr %0, i64 124
  %137 = load i32, ptr %136, align 4, !tbaa !39
  br i1 %135, label %147, label %138

138:                                              ; preds = %128
  %139 = zext i32 %137 to i64
  %140 = getelementptr inbounds i8, ptr %0, i64 50
  %141 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %140, i64 noundef %139)
  %142 = getelementptr inbounds i8, ptr %1, i64 32
  %143 = tail call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %142)
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds i8, ptr %0, i64 54
  %146 = tail call noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3) %145, i64 noundef %144)
  br label %149

147:                                              ; preds = %128
  %.not31 = icmp eq i32 %137, 0
  br i1 %.not31, label %149, label %148

148:                                              ; preds = %147
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 89, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj) #3
  unreachable

149:                                              ; preds = %147, %138
  %150 = getelementptr inbounds i8, ptr %0, i64 128
  %151 = load i32, ptr %150, align 8, !tbaa !40
  %152 = zext i32 %151 to i64
  %153 = getelementptr inbounds i8, ptr %0, i64 57
  %154 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %153, i64 noundef %152)
  %155 = getelementptr inbounds i8, ptr %1, i64 64
  %156 = tail call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %155)
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds i8, ptr %0, i64 61
  %159 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %158, i64 noundef %157)
  %160 = getelementptr inbounds i8, ptr %0, i64 116
  %161 = load i32, ptr %160, align 4, !tbaa !41
  %162 = zext i32 %161 to i64
  %163 = getelementptr inbounds i8, ptr %0, i64 65
  %164 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu11packed_uintILj4EEaSEm(ptr noundef nonnull align 1 dereferenceable(4) %163, i64 noundef %162)
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(2) ptr @_ZN6basisu11packed_uintILj2EEaSEm(ptr noundef nonnull align 1 dereferenceable(2), i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(3) ptr @_ZN6basisu11packed_uintILj3EEaSEm(ptr noundef nonnull align 1 dereferenceable(3), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6basisu7maximumIjEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(46) ptr @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu11packed_uintILj1EEaSEm(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6basisu5clampIjEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 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 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !16, i64 136}
!6 = !{!"_ZTSN6basisu11basisu_fileE", !7, i64 0, !14, i64 80, !17, i64 96, !16, i64 112, !16, i64 116, !16, i64 120, !16, i64 124, !16, i64 128, !16, i64 132, !16, i64 136}
!7 = !{!"_ZTSN6basist17basis_file_headerE", !8, i64 0, !8, i64 2, !8, i64 4, !8, i64 6, !11, i64 8, !8, i64 12, !12, i64 14, !12, i64 17, !13, i64 20, !8, i64 21, !13, i64 23, !12, i64 24, !11, i64 27, !11, i64 31, !11, i64 35, !8, i64 39, !11, i64 41, !12, i64 45, !8, i64 48, !11, i64 50, !12, i64 54, !11, i64 57, !11, i64 61, !11, i64 65, !11, i64 69, !11, i64 73}
!8 = !{!"_ZTSN6basisu11packed_uintILj2EEE", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN6basisu11packed_uintILj4EEE", !9, i64 0}
!12 = !{!"_ZTSN6basisu11packed_uintILj3EEE", !9, i64 0}
!13 = !{!"_ZTSN6basisu11packed_uintILj1EEE", !9, i64 0}
!14 = !{!"_ZTSN6basisu6vectorIN6basist16basis_slice_descEEE", !15, i64 0, !16, i64 8, !16, i64 12}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!"int", !9, i64 0}
!17 = !{!"_ZTSN6basisu6vectorIhEE", !15, i64 0, !16, i64 8, !16, i64 12}
!18 = !{!19, !20, i64 0}
!19 = !{!"_ZTSN6basisu21basisu_backend_outputE", !20, i64 0, !21, i64 4, !21, i64 5, !21, i64 6, !16, i64 8, !16, i64 12, !17, i64 16, !17, i64 32, !22, i64 48, !17, i64 64, !23, i64 80, !24, i64 96}
!20 = !{!"_ZTSN6basist16basis_tex_formatE", !9, i64 0}
!21 = !{!"bool", !9, i64 0}
!22 = !{!"_ZTSN6basisu6vectorINS_25basisu_backend_slice_descEEE", !15, i64 0, !16, i64 8, !16, i64 12}
!23 = !{!"_ZTSN6basisu6vectorINS0_IhEEEE", !15, i64 0, !16, i64 8, !16, i64 12}
!24 = !{!"_ZTSN6basisu6vectorItEE", !15, i64 0, !16, i64 8, !16, i64 12}
!25 = !{!19, !21, i64 4}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!29, !16, i64 36}
!29 = !{!"_ZTSN6basisu25basisu_backend_slice_descE", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !16, i64 40, !21, i64 44, !21, i64 45}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!19, !21, i64 5}
!33 = !{!19, !21, i64 6}
!34 = distinct !{!34, !31}
!35 = !{!29, !21, i64 44}
!36 = !{!19, !16, i64 8}
!37 = !{!6, !16, i64 120}
!38 = !{!19, !16, i64 12}
!39 = !{!6, !16, i64 124}
!40 = !{!6, !16, i64 128}
!41 = !{!6, !16, i64 116}


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