; LLVM IR from godzilla-foundation/godzilla-community :: core/deps/nanomsg-1.1.5/src/utils (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.nn_hash = type { i32, i32, ptr }
%struct.nn_list = type { ptr, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [113 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @nn_hash_init(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %4 = load ptr, ptr %2, align 8, !tbaa !5
  %5 = getelementptr inbounds %struct.nn_hash, ptr %4, i32 0, i32 0
  store i32 32, ptr %5, align 8, !tbaa !9
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.nn_hash, ptr %6, i32 0, i32 1
  store i32 0, ptr %7, align 4, !tbaa !12
  %8 = call ptr @nn_alloc_(i64 noundef 512)
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.nn_hash, ptr %9, i32 0, i32 2
  store ptr %8, ptr %10, align 8, !tbaa !13
  br label %11

11:                                               ; preds = %1
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.nn_hash, ptr %12, i32 0, i32 2
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = icmp ne ptr %14, null
  %16 = xor i1 %15, true
  %17 = zext i1 %16 to i32
  %18 = sext i32 %17 to i64
  %19 = call i64 @llvm.expect.i64(i64 %18, i64 0)
  %20 = icmp ne i64 %19, 0
  br i1 %20, label %21, label %26

21:                                               ; preds = %11
  call void @nn_backtrace_print()
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 41) #6
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = call i32 @fflush(ptr noundef %24)
  call void @nn_err_abort() #7
  unreachable

26:                                               ; preds = %11
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  store i32 0, ptr %3, align 4, !tbaa !14
  br label %29

29:                                               ; preds = %39, %28
  %30 = load i32, ptr %3, align 4, !tbaa !14
  %31 = icmp ne i32 %30, 32
  br i1 %31, label %32, label %42

32:                                               ; preds = %29
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.nn_hash, ptr %33, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = load i32, ptr %3, align 4, !tbaa !14
  %37 = zext i32 %36 to i64
  %38 = getelementptr inbounds %struct.nn_list, ptr %35, i64 %37
  call void @nn_list_init(ptr noundef %38)
  br label %39

39:                                               ; preds = %32
  %40 = load i32, ptr %3, align 4, !tbaa !14
  %41 = add i32 %40, 1
  store i32 %41, ptr %3, align 4, !tbaa !14
  br label %29, !llvm.loop !15

42:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void
}

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

declare ptr @nn_alloc_(i64 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #3

declare void @nn_backtrace_print() #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

declare i32 @fflush(ptr noundef) #2

; Function Attrs: noreturn
declare void @nn_err_abort() #5

declare void @nn_list_init(ptr noundef) #2

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

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

!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, !11, i64 0}
!10 = !{!"nn_hash", !11, i64 0, !11, i64 4, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !6, i64 8}
!14 = !{!11, !11, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [113 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @nn_hash_init(ptr nocapture noundef %0) local_unnamed_addr #0 {
  store i32 32, ptr %0, align 8, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 0, ptr %2, align 4, !tbaa !11
  %3 = tail call ptr @nn_alloc_(i64 noundef 512) #4
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %3, ptr %4, align 8, !tbaa !12
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %67, label %.preheader.preheader, !prof !13

.preheader.preheader:                             ; preds = %1
  tail call void @nn_list_init(ptr noundef nonnull %3) #4
  %5 = load ptr, ptr %4, align 8, !tbaa !12
  %6 = getelementptr inbounds i8, ptr %5, i64 16
  tail call void @nn_list_init(ptr noundef nonnull %6) #4
  %7 = load ptr, ptr %4, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %7, i64 32
  tail call void @nn_list_init(ptr noundef nonnull %8) #4
  %9 = load ptr, ptr %4, align 8, !tbaa !12
  %10 = getelementptr inbounds i8, ptr %9, i64 48
  tail call void @nn_list_init(ptr noundef nonnull %10) #4
  %11 = load ptr, ptr %4, align 8, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %11, i64 64
  tail call void @nn_list_init(ptr noundef nonnull %12) #4
  %13 = load ptr, ptr %4, align 8, !tbaa !12
  %14 = getelementptr inbounds i8, ptr %13, i64 80
  tail call void @nn_list_init(ptr noundef nonnull %14) #4
  %15 = load ptr, ptr %4, align 8, !tbaa !12
  %16 = getelementptr inbounds i8, ptr %15, i64 96
  tail call void @nn_list_init(ptr noundef nonnull %16) #4
  %17 = load ptr, ptr %4, align 8, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %17, i64 112
  tail call void @nn_list_init(ptr noundef nonnull %18) #4
  %19 = load ptr, ptr %4, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %19, i64 128
  tail call void @nn_list_init(ptr noundef nonnull %20) #4
  %21 = load ptr, ptr %4, align 8, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %21, i64 144
  tail call void @nn_list_init(ptr noundef nonnull %22) #4
  %23 = load ptr, ptr %4, align 8, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %23, i64 160
  tail call void @nn_list_init(ptr noundef nonnull %24) #4
  %25 = load ptr, ptr %4, align 8, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %25, i64 176
  tail call void @nn_list_init(ptr noundef nonnull %26) #4
  %27 = load ptr, ptr %4, align 8, !tbaa !12
  %28 = getelementptr inbounds i8, ptr %27, i64 192
  tail call void @nn_list_init(ptr noundef nonnull %28) #4
  %29 = load ptr, ptr %4, align 8, !tbaa !12
  %30 = getelementptr inbounds i8, ptr %29, i64 208
  tail call void @nn_list_init(ptr noundef nonnull %30) #4
  %31 = load ptr, ptr %4, align 8, !tbaa !12
  %32 = getelementptr inbounds i8, ptr %31, i64 224
  tail call void @nn_list_init(ptr noundef nonnull %32) #4
  %33 = load ptr, ptr %4, align 8, !tbaa !12
  %34 = getelementptr inbounds i8, ptr %33, i64 240
  tail call void @nn_list_init(ptr noundef nonnull %34) #4
  %35 = load ptr, ptr %4, align 8, !tbaa !12
  %36 = getelementptr inbounds i8, ptr %35, i64 256
  tail call void @nn_list_init(ptr noundef nonnull %36) #4
  %37 = load ptr, ptr %4, align 8, !tbaa !12
  %38 = getelementptr inbounds i8, ptr %37, i64 272
  tail call void @nn_list_init(ptr noundef nonnull %38) #4
  %39 = load ptr, ptr %4, align 8, !tbaa !12
  %40 = getelementptr inbounds i8, ptr %39, i64 288
  tail call void @nn_list_init(ptr noundef nonnull %40) #4
  %41 = load ptr, ptr %4, align 8, !tbaa !12
  %42 = getelementptr inbounds i8, ptr %41, i64 304
  tail call void @nn_list_init(ptr noundef nonnull %42) #4
  %43 = load ptr, ptr %4, align 8, !tbaa !12
  %44 = getelementptr inbounds i8, ptr %43, i64 320
  tail call void @nn_list_init(ptr noundef nonnull %44) #4
  %45 = load ptr, ptr %4, align 8, !tbaa !12
  %46 = getelementptr inbounds i8, ptr %45, i64 336
  tail call void @nn_list_init(ptr noundef nonnull %46) #4
  %47 = load ptr, ptr %4, align 8, !tbaa !12
  %48 = getelementptr inbounds i8, ptr %47, i64 352
  tail call void @nn_list_init(ptr noundef nonnull %48) #4
  %49 = load ptr, ptr %4, align 8, !tbaa !12
  %50 = getelementptr inbounds i8, ptr %49, i64 368
  tail call void @nn_list_init(ptr noundef nonnull %50) #4
  %51 = load ptr, ptr %4, align 8, !tbaa !12
  %52 = getelementptr inbounds i8, ptr %51, i64 384
  tail call void @nn_list_init(ptr noundef nonnull %52) #4
  %53 = load ptr, ptr %4, align 8, !tbaa !12
  %54 = getelementptr inbounds i8, ptr %53, i64 400
  tail call void @nn_list_init(ptr noundef nonnull %54) #4
  %55 = load ptr, ptr %4, align 8, !tbaa !12
  %56 = getelementptr inbounds i8, ptr %55, i64 416
  tail call void @nn_list_init(ptr noundef nonnull %56) #4
  %57 = load ptr, ptr %4, align 8, !tbaa !12
  %58 = getelementptr inbounds i8, ptr %57, i64 432
  tail call void @nn_list_init(ptr noundef nonnull %58) #4
  %59 = load ptr, ptr %4, align 8, !tbaa !12
  %60 = getelementptr inbounds i8, ptr %59, i64 448
  tail call void @nn_list_init(ptr noundef nonnull %60) #4
  %61 = load ptr, ptr %4, align 8, !tbaa !12
  %62 = getelementptr inbounds i8, ptr %61, i64 464
  tail call void @nn_list_init(ptr noundef nonnull %62) #4
  %63 = load ptr, ptr %4, align 8, !tbaa !12
  %64 = getelementptr inbounds i8, ptr %63, i64 480
  tail call void @nn_list_init(ptr noundef nonnull %64) #4
  %65 = load ptr, ptr %4, align 8, !tbaa !12
  %66 = getelementptr inbounds i8, ptr %65, i64 496
  tail call void @nn_list_init(ptr noundef nonnull %66) #4
  ret void

67:                                               ; preds = %1
  tail call void @nn_backtrace_print() #4
  %68 = load ptr, ptr @stderr, align 8, !tbaa !14
  %69 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 41) #5
  %70 = load ptr, ptr @stderr, align 8, !tbaa !14
  %71 = tail call i32 @fflush(ptr noundef %70)
  tail call void @nn_err_abort() #6
  unreachable
}

declare ptr @nn_alloc_(i64 noundef) local_unnamed_addr #1

declare void @nn_backtrace_print() local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: noreturn
declare void @nn_err_abort() local_unnamed_addr #3

declare void @nn_list_init(ptr noundef) local_unnamed_addr #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { cold nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"nn_hash", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!6, !10, i64 8}
!13 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!14 = !{!10, !10, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass