	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cuvid_init                     ## -- Begin function cuvid_init
	.p2align	4, 0x90
_cuvid_init:                            ## @cuvid_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	16(%rdi), %rbx
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	_hw_device_ctx@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jne	LBB0_3
## %bb.1:
	movq	_AV_HWDEVICE_TYPE_CUDA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %edx
	movq	_hw_device_ctx@GOTPCREL(%rip), %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_av_hwdevice_ctx_create
	testl	%eax, %eax
	js	LBB0_2
LBB0_3:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_av_buffer_unref
	movl	(%r12), %edi
	callq	_av_hwframe_ctx_alloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rbx
	movq	_AV_PIX_FMT_CUDA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	8(%r13), %edi
	movl	%edi, 8(%rbx)
	movl	4(%r13), %eax
	movl	%eax, 4(%rbx)
	movl	(%r13), %eax
	movl	%eax, (%rbx)
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	callq	_av_get_pix_fmt_name
	movl	(%rbx), %r9d
	movl	4(%rbx), %r8d
	leaq	L_.str.3(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	(%r14), %rdi
	callq	_av_hwframe_ctx_init
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	_cuvid_uninit@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_7
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_5:
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	%r14d, %r15d
	jmp	LBB0_7
LBB0_2:
	movl	%eax, %r15d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Initializing cuvid hwaccel\n"

	.comm	_hw_device_ctx,4,2              ## @hw_device_ctx
	.comm	_AV_HWDEVICE_TYPE_CUDA,4,2      ## @AV_HWDEVICE_TYPE_CUDA
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Error creating a CUDA device\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error creating a CUDA frames context\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_PIX_FMT_CUDA,4,2            ## @AV_PIX_FMT_CUDA
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.3:                               ## @.str.3
	.asciz	"Initializing CUDA frames context: sw_format = %s, width = %d, height = %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Error initializing a CUDA frame pool\n"

	.comm	_cuvid_uninit,4,2               ## @cuvid_uninit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cuvid_init                     ; -- Begin function cuvid_init
	.p2align	2
_cuvid_init:                            ; @cuvid_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	ldr	x22, [x0, #16]
Lloh0:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh5:
	adrp	x21, _hw_device_ctx@GOTPAGE
Lloh6:
	ldr	x21, [x21, _hw_device_ctx@GOTPAGEOFF]
	ldr	w8, [x21]
	cbnz	w8, LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _AV_HWDEVICE_TYPE_CUDA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_HWDEVICE_TYPE_CUDA@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x22, #16]
Lloh10:
	adrp	x0, _hw_device_ctx@GOTPAGE
Lloh11:
	ldr	x0, [x0, _hw_device_ctx@GOTPAGEOFF]
	mov	x3, #0
	mov	w4, #0
	bl	_av_hwdevice_ctx_create
	tbnz	w0, #31, LBB0_7
LBB0_2:
	add	x20, x22, #8
	mov	x0, x20
	bl	_av_buffer_unref
	ldr	w0, [x21]
	bl	_av_hwframe_ctx_alloc
	str	x0, [x22, #8]
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x23, [x0]
Lloh12:
	adrp	x8, _AV_PIX_FMT_CUDA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_PIX_FMT_CUDA@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w0, [x19, #8]
	stp	w0, w8, [x23, #8]
	ldr	d0, [x19]
	str	d0, [x23]
Lloh15:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh17:
	ldr	w21, [x8]
	bl	_av_get_pix_fmt_name
                                        ; kill: def $w0 killed $w0 def $x0
	ldp	w9, w8, [x23]
	stp	x8, x9, [sp, #8]
	str	x0, [sp]
Lloh18:
	adrp	x2, l_.str.3@PAGE
Lloh19:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_av_log
	ldr	x0, [x20]
	bl	_av_hwframe_ctx_init
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	w20, #0
Lloh20:
	adrp	x8, _cuvid_uninit@GOTPAGE
Lloh21:
	ldr	x8, [x8, _cuvid_uninit@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x22]
	b	LBB0_9
LBB0_5:
Lloh23:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x2, l_.str.2@PAGE
Lloh27:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_AVERROR
LBB0_6:
	mov	x20, x0
Lloh31:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x2, l_.str.4@PAGE
Lloh35:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_7:
	mov	x20, x0
Lloh36:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x2, l_.str.1@PAGE
Lloh40:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_av_log
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Initializing cuvid hwaccel\n"

	.comm	_hw_device_ctx,4,2              ; @hw_device_ctx
	.comm	_AV_HWDEVICE_TYPE_CUDA,4,2      ; @AV_HWDEVICE_TYPE_CUDA
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Error creating a CUDA device\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error creating a CUDA frames context\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_PIX_FMT_CUDA,4,2            ; @AV_PIX_FMT_CUDA
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.3:                               ; @.str.3
	.asciz	"Initializing CUDA frames context: sw_format = %s, width = %d, height = %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Error initializing a CUDA frame pool\n"

	.comm	_cuvid_uninit,4,2               ; @cuvid_uninit
.subsections_via_symbols
