	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cuda_get_buffer
_cuda_get_buffer:                       ## @cuda_get_buffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	callq	_av_buffer_pool_get
	movq	32(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	(%rbx), %rsi
	movq	24(%rbx), %rdi
	movl	(%rax), %edx
	movq	(%r14), %rcx
	movl	12(%r14), %r8d
	movl	8(%r14), %r9d
	movq	_CUDA_FRAME_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	callq	_av_image_fill_arrays
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	movq	(%r14), %rax
	movq	_AV_PIX_FMT_YUV420P@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	(%rbx), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	movl	%edx, 8(%rax)
	movl	%edx, 4(%rax)
	movq	24(%rbx), %rcx
	movq	8(%rcx), %rsi
	movq	%rsi, 16(%rcx)
	movl	8(%r14), %eax
	imull	%eax, %edx
	movl	%edx, %edi
	shrl	$31, %edi
	addl	%edx, %edi
	sarl	%edi
	movslq	%edi, %rdx
	addq	%rsi, %rdx
	movq	%rdx, 8(%rcx)
	jmp	LBB0_5
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_3:
	movl	8(%r14), %eax
LBB0_5:
	movq	_AV_PIX_FMT_CUDA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rbx)
	movl	12(%r14), %ecx
	movl	%ecx, 12(%rbx)
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CUDA_FRAME_ALIGNMENT,4,2       ## @CUDA_FRAME_ALIGNMENT
	.comm	_AV_PIX_FMT_YUV420P,8,3         ## @AV_PIX_FMT_YUV420P
	.comm	_AV_PIX_FMT_CUDA,4,2            ## @AV_PIX_FMT_CUDA
	.no_dead_strip	_cuda_get_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cuda_get_buffer
_cuda_get_buffer:                       ; @cuda_get_buffer
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #16]
	bl	_av_buffer_pool_get
	ldr	x8, [x19, #32]
	str	x0, [x8]
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x0, [x19, #24]
	ldr	x1, [x19]
	ldr	w2, [x8]
	ldr	x3, [x20]
	ldp	w5, w4, [x20, #8]
Lloh0:
	adrp	x8, _CUDA_FRAME_ALIGNMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CUDA_FRAME_ALIGNMENT@GOTPAGEOFF]
Lloh2:
	ldr	w6, [x8]
	bl	_av_image_fill_arrays
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _AV_PIX_FMT_YUV420P@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_PIX_FMT_YUV420P@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x19]
	ldr	w9, [x8]
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	stp	w9, w9, [x8, #4]
	ldr	x10, [x19, #24]
	ldr	x11, [x10, #8]
	ldr	w8, [x20, #8]
	mul	w9, w8, w9
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	add	x9, x11, w9, sxtw
	stp	x9, x11, [x10, #8]
	b	LBB0_6
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_5:
	ldr	w8, [x20, #8]
LBB0_6:
	mov	w0, #0
Lloh9:
	adrp	x9, _AV_PIX_FMT_CUDA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AV_PIX_FMT_CUDA@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	str	w9, [x19, #16]
	ldr	w9, [x20, #12]
	stp	w8, w9, [x19, #8]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CUDA_FRAME_ALIGNMENT,4,2       ; @CUDA_FRAME_ALIGNMENT
	.comm	_AV_PIX_FMT_YUV420P,8,3         ; @AV_PIX_FMT_YUV420P
	.comm	_AV_PIX_FMT_CUDA,4,2            ; @AV_PIX_FMT_CUDA
	.no_dead_strip	_cuda_get_buffer
.subsections_via_symbols
