; LLVM IR from ClementineAccount/Albuquerque :: src/HelloSDL (main)

; 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.nk_font_config = type { ptr, ptr, i64, i8, i8, i8, i8, i8, [3 x i8], float, i32, %struct.nk_vec2, ptr, ptr, i32, ptr, ptr }
%struct.nk_vec2 = type { float, float }

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @nk_vec2(float noundef, float noundef) #1

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL7nk_zeroPvm(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @nk_font_default_glyph_ranges() #4

; Function Attrs: mustprogress uwtable
define dso_local void @nk_font_config(ptr dead_on_unwind noalias writable sret(%struct.nk_font_config) align 8 %0, float noundef %1) #5 {
  %3 = alloca float, align 4
  %4 = alloca %struct.nk_vec2, align 4
  store float %1, ptr %3, align 4, !tbaa !5
  call void @_ZL7nk_zeroPvm(ptr noundef %0, i64 noundef 88)
  %5 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 1
  store ptr null, ptr %5, align 8, !tbaa !9
  %6 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 2
  store i64 0, ptr %6, align 8, !tbaa !16
  %7 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 3
  store i8 0, ptr %7, align 8, !tbaa !17
  %8 = load float, ptr %3, align 4, !tbaa !5
  %9 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 9
  store float %8, ptr %9, align 8, !tbaa !18
  %10 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 7
  store i8 3, ptr %10, align 4, !tbaa !19
  %11 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 6
  store i8 1, ptr %11, align 1, !tbaa !20
  %12 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 5
  store i8 0, ptr %12, align 2, !tbaa !21
  %13 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 10
  store i32 0, ptr %13, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %14 = call <2 x float> @nk_vec2(float noundef 0.000000e+00, float noundef 0.000000e+00)
  store <2 x float> %14, ptr %4, align 4
  %15 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 4 %4, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  %16 = call ptr @nk_font_default_glyph_ranges()
  %17 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 12
  store ptr %16, ptr %17, align 8, !tbaa !24
  %18 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 4
  store i8 0, ptr %18, align 1, !tbaa !25
  %19 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 14
  store i32 63, ptr %19, align 8, !tbaa !26
  %20 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 13
  store ptr null, ptr %20, align 8, !tbaa !27
  %21 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 15
  store ptr null, ptr %21, align 8, !tbaa !28
  ret void
}

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 = { 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" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="64" "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 }

!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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTS14nk_font_config", !11, i64 0, !11, i64 8, !12, i64 16, !7, i64 24, !7, i64 25, !7, i64 26, !7, i64 27, !7, i64 28, !7, i64 29, !6, i64 32, !13, i64 36, !14, i64 40, !11, i64 48, !11, i64 56, !15, i64 64, !11, i64 72, !11, i64 80}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTS18nk_font_coord_type", !7, i64 0}
!14 = !{!"_ZTS7nk_vec2", !6, i64 0, !6, i64 4}
!15 = !{!"int", !7, i64 0}
!16 = !{!10, !12, i64 16}
!17 = !{!10, !7, i64 24}
!18 = !{!10, !6, i64 32}
!19 = !{!10, !7, i64 28}
!20 = !{!10, !7, i64 27}
!21 = !{!10, !7, i64 26}
!22 = !{!10, !13, i64 36}
!23 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!24 = !{!10, !11, i64 48}
!25 = !{!10, !7, i64 25}
!26 = !{!10, !15, i64 64}
!27 = !{!10, !11, i64 56}
!28 = !{!10, !11, i64 72}


; 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.nk_font_config = type { ptr, ptr, i64, i8, i8, i8, i8, i8, [3 x i8], float, i32, %struct.nk_vec2, ptr, ptr, i32, ptr, ptr }
%struct.nk_vec2 = type { float, float }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @nk_vec2(float noundef, float noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL7nk_zeroPvm(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @nk_font_default_glyph_ranges() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @nk_font_config(ptr dead_on_unwind noalias writable sret(%struct.nk_font_config) align 8 %0, float noundef %1) local_unnamed_addr #3 {
  tail call void @_ZL7nk_zeroPvm(ptr noundef %0, i64 noundef 88)
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(17) %3, i8 0, i64 17, i1 false)
  store float %1, ptr %4, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 28
  store i8 3, ptr %5, align 4, !tbaa !15
  %6 = getelementptr inbounds i8, ptr %0, i64 27
  store i8 1, ptr %6, align 1, !tbaa !16
  %7 = getelementptr inbounds i8, ptr %0, i64 26
  store i8 0, ptr %7, align 2, !tbaa !17
  %8 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 0, ptr %8, align 4, !tbaa !18
  %9 = tail call <2 x float> @nk_vec2(float noundef 0.000000e+00, float noundef 0.000000e+00)
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  store <2 x float> %9, ptr %10, align 8
  %11 = tail call ptr @nk_font_default_glyph_ranges()
  %12 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %11, ptr %12, align 8, !tbaa !19
  %13 = getelementptr inbounds i8, ptr %0, i64 25
  store i8 0, ptr %13, align 1, !tbaa !20
  %14 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 63, ptr %14, align 8, !tbaa !21
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr null, ptr %15, align 8, !tbaa !22
  %16 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr null, ptr %16, align 8, !tbaa !23
  ret void
}

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="64" "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 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 = { 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" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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, !11, i64 32}
!6 = !{!"_ZTS14nk_font_config", !7, i64 0, !7, i64 8, !10, i64 16, !8, i64 24, !8, i64 25, !8, i64 26, !8, i64 27, !8, i64 28, !8, i64 29, !11, i64 32, !12, i64 36, !13, i64 40, !7, i64 48, !7, i64 56, !14, i64 64, !7, i64 72, !7, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"_ZTS18nk_font_coord_type", !8, i64 0}
!13 = !{!"_ZTS7nk_vec2", !11, i64 0, !11, i64 4}
!14 = !{!"int", !8, i64 0}
!15 = !{!6, !8, i64 28}
!16 = !{!6, !8, i64 27}
!17 = !{!6, !8, i64 26}
!18 = !{!6, !12, i64 36}
!19 = !{!6, !7, i64 48}
!20 = !{!6, !8, i64 25}
!21 = !{!6, !14, i64 64}
!22 = !{!6, !7, i64 56}
!23 = !{!6, !7, i64 72}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,TailCallElimPass