; 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_rect = type { float, float, float, float }
%struct.nk_draw_list = type { %struct.nk_rect, [12 x %struct.nk_vec2], %struct.nk_convert_config, ptr, ptr, ptr, i32, i32, i32, i64, i32, i32, i32, i32 }
%struct.nk_vec2 = type { float, float }
%struct.nk_convert_config = type { float, i32, i32, i32, i32, i32, %struct.nk_draw_null_texture, ptr, i64, i64 }
%struct.nk_draw_null_texture = type { %union.nk_handle, %struct.nk_vec2 }
%union.nk_handle = type { ptr }

@_ZL12nk_null_rect = external hidden constant %struct.nk_rect, align 4
@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [7 x i8], align 1
@__PRETTY_FUNCTION__.nk_draw_list_setup = external hidden unnamed_addr constant [187 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [9 x i8], align 1

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @nk_draw_list_setup(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6) #2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store i32 %5, ptr %13, align 4, !tbaa !9
  store i32 %6, ptr %14, align 4, !tbaa !9
  %15 = load ptr, ptr %8, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %7
  br label %20

18:                                               ; preds = %7
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.1, i32 noundef 9427, ptr noundef @__PRETTY_FUNCTION__.nk_draw_list_setup) #3
  unreachable

19:                                               ; No predecessors!
  br label %20

20:                                               ; preds = %19, %17
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %20
  br label %26

24:                                               ; preds = %20
  call void @__assert_fail(ptr noundef @.str.27, ptr noundef @.str.1, i32 noundef 9428, ptr noundef @__PRETTY_FUNCTION__.nk_draw_list_setup) #3
  unreachable

25:                                               ; No predecessors!
  br label %26

26:                                               ; preds = %25, %23
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %26
  br label %32

30:                                               ; preds = %26
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str.1, i32 noundef 9429, ptr noundef @__PRETTY_FUNCTION__.nk_draw_list_setup) #3
  unreachable

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31, %29
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %36

35:                                               ; preds = %32
  br label %38

36:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.29, ptr noundef @.str.1, i32 noundef 9430, ptr noundef @__PRETTY_FUNCTION__.nk_draw_list_setup) #3
  unreachable

37:                                               ; No predecessors!
  br label %38

38:                                               ; preds = %37, %35
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  br label %44

42:                                               ; preds = %38
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str.1, i32 noundef 9431, ptr noundef @__PRETTY_FUNCTION__.nk_draw_list_setup) #3
  unreachable

43:                                               ; No predecessors!
  br label %44

44:                                               ; preds = %43, %41
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %59

47:                                               ; preds = %44
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %59

50:                                               ; preds = %47
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %59

53:                                               ; preds = %50
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %59

56:                                               ; preds = %53
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %60, label %59

59:                                               ; preds = %56, %53, %50, %47, %44
  br label %93

60:                                               ; preds = %56
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.nk_draw_list, ptr %62, i32 0, i32 3
  store ptr %61, ptr %63, align 8, !tbaa !11
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.nk_draw_list, ptr %65, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %66, ptr align 8 %64, i64 64, i1 false), !tbaa.struct !20
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.nk_draw_list, ptr %68, i32 0, i32 5
  store ptr %67, ptr %69, align 8, !tbaa !25
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.nk_draw_list, ptr %71, i32 0, i32 4
  store ptr %70, ptr %72, align 8, !tbaa !26
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.nk_draw_list, ptr %74, i32 0, i32 12
  store i32 %73, ptr %75, align 8, !tbaa !27
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.nk_draw_list, ptr %77, i32 0, i32 13
  store i32 %76, ptr %78, align 4, !tbaa !28
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.nk_draw_list, ptr %79, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %80, ptr align 4 @_ZL12nk_null_rect, i64 16, i1 false), !tbaa.struct !29
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.nk_draw_list, ptr %81, i32 0, i32 9
  store i64 0, ptr %82, align 8, !tbaa !30
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.nk_draw_list, ptr %83, i32 0, i32 6
  store i32 0, ptr %84, align 8, !tbaa !31
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.nk_draw_list, ptr %85, i32 0, i32 7
  store i32 0, ptr %86, align 4, !tbaa !32
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.nk_draw_list, ptr %87, i32 0, i32 9
  store i64 0, ptr %88, align 8, !tbaa !30
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.nk_draw_list, ptr %89, i32 0, i32 8
  store i32 0, ptr %90, align 8, !tbaa !33
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.nk_draw_list, ptr %91, i32 0, i32 10
  store i32 0, ptr %92, align 8, !tbaa !34
  br label %93

93:                                               ; preds = %60, %59
  ret void
}

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS16nk_anti_aliasing", !7, i64 0}
!11 = !{!12, !6, i64 176}
!12 = !{!"_ZTS12nk_draw_list", !13, i64 0, !7, i64 16, !15, i64 112, !6, i64 176, !6, i64 184, !6, i64 192, !16, i64 200, !16, i64 204, !16, i64 208, !19, i64 216, !16, i64 224, !16, i64 228, !10, i64 232, !10, i64 236}
!13 = !{!"_ZTS7nk_rect", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTS17nk_convert_config", !14, i64 0, !10, i64 4, !10, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !17, i64 24, !6, i64 40, !19, i64 48, !19, i64 56}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTS20nk_draw_null_texture", !7, i64 0, !18, i64 8}
!18 = !{!"_ZTS7nk_vec2", !14, i64 0, !14, i64 4}
!19 = !{!"long", !7, i64 0}
!20 = !{i64 0, i64 4, !21, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !22, i64 16, i64 4, !22, i64 20, i64 4, !22, i64 24, i64 8, !23, i64 32, i64 4, !21, i64 36, i64 4, !21, i64 40, i64 8, !5, i64 48, i64 8, !24, i64 56, i64 8, !24}
!21 = !{!14, !14, i64 0}
!22 = !{!16, !16, i64 0}
!23 = !{!7, !7, i64 0}
!24 = !{!19, !19, i64 0}
!25 = !{!12, !6, i64 192}
!26 = !{!12, !6, i64 184}
!27 = !{!12, !10, i64 232}
!28 = !{!12, !10, i64 236}
!29 = !{i64 0, i64 4, !21, i64 4, i64 4, !21, i64 8, i64 4, !21, i64 12, i64 4, !21}
!30 = !{!12, !19, i64 216}
!31 = !{!12, !16, i64 200}
!32 = !{!12, !16, i64 204}
!33 = !{!12, !16, i64 208}
!34 = !{!12, !16, i64 224}


; 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_rect = type { float, float, float, float }

@_ZL12nk_null_rect = external hidden local_unnamed_addr constant %struct.nk_rect, align 4
@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [7 x i8], align 1
@__PRETTY_FUNCTION__.nk_draw_list_setup = external hidden unnamed_addr constant [187 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @nk_draw_list_setup(ptr noundef writeonly %0, ptr noundef readonly %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #2 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %8, label %9

8:                                                ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, i32 noundef 9427, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_list_setup) #3
  unreachable

9:                                                ; preds = %7
  %.not39 = icmp eq ptr %1, null
  br i1 %.not39, label %10, label %11

10:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, i32 noundef 9428, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_list_setup) #3
  unreachable

11:                                               ; preds = %9
  %.not40 = icmp eq ptr %2, null
  br i1 %.not40, label %12, label %13

12:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.1, i32 noundef 9429, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_list_setup) #3
  unreachable

13:                                               ; preds = %11
  %.not41 = icmp eq ptr %3, null
  br i1 %.not41, label %14, label %15

14:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.1, i32 noundef 9430, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_list_setup) #3
  unreachable

15:                                               ; preds = %13
  %.not42 = icmp eq ptr %4, null
  br i1 %.not42, label %16, label %17

16:                                               ; preds = %15
  tail call void @__assert_fail(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.1, i32 noundef 9431, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_list_setup) #3
  unreachable

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %0, i64 176
  store ptr %2, ptr %18, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 112
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %19, ptr noundef nonnull align 8 dereferenceable(64) %1, i64 64, i1 false), !tbaa.struct !18
  %20 = getelementptr inbounds i8, ptr %0, i64 192
  store ptr %4, ptr %20, align 8, !tbaa !25
  %21 = getelementptr inbounds i8, ptr %0, i64 184
  store ptr %3, ptr %21, align 8, !tbaa !26
  %22 = getelementptr inbounds i8, ptr %0, i64 232
  store i32 %5, ptr %22, align 8, !tbaa !27
  %23 = getelementptr inbounds i8, ptr %0, i64 236
  store i32 %6, ptr %23, align 4, !tbaa !28
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(16) @_ZL12nk_null_rect, i64 16, i1 false), !tbaa.struct !29
  %24 = getelementptr inbounds i8, ptr %0, i64 216
  %25 = getelementptr inbounds i8, ptr %0, i64 200
  store i32 0, ptr %25, align 8, !tbaa !30
  %26 = getelementptr inbounds i8, ptr %0, i64 204
  store i32 0, ptr %26, align 4, !tbaa !31
  store i64 0, ptr %24, align 8, !tbaa !32
  %27 = getelementptr inbounds i8, ptr %0, i64 208
  store i32 0, ptr %27, align 8, !tbaa !33
  %28 = getelementptr inbounds i8, ptr %0, i64 224
  store i32 0, ptr %28, align 8, !tbaa !34
  ret void
}

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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, !16, i64 176}
!6 = !{!"_ZTS12nk_draw_list", !7, i64 0, !9, i64 16, !11, i64 112, !16, i64 176, !16, i64 184, !16, i64 192, !13, i64 200, !13, i64 204, !13, i64 208, !17, i64 216, !13, i64 224, !13, i64 228, !12, i64 232, !12, i64 236}
!7 = !{!"_ZTS7nk_rect", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTS17nk_convert_config", !8, i64 0, !12, i64 4, !12, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !14, i64 24, !16, i64 40, !17, i64 48, !17, i64 56}
!12 = !{!"_ZTS16nk_anti_aliasing", !9, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!"_ZTS20nk_draw_null_texture", !9, i64 0, !15, i64 8}
!15 = !{!"_ZTS7nk_vec2", !8, i64 0, !8, i64 4}
!16 = !{!"any pointer", !9, i64 0}
!17 = !{!"long", !9, i64 0}
!18 = !{i64 0, i64 4, !19, i64 4, i64 4, !20, i64 8, i64 4, !20, i64 12, i64 4, !21, i64 16, i64 4, !21, i64 20, i64 4, !21, i64 24, i64 8, !22, i64 32, i64 4, !19, i64 36, i64 4, !19, i64 40, i64 8, !23, i64 48, i64 8, !24, i64 56, i64 8, !24}
!19 = !{!8, !8, i64 0}
!20 = !{!12, !12, i64 0}
!21 = !{!13, !13, i64 0}
!22 = !{!9, !9, i64 0}
!23 = !{!16, !16, i64 0}
!24 = !{!17, !17, i64 0}
!25 = !{!6, !16, i64 192}
!26 = !{!6, !16, i64 184}
!27 = !{!6, !12, i64 232}
!28 = !{!6, !12, i64 236}
!29 = !{i64 0, i64 4, !19, i64 4, i64 4, !19, i64 8, i64 4, !19, i64 12, i64 4, !19}
!30 = !{!6, !13, i64 200}
!31 = !{!6, !13, i64 204}
!32 = !{!6, !17, i64 216}
!33 = !{!6, !13, i64 208}
!34 = !{!6, !13, i64 224}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass