; LLVM IR from yettabaa/cub3D :: mlx-linux (mlx_init)

; 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.s_xvar = type { ptr, i64, i32, i32, ptr, i64, i32, ptr, ptr, ptr, i32, i32, i32, [6 x i32], i64, i64, i32 }
%struct.anon = type { ptr, ptr, i32, i32, i32, i32, ptr, i64, i64, i64, i32, ptr, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, i32, i64, i64, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, ptr, i64, i64, i32, i32, ptr, ptr, i32, ptr }
%struct.Screen = type { ptr, ptr, i64, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, i64, i64, i64, i32, i32, i32, i32, i64 }

@.str = external hidden unnamed_addr constant [1 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @mlx_init() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %4 = call noalias ptr @malloc(i64 noundef 136) #7
  store ptr %4, ptr %2, align 8, !tbaa !5
  %5 = icmp ne ptr %4, null
  br i1 %5, label %7, label %6

6:                                                ; preds = %0
  store ptr null, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %117

7:                                                ; preds = %0
  %8 = call ptr @XOpenDisplay(ptr noundef @.str)
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.s_xvar, ptr %9, i32 0, i32 0
  store ptr %8, ptr %10, align 8, !tbaa !9
  %11 = icmp eq ptr %8, null
  br i1 %11, label %12, label %14

12:                                               ; preds = %7
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %13) #6
  store ptr null, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %117

14:                                               ; preds = %7
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.s_xvar, ptr %15, i32 0, i32 0
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds %struct.anon, ptr %17, i32 0, i32 33
  %19 = load i32, ptr %18, align 8, !tbaa !13
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.s_xvar, ptr %20, i32 0, i32 2
  store i32 %19, ptr %21, align 8, !tbaa !15
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.s_xvar, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %struct.anon, ptr %24, i32 0, i32 35
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.s_xvar, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 33
  %31 = load i32, ptr %30, align 8, !tbaa !13
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds %struct.Screen, ptr %26, i64 %32
  %34 = getelementptr inbounds %struct.Screen, ptr %33, i32 0, i32 2
  %35 = load i64, ptr %34, align 8, !tbaa !17
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.s_xvar, ptr %36, i32 0, i32 1
  store i64 %35, ptr %37, align 8, !tbaa !19
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.s_xvar, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.anon, ptr %40, i32 0, i32 35
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.s_xvar, ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 8, !tbaa !15
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %struct.Screen, ptr %42, i64 %46
  %48 = getelementptr inbounds %struct.Screen, ptr %47, i32 0, i32 12
  %49 = load i64, ptr %48, align 8, !tbaa !20
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.s_xvar, ptr %50, i32 0, i32 5
  store i64 %49, ptr %51, align 8, !tbaa !21
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.s_xvar, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.anon, ptr %54, i32 0, i32 35
  %56 = load ptr, ptr %55, align 8, !tbaa !16
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.s_xvar, ptr %57, i32 0, i32 2
  %59 = load i32, ptr %58, align 8, !tbaa !15
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds %struct.Screen, ptr %56, i64 %60
  %62 = getelementptr inbounds %struct.Screen, ptr %61, i32 0, i32 9
  %63 = load i32, ptr %62, align 8, !tbaa !22
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.s_xvar, ptr %64, i32 0, i32 3
  store i32 %63, ptr %65, align 4, !tbaa !23
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = call i32 @mlx_int_get_visual(ptr noundef %66)
  %68 = icmp eq i32 %67, -1
  br i1 %68, label %69, label %71

69:                                               ; preds = %14
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  call void @exit(i32 noundef 1) #8
  unreachable

71:                                               ; preds = %14
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.s_xvar, ptr %72, i32 0, i32 7
  store ptr null, ptr %73, align 8, !tbaa !24
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.s_xvar, ptr %74, i32 0, i32 8
  store ptr null, ptr %75, align 8, !tbaa !25
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.s_xvar, ptr %76, i32 0, i32 9
  store ptr null, ptr %77, align 8, !tbaa !26
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.s_xvar, ptr %78, i32 0, i32 12
  store i32 1, ptr %79, align 8, !tbaa !27
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.s_xvar, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = call i64 @XInternAtom(ptr noundef %82, ptr noundef @.str.2, i32 noundef 0)
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.s_xvar, ptr %84, i32 0, i32 14
  store i64 %83, ptr %85, align 8, !tbaa !28
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.s_xvar, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !9
  %89 = call i64 @XInternAtom(ptr noundef %88, ptr noundef @.str.3, i32 noundef 0)
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.s_xvar, ptr %90, i32 0, i32 15
  store i64 %89, ptr %91, align 8, !tbaa !29
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = call i32 @mlx_int_deal_shm(ptr noundef %92)
  %94 = load ptr, ptr %2, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.s_xvar, ptr %94, i32 0, i32 6
  %96 = load i32, ptr %95, align 8, !tbaa !30
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %111

98:                                               ; preds = %71
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.s_xvar, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.s_xvar, ptr %102, i32 0, i32 1
  %104 = load i64, ptr %103, align 8, !tbaa !19
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.s_xvar, ptr %105, i32 0, i32 4
  %107 = load ptr, ptr %106, align 8, !tbaa !31
  %108 = call i64 @XCreateColormap(ptr noundef %101, i64 noundef %104, ptr noundef %107, i32 noundef 0)
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.s_xvar, ptr %109, i32 0, i32 5
  store i64 %108, ptr %110, align 8, !tbaa !21
  br label %111

111:                                              ; preds = %98, %71
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = call i32 @mlx_int_rgb_conversion(ptr noundef %112)
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.s_xvar, ptr %114, i32 0, i32 16
  store i32 0, ptr %115, align 8, !tbaa !32
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %116, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %117

117:                                              ; preds = %111, %12, %6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %118 = load ptr, ptr %1, align 8
  ret ptr %118
}

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

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

declare ptr @XOpenDisplay(ptr noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

declare i32 @mlx_int_get_visual(ptr noundef) #3

declare i32 @printf(ptr noundef, ...) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

declare i64 @XInternAtom(ptr noundef, ptr noundef, i32 noundef) #3

declare i64 @XCreateColormap(ptr noundef, i64 noundef, ptr noundef, i32 noundef) #3

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mlx_int_deal_shm(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mlx_int_rgb_conversion(ptr noundef) #0

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = !{!10, !6, i64 0}
!10 = !{!"s_xvar", !6, i64 0, !11, i64 8, !12, i64 16, !12, i64 20, !6, i64 24, !11, i64 32, !12, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !12, i64 76, !12, i64 80, !7, i64 84, !11, i64 112, !11, i64 120, !12, i64 128}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 224}
!14 = !{!"", !6, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !6, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !12, i64 64, !6, i64 72, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !6, i64 104, !12, i64 112, !12, i64 116, !6, i64 120, !6, i64 128, !12, i64 136, !11, i64 144, !11, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !12, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !12, i64 224, !12, i64 228, !6, i64 232, !11, i64 240, !11, i64 248, !12, i64 256, !12, i64 260, !6, i64 264, !6, i64 272, !12, i64 280, !6, i64 288}
!15 = !{!10, !12, i64 16}
!16 = !{!14, !6, i64 232}
!17 = !{!18, !11, i64 16}
!18 = !{!"", !6, i64 0, !6, i64 8, !11, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !6, i64 48, !12, i64 56, !6, i64 64, !6, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !11, i64 120}
!19 = !{!10, !11, i64 8}
!20 = !{!18, !11, i64 80}
!21 = !{!10, !11, i64 32}
!22 = !{!18, !12, i64 56}
!23 = !{!10, !12, i64 20}
!24 = !{!10, !6, i64 48}
!25 = !{!10, !6, i64 56}
!26 = !{!10, !6, i64 64}
!27 = !{!10, !12, i64 80}
!28 = !{!10, !11, i64 112}
!29 = !{!10, !11, i64 120}
!30 = !{!10, !12, i64 40}
!31 = !{!10, !6, i64 24}
!32 = !{!10, !12, i64 128}


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

@.str = external hidden unnamed_addr constant [1 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @mlx_init() local_unnamed_addr #0 {
  %1 = tail call noalias dereferenceable_or_null(136) ptr @malloc(i64 noundef 136) #7
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %47, label %2

2:                                                ; preds = %0
  %3 = tail call ptr @XOpenDisplay(ptr noundef nonnull @.str) #8
  store ptr %3, ptr %1, align 8, !tbaa !5
  %4 = icmp eq ptr %3, null
  br i1 %4, label %5, label %6

5:                                                ; preds = %2
  tail call void @free(ptr noundef nonnull %1) #8
  br label %47

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %3, i64 224
  %8 = load i32, ptr %7, align 8, !tbaa !12
  %9 = getelementptr inbounds i8, ptr %1, i64 16
  store i32 %8, ptr %9, align 8, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %3, i64 232
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  %12 = sext i32 %8 to i64
  %13 = getelementptr inbounds %struct.Screen, ptr %11, i64 %12, i32 2
  %14 = load i64, ptr %13, align 8, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %14, ptr %15, align 8, !tbaa !18
  %16 = getelementptr inbounds %struct.Screen, ptr %11, i64 %12, i32 12
  %17 = load i64, ptr %16, align 8, !tbaa !19
  %18 = getelementptr inbounds i8, ptr %1, i64 32
  store i64 %17, ptr %18, align 8, !tbaa !20
  %19 = getelementptr inbounds %struct.Screen, ptr %11, i64 %12, i32 9
  %20 = load i32, ptr %19, align 8, !tbaa !21
  %21 = getelementptr inbounds i8, ptr %1, i64 20
  store i32 %20, ptr %21, align 4, !tbaa !22
  %22 = tail call i32 @mlx_int_get_visual(ptr noundef nonnull %1) #8
  %23 = icmp eq i32 %22, -1
  br i1 %23, label %24, label %26

24:                                               ; preds = %6
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  tail call void @exit(i32 noundef 1) #9
  unreachable

26:                                               ; preds = %6
  %27 = getelementptr inbounds i8, ptr %1, i64 48
  %28 = getelementptr inbounds i8, ptr %1, i64 80
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %27, i8 0, i64 24, i1 false)
  store i32 1, ptr %28, align 8, !tbaa !23
  %29 = load ptr, ptr %1, align 8, !tbaa !5
  %30 = tail call i64 @XInternAtom(ptr noundef %29, ptr noundef nonnull @.str.2, i32 noundef 0) #8
  %31 = getelementptr inbounds i8, ptr %1, i64 112
  store i64 %30, ptr %31, align 8, !tbaa !24
  %32 = load ptr, ptr %1, align 8, !tbaa !5
  %33 = tail call i64 @XInternAtom(ptr noundef %32, ptr noundef nonnull @.str.3, i32 noundef 0) #8
  %34 = getelementptr inbounds i8, ptr %1, i64 120
  store i64 %33, ptr %34, align 8, !tbaa !25
  %35 = tail call i32 @mlx_int_deal_shm(ptr noundef nonnull %1)
  %36 = getelementptr inbounds i8, ptr %1, i64 40
  %37 = load i32, ptr %36, align 8, !tbaa !26
  %.not34 = icmp eq i32 %37, 0
  br i1 %.not34, label %44, label %38

38:                                               ; preds = %26
  %39 = load ptr, ptr %1, align 8, !tbaa !5
  %40 = load i64, ptr %15, align 8, !tbaa !18
  %41 = getelementptr inbounds i8, ptr %1, i64 24
  %42 = load ptr, ptr %41, align 8, !tbaa !27
  %43 = tail call i64 @XCreateColormap(ptr noundef %39, i64 noundef %40, ptr noundef %42, i32 noundef 0) #8
  store i64 %43, ptr %18, align 8, !tbaa !20
  br label %44

44:                                               ; preds = %38, %26
  %45 = tail call i32 @mlx_int_rgb_conversion(ptr noundef nonnull %1)
  %46 = getelementptr inbounds i8, ptr %1, i64 128
  store i32 0, ptr %46, align 8, !tbaa !28
  br label %47

47:                                               ; preds = %0, %44, %5
  %.0 = phi ptr [ null, %5 ], [ %1, %44 ], [ null, %0 ]
  ret ptr %.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

declare ptr @XOpenDisplay(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

declare i32 @mlx_int_get_visual(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

declare i64 @XInternAtom(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i64 @XCreateColormap(ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @mlx_int_deal_shm(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mlx_int_rgb_conversion(ptr noundef) local_unnamed_addr #0

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

attributes #0 = { 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 #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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { 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, !7, i64 0}
!6 = !{!"s_xvar", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !7, i64 24, !10, i64 32, !11, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !8, i64 84, !10, i64 112, !10, i64 120, !11, i64 128}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !11, i64 224}
!13 = !{!"", !7, i64 0, !7, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !7, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !11, i64 64, !7, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !7, i64 104, !11, i64 112, !11, i64 116, !7, i64 120, !7, i64 128, !11, i64 136, !10, i64 144, !10, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !11, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !11, i64 224, !11, i64 228, !7, i64 232, !10, i64 240, !10, i64 248, !11, i64 256, !11, i64 260, !7, i64 264, !7, i64 272, !11, i64 280, !7, i64 288}
!14 = !{!6, !11, i64 16}
!15 = !{!13, !7, i64 232}
!16 = !{!17, !10, i64 16}
!17 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !7, i64 48, !11, i64 56, !7, i64 64, !7, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !10, i64 120}
!18 = !{!6, !10, i64 8}
!19 = !{!17, !10, i64 80}
!20 = !{!6, !10, i64 32}
!21 = !{!17, !11, i64 56}
!22 = !{!6, !11, i64 20}
!23 = !{!6, !11, i64 80}
!24 = !{!6, !10, i64 112}
!25 = !{!6, !10, i64 120}
!26 = !{!6, !11, i64 40}
!27 = !{!6, !7, i64 24}
!28 = !{!6, !11, i64 128}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass