; LLVM IR from SvrAdityaReddy/RTOS :: Assignment_4/message_queues (message_queue_client)

; 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.mq_attr = type { i64, i64, i64, i64, [4 x i64] }

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [56 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.mq_attr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %13 = load i32, ptr %4, align 4, !tbaa !5
  %14 = icmp ne i32 %13, 2
  br i1 %14, label %15, label %20

15:                                               ; preds = %2
  %16 = load ptr, ptr %5, align 8, !tbaa !9
  %17 = getelementptr inbounds ptr, ptr %16, i64 0
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %18)
  call void @exit(i32 noundef 0) #8
  unreachable

20:                                               ; preds = %2
  %21 = getelementptr inbounds %struct.mq_attr, ptr %8, i32 0, i32 0
  store i64 0, ptr %21, align 8, !tbaa !11
  %22 = getelementptr inbounds %struct.mq_attr, ptr %8, i32 0, i32 1
  store i64 10, ptr %22, align 8, !tbaa !14
  %23 = getelementptr inbounds %struct.mq_attr, ptr %8, i32 0, i32 2
  store i64 256, ptr %23, align 8, !tbaa !15
  %24 = getelementptr inbounds %struct.mq_attr, ptr %8, i32 0, i32 3
  store i64 0, ptr %24, align 8, !tbaa !16
  %25 = call i32 @mq_unlink(ptr noundef @.str.1) #7
  %26 = call i32 (ptr, i32, ...) @mq_open(ptr noundef @.str.1, i32 noundef 66, i32 noundef 436, ptr noundef %8) #7
  store i32 %26, ptr %6, align 4, !tbaa !5
  %27 = call i32 (ptr, i32, ...) @mq_open(ptr noundef @.str.2, i32 noundef 1) #7
  store i32 %27, ptr %7, align 4, !tbaa !5
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = icmp eq i32 %28, -1
  br i1 %29, label %30, label %32

30:                                               ; preds = %20
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %111

32:                                               ; preds = %20
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = icmp eq i32 %33, -1
  br i1 %34, label %35, label %37

35:                                               ; preds = %32
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %111

37:                                               ; preds = %32
  %38 = load ptr, ptr %5, align 8, !tbaa !9
  %39 = getelementptr inbounds ptr, ptr %38, i64 1
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = call i64 @strlen(ptr noundef %40) #9
  %42 = add i64 7, %41
  %43 = add i64 %42, 1
  %44 = mul i64 1, %43
  %45 = call noalias ptr @malloc(i64 noundef %44) #10
  store ptr %45, ptr %10, align 8, !tbaa !9
  %46 = call noalias ptr @malloc(i64 noundef 9) #10
  store ptr %46, ptr %11, align 8, !tbaa !9
  %47 = load ptr, ptr %11, align 8, !tbaa !9
  %48 = call ptr @strncat(ptr noundef %47, ptr noundef @.str.5, i64 noundef 7) #7
  %49 = load ptr, ptr %11, align 8, !tbaa !9
  %50 = call ptr @strncat(ptr noundef %49, ptr noundef @.str.6, i64 noundef 2) #7
  %51 = load ptr, ptr %10, align 8, !tbaa !9
  %52 = load ptr, ptr %11, align 8, !tbaa !9
  %53 = load ptr, ptr %11, align 8, !tbaa !9
  %54 = call i64 @strlen(ptr noundef %53) #9
  %55 = call ptr @strncat(ptr noundef %51, ptr noundef %52, i64 noundef %54) #7
  %56 = load ptr, ptr %10, align 8, !tbaa !9
  %57 = load ptr, ptr %5, align 8, !tbaa !9
  %58 = getelementptr inbounds ptr, ptr %57, i64 1
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = load ptr, ptr %5, align 8, !tbaa !9
  %61 = getelementptr inbounds ptr, ptr %60, i64 1
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = call i64 @strlen(ptr noundef %62) #9
  %64 = call ptr @strncat(ptr noundef %56, ptr noundef %59, i64 noundef %63) #7
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = load ptr, ptr %10, align 8, !tbaa !9
  %67 = load ptr, ptr %10, align 8, !tbaa !9
  %68 = call i64 @strlen(ptr noundef %67) #9
  %69 = call i32 @mq_send(i32 noundef %65, ptr noundef %66, i64 noundef %68, i32 noundef 0)
  %70 = icmp eq i32 %69, -1
  br i1 %70, label %71, label %76

71:                                               ; preds = %37
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = call i32 @mq_close(i32 noundef %72) #7
  %74 = call i32 @mq_unlink(ptr noundef @.str.1) #7
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %76

76:                                               ; preds = %71, %37
  %77 = getelementptr inbounds %struct.mq_attr, ptr %8, i32 0, i32 2
  %78 = load i64, ptr %77, align 8, !tbaa !15
  %79 = mul i64 1, %78
  %80 = call noalias ptr @malloc(i64 noundef %79) #10
  store ptr %80, ptr %9, align 8, !tbaa !9
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = load ptr, ptr %9, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.mq_attr, ptr %8, i32 0, i32 2
  %84 = load i64, ptr %83, align 8, !tbaa !15
  %85 = call i64 @mq_receive(i32 noundef %81, ptr noundef %82, i64 noundef %84, ptr noundef null)
  %86 = icmp eq i64 %85, -1
  br i1 %86, label %87, label %97

87:                                               ; preds = %76
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %89 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %89) #7
  %90 = load ptr, ptr %10, align 8, !tbaa !9
  call void @free(ptr noundef %90) #7
  %91 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %91) #7
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = call i32 @mq_close(i32 noundef %92) #7
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = call i32 @mq_close(i32 noundef %94) #7
  %96 = call i32 @mq_unlink(ptr noundef @.str.1) #7
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %111

97:                                               ; preds = %76
  %98 = load ptr, ptr %5, align 8, !tbaa !9
  %99 = getelementptr inbounds ptr, ptr %98, i64 1
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = load ptr, ptr %9, align 8, !tbaa !9
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %100, ptr noundef %101)
  %103 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %103) #7
  %104 = load ptr, ptr %10, align 8, !tbaa !9
  call void @free(ptr noundef %104) #7
  %105 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %105) #7
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = call i32 @mq_close(i32 noundef %106) #7
  %108 = load i32, ptr %7, align 4, !tbaa !5
  %109 = call i32 @mq_close(i32 noundef %108) #7
  %110 = call i32 @mq_unlink(ptr noundef @.str.1) #7
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %111

111:                                              ; preds = %97, %87, %35, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %112 = load i32, ptr %3, align 4
  ret i32 %112
}

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

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

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

; Function Attrs: nounwind
declare i32 @mq_unlink(ptr noundef) #4

; Function Attrs: nounwind
declare i32 @mq_open(ptr noundef, i32 noundef, ...) #4

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #6

; Function Attrs: nounwind
declare ptr @strncat(ptr noundef, ptr noundef, i64 noundef) #4

declare i32 @mq_send(i32 noundef, ptr noundef, i64 noundef, i32 noundef) #2

; Function Attrs: nounwind
declare i32 @mq_close(i32 noundef) #4

declare i64 @mq_receive(i32 noundef, ptr noundef, i64 noundef, ptr noundef) #2

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

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

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 = { "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 "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 = { 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 #6 = { nounwind willreturn memory(read) "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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"mq_attr", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !7, i64 32}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!12, !13, i64 16}
!16 = !{!12, !13, i64 24}


; 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.mq_attr = type { i64, i64, i64, i64, [4 x i64] }

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [56 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.mq_attr, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #10
  %.not = icmp eq i32 %0, 2
  br i1 %.not, label %7, label %4

4:                                                ; preds = %2
  %5 = load ptr, ptr %1, align 8, !tbaa !5
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %5)
  tail call void @exit(i32 noundef 0) #11
  unreachable

7:                                                ; preds = %2
  store i64 0, ptr %3, align 8, !tbaa !9
  %8 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 10, ptr %8, align 8, !tbaa !12
  %9 = getelementptr inbounds i8, ptr %3, i64 16
  store i64 256, ptr %9, align 8, !tbaa !13
  %10 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 0, ptr %10, align 8, !tbaa !14
  %11 = tail call i32 @mq_unlink(ptr noundef nonnull @.str.1) #10
  %12 = call i32 (ptr, i32, ...) @mq_open(ptr noundef nonnull @.str.1, i32 noundef 66, i32 noundef 436, ptr noundef nonnull %3) #10
  %13 = call i32 (ptr, i32, ...) @mq_open(ptr noundef nonnull @.str.2, i32 noundef 1) #10
  %14 = icmp eq i32 %12, -1
  br i1 %14, label %15, label %17

15:                                               ; preds = %7
  %16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %57

17:                                               ; preds = %7
  %18 = icmp eq i32 %13, -1
  br i1 %18, label %19, label %21

19:                                               ; preds = %17
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %57

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %1, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %23) #12
  %25 = add i64 %24, 8
  %26 = call noalias ptr @malloc(i64 noundef %25) #13
  %27 = call noalias dereferenceable_or_null(9) ptr @malloc(i64 noundef 9) #13
  %28 = call ptr @strncat(ptr noundef nonnull dereferenceable(1) %27, ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef 7) #10
  %29 = call ptr @strncat(ptr noundef nonnull dereferenceable(1) %27, ptr noundef nonnull dereferenceable(1) @.str.6, i64 noundef 2) #10
  %30 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %27) #12
  %31 = call ptr @strncat(ptr noundef nonnull dereferenceable(1) %26, ptr noundef %27, i64 noundef %30) #10
  %32 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %23) #12
  %33 = call ptr @strncat(ptr noundef nonnull dereferenceable(1) %26, ptr noundef %23, i64 noundef %32) #10
  %34 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %26) #12
  %35 = call i32 @mq_send(i32 noundef %13, ptr noundef %26, i64 noundef %34, i32 noundef 0) #10
  %36 = icmp eq i32 %35, -1
  br i1 %36, label %37, label %41

37:                                               ; preds = %21
  %38 = call i32 @mq_close(i32 noundef %13) #10
  %39 = call i32 @mq_unlink(ptr noundef nonnull @.str.1) #10
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %41

41:                                               ; preds = %37, %21
  %42 = load i64, ptr %9, align 8, !tbaa !13
  %43 = call noalias ptr @malloc(i64 noundef %42) #13
  %44 = call i64 @mq_receive(i32 noundef %12, ptr noundef %43, i64 noundef %42, ptr noundef null) #10
  %45 = icmp eq i64 %44, -1
  br i1 %45, label %46, label %51

46:                                               ; preds = %41
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  call void @free(ptr noundef %43) #10
  call void @free(ptr noundef %26) #10
  call void @free(ptr noundef %27) #10
  %48 = call i32 @mq_close(i32 noundef %12) #10
  %49 = call i32 @mq_close(i32 noundef %13) #10
  %50 = call i32 @mq_unlink(ptr noundef nonnull @.str.1) #10
  br label %57

51:                                               ; preds = %41
  %52 = load ptr, ptr %22, align 8, !tbaa !5
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef %52, ptr noundef %43)
  call void @free(ptr noundef %43) #10
  call void @free(ptr noundef %26) #10
  call void @free(ptr noundef %27) #10
  %54 = call i32 @mq_close(i32 noundef %12) #10
  %55 = call i32 @mq_close(i32 noundef %13) #10
  %56 = call i32 @mq_unlink(ptr noundef nonnull @.str.1) #10
  br label %57

57:                                               ; preds = %51, %46, %19, %15
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #10
  ret i32 0
}

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

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

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

; Function Attrs: nounwind
declare i32 @mq_unlink(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @mq_open(ptr noundef, i32 noundef, ...) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #7

declare i32 @mq_send(i32 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #8

; Function Attrs: nounwind
declare i32 @mq_close(i32 noundef) local_unnamed_addr #4

declare i64 @mq_receive(i32 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #8

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

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = { 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 #6 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 #7 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 #8 = { "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 #9 = { 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 #10 = { nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { nounwind allocsize(0) }

!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, !11, i64 0}
!10 = !{!"mq_attr", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !7, i64 32}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!10, !11, i64 16}
!14 = !{!10, !11, i64 24}


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