; LLVM IR from Water-Melon/Melon :: src (mln_hash)

; 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.mln_hash_attr = type { ptr, ptr, ptr, ptr, i64, i8, ptr, ptr, ptr }
%struct.mln_hash_s = type { ptr, i64, ptr, ptr, ptr, ptr, i32, i32, i8, ptr, ptr, ptr, ptr, ptr, ptr }

declare i32 @mln_prime_generate(i32 noundef) #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 allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_hash_new(ptr noundef nonnull %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %6 = load ptr, ptr %3, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.mln_hash_attr, ptr %6, i32 0, i32 6
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = icmp ne ptr %8, null
  br i1 %9, label %10, label %18

10:                                               ; preds = %1
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.mln_hash_attr, ptr %11, i32 0, i32 7
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.mln_hash_attr, ptr %14, i32 0, i32 6
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = call ptr %13(ptr noundef %16, i64 noundef 112)
  store ptr %17, ptr %4, align 8, !tbaa !5
  br label %20

18:                                               ; preds = %1
  %19 = call noalias ptr @malloc(i64 noundef 112) #8
  store ptr %19, ptr %4, align 8, !tbaa !5
  br label %20

20:                                               ; preds = %18, %10
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %20
  store ptr null, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %232

24:                                               ; preds = %20
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.mln_hash_attr, ptr %25, i32 0, i32 6
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.mln_hash_s, ptr %28, i32 0, i32 9
  store ptr %27, ptr %29, align 8, !tbaa !14
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.mln_hash_attr, ptr %30, i32 0, i32 7
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.mln_hash_s, ptr %33, i32 0, i32 10
  store ptr %32, ptr %34, align 8, !tbaa !16
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.mln_hash_attr, ptr %35, i32 0, i32 8
  %37 = load ptr, ptr %36, align 8, !tbaa !17
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.mln_hash_s, ptr %38, i32 0, i32 11
  store ptr %37, ptr %39, align 8, !tbaa !18
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.mln_hash_attr, ptr %40, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8, !tbaa !19
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.mln_hash_s, ptr %43, i32 0, i32 2
  store ptr %42, ptr %44, align 8, !tbaa !20
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.mln_hash_attr, ptr %45, i32 0, i32 1
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.mln_hash_s, ptr %48, i32 0, i32 3
  store ptr %47, ptr %49, align 8, !tbaa !22
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.mln_hash_attr, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !23
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.mln_hash_s, ptr %53, i32 0, i32 4
  store ptr %52, ptr %54, align 8, !tbaa !24
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.mln_hash_attr, ptr %55, i32 0, i32 3
  %57 = load ptr, ptr %56, align 8, !tbaa !25
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.mln_hash_s, ptr %58, i32 0, i32 5
  store ptr %57, ptr %59, align 8, !tbaa !26
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.mln_hash_attr, ptr %60, i32 0, i32 5
  %62 = load i8, ptr %61, align 8
  %63 = lshr i8 %62, 1
  %64 = and i8 %63, 1
  %65 = zext i8 %64 to i32
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %74

67:                                               ; preds = %24
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.mln_hash_attr, ptr %68, i32 0, i32 4
  %70 = load i64, ptr %69, align 8, !tbaa !27
  %71 = trunc i64 %70 to i32
  %72 = call i32 @mln_prime_generate(i32 noundef %71)
  %73 = zext i32 %72 to i64
  br label %78

74:                                               ; preds = %24
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.mln_hash_attr, ptr %75, i32 0, i32 4
  %77 = load i64, ptr %76, align 8, !tbaa !27
  br label %78

78:                                               ; preds = %74, %67
  %79 = phi i64 [ %73, %67 ], [ %77, %74 ]
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.mln_hash_s, ptr %80, i32 0, i32 1
  store i64 %79, ptr %81, align 8, !tbaa !28
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.mln_hash_s, ptr %82, i32 0, i32 9
  %84 = load ptr, ptr %83, align 8, !tbaa !14
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %107

86:                                               ; preds = %78
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.mln_hash_s, ptr %87, i32 0, i32 10
  %89 = load ptr, ptr %88, align 8, !tbaa !16
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.mln_hash_s, ptr %90, i32 0, i32 9
  %92 = load ptr, ptr %91, align 8, !tbaa !14
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.mln_hash_s, ptr %93, i32 0, i32 1
  %95 = load i64, ptr %94, align 8, !tbaa !28
  %96 = mul i64 %95, 16
  %97 = call ptr %89(ptr noundef %92, i64 noundef %96)
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.mln_hash_s, ptr %98, i32 0, i32 0
  store ptr %97, ptr %99, align 8, !tbaa !29
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.mln_hash_s, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !29
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.mln_hash_s, ptr %103, i32 0, i32 1
  %105 = load i64, ptr %104, align 8, !tbaa !28
  %106 = mul i64 %105, 16
  call void @llvm.memset.p0.i64(ptr align 8 %102, i8 0, i64 %106, i1 false)
  br label %114

107:                                              ; preds = %78
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.mln_hash_s, ptr %108, i32 0, i32 1
  %110 = load i64, ptr %109, align 8, !tbaa !28
  %111 = call noalias ptr @calloc(i64 noundef %110, i64 noundef 16) #9
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.mln_hash_s, ptr %112, i32 0, i32 0
  store ptr %111, ptr %113, align 8, !tbaa !29
  br label %114

114:                                              ; preds = %107, %86
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.mln_hash_s, ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !29
  %118 = icmp eq ptr %117, null
  br i1 %118, label %119, label %132

119:                                              ; preds = %114
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.mln_hash_s, ptr %120, i32 0, i32 9
  %122 = load ptr, ptr %121, align 8, !tbaa !14
  %123 = icmp ne ptr %122, null
  br i1 %123, label %124, label %129

124:                                              ; preds = %119
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.mln_hash_s, ptr %125, i32 0, i32 11
  %127 = load ptr, ptr %126, align 8, !tbaa !18
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  call void %127(ptr noundef %128)
  br label %131

129:                                              ; preds = %119
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %130) #7
  br label %131

131:                                              ; preds = %129, %124
  store ptr null, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %232

132:                                              ; preds = %114
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.mln_hash_s, ptr %133, i32 0, i32 6
  store i32 0, ptr %134, align 8, !tbaa !30
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.mln_hash_attr, ptr %135, i32 0, i32 5
  %137 = load i8, ptr %136, align 8
  %138 = lshr i8 %137, 1
  %139 = and i8 %138, 1
  %140 = zext i8 %139 to i32
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %150

142:                                              ; preds = %132
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.mln_hash_s, ptr %143, i32 0, i32 1
  %145 = load i64, ptr %144, align 8, !tbaa !28
  %146 = shl i64 %145, 1
  %147 = trunc i64 %146 to i32
  %148 = call i32 @mln_prime_generate(i32 noundef %147)
  %149 = zext i32 %148 to i64
  br label %155

150:                                              ; preds = %132
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.mln_hash_s, ptr %151, i32 0, i32 1
  %153 = load i64, ptr %152, align 8, !tbaa !28
  %154 = shl i64 %153, 1
  br label %155

155:                                              ; preds = %150, %142
  %156 = phi i64 [ %149, %142 ], [ %154, %150 ]
  %157 = trunc i64 %156 to i32
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.mln_hash_s, ptr %158, i32 0, i32 7
  store i32 %157, ptr %159, align 4, !tbaa !31
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.mln_hash_attr, ptr %160, i32 0, i32 5
  %162 = load i8, ptr %161, align 8
  %163 = and i8 %162, 1
  %164 = zext i8 %163 to i32
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.mln_hash_s, ptr %165, i32 0, i32 8
  %167 = trunc i32 %164 to i8
  %168 = load i8, ptr %166, align 8
  %169 = and i8 %167, 1
  %170 = and i8 %168, -2
  %171 = or i8 %170, %169
  store i8 %171, ptr %166, align 8
  %172 = zext i8 %169 to i32
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.mln_hash_attr, ptr %173, i32 0, i32 5
  %175 = load i8, ptr %174, align 8
  %176 = lshr i8 %175, 1
  %177 = and i8 %176, 1
  %178 = zext i8 %177 to i32
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.mln_hash_s, ptr %179, i32 0, i32 8
  %181 = trunc i32 %178 to i8
  %182 = load i8, ptr %180, align 8
  %183 = and i8 %181, 1
  %184 = shl i8 %183, 1
  %185 = and i8 %182, -3
  %186 = or i8 %185, %184
  store i8 %186, ptr %180, align 8
  %187 = zext i8 %183 to i32
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.mln_hash_s, ptr %188, i32 0, i32 1
  %190 = load i64, ptr %189, align 8, !tbaa !28
  %191 = icmp eq i64 %190, 0
  br i1 %191, label %202, label %192

192:                                              ; preds = %155
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.mln_hash_s, ptr %193, i32 0, i32 2
  %195 = load ptr, ptr %194, align 8, !tbaa !20
  %196 = icmp eq ptr %195, null
  br i1 %196, label %202, label %197

197:                                              ; preds = %192
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.mln_hash_s, ptr %198, i32 0, i32 3
  %200 = load ptr, ptr %199, align 8, !tbaa !22
  %201 = icmp eq ptr %200, null
  br i1 %201, label %202, label %224

202:                                              ; preds = %197, %192, %155
  %203 = load ptr, ptr %4, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.mln_hash_s, ptr %203, i32 0, i32 9
  %205 = load ptr, ptr %204, align 8, !tbaa !14
  %206 = icmp ne ptr %205, null
  br i1 %206, label %207, label %218

207:                                              ; preds = %202
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.mln_hash_s, ptr %208, i32 0, i32 11
  %210 = load ptr, ptr %209, align 8, !tbaa !18
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.mln_hash_s, ptr %211, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8, !tbaa !29
  call void %210(ptr noundef %213)
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.mln_hash_s, ptr %214, i32 0, i32 11
  %216 = load ptr, ptr %215, align 8, !tbaa !18
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  call void %216(ptr noundef %217)
  br label %223

218:                                              ; preds = %202
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.mln_hash_s, ptr %219, i32 0, i32 0
  %221 = load ptr, ptr %220, align 8, !tbaa !29
  call void @free(ptr noundef %221) #7
  %222 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %222) #7
  br label %223

223:                                              ; preds = %218, %207
  store ptr null, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %232

224:                                              ; preds = %197
  %225 = load ptr, ptr %4, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.mln_hash_s, ptr %225, i32 0, i32 13
  store ptr null, ptr %226, align 8, !tbaa !32
  %227 = load ptr, ptr %4, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.mln_hash_s, ptr %227, i32 0, i32 12
  store ptr null, ptr %228, align 8, !tbaa !33
  %229 = load ptr, ptr %4, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.mln_hash_s, ptr %229, i32 0, i32 14
  store ptr null, ptr %230, align 8, !tbaa !34
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %231, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %232

232:                                              ; preds = %224, %223, %131, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %233 = load ptr, ptr %2, align 8
  ret ptr %233
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #6

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nounwind allocsize(0,1) "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 "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind allocsize(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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind allocsize(0,1) }

!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, !6, i64 48}
!10 = !{!"mln_hash_attr", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !12, i64 40, !12, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !6, i64 56}
!14 = !{!15, !6, i64 64}
!15 = !{!"mln_hash_s", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104}
!16 = !{!15, !6, i64 72}
!17 = !{!10, !6, i64 64}
!18 = !{!15, !6, i64 80}
!19 = !{!10, !6, i64 0}
!20 = !{!15, !6, i64 16}
!21 = !{!10, !6, i64 8}
!22 = !{!15, !6, i64 24}
!23 = !{!10, !6, i64 16}
!24 = !{!15, !6, i64 32}
!25 = !{!10, !6, i64 24}
!26 = !{!15, !6, i64 40}
!27 = !{!10, !11, i64 32}
!28 = !{!15, !11, i64 8}
!29 = !{!15, !6, i64 0}
!30 = !{!15, !12, i64 48}
!31 = !{!15, !12, i64 52}
!32 = !{!15, !6, i64 96}
!33 = !{!15, !6, i64 88}
!34 = !{!15, !6, i64 104}


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

declare i32 @mln_prime_generate(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_hash_new(ptr nocapture noundef nonnull readonly %0) local_unnamed_addr #4 {
  %2 = getelementptr inbounds i8, ptr %0, i64 48
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %8, label %4

4:                                                ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 56
  %6 = load ptr, ptr %5, align 8, !tbaa !12
  %7 = tail call ptr %6(ptr noundef nonnull %3, i64 noundef 112) #6
  br label %10

8:                                                ; preds = %1
  %9 = tail call noalias dereferenceable_or_null(112) ptr @malloc(i64 noundef 112) #7
  br label %10

10:                                               ; preds = %8, %4
  %.0 = phi ptr [ %7, %4 ], [ %9, %8 ]
  %11 = icmp eq ptr %.0, null
  br i1 %11, label %93, label %12

12:                                               ; preds = %10
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %.0, i64 64
  store ptr %13, ptr %14, align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  %16 = getelementptr inbounds i8, ptr %.0, i64 72
  %17 = getelementptr inbounds i8, ptr %.0, i64 80
  %18 = load <2 x ptr>, ptr %15, align 8, !tbaa !15
  store <2 x ptr> %18, ptr %16, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %.0, i64 16
  %20 = getelementptr inbounds i8, ptr %.0, i64 24
  %21 = load <2 x ptr>, ptr %0, align 8, !tbaa !15
  store <2 x ptr> %21, ptr %19, align 8, !tbaa !15
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = getelementptr inbounds i8, ptr %.0, i64 32
  %24 = load <2 x ptr>, ptr %22, align 8, !tbaa !15
  store <2 x ptr> %24, ptr %23, align 8, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %0, i64 40
  %26 = load i8, ptr %25, align 8
  %27 = and i8 %26, 2
  %.not63 = icmp eq i8 %27, 0
  %28 = getelementptr inbounds i8, ptr %0, i64 32
  %29 = load i64, ptr %28, align 8, !tbaa !16
  br i1 %.not63, label %34, label %30

30:                                               ; preds = %12
  %31 = trunc i64 %29 to i32
  %32 = tail call i32 @mln_prime_generate(i32 noundef %31) #6
  %33 = zext i32 %32 to i64
  %.pre = load ptr, ptr %14, align 8, !tbaa !13
  br label %34

34:                                               ; preds = %12, %30
  %35 = phi ptr [ %.pre, %30 ], [ %13, %12 ]
  %36 = phi i64 [ %33, %30 ], [ %29, %12 ]
  %37 = getelementptr inbounds i8, ptr %.0, i64 8
  store i64 %36, ptr %37, align 8, !tbaa !17
  %.not64 = icmp eq ptr %35, null
  br i1 %.not64, label %44, label %38

38:                                               ; preds = %34
  %39 = load ptr, ptr %16, align 8, !tbaa !18
  %40 = shl i64 %36, 4
  %41 = tail call ptr %39(ptr noundef nonnull %35, i64 noundef %40) #6
  store ptr %41, ptr %.0, align 8, !tbaa !19
  %42 = load i64, ptr %37, align 8, !tbaa !17
  %43 = shl i64 %42, 4
  tail call void @llvm.memset.p0.i64(ptr align 8 %41, i8 0, i64 %43, i1 false)
  %.pr = load ptr, ptr %.0, align 8, !tbaa !19
  br label %46

44:                                               ; preds = %34
  %45 = tail call noalias ptr @calloc(i64 noundef %36, i64 noundef 16) #8
  store ptr %45, ptr %.0, align 8, !tbaa !19
  br label %46

46:                                               ; preds = %44, %38
  %47 = phi ptr [ %45, %44 ], [ %.pr, %38 ]
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %54

49:                                               ; preds = %46
  %50 = load ptr, ptr %14, align 8, !tbaa !13
  %.not68 = icmp eq ptr %50, null
  br i1 %.not68, label %53, label %51

51:                                               ; preds = %49
  %52 = load ptr, ptr %17, align 8, !tbaa !20
  tail call void %52(ptr noundef nonnull %.0) #6
  br label %93

53:                                               ; preds = %49
  tail call void @free(ptr noundef nonnull %.0) #6
  br label %93

54:                                               ; preds = %46
  %55 = getelementptr inbounds i8, ptr %.0, i64 48
  store i32 0, ptr %55, align 8, !tbaa !21
  %56 = load i8, ptr %25, align 8
  %57 = and i8 %56, 2
  %.not65 = icmp eq i8 %57, 0
  %58 = load i64, ptr %37, align 8, !tbaa !17
  %.tr66 = trunc i64 %58 to i32
  %59 = shl i32 %.tr66, 1
  br i1 %.not65, label %62, label %60

60:                                               ; preds = %54
  %61 = tail call i32 @mln_prime_generate(i32 noundef %59) #6
  %.pre69 = load i64, ptr %37, align 8, !tbaa !17
  br label %62

62:                                               ; preds = %54, %60
  %63 = phi i64 [ %.pre69, %60 ], [ %58, %54 ]
  %64 = phi i32 [ %61, %60 ], [ %59, %54 ]
  %65 = getelementptr inbounds i8, ptr %.0, i64 52
  store i32 %64, ptr %65, align 4, !tbaa !22
  %66 = load i8, ptr %25, align 8
  %67 = and i8 %66, 1
  %68 = getelementptr inbounds i8, ptr %.0, i64 56
  %69 = load i8, ptr %68, align 8
  %70 = and i8 %69, -2
  %71 = or disjoint i8 %70, %67
  store i8 %71, ptr %68, align 8
  %72 = load i8, ptr %25, align 8
  %73 = and i8 %72, 2
  %74 = and i8 %71, -3
  %75 = or disjoint i8 %74, %73
  store i8 %75, ptr %68, align 8
  %76 = icmp eq i64 %63, 0
  br i1 %76, label %83, label %77

77:                                               ; preds = %62
  %78 = load ptr, ptr %19, align 8, !tbaa !23
  %79 = icmp eq ptr %78, null
  br i1 %79, label %83, label %80

80:                                               ; preds = %77
  %81 = load ptr, ptr %20, align 8, !tbaa !24
  %82 = icmp eq ptr %81, null
  br i1 %82, label %83, label %91

83:                                               ; preds = %80, %77, %62
  %84 = load ptr, ptr %14, align 8, !tbaa !13
  %.not67 = icmp eq ptr %84, null
  br i1 %.not67, label %89, label %85

85:                                               ; preds = %83
  %86 = load ptr, ptr %17, align 8, !tbaa !20
  %87 = load ptr, ptr %.0, align 8, !tbaa !19
  tail call void %86(ptr noundef %87) #6
  %88 = load ptr, ptr %17, align 8, !tbaa !20
  tail call void %88(ptr noundef nonnull %.0) #6
  br label %93

89:                                               ; preds = %83
  %90 = load ptr, ptr %.0, align 8, !tbaa !19
  tail call void @free(ptr noundef %90) #6
  tail call void @free(ptr noundef nonnull %.0) #6
  br label %93

91:                                               ; preds = %80
  %92 = getelementptr inbounds i8, ptr %.0, i64 88
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %92, i8 0, i64 24, i1 false)
  br label %93

93:                                               ; preds = %85, %89, %51, %53, %10, %91
  %.060 = phi ptr [ %.0, %91 ], [ null, %10 ], [ null, %53 ], [ null, %51 ], [ null, %89 ], [ null, %85 ]
  ret ptr %.060
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5

attributes #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { nounwind allocsize(0,1) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 48}
!6 = !{!"mln_hash_attr", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !11, i64 40, !7, i64 48, !7, i64 56, !7, i64 64}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !7, i64 56}
!13 = !{!14, !7, i64 64}
!14 = !{!"mln_hash_s", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104}
!15 = !{!7, !7, i64 0}
!16 = !{!6, !10, i64 32}
!17 = !{!14, !10, i64 8}
!18 = !{!14, !7, i64 72}
!19 = !{!14, !7, i64 0}
!20 = !{!14, !7, i64 80}
!21 = !{!14, !11, i64 48}
!22 = !{!14, !11, i64 52}
!23 = !{!14, !7, i64 16}
!24 = !{!14, !7, i64 24}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass