; LLVM IR from opset/openset :: lib/cjson/cjson.ll (ZN5cjsonC2EOS_)

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

%class.cjson = type <{ ptr, i64, ptr, ptr, ptr, ptr, i32, [4 x i8], ptr, ptr, ptr, ptr, i8, [7 x i8] }>

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN5cjsonC2EOS_(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 8 dereferenceable(89) %1) unnamed_addr #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8
  %6 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 0
  %7 = load ptr, ptr %4, align 8, !tbaa !5
  %8 = getelementptr inbounds %class.cjson, ptr %7, i32 0, i32 0
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  store ptr %9, ptr %6, align 8, !tbaa !9
  %10 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 1
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %class.cjson, ptr %11, i32 0, i32 1
  %13 = load i64, ptr %12, align 8, !tbaa !14
  store i64 %13, ptr %10, align 8, !tbaa !14
  %14 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 2
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %class.cjson, ptr %15, i32 0, i32 2
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  store ptr %17, ptr %14, align 8, !tbaa !15
  %18 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 3
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %class.cjson, ptr %19, i32 0, i32 3
  %21 = load ptr, ptr %20, align 8, !tbaa !16
  store ptr %21, ptr %18, align 8, !tbaa !16
  %22 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 4
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %class.cjson, ptr %23, i32 0, i32 4
  %25 = load ptr, ptr %24, align 8, !tbaa !17
  store ptr %25, ptr %22, align 8, !tbaa !17
  %26 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %class.cjson, ptr %27, i32 0, i32 5
  %29 = load ptr, ptr %28, align 8, !tbaa !18
  store ptr %29, ptr %26, align 8, !tbaa !18
  %30 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 6
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %class.cjson, ptr %31, i32 0, i32 6
  %33 = load i32, ptr %32, align 8, !tbaa !19
  store i32 %33, ptr %30, align 8, !tbaa !19
  %34 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 8
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %class.cjson, ptr %35, i32 0, i32 8
  %37 = load ptr, ptr %36, align 8, !tbaa !20
  store ptr %37, ptr %34, align 8, !tbaa !20
  %38 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 9
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %class.cjson, ptr %39, i32 0, i32 9
  %41 = load ptr, ptr %40, align 8, !tbaa !21
  store ptr %41, ptr %38, align 8, !tbaa !21
  %42 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 10
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %class.cjson, ptr %43, i32 0, i32 10
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  store ptr %45, ptr %42, align 8, !tbaa !22
  %46 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 11
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %class.cjson, ptr %47, i32 0, i32 11
  %49 = load ptr, ptr %48, align 8, !tbaa !23
  store ptr %49, ptr %46, align 8, !tbaa !23
  %50 = getelementptr inbounds %class.cjson, ptr %5, i32 0, i32 12
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %class.cjson, ptr %51, i32 0, i32 12
  %53 = load i8, ptr %52, align 8, !tbaa !24, !range !25, !noundef !26
  %54 = trunc i8 %53 to i1
  %55 = zext i1 %54 to i8
  store i8 %55, ptr %50, align 8, !tbaa !24
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %class.cjson, ptr %56, i32 0, i32 12
  store i8 0, ptr %57, align 8, !tbaa !24
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %class.cjson, ptr %58, i32 0, i32 0
  store ptr null, ptr %59, align 8, !tbaa !9
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %class.cjson, ptr %60, i32 0, i32 4
  store ptr null, ptr %61, align 8, !tbaa !17
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %class.cjson, ptr %62, i32 0, i32 5
  store ptr null, ptr %63, align 8, !tbaa !18
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %class.cjson, ptr %64, i32 0, i32 8
  store ptr null, ptr %65, align 8, !tbaa !20
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %class.cjson, ptr %66, i32 0, i32 10
  store ptr null, ptr %67, align 8, !tbaa !22
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.cjson, ptr %68, i32 0, i32 9
  store ptr null, ptr %69, align 8, !tbaa !21
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %class.cjson, ptr %70, i32 0, i32 11
  store ptr null, ptr %71, align 8, !tbaa !23
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.cjson, ptr %72, i32 0, i32 1
  store i64 0, ptr %73, align 8, !tbaa !14
  ret void
}

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

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

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


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

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @_ZN5cjsonC2EOS_(ptr nocapture noundef nonnull writeonly align 8 dereferenceable(89) %0, ptr nocapture noundef nonnull align 8 dereferenceable(89) %1) unnamed_addr #0 align 2 {
  %3 = load ptr, ptr %1, align 8, !tbaa !5
  store ptr %3, ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load i64, ptr %5, align 8, !tbaa !13
  store i64 %6, ptr %4, align 8, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = getelementptr inbounds i8, ptr %1, i64 16
  %9 = load <2 x ptr>, ptr %8, align 8, !tbaa !14
  store <2 x ptr> %9, ptr %7, align 8, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = getelementptr inbounds i8, ptr %1, i64 32
  %12 = load <2 x ptr>, ptr %11, align 8, !tbaa !14
  store <2 x ptr> %12, ptr %10, align 8, !tbaa !14
  %13 = getelementptr inbounds i8, ptr %0, i64 48
  %14 = getelementptr inbounds i8, ptr %1, i64 48
  %15 = load i32, ptr %14, align 8, !tbaa !15
  store i32 %15, ptr %13, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  %17 = getelementptr inbounds i8, ptr %1, i64 56
  %18 = load <2 x ptr>, ptr %17, align 8, !tbaa !14
  store <2 x ptr> %18, ptr %16, align 8, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  %20 = getelementptr inbounds i8, ptr %1, i64 72
  %21 = load <2 x ptr>, ptr %20, align 8, !tbaa !14
  store <2 x ptr> %21, ptr %19, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %0, i64 88
  %23 = getelementptr inbounds i8, ptr %1, i64 88
  %24 = load i8, ptr %23, align 8, !tbaa !16, !range !17, !noundef !18
  store i8 %24, ptr %22, align 8, !tbaa !16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %1, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %11, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(33) %17, i8 0, i64 33, i1 false)
  ret void
}

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

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) 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 nounwind willreturn memory(argmem: write) }

!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 = !{!"_ZTS5cjson", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !11, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !12, i64 88}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN5cjson7Types_eE", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!6, !10, i64 8}
!14 = !{!7, !7, i64 0}
!15 = !{!6, !11, i64 48}
!16 = !{!6, !12, i64 88}
!17 = !{i8 0, i8 2}
!18 = !{}


; Effective O3 passes: EarlyCSEPass,IPSCCPPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass