	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cuda_pool_alloc
_cuda_pool_alloc:                       ## @cuda_pool_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rcx
	movq	(%rcx), %r15
	movq	$0, -40(%rbp)
	movl	(%rax), %edi
	callq	*24(%r15)
	movl	%eax, %edi
	callq	_CHECK_CU
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	-32(%rbp), %rdi
	movl	%r14d, %esi
	callq	*16(%r15)
	movl	%eax, %edi
	callq	_CHECK_CU
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movq	-32(%rbp), %rdi
	movq	_cuda_buffer_free@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %esi
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	callq	_av_buffer_create
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movq	-32(%rbp), %rdi
	callq	*8(%r15)
	movl	%eax, %edi
	callq	_CHECK_CU
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	leaq	-40(%rbp), %rdi
	callq	*(%r15)
	movl	%eax, %edi
	callq	_CHECK_CU
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cuda_buffer_free,4,2           ## @cuda_buffer_free
	.no_dead_strip	_cuda_pool_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cuda_pool_alloc
_cuda_pool_alloc:                       ; @cuda_pool_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x9, [x8, #8]
	ldr	x21, [x9]
	str	xzr, [sp, #8]
	ldr	x9, [x21, #24]
	ldr	w0, [x8]
	blr	x9
	bl	_CHECK_CU
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	x8, [x21, #16]
	mov	x0, sp
	mov	x1, x20
	blr	x8
	bl	_CHECK_CU
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	x0, [sp]
Lloh0:
	adrp	x8, _cuda_buffer_free@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cuda_buffer_free@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, x20
	mov	x3, x19
	mov	w4, #0
	bl	_av_buffer_create
	mov	x19, x0
	cbnz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x21, #8]
	ldr	x0, [sp]
	blr	x8
	bl	_CHECK_CU
	b	LBB0_6
LBB0_4:
	mov	x19, #0
	b	LBB0_7
LBB0_5:
	mov	x19, #0
LBB0_6:
	ldr	x8, [x21]
	add	x0, sp, #8
	blr	x8
	bl	_CHECK_CU
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_cuda_buffer_free,4,2           ; @cuda_buffer_free
	.no_dead_strip	_cuda_pool_alloc
.subsections_via_symbols
