; LLVM IR from LeoVen/C-Macro-Collections :: tests (types)

; 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.hashbidimap0_fkey = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.hashbidimap0_fval = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.hashbidimap0 = type { ptr, i64, i64, double, i32, ptr, ptr, ptr, ptr, ptr }
%struct.cmc_alloc_node = type { ptr, ptr, ptr, ptr }

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @hbm0_new_custom(i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i64 @hbm0_impl_calculate_size(i64 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @hbm0_resize(ptr noundef %0, i64 noundef %1) #2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %struct.hashbidimap0_fkey, align 8
  %14 = alloca %struct.hashbidimap0_fval, align 8
  %15 = alloca %struct.hashbidimap0_fkey, align 8
  %16 = alloca %struct.hashbidimap0_fval, align 8
  %17 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.hashbidimap0, ptr %18, i32 0, i32 4
  store i32 0, ptr %19, align 8, !tbaa !11
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.hashbidimap0, ptr %20, i32 0, i32 1
  %22 = load i64, ptr %21, align 8, !tbaa !15
  %23 = load i64, ptr %5, align 8, !tbaa !9
  %24 = icmp eq i64 %22, %23
  br i1 %24, label %25, label %26

25:                                               ; preds = %2
  br label %237

26:                                               ; preds = %2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.hashbidimap0, ptr %27, i32 0, i32 1
  %29 = load i64, ptr %28, align 8, !tbaa !15
  %30 = uitofp i64 %29 to double
  %31 = load i64, ptr %5, align 8, !tbaa !9
  %32 = uitofp i64 %31 to double
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.hashbidimap0, ptr %33, i32 0, i32 3
  %35 = load double, ptr %34, align 8, !tbaa !16
  %36 = fdiv double %32, %35
  %37 = fcmp ogt double %30, %36
  br i1 %37, label %38, label %39

38:                                               ; preds = %26
  br label %237

39:                                               ; preds = %26
  %40 = load i64, ptr %5, align 8, !tbaa !9
  %41 = uitofp i64 %40 to double
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.hashbidimap0, ptr %42, i32 0, i32 3
  %44 = load double, ptr %43, align 8, !tbaa !16
  %45 = fmul double 0x43F0000000000000, %44
  %46 = fcmp oge double %41, %45
  br i1 %46, label %47, label %50

47:                                               ; preds = %39
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.hashbidimap0, ptr %48, i32 0, i32 4
  store i32 7, ptr %49, align 8, !tbaa !11
  store i1 false, ptr %3, align 1
  br label %238

50:                                               ; preds = %39
  %51 = load i64, ptr %5, align 8, !tbaa !9
  %52 = call i64 @hbm0_impl_calculate_size(i64 noundef %51)
  store i64 %52, ptr %6, align 8, !tbaa !9
  %53 = load i64, ptr %6, align 8, !tbaa !9
  %54 = uitofp i64 %53 to double
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.hashbidimap0, ptr %55, i32 0, i32 2
  %57 = load i64, ptr %56, align 8, !tbaa !17
  %58 = uitofp i64 %57 to double
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.hashbidimap0, ptr %59, i32 0, i32 3
  %61 = load double, ptr %60, align 8, !tbaa !16
  %62 = fdiv double %58, %61
  %63 = fcmp olt double %54, %62
  br i1 %63, label %64, label %67

64:                                               ; preds = %50
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.hashbidimap0, ptr %65, i32 0, i32 4
  store i32 4, ptr %66, align 8, !tbaa !11
  store i1 false, ptr %3, align 1
  br label %238

67:                                               ; preds = %50
  %68 = load i64, ptr %5, align 8, !tbaa !9
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.hashbidimap0, ptr %69, i32 0, i32 3
  %71 = load double, ptr %70, align 8, !tbaa !16
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.hashbidimap0, ptr %72, i32 0, i32 5
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.hashbidimap0, ptr %75, i32 0, i32 6
  %77 = load ptr, ptr %76, align 8, !tbaa !19
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.hashbidimap0, ptr %78, i32 0, i32 7
  %80 = load ptr, ptr %79, align 8, !tbaa !20
  %81 = call ptr @hbm0_new_custom(i64 noundef %68, double noundef %71, ptr noundef %74, ptr noundef %77, ptr noundef %80, ptr noundef null)
  store ptr %81, ptr %7, align 8, !tbaa !5
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %87, label %84

84:                                               ; preds = %67
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.hashbidimap0, ptr %85, i32 0, i32 4
  store i32 1, ptr %86, align 8, !tbaa !11
  store i1 false, ptr %3, align 1
  br label %238

87:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %88

88:                                               ; preds = %165, %87
  %89 = load i64, ptr %8, align 8, !tbaa !9
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.hashbidimap0, ptr %90, i32 0, i32 1
  %92 = load i64, ptr %91, align 8, !tbaa !15
  %93 = icmp ult i64 %89, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %88
  store i32 3, ptr %9, align 4
  br label %168

95:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.hashbidimap0, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !21
  %99 = load i64, ptr %8, align 8, !tbaa !9
  %100 = getelementptr inbounds [2 x ptr], ptr %98, i64 %99
  %101 = getelementptr inbounds [2 x ptr], ptr %100, i64 0, i64 0
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  store ptr %102, ptr %10, align 8, !tbaa !5
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %105, label %161

105:                                              ; preds = %95
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = icmp ne ptr %106, inttoptr (i64 1 to ptr)
  br i1 %107, label %108, label %161

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = call ptr @hbm0_impl_add_entry_to_key(ptr noundef %109, ptr noundef %110)
  store ptr %111, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = call ptr @hbm0_impl_add_entry_to_val(ptr noundef %112, ptr noundef %113)
  store ptr %114, ptr %12, align 8, !tbaa !5
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %120

117:                                              ; preds = %108
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = icmp ne ptr %118, null
  br i1 %119, label %153, label %120

120:                                              ; preds = %117, %108
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 48, i1 false)
  %121 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %13, i32 0, i32 0
  %122 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %13, i32 0, i32 1
  %123 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %13, i32 0, i32 2
  %124 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %13, i32 0, i32 3
  %125 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %13, i32 0, i32 4
  %126 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %13, i32 0, i32 5
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.hashbidimap0, ptr %127, i32 0, i32 5
  store ptr %13, ptr %128, align 8, !tbaa !18
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 48, i1 false)
  %129 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %14, i32 0, i32 0
  %130 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %14, i32 0, i32 1
  %131 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %14, i32 0, i32 2
  %132 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %14, i32 0, i32 3
  %133 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %14, i32 0, i32 4
  %134 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %14, i32 0, i32 5
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.hashbidimap0, ptr %135, i32 0, i32 6
  store ptr %14, ptr %136, align 8, !tbaa !19
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.hashbidimap0, ptr %137, i32 0, i32 7
  %139 = load ptr, ptr %138, align 8, !tbaa !20
  %140 = getelementptr inbounds %struct.cmc_alloc_node, ptr %139, i32 0, i32 3
  %141 = load ptr, ptr %140, align 8, !tbaa !22
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.hashbidimap0, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  call void %141(ptr noundef %144)
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.hashbidimap0, ptr %145, i32 0, i32 7
  %147 = load ptr, ptr %146, align 8, !tbaa !20
  %148 = getelementptr inbounds %struct.cmc_alloc_node, ptr %147, i32 0, i32 3
  %149 = load ptr, ptr %148, align 8, !tbaa !22
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  call void %149(ptr noundef %150)
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.hashbidimap0, ptr %151, i32 0, i32 4
  store i32 7, ptr %152, align 8, !tbaa !11
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %158

153:                                              ; preds = %117
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.hashbidimap0, ptr %154, i32 0, i32 2
  %156 = load i64, ptr %155, align 8, !tbaa !17
  %157 = add i64 %156, 1
  store i64 %157, ptr %155, align 8, !tbaa !17
  store i32 0, ptr %9, align 4
  br label %158

158:                                              ; preds = %153, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %159 = load i32, ptr %9, align 4
  switch i32 %159, label %162 [
    i32 0, label %160
  ]

160:                                              ; preds = %158
  br label %161

161:                                              ; preds = %160, %105, %95
  store i32 0, ptr %9, align 4
  br label %162

162:                                              ; preds = %161, %158
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %163 = load i32, ptr %9, align 4
  switch i32 %163, label %168 [
    i32 0, label %164
  ]

164:                                              ; preds = %162
  br label %165

165:                                              ; preds = %164
  %166 = load i64, ptr %8, align 8, !tbaa !9
  %167 = add i64 %166, 1
  store i64 %167, ptr %8, align 8, !tbaa !9
  br label %88, !llvm.loop !24

168:                                              ; preds = %162, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %169 = load i32, ptr %9, align 4
  switch i32 %169, label %240 [
    i32 3, label %170
    i32 1, label %238
  ]

170:                                              ; preds = %168
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.hashbidimap0, ptr %171, i32 0, i32 2
  %173 = load i64, ptr %172, align 8, !tbaa !17
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.hashbidimap0, ptr %174, i32 0, i32 2
  %176 = load i64, ptr %175, align 8, !tbaa !17
  %177 = icmp ne i64 %173, %176
  br i1 %177, label %178, label %211

178:                                              ; preds = %170
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 48, i1 false)
  %179 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %15, i32 0, i32 0
  %180 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %15, i32 0, i32 1
  %181 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %15, i32 0, i32 2
  %182 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %15, i32 0, i32 3
  %183 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %15, i32 0, i32 4
  %184 = getelementptr inbounds %struct.hashbidimap0_fkey, ptr %15, i32 0, i32 5
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.hashbidimap0, ptr %185, i32 0, i32 5
  store ptr %15, ptr %186, align 8, !tbaa !18
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 48, i1 false)
  %187 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %16, i32 0, i32 0
  %188 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %16, i32 0, i32 1
  %189 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %16, i32 0, i32 2
  %190 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %16, i32 0, i32 3
  %191 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %16, i32 0, i32 4
  %192 = getelementptr inbounds %struct.hashbidimap0_fval, ptr %16, i32 0, i32 5
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.hashbidimap0, ptr %193, i32 0, i32 6
  store ptr %16, ptr %194, align 8, !tbaa !19
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.hashbidimap0, ptr %195, i32 0, i32 7
  %197 = load ptr, ptr %196, align 8, !tbaa !20
  %198 = getelementptr inbounds %struct.cmc_alloc_node, ptr %197, i32 0, i32 3
  %199 = load ptr, ptr %198, align 8, !tbaa !22
  %200 = load ptr, ptr %7, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.hashbidimap0, ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !21
  call void %199(ptr noundef %202)
  %203 = load ptr, ptr %4, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.hashbidimap0, ptr %203, i32 0, i32 7
  %205 = load ptr, ptr %204, align 8, !tbaa !20
  %206 = getelementptr inbounds %struct.cmc_alloc_node, ptr %205, i32 0, i32 3
  %207 = load ptr, ptr %206, align 8, !tbaa !22
  %208 = load ptr, ptr %7, align 8, !tbaa !5
  call void %207(ptr noundef %208)
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.hashbidimap0, ptr %209, i32 0, i32 4
  store i32 7, ptr %210, align 8, !tbaa !11
  store i1 false, ptr %3, align 1
  br label %238

211:                                              ; preds = %170
  %212 = load ptr, ptr %4, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.hashbidimap0, ptr %212, i32 0, i32 0
  %214 = load ptr, ptr %213, align 8, !tbaa !21
  store ptr %214, ptr %17, align 8, !tbaa !5
  %215 = load ptr, ptr %7, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.hashbidimap0, ptr %215, i32 0, i32 0
  %217 = load ptr, ptr %216, align 8, !tbaa !21
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.hashbidimap0, ptr %218, i32 0, i32 0
  store ptr %217, ptr %219, align 8, !tbaa !21
  %220 = load ptr, ptr %7, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.hashbidimap0, ptr %220, i32 0, i32 1
  %222 = load i64, ptr %221, align 8, !tbaa !15
  %223 = load ptr, ptr %4, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.hashbidimap0, ptr %223, i32 0, i32 1
  store i64 %222, ptr %224, align 8, !tbaa !15
  %225 = load ptr, ptr %4, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.hashbidimap0, ptr %225, i32 0, i32 7
  %227 = load ptr, ptr %226, align 8, !tbaa !20
  %228 = getelementptr inbounds %struct.cmc_alloc_node, ptr %227, i32 0, i32 3
  %229 = load ptr, ptr %228, align 8, !tbaa !22
  %230 = load ptr, ptr %17, align 8, !tbaa !5
  call void %229(ptr noundef %230)
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.hashbidimap0, ptr %231, i32 0, i32 7
  %233 = load ptr, ptr %232, align 8, !tbaa !20
  %234 = getelementptr inbounds %struct.cmc_alloc_node, ptr %233, i32 0, i32 3
  %235 = load ptr, ptr %234, align 8, !tbaa !22
  %236 = load ptr, ptr %7, align 8, !tbaa !5
  call void %235(ptr noundef %236)
  br label %237

237:                                              ; preds = %211, %38, %25
  store i1 true, ptr %3, align 1
  br label %238

238:                                              ; preds = %237, %178, %168, %84, %64, %47
  %239 = load i1, ptr %3, align 1
  ret i1 %239

240:                                              ; preds = %168
  unreachable
}

; Function Attrs: nounwind uwtable
declare hidden ptr @hbm0_impl_add_entry_to_key(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden ptr @hbm0_impl_add_entry_to_val(ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !14, i64 32}
!12 = !{!"hashbidimap0", !6, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !14, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!13 = !{!"double", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !10, i64 8}
!16 = !{!12, !13, i64 24}
!17 = !{!12, !10, i64 16}
!18 = !{!12, !6, i64 40}
!19 = !{!12, !6, i64 48}
!20 = !{!12, !6, i64 56}
!21 = !{!12, !6, i64 0}
!22 = !{!23, !6, i64 24}
!23 = !{!"cmc_alloc_node", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.hashbidimap0_fkey = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.hashbidimap0_fval = type { ptr, ptr, ptr, ptr, ptr, ptr }

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @hbm0_new_custom(i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i64 @hbm0_impl_calculate_size(i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i1 @hbm0_resize(ptr nocapture noundef %0, i64 noundef %1) local_unnamed_addr #1 {
  %3 = alloca %struct.hashbidimap0_fkey, align 8
  %4 = alloca %struct.hashbidimap0_fval, align 8
  %5 = alloca %struct.hashbidimap0_fkey, align 8
  %6 = alloca %struct.hashbidimap0_fval, align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 0, ptr %7, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i64, ptr %8, align 8, !tbaa !13
  %10 = icmp eq i64 %9, %1
  br i1 %10, label %92, label %11

11:                                               ; preds = %2
  %12 = uitofp i64 %9 to double
  %13 = uitofp i64 %1 to double
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = load double, ptr %14, align 8, !tbaa !14
  %16 = fdiv double %13, %15
  %17 = fcmp olt double %16, %12
  br i1 %17, label %92, label %18

18:                                               ; preds = %11
  %19 = fmul double %15, 0x43F0000000000000
  %20 = fcmp ugt double %19, %13
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  store i32 7, ptr %7, align 8, !tbaa !5
  br label %92

22:                                               ; preds = %18
  %23 = tail call i64 @hbm0_impl_calculate_size(i64 noundef %1)
  %24 = uitofp i64 %23 to double
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  %26 = load i64, ptr %25, align 8, !tbaa !15
  %27 = uitofp i64 %26 to double
  %28 = load double, ptr %14, align 8, !tbaa !14
  %29 = fdiv double %27, %28
  %30 = fcmp ogt double %29, %24
  br i1 %30, label %31, label %32

31:                                               ; preds = %22
  store i32 4, ptr %7, align 8, !tbaa !5
  br label %92

32:                                               ; preds = %22
  %33 = getelementptr inbounds i8, ptr %0, i64 40
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = getelementptr inbounds i8, ptr %0, i64 48
  %36 = load ptr, ptr %35, align 8, !tbaa !17
  %37 = getelementptr inbounds i8, ptr %0, i64 56
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %39 = tail call ptr @hbm0_new_custom(i64 noundef %1, double noundef %28, ptr noundef %34, ptr noundef %36, ptr noundef %38, ptr noundef null)
  %.not = icmp eq ptr %39, null
  br i1 %.not, label %42, label %.preheader

.preheader:                                       ; preds = %32
  %40 = load i64, ptr %8, align 8, !tbaa !13
  %.not82 = icmp eq i64 %40, 0
  br i1 %.not82, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %41 = getelementptr inbounds i8, ptr %39, i64 16
  br label %43

42:                                               ; preds = %32
  store i32 1, ptr %7, align 8, !tbaa !5
  br label %92

43:                                               ; preds = %.lr.ph, %.critedge
  %44 = phi i64 [ %40, %.lr.ph ], [ %55, %.critedge ]
  %.06781 = phi i64 [ 0, %.lr.ph ], [ %56, %.critedge ]
  %45 = load ptr, ptr %0, align 8, !tbaa !19
  %46 = getelementptr inbounds [2 x ptr], ptr %45, i64 %.06781
  %47 = load ptr, ptr %46, align 8, !tbaa !20
  %switch76 = icmp ult ptr %47, inttoptr (i64 2 to ptr)
  br i1 %switch76, label %.critedge, label %48

48:                                               ; preds = %43
  %49 = tail call ptr @hbm0_impl_add_entry_to_key(ptr noundef nonnull %39, ptr noundef nonnull %47)
  %50 = tail call ptr @hbm0_impl_add_entry_to_val(ptr noundef nonnull %39, ptr noundef nonnull %47)
  %51 = icmp ne ptr %49, null
  %52 = icmp ne ptr %50, null
  %or.cond4 = select i1 %51, i1 %52, i1 false
  br i1 %or.cond4, label %.thread, label %58

.thread:                                          ; preds = %48
  %53 = load i64, ptr %41, align 8, !tbaa !15
  %54 = add i64 %53, 1
  store i64 %54, ptr %41, align 8, !tbaa !15
  %.pre = load i64, ptr %8, align 8, !tbaa !13
  br label %.critedge

.critedge:                                        ; preds = %.thread, %43
  %55 = phi i64 [ %.pre, %.thread ], [ %44, %43 ]
  %56 = add nuw i64 %.06781, 1
  %57 = icmp ult i64 %56, %55
  br i1 %57, label %43, label %._crit_edge, !llvm.loop !21

58:                                               ; preds = %48
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %3, i8 0, i64 48, i1 false)
  %59 = getelementptr inbounds i8, ptr %39, i64 40
  store ptr %3, ptr %59, align 8, !tbaa !16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %4, i8 0, i64 48, i1 false)
  %60 = getelementptr inbounds i8, ptr %39, i64 48
  store ptr %4, ptr %60, align 8, !tbaa !17
  %61 = load ptr, ptr %37, align 8, !tbaa !18
  %62 = getelementptr inbounds i8, ptr %61, i64 24
  %63 = load ptr, ptr %62, align 8, !tbaa !23
  %64 = load ptr, ptr %39, align 8, !tbaa !19
  call void %63(ptr noundef %64) #2
  %65 = load ptr, ptr %37, align 8, !tbaa !18
  %66 = getelementptr inbounds i8, ptr %65, i64 24
  %67 = load ptr, ptr %66, align 8, !tbaa !23
  call void %67(ptr noundef nonnull %39) #2
  store i32 7, ptr %7, align 8, !tbaa !5
  br label %92

._crit_edge:                                      ; preds = %.critedge, %.preheader
  %68 = load i64, ptr %25, align 8, !tbaa !15
  %69 = getelementptr inbounds i8, ptr %39, i64 16
  %70 = load i64, ptr %69, align 8, !tbaa !15
  %.not75 = icmp eq i64 %68, %70
  br i1 %.not75, label %81, label %71

71:                                               ; preds = %._crit_edge
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %5, i8 0, i64 48, i1 false)
  %72 = getelementptr inbounds i8, ptr %39, i64 40
  store ptr %5, ptr %72, align 8, !tbaa !16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %6, i8 0, i64 48, i1 false)
  %73 = getelementptr inbounds i8, ptr %39, i64 48
  store ptr %6, ptr %73, align 8, !tbaa !17
  %74 = load ptr, ptr %37, align 8, !tbaa !18
  %75 = getelementptr inbounds i8, ptr %74, i64 24
  %76 = load ptr, ptr %75, align 8, !tbaa !23
  %77 = load ptr, ptr %39, align 8, !tbaa !19
  call void %76(ptr noundef %77) #2
  %78 = load ptr, ptr %37, align 8, !tbaa !18
  %79 = getelementptr inbounds i8, ptr %78, i64 24
  %80 = load ptr, ptr %79, align 8, !tbaa !23
  call void %80(ptr noundef nonnull %39) #2
  store i32 7, ptr %7, align 8, !tbaa !5
  br label %92

81:                                               ; preds = %._crit_edge
  %82 = load ptr, ptr %0, align 8, !tbaa !19
  %83 = load ptr, ptr %39, align 8, !tbaa !19
  store ptr %83, ptr %0, align 8, !tbaa !19
  %84 = getelementptr inbounds i8, ptr %39, i64 8
  %85 = load i64, ptr %84, align 8, !tbaa !13
  store i64 %85, ptr %8, align 8, !tbaa !13
  %86 = load ptr, ptr %37, align 8, !tbaa !18
  %87 = getelementptr inbounds i8, ptr %86, i64 24
  %88 = load ptr, ptr %87, align 8, !tbaa !23
  tail call void %88(ptr noundef %82) #2
  %89 = load ptr, ptr %37, align 8, !tbaa !18
  %90 = getelementptr inbounds i8, ptr %89, i64 24
  %91 = load ptr, ptr %90, align 8, !tbaa !23
  tail call void %91(ptr noundef nonnull %39) #2
  br label %92

92:                                               ; preds = %58, %81, %2, %11, %71, %42, %31, %21
  %.5 = phi i1 [ false, %21 ], [ false, %31 ], [ false, %58 ], [ false, %71 ], [ false, %42 ], [ true, %11 ], [ true, %2 ], [ true, %81 ]
  ret i1 %.5
}

; Function Attrs: nounwind uwtable
declare hidden ptr @hbm0_impl_add_entry_to_key(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden ptr @hbm0_impl_add_entry_to_val(ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { 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 = { 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, !12, i64 32}
!6 = !{!"hashbidimap0", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!6, !10, i64 8}
!14 = !{!6, !11, i64 24}
!15 = !{!6, !10, i64 16}
!16 = !{!6, !7, i64 40}
!17 = !{!6, !7, i64 48}
!18 = !{!6, !7, i64 56}
!19 = !{!6, !7, i64 0}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !7, i64 24}
!24 = !{!"cmc_alloc_node", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}


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