	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_mdp_register_m2m_device    ## -- Begin function mtk_mdp_register_m2m_device
	.p2align	4, 0x90
_mtk_mdp_register_m2m_device:           ## @mtk_mdp_register_m2m_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
	movq	%rdi, %rbx
	movq	32(%rdi), %r14
	movq	_mtk_mdp_default_variant@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rdi)
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_video_device_alloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_V4L2_CAP_VIDEO_M2M_MPLANE@GOTPCREL(%rip), %rcx
	movq	_V4L2_CAP_STREAMING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%edx, (%rax)
	movq	_mtk_mdp_m2m_fops@GOTPCREL(%rip), %rcx
	movq	%rcx, 56(%rax)
	movq	_mtk_mdp_m2m_ioctl_ops@GOTPCREL(%rip), %rcx
	movq	%rcx, 48(%rax)
	movq	_video_device_release@GOTPCREL(%rip), %rcx
	movq	%rcx, 40(%rax)
	leaq	16(%rbx), %rcx
	movq	%rcx, 32(%rax)
	movq	_VFL_DIR_M2M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rax)
	leaq	12(%rbx), %r12
	movq	%r12, 16(%rax)
	movl	8(%rax), %edi
	movq	_MTK_MDP_MODULE_NAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str.1(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	(%rbx), %rdi
	movq	%rbx, %rsi
	callq	_video_set_drvdata
	movq	_mtk_mdp_m2m_ops@GOTPCREL(%rip), %rdi
	callq	_v4l2_m2m_init
	movl	%eax, 8(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	8(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_4:
	movq	(%rbx), %rdi
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edx
	callq	_video_register_device
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	8(%rbx), %edi
	callq	_v4l2_m2m_release
LBB0_6:
	movq	(%rbx), %rdi
	callq	_video_device_release
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	(%rbx), %rax
	movl	4(%rax), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	callq	_v4l2_info
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_mtk_mdp_default_variant,4,2    ## @mtk_mdp_default_variant
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate video device\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_V4L2_CAP_VIDEO_M2M_MPLANE,4,2  ## @V4L2_CAP_VIDEO_M2M_MPLANE
	.comm	_V4L2_CAP_STREAMING,4,2         ## @V4L2_CAP_STREAMING
	.comm	_mtk_mdp_m2m_fops,4,2           ## @mtk_mdp_m2m_fops
	.comm	_mtk_mdp_m2m_ioctl_ops,4,2      ## @mtk_mdp_m2m_ioctl_ops
	.comm	_VFL_DIR_M2M,4,2                ## @VFL_DIR_M2M
L_.str.1:                               ## @.str.1
	.asciz	"%s:m2m"

	.comm	_MTK_MDP_MODULE_NAME,8,3        ## @MTK_MDP_MODULE_NAME
	.comm	_mtk_mdp_m2m_ops,4,2            ## @mtk_mdp_m2m_ops
L_.str.2:                               ## @.str.2
	.asciz	"failed to initialize v4l2-m2m device\n"

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

L_.str.4:                               ## @.str.4
	.asciz	"driver registered as /dev/video%d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_mdp_register_m2m_device    ; -- Begin function mtk_mdp_register_m2m_device
	.p2align	2
_mtk_mdp_register_m2m_device:           ; @mtk_mdp_register_m2m_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
	mov	x19, x0
	ldr	x20, [x0, #32]
Lloh0:
	adrp	x8, _mtk_mdp_default_variant@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mtk_mdp_default_variant@GOTPAGEOFF]
	str	x8, [x0, #24]
	bl	_video_device_alloc
	str	x0, [x19]
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _V4L2_CAP_VIDEO_M2M_MPLANE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_CAP_VIDEO_M2M_MPLANE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _V4L2_CAP_STREAMING@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V4L2_CAP_STREAMING@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _mtk_mdp_m2m_fops@GOTPAGE
Lloh9:
	ldr	x9, [x9, _mtk_mdp_m2m_fops@GOTPAGEOFF]
Lloh10:
	adrp	x10, _mtk_mdp_m2m_ioctl_ops@GOTPAGE
Lloh11:
	ldr	x10, [x10, _mtk_mdp_m2m_ioctl_ops@GOTPAGEOFF]
	str	w8, [x0]
	stp	x10, x9, [x0, #48]
Lloh12:
	adrp	x8, _video_device_release@GOTPAGE
Lloh13:
	ldr	x8, [x8, _video_device_release@GOTPAGEOFF]
	add	x9, x19, #16
	stp	x9, x8, [x0, #32]
Lloh14:
	adrp	x8, _VFL_DIR_M2M@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VFL_DIR_M2M@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	add	x21, x19, #12
	str	x21, [x0, #16]
	ldr	w0, [x0, #8]
Lloh17:
	adrp	x8, _MTK_MDP_MODULE_NAME@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MTK_MDP_MODULE_NAME@GOTPAGEOFF]
Lloh19:
	ldr	x3, [x8]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	ldr	x0, [x19]
	mov	x1, x19
	bl	_video_set_drvdata
Lloh22:
	adrp	x0, _mtk_mdp_m2m_ops@GOTPAGE
Lloh23:
	ldr	x0, [x0, _mtk_mdp_m2m_ops@GOTPAGEOFF]
	bl	_v4l2_m2m_init
	str	w0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #8]
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_6
LBB0_3:
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_4:
	ldr	x0, [x19]
Lloh31:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh32:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	w2, #2
	bl	_video_register_device
	mov	x22, x0
	cbz	w0, LBB0_8
; %bb.5:
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #8]
	bl	_v4l2_m2m_release
LBB0_6:
	ldr	x0, [x19]
	bl	_video_device_release
LBB0_7:
	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
LBB0_8:
	ldr	x8, [x19]
	ldr	w2, [x8, #4]
Lloh36:
	adrp	x1, l_.str.4@PAGE
Lloh37:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_v4l2_info
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_mtk_mdp_default_variant,4,2    ; @mtk_mdp_default_variant
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate video device\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_V4L2_CAP_VIDEO_M2M_MPLANE,4,2  ; @V4L2_CAP_VIDEO_M2M_MPLANE
	.comm	_V4L2_CAP_STREAMING,4,2         ; @V4L2_CAP_STREAMING
	.comm	_mtk_mdp_m2m_fops,4,2           ; @mtk_mdp_m2m_fops
	.comm	_mtk_mdp_m2m_ioctl_ops,4,2      ; @mtk_mdp_m2m_ioctl_ops
	.comm	_VFL_DIR_M2M,4,2                ; @VFL_DIR_M2M
l_.str.1:                               ; @.str.1
	.asciz	"%s:m2m"

	.comm	_MTK_MDP_MODULE_NAME,8,3        ; @MTK_MDP_MODULE_NAME
	.comm	_mtk_mdp_m2m_ops,4,2            ; @mtk_mdp_m2m_ops
l_.str.2:                               ; @.str.2
	.asciz	"failed to initialize v4l2-m2m device\n"

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

l_.str.4:                               ; @.str.4
	.asciz	"driver registered as /dev/video%d"

.subsections_via_symbols
