	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvdec_retrieve_data
_nvdec_retrieve_data:                   ## @nvdec_retrieve_data
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	32(%rsi), %rax
	movq	40(%rsi), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %r13
	movq	(%r13), %rcx
	movq	(%rcx), %r12
	movq	(%rax), %r15
	movl	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movl	$0, -60(%rbp)
	movl	$0, -44(%rbp)
	movl	$1, -88(%rbp)
	movl	28(%r12), %eax
	movl	%eax, -84(%rbp)
	movq	(%r12), %rax
	movl	24(%r12), %edi
	callq	*8(%rax)
	movl	%eax, %edi
	callq	_CHECK_CU
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	16(%r12), %rax
	movl	8(%r12), %edi
	movl	16(%r13), %esi
	leaq	-56(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-88(%rbp), %r8
	callq	*8(%rax)
	movl	%eax, %edi
	callq	_CHECK_CU
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_14
## %bb.3:
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movl	$24, %edi
	callq	_av_mallocz
	movq	%rax, -72(%rbp)
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	%rax, %r15
	movq	_nvdec_unmap_mapped_frame@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rcx
	movq	_AV_BUFFER_FLAG_READONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movl	$24, %esi
	callq	_av_buffer_create
	movq	16(%r14), %rcx
	movl	%eax, 4(%rcx)
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:
	movl	16(%r13), %eax
	movl	%eax, 16(%r15)
	movq	8(%r13), %rdi
	callq	_av_buffer_ref
	movq	%rax, 8(%r15)
	movq	(%r13), %rdi
	callq	_av_buffer_ref
	movq	%rax, (%r15)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	-60(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_av_pix_fmt_get_chroma_sub_sample
	movq	(%r14), %rax
	cmpl	$0, (%rax)
	je	LBB0_14
## %bb.6:
	movl	%ebx, %r9d
	movq	-56(%rbp), %r8
	xorl	%edx, %edx
	movl	-48(%rbp), %edi
	xorl	%esi, %esi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	-48(%rbp), %edi
	movl	8(%r14), %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	imull	%edi, %ebx
	addl	%ebx, %esi
	incl	%edx
	cmpl	$0, (%rax,%rdx,4)
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%esi, %eax
	addq	%r8, %rax
	movq	24(%r14), %rcx
	movq	%rax, (%rcx,%rdx,8)
	movq	(%r14), %rax
	movl	%edi, (%rax,%rdx,4)
	movl	$0, %ecx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	-44(%rbp), %ecx
	jmp	LBB0_9
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	movq	16(%r14), %rdi
	cmpl	$0, 4(%rdi)
	je	LBB0_12
## %bb.13:
	addq	$4, %rdi
	callq	_av_buffer_unref
	jmp	LBB0_14
LBB0_10:
	movl	%r9d, %ebx
	jmp	LBB0_14
LBB0_12:
	movq	16(%r12), %rax
	movl	8(%r12), %edi
	movq	-56(%rbp), %rsi
	callq	*(%rax)
	movl	%eax, %edi
	callq	_CHECK_CU
	leaq	-72(%rbp), %rdi
	callq	_av_freep
LBB0_14:
	movq	(%r12), %rax
	leaq	-100(%rbp), %rdi
	callq	*(%rax)
	movl	%eax, %edi
	callq	_CHECK_CU
LBB0_15:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nvdec_unmap_mapped_frame,4,2   ## @nvdec_unmap_mapped_frame
	.comm	_AV_BUFFER_FLAG_READONLY,4,2    ## @AV_BUFFER_FLAG_READONLY
	.no_dead_strip	_nvdec_retrieve_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvdec_retrieve_data
_nvdec_retrieve_data:                   ; @nvdec_retrieve_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	ldp	x9, x8, [x1, #32]
	ldr	x8, [x8]
	ldr	x24, [x8]
	ldr	x8, [x24]
	ldr	x22, [x8]
	ldr	x23, [x9]
	str	xzr, [sp, #40]
	stp	wzr, wzr, [sp, #12]
	mov	w8, #1
	ldp	w0, w9, [x22, #24]
	str	w8, [sp, #48]
	stp	w9, wzr, [sp, #52]
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	blr	x8
	bl	_CHECK_CU
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldr	x8, [x22, #16]
	ldr	x8, [x8, #8]
	ldr	w0, [x22, #8]
	ldr	w1, [x24, #16]
	add	x2, sp, #24
	add	x3, sp, #20
	add	x4, sp, #48
	blr	x8
	bl	_CHECK_CU
	mov	x19, x0
	tbnz	w0, #31, LBB0_11
; %bb.2:
	mov	w0, #24
	bl	_av_mallocz
	str	x0, [sp, #40]
	cbz	x0, LBB0_8
; %bb.3:
	mov	x21, x0
Lloh0:
	adrp	x8, _nvdec_unmap_mapped_frame@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nvdec_unmap_mapped_frame@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldr	x3, [sp, #24]
Lloh3:
	adrp	x8, _AV_BUFFER_FLAG_READONLY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_BUFFER_FLAG_READONLY@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	w1, #24
	bl	_av_buffer_create
	ldr	x8, [x20, #16]
	str	w0, [x8, #4]
	cbz	w0, LBB0_8
; %bb.4:
	ldr	w8, [x24, #16]
	str	w8, [x21, #16]
	ldr	x0, [x24, #8]
	bl	_av_buffer_ref
	str	x0, [x21, #8]
	ldr	x0, [x24]
	bl	_av_buffer_ref
	str	x0, [x21]
	ldr	w0, [x23]
	add	x1, sp, #16
	add	x2, sp, #12
	bl	_av_pix_fmt_get_chroma_sub_sample
	ldr	x8, [x20]
	ldr	w8, [x8]
	cbz	w8, LBB0_11
; %bb.5:
	mov	x8, #0
	mov	w9, #0
	ldr	x10, [sp, #24]
	ldr	w11, [sp, #20]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x12, x10, w9, uxtw
	ldr	x13, [x20, #24]
	str	x12, [x13, x8, lsl #3]
	ldr	x12, [x20]
	str	w11, [x12, x8, lsl #2]
	ldr	w11, [sp, #20]
	ldr	w13, [x20, #8]
	ldr	w14, [sp, #12]
	cmp	x8, #0
	csel	w14, wzr, w14, eq
	asr	w13, w13, w14
	madd	w9, w13, w11, w9
	add	w8, w8, #1
	ldr	w12, [x12, w8, uxtw #2]
	cbnz	w12, LBB0_6
	b	LBB0_11
LBB0_7:
	mov	x19, x0
	b	LBB0_12
LBB0_8:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x19, x0
	ldr	x0, [x20, #16]
	ldr	w8, [x0, #4]!
	cbz	w8, LBB0_10
; %bb.9:
	bl	_av_buffer_unref
	b	LBB0_11
LBB0_10:
	ldr	x8, [x22, #16]
	ldr	x8, [x8]
	ldr	w0, [x22, #8]
	ldr	x1, [sp, #24]
	blr	x8
	bl	_CHECK_CU
	add	x0, sp, #40
	bl	_av_freep
LBB0_11:
	ldr	x8, [x22]
	ldr	x8, [x8]
	add	x0, sp, #36
	blr	x8
	bl	_CHECK_CU
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nvdec_unmap_mapped_frame,4,2   ; @nvdec_unmap_mapped_frame
	.comm	_AV_BUFFER_FLAG_READONLY,4,2    ; @AV_BUFFER_FLAG_READONLY
	.no_dead_strip	_nvdec_retrieve_data
.subsections_via_symbols
