; LLVM IR from buzz-lang/Buzz :: src/buzz (buzzheap)

; 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.buzzheap_clone_tableelem_s = type { ptr, ptr }
%struct.anon = type { i16, i16 }
%struct.buzzvm_s = type { ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i16, ptr, ptr, ptr, ptr, i32, i32, ptr, i16, ptr, i32 }
%struct.buzzheap_s = type { ptr, i32, i16 }
%struct.buzzdarray_s = type { ptr, i64, i32, i32, ptr }
%struct.buzzint_t = type { i16, i16, i32 }
%struct.buzzfloat_t = type { i16, i16, float }
%struct.buzzstring_t = type { i16, i16, %struct.anon.0 }
%struct.anon.0 = type { i16, ptr }
%struct.buzzuserdata_t = type { i16, i16, ptr }
%struct.buzzclosure_t = type { i16, i16, %struct.anon.1 }
%struct.anon.1 = type { i32, ptr, i8 }
%struct.buzztable_t = type { i16, i16, ptr }
%struct.buzzdict_s = type { ptr, i32, i32, ptr, ptr, ptr, i32, i32 }

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

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

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

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

declare void @buzzdarray_insert(ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @buzzheap_clone_tableelem(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @buzzheap_clone(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %struct.buzzheap_clone_tableelem_s, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %10 = call noalias ptr @malloc(i64 noundef 32) #7
  store ptr %10, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.anon, ptr %11, i32 0, i32 0
  %13 = load i16, ptr %12, align 8, !tbaa !9
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.anon, ptr %14, i32 0, i32 0
  store i16 %13, ptr %15, align 8, !tbaa !9
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.anon, ptr %16, i32 0, i32 1
  %18 = load i16, ptr %17, align 2, !tbaa !9
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.anon, ptr %19, i32 0, i32 1
  store i16 %18, ptr %20, align 2, !tbaa !9
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.buzzvm_s, ptr %21, i32 0, i32 10
  %23 = load ptr, ptr %22, align 8, !tbaa !10
  %24 = getelementptr inbounds %struct.buzzheap_s, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !14
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.buzzvm_s, ptr %26, i32 0, i32 10
  %28 = load ptr, ptr %27, align 8, !tbaa !10
  %29 = getelementptr inbounds %struct.buzzheap_s, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = getelementptr inbounds %struct.buzzdarray_s, ptr %30, i32 0, i32 1
  %32 = load i64, ptr %31, align 8, !tbaa !16
  %33 = trunc i64 %32 to i32
  call void @buzzdarray_insert(ptr noundef %25, i32 noundef %33, ptr noundef %6)
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.anon, ptr %34, i32 0, i32 0
  %36 = load i16, ptr %35, align 8, !tbaa !9
  %37 = zext i16 %36 to i32
  switch i32 %37, label %134 [
    i32 0, label %38
    i32 1, label %40
    i32 2, label %47
    i32 3, label %54
    i32 6, label %70
    i32 5, label %77
    i32 4, label %101
  ]

38:                                               ; preds = %2
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %39, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %141

40:                                               ; preds = %2
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.buzzint_t, ptr %41, i32 0, i32 2
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.buzzint_t, ptr %44, i32 0, i32 2
  store i32 %43, ptr %45, align 4, !tbaa !9
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %46, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %141

47:                                               ; preds = %2
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.buzzfloat_t, ptr %48, i32 0, i32 2
  %50 = load float, ptr %49, align 4, !tbaa !9
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.buzzfloat_t, ptr %51, i32 0, i32 2
  store float %50, ptr %52, align 4, !tbaa !9
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %53, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %141

54:                                               ; preds = %2
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.buzzstring_t, ptr %55, i32 0, i32 2
  %57 = getelementptr inbounds %struct.anon.0, ptr %56, i32 0, i32 0
  %58 = load i16, ptr %57, align 8, !tbaa !9
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.buzzstring_t, ptr %59, i32 0, i32 2
  %61 = getelementptr inbounds %struct.anon.0, ptr %60, i32 0, i32 0
  store i16 %58, ptr %61, align 8, !tbaa !9
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.buzzstring_t, ptr %62, i32 0, i32 2
  %64 = getelementptr inbounds %struct.anon.0, ptr %63, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.buzzstring_t, ptr %66, i32 0, i32 2
  %68 = getelementptr inbounds %struct.anon.0, ptr %67, i32 0, i32 1
  store ptr %65, ptr %68, align 8, !tbaa !9
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %69, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %141

70:                                               ; preds = %2
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.buzzuserdata_t, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.buzzuserdata_t, ptr %74, i32 0, i32 2
  store ptr %73, ptr %75, align 8, !tbaa !9
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %76, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %141

77:                                               ; preds = %2
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.buzzclosure_t, ptr %78, i32 0, i32 2
  %80 = getelementptr inbounds %struct.anon.1, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !9
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.buzzclosure_t, ptr %82, i32 0, i32 2
  %84 = getelementptr inbounds %struct.anon.1, ptr %83, i32 0, i32 0
  store i32 %81, ptr %84, align 8, !tbaa !9
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.buzzclosure_t, ptr %85, i32 0, i32 2
  %87 = getelementptr inbounds %struct.anon.1, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !9
  %89 = call ptr @buzzdarray_clone(ptr noundef %88)
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.buzzclosure_t, ptr %90, i32 0, i32 2
  %92 = getelementptr inbounds %struct.anon.1, ptr %91, i32 0, i32 1
  store ptr %89, ptr %92, align 8, !tbaa !9
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.buzzclosure_t, ptr %93, i32 0, i32 2
  %95 = getelementptr inbounds %struct.anon.1, ptr %94, i32 0, i32 2
  %96 = load i8, ptr %95, align 8, !tbaa !9
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.buzzclosure_t, ptr %97, i32 0, i32 2
  %99 = getelementptr inbounds %struct.anon.1, ptr %98, i32 0, i32 2
  store i8 %96, ptr %99, align 8, !tbaa !9
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %100, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %141

101:                                              ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.buzztable_t, ptr %102, i32 0, i32 2
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  store ptr %104, ptr %8, align 8, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.buzzdict_s, ptr %105, i32 0, i32 2
  %107 = load i32, ptr %106, align 4, !tbaa !19
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.buzzdict_s, ptr %108, i32 0, i32 6
  %110 = load i32, ptr %109, align 8, !tbaa !21
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.buzzdict_s, ptr %111, i32 0, i32 7
  %113 = load i32, ptr %112, align 4, !tbaa !22
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.buzzdict_s, ptr %114, i32 0, i32 3
  %116 = load ptr, ptr %115, align 8, !tbaa !23
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.buzzdict_s, ptr %117, i32 0, i32 4
  %119 = load ptr, ptr %118, align 8, !tbaa !24
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.buzzdict_s, ptr %120, i32 0, i32 5
  %122 = load ptr, ptr %121, align 8, !tbaa !25
  %123 = call ptr @buzzdict_new(i32 noundef %107, i32 noundef %110, i32 noundef %113, ptr noundef %116, ptr noundef %119, ptr noundef %122)
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.buzztable_t, ptr %124, i32 0, i32 2
  store ptr %123, ptr %125, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %126 = getelementptr inbounds %struct.buzzheap_clone_tableelem_s, ptr %9, i32 0, i32 0
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %127, ptr %126, align 8, !tbaa !26
  %128 = getelementptr inbounds %struct.buzzheap_clone_tableelem_s, ptr %9, i32 0, i32 1
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.buzztable_t, ptr %129, i32 0, i32 2
  %131 = load ptr, ptr %130, align 8, !tbaa !9
  store ptr %131, ptr %128, align 8, !tbaa !28
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  call void @buzzdict_foreach(ptr noundef %132, ptr noundef @buzzheap_clone_tableelem, ptr noundef %9)
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %133, ptr %3, align 8
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %141

134:                                              ; preds = %2
  %135 = load ptr, ptr @stderr, align 8, !tbaa !5
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.anon, ptr %136, i32 0, i32 0
  %138 = load i16, ptr %137, align 8, !tbaa !9
  %139 = zext i16 %138 to i32
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 121, i32 noundef %139) #6
  call void @abort() #8
  unreachable

141:                                              ; preds = %101, %77, %70, %54, %47, %40, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %142 = load ptr, ptr %3, align 8
  ret ptr %142
}

declare ptr @buzzdarray_clone(ptr noundef) #2

declare ptr @buzzdict_new(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @buzzdict_foreach(ptr noundef, ptr noundef, ptr noundef) #2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 72}
!11 = !{!"buzzvm_s", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !13, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !12, i64 152, !12, i64 156, !6, i64 160, !13, i64 168, !6, i64 176, !12, i64 184}
!12 = !{!"int", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"buzzheap_s", !6, i64 0, !12, i64 8, !13, i64 12}
!16 = !{!17, !18, i64 8}
!17 = !{!"buzzdarray_s", !6, i64 0, !18, i64 8, !12, i64 16, !12, i64 20, !6, i64 24}
!18 = !{!"long", !7, i64 0}
!19 = !{!20, !12, i64 12}
!20 = !{!"buzzdict_s", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !12, i64 44}
!21 = !{!20, !12, i64 40}
!22 = !{!20, !12, i64 44}
!23 = !{!20, !6, i64 16}
!24 = !{!20, !6, i64 24}
!25 = !{!20, !6, i64 32}
!26 = !{!27, !6, i64 0}
!27 = !{!"buzzheap_clone_tableelem_s", !6, i64 0, !6, i64 8}
!28 = !{!27, !6, i64 8}


; 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.buzzheap_clone_tableelem_s = type { ptr, ptr }

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

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

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

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

declare void @buzzdarray_insert(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @buzzheap_clone_tableelem(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @buzzheap_clone(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 {
  %3 = alloca ptr, align 8
  %4 = alloca %struct.buzzheap_clone_tableelem_s, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %5 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7
  store ptr %5, ptr %3, align 8, !tbaa !5
  %6 = load <2 x i16>, ptr %1, align 8, !tbaa !9
  store <2 x i16> %6, ptr %5, align 8, !tbaa !9
  %7 = getelementptr inbounds i8, ptr %0, i64 72
  %8 = load ptr, ptr %7, align 8, !tbaa !10
  %9 = load ptr, ptr %8, align 8, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !16
  %12 = trunc i64 %11 to i32
  call void @buzzdarray_insert(ptr noundef %9, i32 noundef %12, ptr noundef nonnull %3) #6
  %13 = load i16, ptr %1, align 8, !tbaa !9
  switch i16 %13, label %74 [
    i16 0, label %14
    i16 1, label %16
    i16 2, label %22
    i16 3, label %28
    i16 6, label %36
    i16 5, label %41
    i16 4, label %54
  ]

14:                                               ; preds = %2
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  br label %78

16:                                               ; preds = %2
  %17 = getelementptr inbounds i8, ptr %1, i64 4
  %18 = load i32, ptr %17, align 4, !tbaa !9
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 4
  store i32 %18, ptr %20, align 4, !tbaa !9
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  br label %78

22:                                               ; preds = %2
  %23 = getelementptr inbounds i8, ptr %1, i64 4
  %24 = load float, ptr %23, align 4, !tbaa !9
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 4
  store float %24, ptr %26, align 4, !tbaa !9
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  br label %78

28:                                               ; preds = %2
  %29 = getelementptr inbounds i8, ptr %1, i64 8
  %30 = load i16, ptr %29, align 8, !tbaa !9
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  store i16 %30, ptr %32, align 8, !tbaa !9
  %33 = getelementptr inbounds i8, ptr %1, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %31, i64 16
  store ptr %34, ptr %35, align 8, !tbaa !9
  br label %78

36:                                               ; preds = %2
  %37 = getelementptr inbounds i8, ptr %1, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  store ptr %38, ptr %40, align 8, !tbaa !9
  br label %78

41:                                               ; preds = %2
  %42 = getelementptr inbounds i8, ptr %1, i64 8
  %43 = load i32, ptr %42, align 8, !tbaa !9
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  store i32 %43, ptr %45, align 8, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %1, i64 16
  %47 = load ptr, ptr %46, align 8, !tbaa !9
  %48 = call ptr @buzzdarray_clone(ptr noundef %47) #6
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  store ptr %48, ptr %50, align 8, !tbaa !9
  %51 = getelementptr inbounds i8, ptr %1, i64 24
  %52 = load i8, ptr %51, align 8, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %49, i64 24
  store i8 %52, ptr %53, align 8, !tbaa !9
  br label %78

54:                                               ; preds = %2
  %55 = getelementptr inbounds i8, ptr %1, i64 8
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds i8, ptr %56, i64 12
  %58 = load i32, ptr %57, align 4, !tbaa !19
  %59 = getelementptr inbounds i8, ptr %56, i64 40
  %60 = load i32, ptr %59, align 8, !tbaa !21
  %61 = getelementptr inbounds i8, ptr %56, i64 44
  %62 = load i32, ptr %61, align 4, !tbaa !22
  %63 = getelementptr inbounds i8, ptr %56, i64 16
  %64 = load ptr, ptr %63, align 8, !tbaa !23
  %65 = getelementptr inbounds i8, ptr %56, i64 24
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = getelementptr inbounds i8, ptr %56, i64 32
  %68 = load ptr, ptr %67, align 8, !tbaa !25
  %69 = call ptr @buzzdict_new(i32 noundef %58, i32 noundef %60, i32 noundef %62, ptr noundef %64, ptr noundef %66, ptr noundef %68) #6
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 8
  store ptr %69, ptr %71, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  store ptr %0, ptr %4, align 8, !tbaa !26
  %72 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr %69, ptr %72, align 8, !tbaa !28
  call void @buzzdict_foreach(ptr noundef %56, ptr noundef nonnull @buzzheap_clone_tableelem, ptr noundef nonnull %4) #6
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br label %78

74:                                               ; preds = %2
  %75 = zext i16 %13 to i32
  %76 = load ptr, ptr @stderr, align 8, !tbaa !5
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 121, i32 noundef %75) #8
  call void @abort() #9
  unreachable

78:                                               ; preds = %54, %41, %36, %28, %22, %16, %14
  %.0 = phi ptr [ %73, %54 ], [ %49, %41 ], [ %39, %36 ], [ %31, %28 ], [ %27, %22 ], [ %21, %16 ], [ %15, %14 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret ptr %.0
}

declare ptr @buzzdarray_clone(ptr noundef) local_unnamed_addr #2

declare ptr @buzzdict_new(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @buzzdict_foreach(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 72}
!11 = !{!"buzzvm_s", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !13, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !12, i64 152, !12, i64 156, !6, i64 160, !13, i64 168, !6, i64 176, !12, i64 184}
!12 = !{!"int", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"buzzheap_s", !6, i64 0, !12, i64 8, !13, i64 12}
!16 = !{!17, !18, i64 8}
!17 = !{!"buzzdarray_s", !6, i64 0, !18, i64 8, !12, i64 16, !12, i64 20, !6, i64 24}
!18 = !{!"long", !7, i64 0}
!19 = !{!20, !12, i64 12}
!20 = !{!"buzzdict_s", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !12, i64 44}
!21 = !{!20, !12, i64 40}
!22 = !{!20, !12, i64 44}
!23 = !{!20, !6, i64 16}
!24 = !{!20, !6, i64 24}
!25 = !{!20, !6, i64 32}
!26 = !{!27, !6, i64 0}
!27 = !{!"buzzheap_clone_tableelem_s", !6, i64 0, !6, i64 8}
!28 = !{!27, !6, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass