; LLVM IR from unitreerobotics/kinect_teleoperate :: src/extern/glfw/src/tests (gamma)

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; 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) #1

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

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

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

; Function Attrs: nounwind 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) #2 {
  %3 = alloca float, align 4
  %4 = alloca %struct.nk_vec2, align 4
  store float %1, ptr %3, align 4, !tbaa !5
  call void @nk_zero(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 !15
  %7 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 3
  store i8 0, ptr %7, align 8, !tbaa !16
  %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 !17
  %10 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 7
  store i8 3, ptr %10, align 4, !tbaa !18
  %11 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 6
  store i8 1, ptr %11, align 1, !tbaa !19
  %12 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 5
  store i8 0, ptr %12, align 2, !tbaa !20
  %13 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 10
  store i32 0, ptr %13, align 4, !tbaa !21
  %14 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 11
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %15 = call <2 x float> @nk_vec2(float noundef 0.000000e+00, float noundef 0.000000e+00)
  store <2 x float> %15, ptr %4, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 4 %4, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %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 !23
  %18 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 4
  store i8 0, ptr %18, align 1, !tbaa !24
  %19 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 14
  store i32 63, ptr %19, align 8, !tbaa !25
  %20 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 13
  store ptr null, ptr %20, align 8, !tbaa !26
  %21 = getelementptr inbounds %struct.nk_font_config, ptr %0, i32 0, i32 15
  store ptr null, ptr %21, align 8, !tbaa !27
  ret void
}

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

!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/C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"nk_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, !13, i64 64, !11, i64 72, !11, i64 80}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"nk_vec2", !6, i64 0, !6, i64 4}
!15 = !{!10, !12, i64 16}
!16 = !{!10, !7, i64 24}
!17 = !{!10, !6, i64 32}
!18 = !{!10, !7, i64 28}
!19 = !{!10, !7, i64 27}
!20 = !{!10, !7, i64 26}
!21 = !{!10, !13, i64 36}
!22 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!23 = !{!10, !11, i64 48}
!24 = !{!10, !7, i64 25}
!25 = !{!10, !13, i64 64}
!26 = !{!10, !11, i64 56}
!27 = !{!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: nounwind uwtable
declare dso_local <2 x float> @nk_vec2(float noundef, float noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind 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 #0 {
  tail call void @nk_zero(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 !14
  %6 = getelementptr inbounds i8, ptr %0, i64 27
  store i8 1, ptr %6, align 1, !tbaa !15
  %7 = getelementptr inbounds i8, ptr %0, i64 26
  store i8 0, ptr %7, align 2, !tbaa !16
  %8 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 0, ptr %8, align 4, !tbaa !17
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  %10 = tail call <2 x float> @nk_vec2(float noundef 0.000000e+00, float noundef 0.000000e+00)
  store <2 x float> %10, ptr %9, 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 !18
  %13 = getelementptr inbounds i8, ptr %0, i64 25
  store i8 0, ptr %13, align 1, !tbaa !19
  %14 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 63, ptr %14, align 8, !tbaa !20
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr null, ptr %15, align 8, !tbaa !21
  %16 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr null, ptr %16, align 8, !tbaa !22
  ret void
}

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

attributes #0 = { 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 = { 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 #2 = { 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 = !{!"nk_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, !12, i64 64, !7, i64 72, !7, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"nk_vec2", !11, i64 0, !11, i64 4}
!14 = !{!6, !8, i64 28}
!15 = !{!6, !8, i64 27}
!16 = !{!6, !8, i64 26}
!17 = !{!6, !12, i64 36}
!18 = !{!6, !7, i64 48}
!19 = !{!6, !8, i64 25}
!20 = !{!6, !12, i64 64}
!21 = !{!6, !7, i64 56}
!22 = !{!6, !7, i64 72}


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