	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hva_register_device
_hva_register_device:                   ## @hva_register_device
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r12
	callq	_hva_to_dev
	movq	%rax, %r14
	movq	_hva_m2m_ops@GOTPCREL(%rip), %rdi
	callq	_v4l2_m2m_init
	movl	%eax, (%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.9:
	movq	_HVA_PREFIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	(%r12), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_video_device_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	_hva_fops@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r15)
	movq	_hva_ioctl_ops@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r15)
	movq	_video_device_release@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r15)
	leaq	24(%r12), %rax
	movq	%rax, 24(%r15)
	movq	_VFL_DIR_M2M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	_V4L2_CAP_STREAMING@GOTPCREL(%rip), %rax
	movq	_V4L2_CAP_VIDEO_M2M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r15)
	leaq	20(%r12), %rax
	movq	%rax, 8(%r15)
	movl	4(%r15), %edi
	movq	_HVA_NAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	16(%r12), %r8d
	leaq	L_.str.2(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$-1, %edx
	callq	_video_register_device
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movl	%eax, %ebx
	movq	_HVA_PREFIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_video_device_release
	jmp	LBB0_7
LBB0_4:
	movq	_HVA_PREFIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_7:
	movl	(%r12), %edi
	callq	_v4l2_m2m_release
	jmp	LBB0_8
LBB0_10:
	movq	%r15, 8(%r12)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_video_set_drvdata
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_hva_m2m_ops,4,2                ## @hva_m2m_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s failed to initialize v4l2-m2m device\n"

	.comm	_HVA_PREFIX,4,2                 ## @HVA_PREFIX
L_.str.1:                               ## @.str.1
	.asciz	"%s failed to allocate video device\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_hva_fops,4,2                   ## @hva_fops
	.comm	_hva_ioctl_ops,4,2              ## @hva_ioctl_ops
	.comm	_VFL_DIR_M2M,4,2                ## @VFL_DIR_M2M
	.comm	_V4L2_CAP_STREAMING,4,2         ## @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_VIDEO_M2M,4,2         ## @V4L2_CAP_VIDEO_M2M
L_.str.2:                               ## @.str.2
	.asciz	"%s%lx"

	.comm	_HVA_NAME,8,3                   ## @HVA_NAME
	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
L_.str.3:                               ## @.str.3
	.asciz	"%s failed to register video device\n"

	.no_dead_strip	_hva_register_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hva_register_device
_hva_register_device:                   ; @hva_register_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_hva_to_dev
	mov	x20, x0
Lloh0:
	adrp	x0, _hva_m2m_ops@GOTPAGE
Lloh1:
	ldr	x0, [x0, _hva_m2m_ops@GOTPAGEOFF]
	bl	_v4l2_m2m_init
	str	w0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _HVA_PREFIX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HVA_PREFIX@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_3:
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_4:
	bl	_video_device_alloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x21, x0
Lloh10:
	adrp	x8, _hva_fops@GOTPAGE
Lloh11:
	ldr	x8, [x8, _hva_fops@GOTPAGEOFF]
Lloh12:
	adrp	x9, _hva_ioctl_ops@GOTPAGE
Lloh13:
	ldr	x9, [x9, _hva_ioctl_ops@GOTPAGEOFF]
	stp	x9, x8, [x0, #40]
Lloh14:
	adrp	x8, _video_device_release@GOTPAGE
Lloh15:
	ldr	x8, [x8, _video_device_release@GOTPAGEOFF]
	add	x9, x19, #24
Lloh16:
	adrp	x10, _VFL_DIR_M2M@GOTPAGE
Lloh17:
	ldr	x10, [x10, _VFL_DIR_M2M@GOTPAGEOFF]
	stp	x9, x8, [x0, #24]
Lloh18:
	ldr	w8, [x10]
	str	w8, [x0, #16]
Lloh19:
	adrp	x8, _V4L2_CAP_STREAMING@GOTPAGE
Lloh20:
	ldr	x8, [x8, _V4L2_CAP_STREAMING@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _V4L2_CAP_VIDEO_M2M@GOTPAGE
Lloh23:
	ldr	x9, [x9, _V4L2_CAP_VIDEO_M2M@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x0]
	add	x8, x19, #20
	str	x8, [x0, #8]
	ldr	w0, [x0, #4]
Lloh25:
	adrp	x8, _HVA_NAME@GOTPAGE
Lloh26:
	ldr	x8, [x8, _HVA_NAME@GOTPAGEOFF]
Lloh27:
	ldr	x3, [x8]
	ldr	w4, [x19, #16]
Lloh28:
	adrp	x2, l_.str.2@PAGE
Lloh29:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh30:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh31:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #-1
	bl	_video_register_device
	mov	x22, x0
	cbz	w0, LBB0_9
; %bb.6:
Lloh33:
	adrp	x8, _HVA_PREFIX@GOTPAGE
Lloh34:
	ldr	x8, [x8, _HVA_PREFIX@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x21
	bl	_video_device_release
	b	LBB0_8
LBB0_7:
Lloh38:
	adrp	x8, _HVA_PREFIX@GOTPAGE
Lloh39:
	ldr	x8, [x8, _HVA_PREFIX@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh43:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	ldr	w0, [x19]
	bl	_v4l2_m2m_release
	b	LBB0_10
LBB0_9:
	str	x21, [x19, #8]
	mov	x0, x21
	mov	x1, x19
	bl	_video_set_drvdata
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_hva_m2m_ops,4,2                ; @hva_m2m_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s failed to initialize v4l2-m2m device\n"

	.comm	_HVA_PREFIX,4,2                 ; @HVA_PREFIX
l_.str.1:                               ; @.str.1
	.asciz	"%s failed to allocate video device\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_hva_fops,4,2                   ; @hva_fops
	.comm	_hva_ioctl_ops,4,2              ; @hva_ioctl_ops
	.comm	_VFL_DIR_M2M,4,2                ; @VFL_DIR_M2M
	.comm	_V4L2_CAP_STREAMING,4,2         ; @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_VIDEO_M2M,4,2         ; @V4L2_CAP_VIDEO_M2M
l_.str.2:                               ; @.str.2
	.asciz	"%s%lx"

	.comm	_HVA_NAME,8,3                   ; @HVA_NAME
	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
l_.str.3:                               ; @.str.3
	.asciz	"%s failed to register video device\n"

	.no_dead_strip	_hva_register_device
.subsections_via_symbols
