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

%"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.3" = type { ptr, i32, i32 }
%"class.basisu::vector.7" = type { ptr, i32, i32 }
%"class.basisu::vector.9" = type { ptr, i32, i32 }
%"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 }

@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj(ptr noundef nonnull align 8 dereferenceable(140), ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef) #0 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6basisu11basisu_file18create_image_descsERKNS_21basisu_backend_outputE(ptr noundef nonnull align 8 dereferenceable(140), ptr noundef nonnull align 8 dereferenceable(112)) #0 align 2

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

declare void @_ZN6basisu12error_printfEPKcz(ptr noundef, ...) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu11basisu_file16create_comp_dataERKNS_21basisu_backend_outputE(ptr noundef nonnull align 8 dereferenceable(140), ptr noundef nonnull align 8 dereferenceable(112)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu11basisu_file10fixup_crcsEv(ptr noundef nonnull align 8 dereferenceable(140)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6basisu11basisu_file4initERKNS_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 i1, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i32 %2, ptr %11, align 4, !tbaa !9
  store i32 %3, ptr %12, align 4, !tbaa !11
  store i32 %4, ptr %13, align 4, !tbaa !11
  %21 = zext i1 %5 to i8
  store i8 %21, ptr %14, align 1, !tbaa !13
  store i32 %6, ptr %15, align 4, !tbaa !11
  %22 = load ptr, ptr %9, align 8
  call void @_ZN6basisu11basisu_file5clearEv(ptr noundef nonnull align 8 dereferenceable(140) %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %23, i32 0, i32 8
  store ptr %24, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store i64 0, ptr %17, align 8, !tbaa !15
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %25, i32 0, i32 2
  %27 = load i8, ptr %26, align 1, !tbaa !17, !range !24, !noundef !25
  %28 = trunc i8 %27 to i1
  br i1 %28, label %50, label %29

29:                                               ; preds = %7
  %30 = load ptr, ptr %16, align 8, !tbaa !5
  %31 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %30)
  %32 = zext i32 %31 to i64
  %33 = mul i64 23, %32
  %34 = add i64 77, %33
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %35, i32 0, i32 6
  %37 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %36)
  %38 = zext i32 %37 to i64
  %39 = add i64 %34, %38
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %40, i32 0, i32 7
  %42 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %41)
  %43 = zext i32 %42 to i64
  %44 = add i64 %39, %43
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %45, i32 0, i32 9
  %47 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %46)
  %48 = zext i32 %47 to i64
  %49 = add i64 %44, %48
  store i64 %49, ptr %17, align 8, !tbaa !15
  br label %61

50:                                               ; preds = %7
  %51 = load ptr, ptr %16, align 8, !tbaa !5
  %52 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %51)
  %53 = zext i32 %52 to i64
  %54 = mul i64 23, %53
  %55 = add i64 77, %54
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %56, i32 0, i32 9
  %58 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %57)
  %59 = zext i32 %58 to i64
  %60 = add i64 %55, %59
  store i64 %60, ptr %17, align 8, !tbaa !15
  br label %61

61:                                               ; preds = %50, %29
  %62 = load i64, ptr %17, align 8, !tbaa !15
  %63 = icmp uge i64 %62, 4294901760
  br i1 %63, label %64, label %65

64:                                               ; preds = %61
  call void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef @.str.15)
  store i1 false, ptr %8, align 1
  store i32 1, ptr %18, align 4
  br label %182

65:                                               ; preds = %61
  %66 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 4
  store i32 0, ptr %66, align 8, !tbaa !26
  %67 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 5
  store i32 77, ptr %67, align 4, !tbaa !34
  %68 = load ptr, ptr %10, 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 !35
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %123

72:                                               ; preds = %65
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %73, i32 0, i32 2
  %75 = load i8, ptr %74, align 1, !tbaa !17, !range !24, !noundef !25
  %76 = trunc i8 %75 to i1
  br i1 %76, label %77, label %90

77:                                               ; preds = %72
  %78 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 6
  store i32 0, ptr %78, align 8, !tbaa !36
  %79 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 7
  store i32 0, ptr %79, align 4, !tbaa !37
  %80 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 5
  %81 = load i32, ptr %80, align 4, !tbaa !34
  %82 = zext i32 %81 to i64
  %83 = load ptr, ptr %16, align 8, !tbaa !5
  %84 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %83)
  %85 = zext i32 %84 to i64
  %86 = mul i64 23, %85
  %87 = add i64 %82, %86
  %88 = trunc i64 %87 to i32
  %89 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 8
  store i32 %88, ptr %89, align 8, !tbaa !38
  br label %115

90:                                               ; preds = %72
  %91 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 5
  %92 = load i32, ptr %91, align 4, !tbaa !34
  %93 = zext i32 %92 to i64
  %94 = load ptr, ptr %16, align 8, !tbaa !5
  %95 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %94)
  %96 = zext i32 %95 to i64
  %97 = mul i64 23, %96
  %98 = add i64 %93, %97
  %99 = trunc i64 %98 to i32
  %100 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 6
  store i32 %99, ptr %100, align 8, !tbaa !36
  %101 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 6
  %102 = load i32, ptr %101, align 8, !tbaa !36
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %103, i32 0, i32 6
  %105 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %104)
  %106 = add i32 %102, %105
  %107 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 7
  store i32 %106, ptr %107, align 4, !tbaa !37
  %108 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 7
  %109 = load i32, ptr %108, align 4, !tbaa !37
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %110, i32 0, i32 7
  %112 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %111)
  %113 = add i32 %109, %112
  %114 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 8
  store i32 %113, ptr %114, align 8, !tbaa !38
  br label %115

115:                                              ; preds = %90, %77
  %116 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 8
  %117 = load i32, ptr %116, align 8, !tbaa !38
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %118, i32 0, i32 9
  %120 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %119)
  %121 = add i32 %117, %120
  %122 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 9
  store i32 %121, ptr %122, align 4, !tbaa !39
  br label %137

123:                                              ; preds = %65
  %124 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 6
  store i32 0, ptr %124, align 8, !tbaa !36
  %125 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 7
  store i32 0, ptr %125, align 4, !tbaa !37
  %126 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 8
  store i32 0, ptr %126, align 8, !tbaa !38
  %127 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 5
  %128 = load i32, ptr %127, align 4, !tbaa !34
  %129 = zext i32 %128 to i64
  %130 = load ptr, ptr %16, align 8, !tbaa !5
  %131 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %130)
  %132 = zext i32 %131 to i64
  %133 = mul i64 23, %132
  %134 = add i64 %129, %133
  %135 = trunc i64 %134 to i32
  %136 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 9
  store i32 %135, ptr %136, align 4, !tbaa !39
  br label %137

137:                                              ; preds = %123, %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %138 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 9
  %139 = load i32, ptr %138, align 4, !tbaa !39
  %140 = zext i32 %139 to i64
  store i64 %140, ptr %19, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %141

141:                                              ; preds = %158, %137
  %142 = load i32, ptr %20, align 4, !tbaa !11
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %143, i32 0, i32 10
  %145 = call noundef i32 @_ZNK6basisu6vectorINS0_IhEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %144)
  %146 = icmp ult i32 %142, %145
  br i1 %146, label %148, label %147

147:                                              ; preds = %141
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %161

148:                                              ; preds = %141
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %149, i32 0, i32 10
  %151 = load i32, ptr %20, align 4, !tbaa !11
  %152 = zext i32 %151 to i64
  %153 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu6vectorINS0_IhEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %150, i64 noundef %152)
  %154 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %153)
  %155 = zext i32 %154 to i64
  %156 = load i64, ptr %19, align 8, !tbaa !15
  %157 = add i64 %156, %155
  store i64 %157, ptr %19, align 8, !tbaa !15
  br label %158

158:                                              ; preds = %148
  %159 = load i32, ptr %20, align 4, !tbaa !11
  %160 = add i32 %159, 1
  store i32 %160, ptr %20, align 4, !tbaa !11
  br label %141, !llvm.loop !40

161:                                              ; preds = %147
  %162 = load i64, ptr %19, align 8, !tbaa !15
  %163 = icmp uge i64 %162, 4294901760
  br i1 %163, label %164, label %165

164:                                              ; preds = %161
  call void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef @.str.15)
  store i1 false, ptr %8, align 1
  store i32 1, ptr %18, align 4
  br label %181

165:                                              ; preds = %161
  %166 = load i64, ptr %19, align 8, !tbaa !15
  %167 = trunc i64 %166 to i32
  %168 = getelementptr inbounds %"class.basisu::basisu_file", ptr %22, i32 0, i32 10
  store i32 %167, ptr %168, align 8, !tbaa !42
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = load i32, ptr %11, align 4, !tbaa !9
  %171 = load i32, ptr %12, align 4, !tbaa !11
  %172 = load i32, ptr %13, align 4, !tbaa !11
  %173 = load i8, ptr %14, align 1, !tbaa !13, !range !24, !noundef !25
  %174 = trunc i8 %173 to i1
  %175 = load i32, ptr %15, align 4, !tbaa !11
  call void @_ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj(ptr noundef nonnull align 8 dereferenceable(140) %22, ptr noundef nonnull align 8 dereferenceable(112) %169, i32 noundef %170, i32 noundef %171, i32 noundef %172, i1 noundef zeroext %174, i32 noundef %175)
  %176 = load ptr, ptr %10, align 8, !tbaa !5
  %177 = call noundef zeroext i1 @_ZN6basisu11basisu_file18create_image_descsERKNS_21basisu_backend_outputE(ptr noundef nonnull align 8 dereferenceable(140) %22, ptr noundef nonnull align 8 dereferenceable(112) %176)
  br i1 %177, label %179, label %178

178:                                              ; preds = %165
  store i1 false, ptr %8, align 1
  store i32 1, ptr %18, align 4
  br label %181

179:                                              ; preds = %165
  %180 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN6basisu11basisu_file16create_comp_dataERKNS_21basisu_backend_outputE(ptr noundef nonnull align 8 dereferenceable(140) %22, ptr noundef nonnull align 8 dereferenceable(112) %180)
  call void @_ZN6basisu11basisu_file10fixup_crcsEv(ptr noundef nonnull align 8 dereferenceable(140) %22)
  store i1 true, ptr %8, align 1
  store i32 1, ptr %18, align 4
  br label %181

181:                                              ; preds = %179, %178, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %182

182:                                              ; preds = %181, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %183 = load i1, ptr %8, align 1
  ret i1 %183
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu11basisu_file5clearEv(ptr noundef nonnull align 8 dereferenceable(140)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu6vectorINS0_IhEEE4sizeEv(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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_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, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !14, i64 5}
!18 = !{!"_ZTSN6basisu21basisu_backend_outputE", !19, i64 0, !14, i64 4, !14, i64 5, !14, i64 6, !12, i64 8, !12, i64 12, !20, i64 16, !20, i64 32, !21, i64 48, !20, i64 64, !22, i64 80, !23, i64 96}
!19 = !{!"_ZTSN6basist16basis_tex_formatE", !7, i64 0}
!20 = !{!"_ZTSN6basisu6vectorIhEE", !6, i64 0, !12, i64 8, !12, i64 12}
!21 = !{!"_ZTSN6basisu6vectorINS_25basisu_backend_slice_descEEE", !6, i64 0, !12, i64 8, !12, i64 12}
!22 = !{!"_ZTSN6basisu6vectorINS0_IhEEEE", !6, i64 0, !12, i64 8, !12, i64 12}
!23 = !{!"_ZTSN6basisu6vectorItEE", !6, i64 0, !12, i64 8, !12, i64 12}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!27, !12, i64 112}
!27 = !{!"_ZTSN6basisu11basisu_fileE", !28, i64 0, !33, i64 80, !20, i64 96, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136}
!28 = !{!"_ZTSN6basist17basis_file_headerE", !29, i64 0, !29, i64 2, !29, i64 4, !29, i64 6, !30, i64 8, !29, i64 12, !31, i64 14, !31, i64 17, !32, i64 20, !29, i64 21, !32, i64 23, !31, i64 24, !30, i64 27, !30, i64 31, !30, i64 35, !29, i64 39, !30, i64 41, !31, i64 45, !29, i64 48, !30, i64 50, !31, i64 54, !30, i64 57, !30, i64 61, !30, i64 65, !30, i64 69, !30, i64 73}
!29 = !{!"_ZTSN6basisu11packed_uintILj2EEE", !7, i64 0}
!30 = !{!"_ZTSN6basisu11packed_uintILj4EEE", !7, i64 0}
!31 = !{!"_ZTSN6basisu11packed_uintILj3EEE", !7, i64 0}
!32 = !{!"_ZTSN6basisu11packed_uintILj1EEE", !7, i64 0}
!33 = !{!"_ZTSN6basisu6vectorIN6basist16basis_slice_descEEE", !6, i64 0, !12, i64 8, !12, i64 12}
!34 = !{!27, !12, i64 116}
!35 = !{!18, !19, i64 0}
!36 = !{!27, !12, i64 120}
!37 = !{!27, !12, i64 124}
!38 = !{!27, !12, i64 128}
!39 = !{!27, !12, i64 132}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!27, !12, i64 136}


; 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.15 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu11basisu_file13create_headerERKNS_21basisu_backend_outputEN6basist18basis_texture_typeEjjbj(ptr noundef nonnull align 8 dereferenceable(140), ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef) local_unnamed_addr #0 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 i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6basisu11basisu_file18create_image_descsERKNS_21basisu_backend_outputE(ptr noundef nonnull align 8 dereferenceable(140), ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0 align 2

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

declare void @_ZN6basisu12error_printfEPKcz(ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu11basisu_file16create_comp_dataERKNS_21basisu_backend_outputE(ptr noundef nonnull align 8 dereferenceable(140), ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu11basisu_file10fixup_crcsEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6basisu11basisu_file4initERKNS_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 {
  tail call void @_ZN6basisu11basisu_file5clearEv(ptr noundef nonnull align 8 dereferenceable(140) %0)
  %8 = getelementptr inbounds i8, ptr %1, i64 48
  %9 = getelementptr inbounds i8, ptr %1, i64 5
  %10 = load i8, ptr %9, align 1, !tbaa !5, !range !17, !noundef !18
  %11 = trunc nuw i8 %10 to i1
  %12 = tail call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %13 = zext i32 %12 to i64
  %14 = mul nuw nsw i64 %13, 23
  %15 = add nuw nsw i64 %14, 77
  br i1 %11, label %25, label %16

16:                                               ; preds = %7
  %17 = getelementptr inbounds i8, ptr %1, i64 16
  %18 = tail call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %17)
  %19 = zext i32 %18 to i64
  %20 = add nuw nsw i64 %15, %19
  %21 = getelementptr inbounds i8, ptr %1, i64 32
  %22 = tail call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
  %23 = zext i32 %22 to i64
  %24 = add nuw nsw i64 %20, %23
  br label %25

25:                                               ; preds = %7, %16
  %.sink40 = phi i64 [ %24, %16 ], [ %15, %7 ]
  %26 = getelementptr inbounds i8, ptr %1, i64 64
  %27 = tail call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
  %28 = zext i32 %27 to i64
  %29 = add nuw nsw i64 %.sink40, %28
  %30 = icmp ugt i64 %29, 4294901759
  br i1 %30, label %31, label %32

31:                                               ; preds = %25
  tail call void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef nonnull @.str.15)
  br label %89

32:                                               ; preds = %25
  %33 = getelementptr inbounds i8, ptr %0, i64 112
  store i32 0, ptr %33, align 8, !tbaa !19
  %34 = getelementptr inbounds i8, ptr %0, i64 116
  store i32 77, ptr %34, align 4, !tbaa !27
  %35 = load i32, ptr %1, align 8, !tbaa !28
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %63

37:                                               ; preds = %32
  %38 = load i8, ptr %9, align 1, !tbaa !5, !range !17, !noundef !18
  %39 = trunc nuw i8 %38 to i1
  br i1 %39, label %40, label %46

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %0, i64 120
  store i32 0, ptr %41, align 8, !tbaa !29
  %42 = getelementptr inbounds i8, ptr %0, i64 124
  store i32 0, ptr %42, align 4, !tbaa !30
  %43 = tail call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %44 = mul i32 %43, 23
  %45 = add i32 %44, 77
  br label %58

46:                                               ; preds = %37
  %47 = tail call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %48 = mul i32 %47, 23
  %49 = add i32 %48, 77
  %50 = getelementptr inbounds i8, ptr %0, i64 120
  store i32 %49, ptr %50, align 8, !tbaa !29
  %51 = getelementptr inbounds i8, ptr %1, i64 16
  %52 = tail call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %51)
  %53 = add i32 %49, %52
  %54 = getelementptr inbounds i8, ptr %0, i64 124
  store i32 %53, ptr %54, align 4, !tbaa !30
  %55 = getelementptr inbounds i8, ptr %1, i64 32
  %56 = tail call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %55)
  %57 = add i32 %56, %53
  br label %58

58:                                               ; preds = %46, %40
  %.sink = phi i32 [ %45, %40 ], [ %57, %46 ]
  %59 = getelementptr inbounds i8, ptr %0, i64 128
  store i32 %.sink, ptr %59, align 8
  %60 = getelementptr inbounds i8, ptr %1, i64 64
  %61 = tail call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %60)
  %62 = add i32 %61, %.sink
  br label %70

63:                                               ; preds = %32
  %64 = getelementptr inbounds i8, ptr %0, i64 120
  store i32 0, ptr %64, align 8, !tbaa !29
  %65 = getelementptr inbounds i8, ptr %0, i64 124
  store i32 0, ptr %65, align 4, !tbaa !30
  %66 = getelementptr inbounds i8, ptr %0, i64 128
  store i32 0, ptr %66, align 8, !tbaa !31
  %67 = tail call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %68 = mul i32 %67, 23
  %69 = add i32 %68, 77
  br label %70

70:                                               ; preds = %63, %58
  %.sink44 = phi i32 [ %69, %63 ], [ %62, %58 ]
  %71 = getelementptr inbounds i8, ptr %0, i64 132
  store i32 %.sink44, ptr %71, align 4, !tbaa !32
  %72 = zext i32 %.sink44 to i64
  %73 = getelementptr inbounds i8, ptr %1, i64 80
  %74 = tail call noundef i32 @_ZNK6basisu6vectorINS0_IhEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %73)
  %.not = icmp eq i32 %74, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %70
  %.034.lcssa = phi i64 [ %72, %70 ], [ %79, %.lr.ph ]
  %75 = icmp ugt i64 %.034.lcssa, 4294901759
  br i1 %75, label %83, label %84

.lr.ph:                                           ; preds = %70, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %70 ]
  %.03437 = phi i64 [ %79, %.lr.ph ], [ %72, %70 ]
  %76 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu6vectorINS0_IhEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %73, i64 noundef %indvars.iv)
  %77 = tail call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %76)
  %78 = zext i32 %77 to i64
  %79 = add i64 %.03437, %78
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %80 = tail call noundef i32 @_ZNK6basisu6vectorINS0_IhEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %73)
  %81 = zext i32 %80 to i64
  %82 = icmp ult i64 %indvars.iv.next, %81
  br i1 %82, label %.lr.ph, label %._crit_edge, !llvm.loop !33

83:                                               ; preds = %._crit_edge
  tail call void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef nonnull @.str.15)
  br label %89

84:                                               ; preds = %._crit_edge
  %85 = trunc nuw i64 %.034.lcssa to i32
  %86 = getelementptr inbounds i8, ptr %0, i64 136
  store i32 %85, ptr %86, align 8, !tbaa !35
  tail call 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)
  %87 = tail call noundef zeroext i1 @_ZN6basisu11basisu_file18create_image_descsERKNS_21basisu_backend_outputE(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef nonnull align 8 dereferenceable(112) %1)
  br i1 %87, label %88, label %89

88:                                               ; preds = %84
  tail call void @_ZN6basisu11basisu_file16create_comp_dataERKNS_21basisu_backend_outputE(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef nonnull align 8 dereferenceable(112) %1)
  tail call void @_ZN6basisu11basisu_file10fixup_crcsEv(ptr noundef nonnull align 8 dereferenceable(140) %0)
  br label %89

89:                                               ; preds = %83, %88, %84, %31
  %.1 = phi i1 [ false, %31 ], [ false, %83 ], [ true, %88 ], [ false, %84 ]
  ret i1 %.1
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu11basisu_file5clearEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu6vectorINS0_IhEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 5}
!6 = !{!"_ZTSN6basisu21basisu_backend_outputE", !7, i64 0, !10, i64 4, !10, i64 5, !10, i64 6, !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 32, !14, i64 48, !12, i64 64, !15, i64 80, !16, i64 96}
!7 = !{!"_ZTSN6basist16basis_tex_formatE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_ZTSN6basisu6vectorIhEE", !13, i64 0, !11, i64 8, !11, i64 12}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSN6basisu6vectorINS_25basisu_backend_slice_descEEE", !13, i64 0, !11, i64 8, !11, i64 12}
!15 = !{!"_ZTSN6basisu6vectorINS0_IhEEEE", !13, i64 0, !11, i64 8, !11, i64 12}
!16 = !{!"_ZTSN6basisu6vectorItEE", !13, i64 0, !11, i64 8, !11, i64 12}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!20, !11, i64 112}
!20 = !{!"_ZTSN6basisu11basisu_fileE", !21, i64 0, !26, i64 80, !12, i64 96, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136}
!21 = !{!"_ZTSN6basist17basis_file_headerE", !22, i64 0, !22, i64 2, !22, i64 4, !22, i64 6, !23, i64 8, !22, i64 12, !24, i64 14, !24, i64 17, !25, i64 20, !22, i64 21, !25, i64 23, !24, i64 24, !23, i64 27, !23, i64 31, !23, i64 35, !22, i64 39, !23, i64 41, !24, i64 45, !22, i64 48, !23, i64 50, !24, i64 54, !23, i64 57, !23, i64 61, !23, i64 65, !23, i64 69, !23, i64 73}
!22 = !{!"_ZTSN6basisu11packed_uintILj2EEE", !8, i64 0}
!23 = !{!"_ZTSN6basisu11packed_uintILj4EEE", !8, i64 0}
!24 = !{!"_ZTSN6basisu11packed_uintILj3EEE", !8, i64 0}
!25 = !{!"_ZTSN6basisu11packed_uintILj1EEE", !8, i64 0}
!26 = !{!"_ZTSN6basisu6vectorIN6basist16basis_slice_descEEE", !13, i64 0, !11, i64 8, !11, i64 12}
!27 = !{!20, !11, i64 116}
!28 = !{!6, !7, i64 0}
!29 = !{!20, !11, i64 120}
!30 = !{!20, !11, i64 124}
!31 = !{!20, !11, i64 128}
!32 = !{!20, !11, i64 132}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!20, !11, i64 136}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass