	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_nvdec_decode_init           ## -- Begin function ff_nvdec_decode_init
	.p2align	4, 0x90
_ff_nvdec_decode_init:                  ## @ff_nvdec_decode_init
	.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	%rdi, %r13
	movq	32(%rdi), %rax
	movq	(%rax), %r12
	movl	$0, -64(%rbp)
	movl	24(%rdi), %edi
	callq	_av_pix_fmt_desc_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	28(%r13), %edi
	callq	_map_avcodec_id
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%eax, %r14d
	movl	24(%r13), %edi
	callq	_map_chroma_format
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movl	%eax, %r15d
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, 8(%r12)
	setne	%cl
	movq	_cudaVideoChromaFormat_444@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	sete	%dil
	cmpq	$0, 16(%r13)
	jne	LBB0_10
## %bb.8:
	movq	_AV_HWDEVICE_TYPE_CUDA@GOTPCREL(%rip), %rax
	movb	%cl, -41(%rbp)                  ## 1-byte Spill
	movl	(%rax), %esi
	movl	%edi, %r12d
	movq	%r13, %rdi
	callq	_ff_decode_get_hw_frames_ctx
	movl	%r12d, %edi
	movb	-41(%rbp), %cl                  ## 1-byte Reload
	testl	%eax, %eax
	js	LBB0_9
LBB0_10:
	movq	(%rbx), %rax
	movl	(%rax), %eax
	cmpl	$8, %eax
	je	LBB0_11
## %bb.12:
	cmpl	$12, %eax
	je	LBB0_14
## %bb.13:
	cmpl	$10, %eax
	jne	LBB0_22
LBB0_14:
	movq	_cudaVideoSurfaceFormat_P016@GOTPCREL(%rip), %rsi
	movq	_cudaVideoSurfaceFormat_YUV444_16Bit@GOTPCREL(%rip), %rdx
	jmp	LBB0_15
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_1:
	movq	_AVERROR_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_21:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_6
LBB0_11:
	movq	_cudaVideoSurfaceFormat_NV12@GOTPCREL(%rip), %rsi
	movq	_cudaVideoSurfaceFormat_YUV444@GOTPCREL(%rip), %rdx
LBB0_15:
	andb	%dil, %cl
	cmoveq	%rsi, %rdx
	movl	(%rdx), %ecx
	movq	16(%r13), %rdx
	movq	(%rdx), %rbx
	movq	4(%r13), %xmm0                  ## xmm0 = mem[0],zero
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	movdqu	%xmm0, -80(%rbp)
	addl	$-8, %eax
	movl	%eax, -104(%rbp)
	movl	%ecx, -84(%rbp)
	movl	%r14d, -100(%rbp)
	movl	%r15d, -96(%rbp)
	movl	(%rbx), %eax
	movl	%eax, -92(%rbp)
	movl	%eax, -88(%rbp)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	4(%rax), %rdi
	movl	4(%rbx), %esi
	leaq	-104(%rbp), %rdx
	movq	%r13, %rcx
	callq	_nvdec_decoder_create
	testl	%eax, %eax
	js	LBB0_16
## %bb.18:
	movl	$4, %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movl	(%rbx), %ecx
	movl	%ecx, (%rax)
	movq	_nvdec_decoder_frame_alloc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_av_free@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$4, %edi
	movq	%rax, %rsi
	callq	_av_buffer_pool_init2
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jne	LBB0_21
LBB0_20:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_ff_nvdec_decode_uninit
	jmp	LBB0_21
LBB0_16:
	movl	%eax, %r12d
	movl	-92(%rbp), %ecx
	cmpl	$33, %ecx
	jl	LBB0_21
## %bb.17:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	(%rbx), %esi
	movl	(%r13), %ecx
	leaq	L_.str.4(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_21
LBB0_22:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_6:
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_9:
	movl	%eax, %r12d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_BUG,4,2                ## @AVERROR_BUG
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported codec ID\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unsupported chroma format\n"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_cudaVideoChromaFormat_444,4,2  ## @cudaVideoChromaFormat_444
	.comm	_AV_HWDEVICE_TYPE_CUDA,4,2      ## @AV_HWDEVICE_TYPE_CUDA
	.comm	_cudaVideoSurfaceFormat_YUV444,4,2 ## @cudaVideoSurfaceFormat_YUV444
	.comm	_cudaVideoSurfaceFormat_NV12,4,2 ## @cudaVideoSurfaceFormat_NV12
	.comm	_cudaVideoSurfaceFormat_YUV444_16Bit,4,2 ## @cudaVideoSurfaceFormat_YUV444_16Bit
	.comm	_cudaVideoSurfaceFormat_P016,4,2 ## @cudaVideoSurfaceFormat_P016
L_.str.2:                               ## @.str.2
	.asciz	"Unsupported bit depth\n"

	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.3:                               ## @.str.3
	.asciz	"Using more than 32 (%d) decode surfaces might cause nvdec to fail.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Try lowering the amount of threads. Using %d right now.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nvdec_decoder_frame_alloc,4,2  ## @nvdec_decoder_frame_alloc
	.comm	_av_free,4,2                    ## @av_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_nvdec_decode_init           ; -- Begin function ff_nvdec_decode_init
	.p2align	2
_ff_nvdec_decode_init:                  ; @ff_nvdec_decode_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	x24, [x8]
	str	wzr, [sp, #56]
	ldr	w0, [x0, #24]
	bl	_av_pix_fmt_desc_get
	cbz	x0, LBB0_9
; %bb.1:
	mov	x23, x0
	ldr	w0, [x19, #28]
	bl	_map_avcodec_id
	tbnz	w0, #31, LBB0_8
; %bb.2:
	mov	x20, x0
	ldr	w0, [x19, #24]
	bl	_map_chroma_format
	tbnz	w0, #31, LBB0_11
; %bb.3:
	mov	x21, x0
	ldr	x8, [x24, #8]
	cmp	x8, #0
Lloh0:
	adrp	x8, _cudaVideoChromaFormat_444@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cudaVideoChromaFormat_444@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w0, w8, #0, ne
	cset	w25, eq
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _AV_HWDEVICE_TYPE_CUDA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_HWDEVICE_TYPE_CUDA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ff_decode_get_hw_frames_ctx
	tbnz	w0, #31, LBB0_22
LBB0_5:
	ldr	x8, [x23]
	ldr	w9, [x8]
	subs	w8, w9, #8
	b.eq	LBB0_12
; %bb.6:
	cmp	w9, #12
	ccmp	w9, #10, #4, ne
	b.ne	LBB0_20
; %bb.7:
Lloh6:
	adrp	x9, _cudaVideoSurfaceFormat_P016@GOTPAGE
Lloh7:
	ldr	x9, [x9, _cudaVideoSurfaceFormat_P016@GOTPAGEOFF]
Lloh8:
	adrp	x10, _cudaVideoSurfaceFormat_YUV444_16Bit@GOTPAGE
Lloh9:
	ldr	x10, [x10, _cudaVideoSurfaceFormat_YUV444_16Bit@GOTPAGEOFF]
	b	LBB0_13
LBB0_8:
Lloh10:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_9:
Lloh15:
	adrp	x8, _AVERROR_BUG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AVERROR_BUG@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_11:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str.1@PAGE
Lloh22:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_21
LBB0_12:
Lloh23:
	adrp	x9, _cudaVideoSurfaceFormat_NV12@GOTPAGE
Lloh24:
	ldr	x9, [x9, _cudaVideoSurfaceFormat_NV12@GOTPAGEOFF]
Lloh25:
	adrp	x10, _cudaVideoSurfaceFormat_YUV444@GOTPAGE
Lloh26:
	ldr	x10, [x10, _cudaVideoSurfaceFormat_YUV444@GOTPAGEOFF]
LBB0_13:
	cmp	w25, #0
	csel	x9, x10, x9, ne
	ldr	w9, [x9]
	ldr	x10, [x19, #16]
	ldr	x23, [x10]
	ldur	d0, [x19, #4]
	mov.d	v0[1], v0[0]
	stur	q0, [sp, #40]
	stp	w8, w20, [sp, #16]
	str	w9, [sp, #36]
	str	w21, [sp, #24]
	ldr	w8, [x23]
	stp	w8, w8, [sp, #28]
	add	x0, x24, #4
	ldr	w1, [x23, #4]
	add	x2, sp, #16
	mov	x3, x19
	bl	_nvdec_decoder_create
	tbnz	w0, #31, LBB0_18
; %bb.14:
	mov	w0, #4
	bl	_av_mallocz
	cbz	x0, LBB0_17
; %bb.15:
	mov	x1, x0
	ldr	w8, [x23]
	str	w8, [x0]
Lloh27:
	adrp	x8, _nvdec_decoder_frame_alloc@GOTPAGE
Lloh28:
	ldr	x8, [x8, _nvdec_decoder_frame_alloc@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
Lloh30:
	adrp	x8, _av_free@GOTPAGE
Lloh31:
	ldr	x8, [x8, _av_free@GOTPAGEOFF]
Lloh32:
	ldr	w3, [x8]
	mov	w0, #4
	bl	_av_buffer_pool_init2
	str	w0, [x24]
	cbz	w0, LBB0_17
; %bb.16:
	mov	w22, #0
	b	LBB0_10
LBB0_17:
Lloh33:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x22, x0
	mov	x0, x19
	bl	_ff_nvdec_decode_uninit
	b	LBB0_10
LBB0_18:
	mov	x22, x0
	ldr	w8, [sp, #28]
	cmp	w8, #33
	b.lt	LBB0_10
; %bb.19:
Lloh36:
	adrp	x20, _AV_LOG_WARNING@GOTPAGE
Lloh37:
	ldr	x20, [x20, _AV_LOG_WARNING@GOTPAGEOFF]
	ldr	w1, [x20]
	str	x8, [sp]
Lloh38:
	adrp	x2, l_.str.3@PAGE
Lloh39:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	w1, [x20]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh40:
	adrp	x2, l_.str.4@PAGE
Lloh41:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_10
LBB0_20:
Lloh42:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh43:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
Lloh45:
	adrp	x2, l_.str.2@PAGE
Lloh46:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_21:
	mov	x0, x19
	bl	_av_log
Lloh47:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_AVERROR
LBB0_22:
	mov	x22, x0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_BUG,4,2                ; @AVERROR_BUG
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported codec ID\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unsupported chroma format\n"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_cudaVideoChromaFormat_444,4,2  ; @cudaVideoChromaFormat_444
	.comm	_AV_HWDEVICE_TYPE_CUDA,4,2      ; @AV_HWDEVICE_TYPE_CUDA
	.comm	_cudaVideoSurfaceFormat_YUV444,4,2 ; @cudaVideoSurfaceFormat_YUV444
	.comm	_cudaVideoSurfaceFormat_NV12,4,2 ; @cudaVideoSurfaceFormat_NV12
	.comm	_cudaVideoSurfaceFormat_YUV444_16Bit,4,2 ; @cudaVideoSurfaceFormat_YUV444_16Bit
	.comm	_cudaVideoSurfaceFormat_P016,4,2 ; @cudaVideoSurfaceFormat_P016
l_.str.2:                               ; @.str.2
	.asciz	"Unsupported bit depth\n"

	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.3:                               ; @.str.3
	.asciz	"Using more than 32 (%d) decode surfaces might cause nvdec to fail.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Try lowering the amount of threads. Using %d right now.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nvdec_decoder_frame_alloc,4,2  ; @nvdec_decoder_frame_alloc
	.comm	_av_free,4,2                    ; @av_free
.subsections_via_symbols
