; LLVM IR from sskorol/respeaker-websockets :: src (cAPA102)

; 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.cAPA102_LEDs = type { i32, i32, ptr, i8 }
%struct.spi_ioc_transfer = type { i64, i64, i32, i32, i16, i8, i8, i8, i8, i8, i8 }

@cAPA012_BUF = external hidden global %struct.cAPA102_LEDs, align 8
@stdout = external global ptr, align 8
@.str = external hidden unnamed_addr constant [32 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @cAPA102_Refresh() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.spi_ioc_transfer, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %8 = load i32, ptr @cAPA012_BUF, align 8, !tbaa !5
  %9 = mul i32 4, %8
  %10 = add i32 4, %9
  %11 = load i32, ptr @cAPA012_BUF, align 8, !tbaa !5
  %12 = add i32 %11, 15
  %13 = udiv i32 %12, 16
  %14 = add i32 %10, %13
  %15 = add i32 %14, 1
  store i32 %15, ptr %3, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %16 = load i32, ptr %3, align 4, !tbaa !11
  %17 = zext i32 %16 to i64
  %18 = call noalias ptr @malloc(i64 noundef %17) #5
  store ptr %18, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #4
  %19 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 0
  %20 = load ptr, ptr %6, align 8, !tbaa !12
  %21 = ptrtoint ptr %20 to i64
  store i64 %21, ptr %19, align 8, !tbaa !13
  %22 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 1
  store i64 0, ptr %22, align 8, !tbaa !17
  %23 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 2
  %24 = load i32, ptr %3, align 4, !tbaa !11
  store i32 %24, ptr %23, align 8, !tbaa !18
  %25 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 3
  store i32 32000000, ptr %25, align 4, !tbaa !19
  %26 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 4
  store i16 0, ptr %26, align 8, !tbaa !20
  %27 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 5
  store i8 8, ptr %27, align 2, !tbaa !21
  %28 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 6
  store i8 0, ptr %28, align 1, !tbaa !22
  %29 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 7
  store i8 0, ptr %29, align 4, !tbaa !23
  %30 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 8
  store i8 0, ptr %30, align 1, !tbaa !24
  %31 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 9
  store i8 0, ptr %31, align 2, !tbaa !25
  %32 = getelementptr inbounds %struct.spi_ioc_transfer, ptr %7, i32 0, i32 10
  store i8 0, ptr %32, align 1, !tbaa !26
  store i32 0, ptr %2, align 4, !tbaa !11
  br label %33

33:                                               ; preds = %41, %0
  %34 = load i32, ptr %2, align 4, !tbaa !11
  %35 = icmp ult i32 %34, 4
  br i1 %35, label %36, label %44

36:                                               ; preds = %33
  %37 = load ptr, ptr %6, align 8, !tbaa !12
  %38 = load i32, ptr %2, align 4, !tbaa !11
  %39 = zext i32 %38 to i64
  %40 = getelementptr inbounds i8, ptr %37, i64 %39
  store i8 0, ptr %40, align 1, !tbaa !27
  br label %41

41:                                               ; preds = %36
  %42 = load i32, ptr %2, align 4, !tbaa !11
  %43 = add i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !11
  br label %33, !llvm.loop !28

44:                                               ; preds = %33
  %45 = load ptr, ptr %6, align 8, !tbaa !12
  %46 = getelementptr inbounds i8, ptr %45, i64 4
  store ptr %46, ptr %5, align 8, !tbaa !12
  %47 = load ptr, ptr getelementptr inbounds (%struct.cAPA102_LEDs, ptr @cAPA012_BUF, i32 0, i32 2), align 8, !tbaa !30
  store ptr %47, ptr %4, align 8, !tbaa !12
  store i32 0, ptr %2, align 4, !tbaa !11
  br label %48

48:                                               ; preds = %71, %44
  %49 = load i32, ptr %2, align 4, !tbaa !11
  %50 = load i32, ptr @cAPA012_BUF, align 8, !tbaa !5
  %51 = icmp ult i32 %49, %50
  br i1 %51, label %52, label %78

52:                                               ; preds = %48
  %53 = load i8, ptr getelementptr inbounds (%struct.cAPA102_LEDs, ptr @cAPA012_BUF, i32 0, i32 3), align 8, !tbaa !31
  %54 = load ptr, ptr %5, align 8, !tbaa !12
  %55 = getelementptr inbounds i8, ptr %54, i64 0
  store i8 %53, ptr %55, align 1, !tbaa !27
  %56 = load ptr, ptr %4, align 8, !tbaa !12
  %57 = getelementptr inbounds i8, ptr %56, i64 1
  %58 = load i8, ptr %57, align 1, !tbaa !27
  %59 = load ptr, ptr %5, align 8, !tbaa !12
  %60 = getelementptr inbounds i8, ptr %59, i64 1
  store i8 %58, ptr %60, align 1, !tbaa !27
  %61 = load ptr, ptr %4, align 8, !tbaa !12
  %62 = getelementptr inbounds i8, ptr %61, i64 2
  %63 = load i8, ptr %62, align 1, !tbaa !27
  %64 = load ptr, ptr %5, align 8, !tbaa !12
  %65 = getelementptr inbounds i8, ptr %64, i64 2
  store i8 %63, ptr %65, align 1, !tbaa !27
  %66 = load ptr, ptr %4, align 8, !tbaa !12
  %67 = getelementptr inbounds i8, ptr %66, i64 3
  %68 = load i8, ptr %67, align 1, !tbaa !27
  %69 = load ptr, ptr %5, align 8, !tbaa !12
  %70 = getelementptr inbounds i8, ptr %69, i64 3
  store i8 %68, ptr %70, align 1, !tbaa !27
  br label %71

71:                                               ; preds = %52
  %72 = load i32, ptr %2, align 4, !tbaa !11
  %73 = add i32 %72, 1
  store i32 %73, ptr %2, align 4, !tbaa !11
  %74 = load ptr, ptr %4, align 8, !tbaa !12
  %75 = getelementptr inbounds i8, ptr %74, i64 4
  store ptr %75, ptr %4, align 8, !tbaa !12
  %76 = load ptr, ptr %5, align 8, !tbaa !12
  %77 = getelementptr inbounds i8, ptr %76, i64 4
  store ptr %77, ptr %5, align 8, !tbaa !12
  br label %48, !llvm.loop !32

78:                                               ; preds = %48
  %79 = load i32, ptr @cAPA012_BUF, align 8, !tbaa !5
  %80 = mul i32 %79, 4
  %81 = add i32 %80, 4
  store i32 %81, ptr %2, align 4, !tbaa !11
  br label %82

82:                                               ; preds = %91, %78
  %83 = load i32, ptr %2, align 4, !tbaa !11
  %84 = load i32, ptr %3, align 4, !tbaa !11
  %85 = icmp ult i32 %83, %84
  br i1 %85, label %86, label %94

86:                                               ; preds = %82
  %87 = load ptr, ptr %6, align 8, !tbaa !12
  %88 = load i32, ptr %2, align 4, !tbaa !11
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds i8, ptr %87, i64 %89
  store i8 1, ptr %90, align 1, !tbaa !27
  br label %91

91:                                               ; preds = %86
  %92 = load i32, ptr %2, align 4, !tbaa !11
  %93 = add i32 %92, 1
  store i32 %93, ptr %2, align 4, !tbaa !11
  br label %82, !llvm.loop !33

94:                                               ; preds = %82
  %95 = load i32, ptr getelementptr inbounds (%struct.cAPA102_LEDs, ptr @cAPA012_BUF, i32 0, i32 1), align 4, !tbaa !34
  %96 = call i32 (i32, i64, ...) @ioctl(i32 noundef %95, i64 noundef 1075866368, ptr noundef %7) #4
  store i32 %96, ptr %1, align 4, !tbaa !11
  %97 = load i32, ptr %1, align 4, !tbaa !11
  %98 = icmp slt i32 %97, 1
  br i1 %98, label %99, label %102

99:                                               ; preds = %94
  %100 = load ptr, ptr @stdout, align 8, !tbaa !12
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef @.str) #4
  br label %102

102:                                              ; preds = %99, %94
  %103 = load ptr, ptr %6, align 8, !tbaa !12
  call void @free(ptr noundef %103) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

; 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: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

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

attributes #0 = { 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 #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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !8, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"spi_ioc_transfer", !15, i64 0, !15, i64 8, !7, i64 16, !7, i64 20, !16, i64 24, !8, i64 26, !8, i64 27, !8, i64 28, !8, i64 29, !8, i64 30, !8, i64 31}
!15 = !{!"long long", !8, i64 0}
!16 = !{!"short", !8, i64 0}
!17 = !{!14, !15, i64 8}
!18 = !{!14, !7, i64 16}
!19 = !{!14, !7, i64 20}
!20 = !{!14, !16, i64 24}
!21 = !{!14, !8, i64 26}
!22 = !{!14, !8, i64 27}
!23 = !{!14, !8, i64 28}
!24 = !{!14, !8, i64 29}
!25 = !{!14, !8, i64 30}
!26 = !{!14, !8, i64 31}
!27 = !{!8, !8, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!6, !10, i64 8}
!31 = !{!6, !8, i64 16}
!32 = distinct !{!32, !29}
!33 = distinct !{!33, !29}
!34 = !{!6, !7, i64 4}


; 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.cAPA102_LEDs = type { i32, i32, ptr, i8 }
%struct.spi_ioc_transfer = type { i64, i64, i32, i32, i16, i8, i8, i8, i8, i8, i8 }

@cAPA012_BUF = external hidden local_unnamed_addr global %struct.cAPA102_LEDs, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [32 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @cAPA102_Refresh() local_unnamed_addr #1 {
  %1 = alloca %struct.spi_ioc_transfer, align 8
  %2 = load i32, ptr @cAPA012_BUF, align 8, !tbaa !5
  %3 = shl i32 %2, 2
  %4 = add i32 %3, 4
  %5 = add i32 %2, 15
  %6 = lshr i32 %5, 4
  %7 = add nuw nsw i32 %6, 1
  %8 = add i32 %7, %4
  %9 = zext i32 %8 to i64
  %10 = tail call noalias ptr @malloc(i64 noundef %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #8
  %11 = ptrtoint ptr %10 to i64
  store i64 %11, ptr %1, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 0, ptr %12, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %1, i64 16
  store i32 %8, ptr %13, align 8, !tbaa !16
  %14 = getelementptr inbounds i8, ptr %1, i64 20
  store i32 32000000, ptr %14, align 4, !tbaa !17
  %15 = getelementptr inbounds i8, ptr %1, i64 24
  store i16 0, ptr %15, align 8, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %1, i64 26
  store i8 8, ptr %16, align 2, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %1, i64 27
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(5) %17, i8 0, i64 5, i1 false)
  store i32 0, ptr %10, align 1
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %18 = load ptr, ptr getelementptr inbounds (i8, ptr @cAPA012_BUF, i64 8), align 8, !tbaa !20
  %19 = load i8, ptr getelementptr inbounds (i8, ptr @cAPA012_BUF, i64 16), align 8, !tbaa !21
  %xtraiter = and i32 %2, 1
  %20 = icmp eq i32 %2, 1
  br i1 %20, label %.preheader.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i32 %2, -2
  br label %34

.preheader.loopexit.unr-lcssa:                    ; preds = %34, %.lr.ph
  %.pn30.unr = phi ptr [ %10, %.lr.ph ], [ %.025.1, %34 ]
  %.02629.unr = phi ptr [ %18, %.lr.ph ], [ %53, %34 ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.preheader.loopexit.epilog-lcssa

.preheader.loopexit.epilog-lcssa:                 ; preds = %.preheader.loopexit.unr-lcssa
  %.025.epil = getelementptr inbounds i8, ptr %.pn30.unr, i64 4
  store i8 %19, ptr %.025.epil, align 1, !tbaa !22
  %21 = getelementptr inbounds i8, ptr %.02629.unr, i64 1
  %22 = load i8, ptr %21, align 1, !tbaa !22
  %23 = getelementptr inbounds i8, ptr %.pn30.unr, i64 5
  store i8 %22, ptr %23, align 1, !tbaa !22
  %24 = getelementptr inbounds i8, ptr %.02629.unr, i64 2
  %25 = load i8, ptr %24, align 1, !tbaa !22
  %26 = getelementptr inbounds i8, ptr %.pn30.unr, i64 6
  store i8 %25, ptr %26, align 1, !tbaa !22
  %27 = getelementptr inbounds i8, ptr %.02629.unr, i64 3
  %28 = load i8, ptr %27, align 1, !tbaa !22
  %29 = getelementptr inbounds i8, ptr %.pn30.unr, i64 7
  store i8 %28, ptr %29, align 1, !tbaa !22
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit.epilog-lcssa, %.preheader.loopexit.unr-lcssa, %0
  %30 = icmp ult i32 %4, %8
  br i1 %30, label %.lr.ph33.preheader, label %._crit_edge

.lr.ph33.preheader:                               ; preds = %.preheader
  %31 = zext i32 %4 to i64
  %scevgep = getelementptr i8, ptr %10, i64 %31
  %32 = lshr i32 %5, 4
  %narrow = add nuw nsw i32 %32, 1
  %33 = zext nneg i32 %narrow to i64
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %scevgep, i8 1, i64 %33, i1 false), !tbaa !22
  br label %._crit_edge

34:                                               ; preds = %34, %.lr.ph.new
  %.pn30 = phi ptr [ %10, %.lr.ph.new ], [ %.025.1, %34 ]
  %.02629 = phi ptr [ %18, %.lr.ph.new ], [ %53, %34 ]
  %niter = phi i32 [ 0, %.lr.ph.new ], [ %niter.next.1, %34 ]
  %.025 = getelementptr inbounds i8, ptr %.pn30, i64 4
  store i8 %19, ptr %.025, align 1, !tbaa !22
  %35 = getelementptr inbounds i8, ptr %.02629, i64 1
  %36 = load i8, ptr %35, align 1, !tbaa !22
  %37 = getelementptr inbounds i8, ptr %.pn30, i64 5
  store i8 %36, ptr %37, align 1, !tbaa !22
  %38 = getelementptr inbounds i8, ptr %.02629, i64 2
  %39 = load i8, ptr %38, align 1, !tbaa !22
  %40 = getelementptr inbounds i8, ptr %.pn30, i64 6
  store i8 %39, ptr %40, align 1, !tbaa !22
  %41 = getelementptr inbounds i8, ptr %.02629, i64 3
  %42 = load i8, ptr %41, align 1, !tbaa !22
  %43 = getelementptr inbounds i8, ptr %.pn30, i64 7
  store i8 %42, ptr %43, align 1, !tbaa !22
  %.025.1 = getelementptr inbounds i8, ptr %.pn30, i64 8
  store i8 %19, ptr %.025.1, align 1, !tbaa !22
  %44 = getelementptr inbounds i8, ptr %.02629, i64 5
  %45 = load i8, ptr %44, align 1, !tbaa !22
  %46 = getelementptr inbounds i8, ptr %.pn30, i64 9
  store i8 %45, ptr %46, align 1, !tbaa !22
  %47 = getelementptr inbounds i8, ptr %.02629, i64 6
  %48 = load i8, ptr %47, align 1, !tbaa !22
  %49 = getelementptr inbounds i8, ptr %.pn30, i64 10
  store i8 %48, ptr %49, align 1, !tbaa !22
  %50 = getelementptr inbounds i8, ptr %.02629, i64 7
  %51 = load i8, ptr %50, align 1, !tbaa !22
  %52 = getelementptr inbounds i8, ptr %.pn30, i64 11
  store i8 %51, ptr %52, align 1, !tbaa !22
  %53 = getelementptr inbounds i8, ptr %.02629, i64 8
  %niter.next.1 = add i32 %niter, 2
  %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.loopexit.unr-lcssa, label %34, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph33.preheader, %.preheader
  %54 = load i32, ptr getelementptr inbounds (i8, ptr @cAPA012_BUF, i64 4), align 4, !tbaa !25
  %55 = call i32 (i32, i64, ...) @ioctl(i32 noundef %54, i64 noundef 1075866368, ptr noundef nonnull %1) #8
  %56 = icmp slt i32 %55, 1
  br i1 %56, label %57, label %60

57:                                               ; preds = %._crit_edge
  %58 = load ptr, ptr @stdout, align 8, !tbaa !26
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str) #8
  br label %60

60:                                               ; preds = %57, %._crit_edge
  call void @free(ptr noundef %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  ret void
}

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

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

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) local_unnamed_addr #3

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

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

; 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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { 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 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !8, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"spi_ioc_transfer", !13, i64 0, !13, i64 8, !7, i64 16, !7, i64 20, !14, i64 24, !8, i64 26, !8, i64 27, !8, i64 28, !8, i64 29, !8, i64 30, !8, i64 31}
!13 = !{!"long long", !8, i64 0}
!14 = !{!"short", !8, i64 0}
!15 = !{!12, !13, i64 8}
!16 = !{!12, !7, i64 16}
!17 = !{!12, !7, i64 20}
!18 = !{!12, !14, i64 24}
!19 = !{!12, !8, i64 26}
!20 = !{!6, !10, i64 8}
!21 = !{!6, !8, i64 16}
!22 = !{!8, !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!6, !7, i64 4}
!26 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass