; LLVM IR from TobiasKozel/VAE :: external/portaudio/src/hostapi/skeleton (pa_hostapi_skeleton)

; 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.PaSkeletonHostApiRepresentation = type { %struct.PaUtilHostApiRepresentation, %struct.PaUtilStreamInterface, %struct.PaUtilStreamInterface, ptr }
%struct.PaUtilHostApiRepresentation = type { %struct.PaUtilPrivatePaFrontHostApiInfo, %struct.PaHostApiInfo, ptr, ptr, ptr, ptr }
%struct.PaUtilPrivatePaFrontHostApiInfo = type { i64 }
%struct.PaHostApiInfo = type { i32, i32, ptr, i32, i32, i32 }
%struct.PaUtilStreamInterface = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.PaDeviceInfo = type { i32, ptr, i32, i32, i32, double, double, double, double, double }

@.str = external hidden unnamed_addr constant [24 x i8], align 1

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

16:                                               ; preds = %2
  store i32 -9992, ptr %6, align 4, !tbaa !9
  br label %148

17:                                               ; preds = %2
  %18 = call ptr @PaUtil_CreateAllocationGroup()
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.PaSkeletonHostApiRepresentation, ptr %19, i32 0, i32 3
  store ptr %18, ptr %20, align 8, !tbaa !11
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.PaSkeletonHostApiRepresentation, ptr %21, i32 0, i32 3
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = icmp ne ptr %23, null
  br i1 %24, label %26, label %25

25:                                               ; preds = %17
  store i32 -9992, ptr %6, align 4, !tbaa !9
  br label %148

26:                                               ; preds = %17
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.PaSkeletonHostApiRepresentation, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %28, ptr %29, align 8, !tbaa !5
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %31, i32 0, i32 1
  %33 = getelementptr inbounds %struct.PaHostApiInfo, ptr %32, i32 0, i32 0
  store i32 1, ptr %33, align 8, !tbaa !18
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %35, i32 0, i32 1
  %37 = getelementptr inbounds %struct.PaHostApiInfo, ptr %36, i32 0, i32 1
  store i32 0, ptr %37, align 4, !tbaa !19
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %39, i32 0, i32 1
  %41 = getelementptr inbounds %struct.PaHostApiInfo, ptr %40, i32 0, i32 2
  store ptr @.str, ptr %41, align 8, !tbaa !20
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %43, i32 0, i32 1
  %45 = getelementptr inbounds %struct.PaHostApiInfo, ptr %44, i32 0, i32 4
  store i32 -1, ptr %45, align 4, !tbaa !21
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %47, i32 0, i32 1
  %49 = getelementptr inbounds %struct.PaHostApiInfo, ptr %48, i32 0, i32 5
  store i32 -1, ptr %49, align 8, !tbaa !22
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %51, i32 0, i32 1
  %53 = getelementptr inbounds %struct.PaHostApiInfo, ptr %52, i32 0, i32 3
  store i32 0, ptr %53, align 8, !tbaa !23
  store i32 0, ptr %8, align 4, !tbaa !9
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %56, label %133

56:                                               ; preds = %26
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.PaSkeletonHostApiRepresentation, ptr %57, i32 0, i32 3
  %59 = load ptr, ptr %58, align 8, !tbaa !11
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = mul i64 8, %61
  %63 = call ptr @PaUtil_GroupAllocateMemory(ptr noundef %59, i64 noundef %62)
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %65, i32 0, i32 2
  store ptr %63, ptr %66, align 8, !tbaa !24
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %68, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !24
  %71 = icmp ne ptr %70, null
  br i1 %71, label %73, label %72

72:                                               ; preds = %56
  store i32 -9992, ptr %6, align 4, !tbaa !9
  br label %148

73:                                               ; preds = %56
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.PaSkeletonHostApiRepresentation, ptr %74, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !11
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = mul i64 72, %78
  %80 = call ptr @PaUtil_GroupAllocateMemory(ptr noundef %76, i64 noundef %79)
  store ptr %80, ptr %10, align 8, !tbaa !5
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = icmp ne ptr %81, null
  br i1 %82, label %84, label %83

83:                                               ; preds = %73
  store i32 -9992, ptr %6, align 4, !tbaa !9
  br label %148

84:                                               ; preds = %73
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %129, %84
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = load i32, ptr %8, align 4, !tbaa !9
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %89, label %132

89:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = load i32, ptr %7, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds %struct.PaDeviceInfo, ptr %90, i64 %92
  store ptr %93, ptr %11, align 8, !tbaa !5
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.PaDeviceInfo, ptr %94, i32 0, i32 0
  store i32 2, ptr %95, align 8, !tbaa !25
  %96 = load i32, ptr %5, align 4, !tbaa !9
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.PaDeviceInfo, ptr %97, i32 0, i32 2
  store i32 %96, ptr %98, align 8, !tbaa !28
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.PaDeviceInfo, ptr %99, i32 0, i32 1
  store ptr null, ptr %100, align 8, !tbaa !29
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.PaDeviceInfo, ptr %101, i32 0, i32 3
  store i32 0, ptr %102, align 4, !tbaa !30
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.PaDeviceInfo, ptr %103, i32 0, i32 4
  store i32 0, ptr %104, align 8, !tbaa !31
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.PaDeviceInfo, ptr %105, i32 0, i32 5
  store double 0.000000e+00, ptr %106, align 8, !tbaa !32
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.PaDeviceInfo, ptr %107, i32 0, i32 6
  store double 0.000000e+00, ptr %108, align 8, !tbaa !33
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.PaDeviceInfo, ptr %109, i32 0, i32 7
  store double 0.000000e+00, ptr %110, align 8, !tbaa !34
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.PaDeviceInfo, ptr %111, i32 0, i32 8
  store double 0.000000e+00, ptr %112, align 8, !tbaa !35
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.PaDeviceInfo, ptr %113, i32 0, i32 9
  store double 0.000000e+00, ptr %114, align 8, !tbaa !36
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %117, i32 0, i32 2
  %119 = load ptr, ptr %118, align 8, !tbaa !24
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %119, i64 %121
  store ptr %115, ptr %122, align 8, !tbaa !5
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %124, i32 0, i32 1
  %126 = getelementptr inbounds %struct.PaHostApiInfo, ptr %125, i32 0, i32 3
  %127 = load i32, ptr %126, align 8, !tbaa !23
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %126, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %129

129:                                              ; preds = %89
  %130 = load i32, ptr %7, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %7, align 4, !tbaa !9
  br label %85, !llvm.loop !37

132:                                              ; preds = %85
  br label %133

133:                                              ; preds = %132, %26
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = load ptr, ptr %134, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %135, i32 0, i32 3
  store ptr @Terminate, ptr %136, align 8, !tbaa !39
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %138, i32 0, i32 4
  store ptr @OpenStream, ptr %139, align 8, !tbaa !40
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.PaUtilHostApiRepresentation, ptr %141, i32 0, i32 5
  store ptr @IsFormatSupported, ptr %142, align 8, !tbaa !41
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.PaSkeletonHostApiRepresentation, ptr %143, i32 0, i32 1
  call void @PaUtil_InitializeStreamInterface(ptr noundef %144, ptr noundef @CloseStream, ptr noundef @StartStream, ptr noundef @StopStream, ptr noundef @AbortStream, ptr noundef @IsStreamStopped, ptr noundef @IsStreamActive, ptr noundef @GetStreamTime, ptr noundef @GetStreamCpuLoad, ptr noundef @PaUtil_DummyRead, ptr noundef @PaUtil_DummyWrite, ptr noundef @PaUtil_DummyGetReadAvailable, ptr noundef @PaUtil_DummyGetWriteAvailable)
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.PaSkeletonHostApiRepresentation, ptr %145, i32 0, i32 2
  call void @PaUtil_InitializeStreamInterface(ptr noundef %146, ptr noundef @CloseStream, ptr noundef @StartStream, ptr noundef @StopStream, ptr noundef @AbortStream, ptr noundef @IsStreamStopped, ptr noundef @IsStreamActive, ptr noundef @GetStreamTime, ptr noundef @PaUtil_DummyGetCpuLoad, ptr noundef @ReadStream, ptr noundef @WriteStream, ptr noundef @GetStreamReadAvailable, ptr noundef @GetStreamWriteAvailable)
  %147 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %147, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %167

148:                                              ; preds = %83, %72, %25, %16
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = icmp ne ptr %149, null
  br i1 %150, label %151, label %165

151:                                              ; preds = %148
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.PaSkeletonHostApiRepresentation, ptr %152, i32 0, i32 3
  %154 = load ptr, ptr %153, align 8, !tbaa !11
  %155 = icmp ne ptr %154, null
  br i1 %155, label %156, label %163

156:                                              ; preds = %151
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.PaSkeletonHostApiRepresentation, ptr %157, i32 0, i32 3
  %159 = load ptr, ptr %158, align 8, !tbaa !11
  call void @PaUtil_FreeAllAllocations(ptr noundef %159)
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.PaSkeletonHostApiRepresentation, ptr %160, i32 0, i32 3
  %162 = load ptr, ptr %161, align 8, !tbaa !11
  call void @PaUtil_DestroyAllocationGroup(ptr noundef %162)
  br label %163

163:                                              ; preds = %156, %151
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  call void @PaUtil_FreeMemory(ptr noundef %164)
  br label %165

165:                                              ; preds = %163, %148
  %166 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %166, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %167

167:                                              ; preds = %165, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  %168 = load i32, ptr %3, align 4
  ret i32 %168
}

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

declare ptr @PaUtil_AllocateMemory(i64 noundef) #2

declare ptr @PaUtil_CreateAllocationGroup() #2

declare ptr @PaUtil_GroupAllocateMemory(ptr noundef, i64 noundef) #2

; 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 hidden void @Terminate(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @OpenStream(ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @IsFormatSupported(ptr noundef, ptr noundef, ptr noundef, double noundef) #0

declare void @PaUtil_InitializeStreamInterface(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @CloseStream(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @StartStream(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @StopStream(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @AbortStream(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @IsStreamStopped(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @IsStreamActive(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden double @GetStreamTime(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden double @GetStreamCpuLoad(ptr noundef) #0

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

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

declare i64 @PaUtil_DummyGetReadAvailable(ptr noundef) #2

declare i64 @PaUtil_DummyGetWriteAvailable(ptr noundef) #2

declare double @PaUtil_DummyGetCpuLoad(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @ReadStream(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @WriteStream(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i64 @GetStreamReadAvailable(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i64 @GetStreamWriteAvailable(ptr noundef) #0

declare void @PaUtil_FreeAllAllocations(ptr noundef) #2

declare void @PaUtil_DestroyAllocationGroup(ptr noundef) #2

declare void @PaUtil_FreeMemory(ptr noundef) #2

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 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 264}
!12 = !{!"", !13, i64 0, !17, i64 72, !17, i64 168, !6, i64 264}
!13 = !{!"PaUtilHostApiRepresentation", !14, i64 0, !16, i64 8, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!14 = !{!"PaUtilPrivatePaFrontHostApiInfo", !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"PaHostApiInfo", !10, i64 0, !10, i64 4, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24}
!17 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!18 = !{!13, !10, i64 8}
!19 = !{!13, !10, i64 12}
!20 = !{!13, !6, i64 16}
!21 = !{!13, !10, i64 28}
!22 = !{!13, !10, i64 32}
!23 = !{!13, !10, i64 24}
!24 = !{!13, !6, i64 40}
!25 = !{!26, !10, i64 0}
!26 = !{!"PaDeviceInfo", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !27, i64 32, !27, i64 40, !27, i64 48, !27, i64 56, !27, i64 64}
!27 = !{!"double", !7, i64 0}
!28 = !{!26, !10, i64 16}
!29 = !{!26, !6, i64 8}
!30 = !{!26, !10, i64 20}
!31 = !{!26, !10, i64 24}
!32 = !{!26, !27, i64 32}
!33 = !{!26, !27, i64 40}
!34 = !{!26, !27, i64 48}
!35 = !{!26, !27, i64 56}
!36 = !{!26, !27, i64 64}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!13, !6, i64 48}
!40 = !{!13, !6, i64 56}
!41 = !{!13, !6, i64 64}


; 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"

@.str = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -9992, 1) i32 @PaSkeleton_Initialize(ptr nocapture noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = tail call ptr @PaUtil_AllocateMemory(i64 noundef 272) #2
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %.critedge, label %4

4:                                                ; preds = %2
  %5 = tail call ptr @PaUtil_CreateAllocationGroup() #2
  %6 = getelementptr inbounds i8, ptr %3, i64 264
  store ptr %5, ptr %6, align 8, !tbaa !5
  %.not56 = icmp eq ptr %5, null
  br i1 %.not56, label %22, label %7

7:                                                ; preds = %4
  store ptr %3, ptr %0, align 8, !tbaa !16
  %8 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 1, ptr %8, align 8, !tbaa !17
  %9 = getelementptr inbounds i8, ptr %3, i64 12
  store i32 0, ptr %9, align 4, !tbaa !18
  %10 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr @.str, ptr %10, align 8, !tbaa !19
  %11 = load ptr, ptr %0, align 8, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %11, i64 28
  store i32 -1, ptr %12, align 4, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %11, i64 32
  store i32 -1, ptr %13, align 8, !tbaa !21
  %14 = getelementptr inbounds i8, ptr %11, i64 24
  store i32 0, ptr %14, align 8, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %11, i64 48
  store ptr @Terminate, ptr %15, align 8, !tbaa !23
  %16 = load ptr, ptr %0, align 8, !tbaa !16
  %17 = getelementptr inbounds i8, ptr %16, i64 56
  store ptr @OpenStream, ptr %17, align 8, !tbaa !24
  %18 = load ptr, ptr %0, align 8, !tbaa !16
  %19 = getelementptr inbounds i8, ptr %18, i64 64
  store ptr @IsFormatSupported, ptr %19, align 8, !tbaa !25
  %20 = getelementptr inbounds i8, ptr %3, i64 72
  tail call void @PaUtil_InitializeStreamInterface(ptr noundef nonnull %20, ptr noundef nonnull @CloseStream, ptr noundef nonnull @StartStream, ptr noundef nonnull @StopStream, ptr noundef nonnull @AbortStream, ptr noundef nonnull @IsStreamStopped, ptr noundef nonnull @IsStreamActive, ptr noundef nonnull @GetStreamTime, ptr noundef nonnull @GetStreamCpuLoad, ptr noundef nonnull @PaUtil_DummyRead, ptr noundef nonnull @PaUtil_DummyWrite, ptr noundef nonnull @PaUtil_DummyGetReadAvailable, ptr noundef nonnull @PaUtil_DummyGetWriteAvailable) #2
  %21 = getelementptr inbounds i8, ptr %3, i64 168
  tail call void @PaUtil_InitializeStreamInterface(ptr noundef nonnull %21, ptr noundef nonnull @CloseStream, ptr noundef nonnull @StartStream, ptr noundef nonnull @StopStream, ptr noundef nonnull @AbortStream, ptr noundef nonnull @IsStreamStopped, ptr noundef nonnull @IsStreamActive, ptr noundef nonnull @GetStreamTime, ptr noundef nonnull @PaUtil_DummyGetCpuLoad, ptr noundef nonnull @ReadStream, ptr noundef nonnull @WriteStream, ptr noundef nonnull @GetStreamReadAvailable, ptr noundef nonnull @GetStreamWriteAvailable) #2
  br label %.critedge

22:                                               ; preds = %4
  tail call void @PaUtil_FreeMemory(ptr noundef nonnull %3) #2
  br label %.critedge

.critedge:                                        ; preds = %22, %2, %7
  %.0 = phi i32 [ 0, %7 ], [ -9992, %2 ], [ -9992, %22 ]
  ret i32 %.0
}

declare ptr @PaUtil_AllocateMemory(i64 noundef) local_unnamed_addr #1

declare ptr @PaUtil_CreateAllocationGroup() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @Terminate(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @OpenStream(ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @IsFormatSupported(ptr noundef, ptr noundef, ptr noundef, double noundef) #0

declare void @PaUtil_InitializeStreamInterface(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @CloseStream(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @StartStream(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @StopStream(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @AbortStream(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @IsStreamStopped(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @IsStreamActive(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden double @GetStreamTime(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden double @GetStreamCpuLoad(ptr noundef) #0

declare i32 @PaUtil_DummyRead(ptr noundef, ptr noundef, i64 noundef) #1

declare i32 @PaUtil_DummyWrite(ptr noundef, ptr noundef, i64 noundef) #1

declare i64 @PaUtil_DummyGetReadAvailable(ptr noundef) #1

declare i64 @PaUtil_DummyGetWriteAvailable(ptr noundef) #1

declare double @PaUtil_DummyGetCpuLoad(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @ReadStream(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @WriteStream(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i64 @GetStreamReadAvailable(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i64 @GetStreamWriteAvailable(ptr noundef) #0

declare void @PaUtil_FreeMemory(ptr noundef) local_unnamed_addr #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 = { "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 = { 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, !14, i64 264}
!6 = !{!"", !7, i64 0, !15, i64 72, !15, i64 168, !14, i64 264}
!7 = !{!"PaUtilHostApiRepresentation", !8, i64 0, !12, i64 8, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64}
!8 = !{!"PaUtilPrivatePaFrontHostApiInfo", !9, i64 0}
!9 = !{!"long", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"PaHostApiInfo", !13, i64 0, !13, i64 4, !14, i64 8, !13, i64 16, !13, i64 20, !13, i64 24}
!13 = !{!"int", !10, i64 0}
!14 = !{!"any pointer", !10, i64 0}
!15 = !{!"", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88}
!16 = !{!14, !14, i64 0}
!17 = !{!7, !13, i64 8}
!18 = !{!7, !13, i64 12}
!19 = !{!7, !14, i64 16}
!20 = !{!7, !13, i64 28}
!21 = !{!7, !13, i64 32}
!22 = !{!7, !13, i64 24}
!23 = !{!7, !14, i64 48}
!24 = !{!7, !14, i64 56}
!25 = !{!7, !14, i64 64}


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