	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvdec_test_capabilities
_nvdec_test_capabilities:               ## @nvdec_test_capabilities
	.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	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movl	16(%rsi), %eax
	movl	%eax, -40(%rbp)
	movl	12(%rsi), %eax
	movl	%eax, -44(%rbp)
	movl	8(%rsi), %eax
	movl	%eax, -48(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	leaq	-80(%rbp), %rdi
	callq	*%rax
	movl	%eax, %edi
	callq	_CHECK_CU
	testl	%eax, %eax
	js	LBB0_15
## %bb.3:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	(%rbx), %esi
	cmpq	$0, -56(%rbp)
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rcx
	cmoveq	%rax, %rcx
	movl	-80(%rbp), %r8d
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	(%rbx), %esi
	movl	-76(%rbp), %ecx
	movl	-72(%rbp), %r8d
	leaq	L_.str.6(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	(%rbx), %esi
	movl	-68(%rbp), %ecx
	movl	-64(%rbp), %r8d
	leaq	L_.str.7(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	cmpq	$0, -56(%rbp)
	je	LBB0_4
## %bb.5:
	movl	(%r15), %ecx
	movl	-76(%rbp), %r8d
	movl	-72(%rbp), %r9d
	cmpl	%r9d, %ecx
	jg	LBB0_7
## %bb.6:
	cmpl	%r8d, %ecx
	jl	LBB0_7
## %bb.9:
	movl	4(%r15), %eax
	movl	-68(%rbp), %r8d
	movl	-64(%rbp), %r9d
	cmpl	%r9d, %eax
	jg	LBB0_11
## %bb.10:
	cmpl	%r8d, %eax
	jl	LBB0_11
## %bb.12:
	imull	%ecx, %eax
	leal	255(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$8, %ecx
	movl	-80(%rbp), %r8d
	xorl	%ebx, %ebx
	cmpl	%r8d, %ecx
	jle	LBB0_16
## %bb.13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.11(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_14
LBB0_1:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	(%r15), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_16
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.8(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_14
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.9(%rip), %rdx
	movq	%r14, %rdi
	jmp	LBB0_8
LBB0_11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.10(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %ecx
LBB0_8:
	xorl	%eax, %eax
	callq	_av_log
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_15:
	movl	%eax, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Used Nvidia driver is too old to perform a capability check.\n"

L_.str.1:                               ## @.str.1
	.asciz	"The minimum required version is 378.13. Continuing blind.\n"

	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
L_.str.2:                               ## @.str.2
	.asciz	"NVDEC capabilities:\n"

L_.str.3:                               ## @.str.3
	.asciz	"format supported: %s, max_mb_count: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"yes"

L_.str.5:                               ## @.str.5
	.asciz	"no"

L_.str.6:                               ## @.str.6
	.asciz	"min_width: %d, max_width: %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"min_height: %d, max_height: %d\n"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.8:                               ## @.str.8
	.asciz	"Hardware is lacking required capabilities\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.9:                               ## @.str.9
	.asciz	"Video width %d not within range from %d to %d\n"

L_.str.10:                              ## @.str.10
	.asciz	"Video height %d not within range from %d to %d\n"

L_.str.11:                              ## @.str.11
	.asciz	"Video macroblock count %d exceeds maximum of %d\n"

	.no_dead_strip	_nvdec_test_capabilities
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvdec_test_capabilities
_nvdec_test_capabilities:               ; @nvdec_test_capabilities
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x2
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #48]
	str	q0, [sp, #32]
	ldr	w8, [x1, #16]
	str	w8, [sp, #72]
	ldr	d0, [x1, #8]
	str	d0, [sp, #64]
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x20, x1
	add	x0, sp, #32
	blr	x8
	bl	_CHECK_CU
	tbnz	w0, #31, LBB0_14
; %bb.2:
Lloh0:
	adrp	x21, _AV_LOG_VERBOSE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AV_LOG_VERBOSE@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x2, l_.str.2@PAGE
Lloh3:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	w1, [x21]
Lloh4:
	adrp	x8, l_.str.4@PAGE
Lloh5:
	add	x8, x8, l_.str.4@PAGEOFF
	ldr	x9, [sp, #56]
Lloh6:
	adrp	x10, l_.str.5@PAGE
Lloh7:
	add	x10, x10, l_.str.5@PAGEOFF
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w9, [sp, #32]
	stp	x8, x9, [sp]
Lloh8:
	adrp	x2, l_.str.3@PAGE
Lloh9:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	w1, [x21]
	ldp	w8, w9, [sp, #36]
	stp	x8, x9, [sp]
Lloh10:
	adrp	x2, l_.str.6@PAGE
Lloh11:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	w1, [x21]
	ldp	w8, w9, [sp, #44]
	stp	x8, x9, [sp]
Lloh12:
	adrp	x2, l_.str.7@PAGE
Lloh13:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	x8, [sp, #56]
	cbz	x8, LBB0_10
; %bb.3:
	ldr	w8, [x20]
	ldp	w9, w10, [sp, #36]
	cmp	w8, w10
	b.gt	LBB0_11
; %bb.4:
	cmp	w8, w9
	b.lt	LBB0_11
; %bb.5:
	ldr	w9, [x20, #4]
	ldp	w10, w11, [sp, #44]
	cmp	w9, w11
	b.gt	LBB0_12
; %bb.6:
	cmp	w9, w10
	b.lt	LBB0_12
; %bb.7:
	mul	w8, w9, w8
	add	w9, w8, #255
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #8
	ldr	w9, [sp, #32]
	cmp	w8, w9
	b.le	LBB0_15
; %bb.8:
Lloh14:
	adrp	x10, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x10, [x10, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x10]
	stp	x8, x9, [sp]
Lloh17:
	adrp	x2, l_.str.11@PAGE
Lloh18:
	add	x2, x2, l_.str.11@PAGEOFF
	b	LBB0_13
LBB0_9:
Lloh19:
	adrp	x20, _AV_LOG_WARNING@GOTPAGE
Lloh20:
	ldr	x20, [x20, _AV_LOG_WARNING@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	w1, [x20]
Lloh23:
	adrp	x2, l_.str.1@PAGE
Lloh24:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w0, #0
	b	LBB0_14
LBB0_10:
Lloh25:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x2, l_.str.8@PAGE
Lloh29:
	add	x2, x2, l_.str.8@PAGEOFF
	b	LBB0_13
LBB0_11:
Lloh30:
	adrp	x11, _AV_LOG_ERROR@GOTPAGE
Lloh31:
	ldr	x11, [x11, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x11]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh33:
	adrp	x2, l_.str.9@PAGE
Lloh34:
	add	x2, x2, l_.str.9@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh35:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	stp	x10, x11, [sp, #8]
	str	x9, [sp]
Lloh38:
	adrp	x2, l_.str.10@PAGE
Lloh39:
	add	x2, x2, l_.str.10@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_av_log
Lloh40:
	adrp	x8, _EINVAL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_14:
	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
	add	sp, sp, #128
	ret
LBB0_15:
	mov	w0, #0
	b	LBB0_14
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Used Nvidia driver is too old to perform a capability check.\n"

l_.str.1:                               ; @.str.1
	.asciz	"The minimum required version is 378.13. Continuing blind.\n"

	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
l_.str.2:                               ; @.str.2
	.asciz	"NVDEC capabilities:\n"

l_.str.3:                               ; @.str.3
	.asciz	"format supported: %s, max_mb_count: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"yes"

l_.str.5:                               ; @.str.5
	.asciz	"no"

l_.str.6:                               ; @.str.6
	.asciz	"min_width: %d, max_width: %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"min_height: %d, max_height: %d\n"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.8:                               ; @.str.8
	.asciz	"Hardware is lacking required capabilities\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.9:                               ; @.str.9
	.asciz	"Video width %d not within range from %d to %d\n"

l_.str.10:                              ; @.str.10
	.asciz	"Video height %d not within range from %d to %d\n"

l_.str.11:                              ; @.str.11
	.asciz	"Video macroblock count %d exceeds maximum of %d\n"

	.no_dead_strip	_nvdec_test_capabilities
.subsections_via_symbols
