	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fimc_register_m2m_device       ## -- Begin function fimc_register_m2m_device
	.p2align	4, 0x90
_fimc_register_m2m_device:              ## @fimc_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	%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	%rsi, %r14
	movq	%rdi, %rbx
	leaq	16(%rdi), %r15
	movq	%rsi, 88(%rdi)
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	_fimc_m2m_fops@GOTPCREL(%rip), %rax
	movq	%rax, 72(%rbx)
	movq	_fimc_m2m_ioctl_ops@GOTPCREL(%rip), %rax
	movq	%rax, 64(%rbx)
	movq	%r14, 56(%rbx)
	movl	$-1, 16(%rbx)
	movq	_video_device_release_empty@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	leaq	80(%rbx), %rax
	movq	%rax, 40(%rbx)
	movq	_VFL_DIR_M2M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_V4L2_CAP_STREAMING@GOTPCREL(%rip), %rax
	movq	_V4L2_CAP_VIDEO_M2M_MPLANE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 20(%rbx)
	movq	_V4L2_FL_QUIRK_INVERTED_CROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	32(%rbx), %rsi
	callq	_set_bit
	movl	(%rbx), %ecx
	movl	28(%rbx), %edi
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_video_set_drvdata
	movq	_m2m_ops@GOTPCREL(%rip), %rdi
	callq	_v4l2_m2m_init
	movl	%eax, 8(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
	movl	8(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	leaq	24(%rbx), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_media_entity_pads_init
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	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_3
## %bb.4:
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_media_entity_cleanup
LBB0_5:
	movl	8(%rbx), %edi
	callq	_v4l2_m2m_release
LBB0_6:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	28(%rbx), %ebx
	movq	%r15, %rdi
	callq	_video_device_node_name
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_v4l2_info
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_fimc_m2m_fops,4,2              ## @fimc_m2m_fops
	.comm	_fimc_m2m_ioctl_ops,4,2         ## @fimc_m2m_ioctl_ops
	.comm	_video_device_release_empty,4,2 ## @video_device_release_empty
	.comm	_VFL_DIR_M2M,4,2                ## @VFL_DIR_M2M
	.comm	_V4L2_CAP_STREAMING,4,2         ## @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_VIDEO_M2M_MPLANE,4,2  ## @V4L2_CAP_VIDEO_M2M_MPLANE
	.comm	_V4L2_FL_QUIRK_INVERTED_CROP,4,2 ## @V4L2_FL_QUIRK_INVERTED_CROP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fimc.%d.m2m"

	.comm	_m2m_ops,4,2                    ## @m2m_ops
L_.str.1:                               ## @.str.1
	.asciz	"failed to initialize v4l2-m2m device\n"

	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
L_.str.2:                               ## @.str.2
	.asciz	"Registered %s as /dev/%s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fimc_register_m2m_device       ; -- Begin function fimc_register_m2m_device
	.p2align	2
_fimc_register_m2m_device:              ; @fimc_register_m2m_device
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	add	x21, x0, #16
	str	x1, [x0, #88]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #64
	bl	_memset
Lloh0:
	adrp	x8, _fimc_m2m_fops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fimc_m2m_fops@GOTPAGEOFF]
	str	x8, [x19, #72]
Lloh2:
	adrp	x8, _fimc_m2m_ioctl_ops@GOTPAGE
Lloh3:
	ldr	x8, [x8, _fimc_m2m_ioctl_ops@GOTPAGEOFF]
	stp	x20, x8, [x19, #56]
Lloh4:
	adrp	x8, _video_device_release_empty@GOTPAGE
Lloh5:
	ldr	x8, [x8, _video_device_release_empty@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x19, #48]
	add	x8, x19, #80
	str	x8, [x19, #40]
Lloh7:
	adrp	x8, _VFL_DIR_M2M@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VFL_DIR_M2M@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #36]
Lloh10:
	adrp	x8, _V4L2_CAP_STREAMING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _V4L2_CAP_STREAMING@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _V4L2_CAP_VIDEO_M2M_MPLANE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_CAP_VIDEO_M2M_MPLANE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	w9, #-1
	stp	w9, w8, [x19, #16]
Lloh16:
	adrp	x8, _V4L2_FL_QUIRK_INVERTED_CROP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _V4L2_FL_QUIRK_INVERTED_CROP@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	add	x1, x19, #32
	bl	_set_bit
	ldr	w0, [x19, #28]
	ldr	w3, [x19]
Lloh19:
	adrp	x2, l_.str@PAGE
Lloh20:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	mov	x0, x21
	mov	x1, x19
	bl	_video_set_drvdata
Lloh21:
	adrp	x0, _m2m_ops@GOTPAGE
Lloh22:
	ldr	x0, [x0, _m2m_ops@GOTPAGEOFF]
	bl	_v4l2_m2m_init
	str	w0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_v4l2_err
	ldr	w0, [x19, #8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	add	x22, x19, #24
	mov	x0, x22
	mov	w1, #0
	mov	x2, #0
	bl	_media_entity_pads_init
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.3:
Lloh25:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh26:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #-1
	bl	_video_register_device
	mov	x23, x0
	cbz	w0, LBB0_7
; %bb.4:
	mov	x0, x22
	bl	_media_entity_cleanup
LBB0_5:
	ldr	w0, [x19, #8]
	bl	_v4l2_m2m_release
LBB0_6:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w19, [x19, #28]
	mov	x0, x21
	bl	_video_device_node_name
	mov	x3, x0
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_v4l2_info
	b	LBB0_6
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_fimc_m2m_fops,4,2              ; @fimc_m2m_fops
	.comm	_fimc_m2m_ioctl_ops,4,2         ; @fimc_m2m_ioctl_ops
	.comm	_video_device_release_empty,4,2 ; @video_device_release_empty
	.comm	_VFL_DIR_M2M,4,2                ; @VFL_DIR_M2M
	.comm	_V4L2_CAP_STREAMING,4,2         ; @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_VIDEO_M2M_MPLANE,4,2  ; @V4L2_CAP_VIDEO_M2M_MPLANE
	.comm	_V4L2_FL_QUIRK_INVERTED_CROP,4,2 ; @V4L2_FL_QUIRK_INVERTED_CROP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fimc.%d.m2m"

	.comm	_m2m_ops,4,2                    ; @m2m_ops
l_.str.1:                               ; @.str.1
	.asciz	"failed to initialize v4l2-m2m device\n"

	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
l_.str.2:                               ; @.str.2
	.asciz	"Registered %s as /dev/%s\n"

.subsections_via_symbols
