	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvin_dma_register              ## -- Begin function rvin_dma_register
	.p2align	4, 0x90
_rvin_dma_register:                     ## @rvin_dma_register
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	leaq	28(%rbx), %rsi
	callq	_v4l2_device_register
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	leaq	32(%rbx), %r15
	leaq	4(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_init
	leaq	24(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	20(%rbx), %rdi
	callq	_spin_lock_init
	movq	_STOPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_HW_BUFFER_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_8
## %bb.2:
	leaq	-1(%rdx), %rcx
	movl	%edx, %eax
	andl	$3, %eax
	cmpq	$3, %rcx
	jae	LBB0_4
## %bb.3:
	xorl	%ecx, %ecx
	jmp	LBB0_6
LBB0_4:
	andl	$-4, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rsi
	movq	$0, (%rsi,%rcx,8)
	movq	8(%rbx), %rsi
	movq	$0, 8(%rsi,%rcx,8)
	movq	8(%rbx), %rsi
	movq	$0, 16(%rsi,%rcx,8)
	movq	8(%rbx), %rsi
	movq	$0, 24(%rsi,%rcx,8)
	addq	$4, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_5
LBB0_6:
	testq	%rax, %rax
	je	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rdx
	movq	$0, (%rdx,%rcx,8)
	incq	%rcx
	decq	%rax
	jne	LBB0_7
LBB0_8:
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 88(%rbx)
	movq	_VB2_MMAP@GOTPCREL(%rip), %rax
	movq	_VB2_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_VB2_DMABUF@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 32(%rbx)
	movq	%r12, 80(%rbx)
	movq	%rbx, 72(%rbx)
	movl	$4, 36(%rbx)
	movq	_rvin_qops@GOTPCREL(%rip), %rax
	movq	%rax, 64(%rbx)
	movq	_vb2_dma_contig_memops@GOTPCREL(%rip), %rax
	movq	%rax, 56(%rbx)
	movq	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movl	$4, 40(%rbx)
	movl	(%rbx), %eax
	movl	%eax, 44(%rbx)
	movq	%r15, %rdi
	callq	_vb2_queue_init
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movl	(%rbx), %edi
	movq	_rvin_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_KBUILD_MODNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r14d, %esi
	movq	%rbx, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_12
LBB0_9:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
LBB0_12:
	movq	%rbx, %rdi
	callq	_vin_err
	movq	%rbx, %rdi
	callq	_rvin_dma_unregister
	jmp	LBB0_13
LBB0_14:
	xorl	%r15d, %r15d
LBB0_13:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STOPPED,4,2                    ## @STOPPED
	.comm	_HW_BUFFER_NUM,4,2              ## @HW_BUFFER_NUM
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_VB2_MMAP,4,2                   ## @VB2_MMAP
	.comm	_VB2_READ,4,2                   ## @VB2_READ
	.comm	_VB2_DMABUF,4,2                 ## @VB2_DMABUF
	.comm	_rvin_qops,4,2                  ## @rvin_qops
	.comm	_vb2_dma_contig_memops,4,2      ## @vb2_dma_contig_memops
	.comm	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,4,2 ## @V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to initialize VB2 queue\n"

	.comm	_rvin_irq,4,2                   ## @rvin_irq
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.comm	_KBUILD_MODNAME,4,2             ## @KBUILD_MODNAME
L_.str.1:                               ## @.str.1
	.asciz	"failed to request irq\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvin_dma_register              ; -- Begin function rvin_dma_register
	.p2align	2
_rvin_dma_register:                     ; @rvin_dma_register
	.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	x20, x1
	mov	x19, x0
	mov	x1, x0
	ldr	w0, [x1], #28
	bl	_v4l2_device_register
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.1:
	add	x21, x19, #32
	add	x22, x19, #4
	mov	x0, x22
	bl	_mutex_init
	add	x0, x19, #24
	bl	_INIT_LIST_HEAD
	add	x0, x19, #20
	bl	_spin_lock_init
Lloh0:
	adrp	x8, _STOPPED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STOPPED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #16]
Lloh3:
	adrp	x8, _HW_BUFFER_NUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HW_BUFFER_NUM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x8, #0
	lsl	x9, x9, #3
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #8]
	str	xzr, [x10, x8]
	add	x8, x8, #8
	cmp	x9, x8
	b.ne	LBB0_3
LBB0_4:
Lloh6:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #88]
Lloh9:
	adrp	x8, _VB2_MMAP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VB2_MMAP@GOTPAGEOFF]
Lloh11:
	adrp	x9, _VB2_READ@GOTPAGE
Lloh12:
	ldr	x9, [x9, _VB2_READ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _VB2_DMABUF@GOTPAGE
Lloh16:
	ldr	x9, [x9, _VB2_DMABUF@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #32]
	stp	x19, x22, [x19, #72]
Lloh18:
	adrp	x8, _rvin_qops@GOTPAGE
Lloh19:
	ldr	x8, [x8, _rvin_qops@GOTPAGEOFF]
Lloh20:
	adrp	x9, _vb2_dma_contig_memops@GOTPAGE
Lloh21:
	ldr	x9, [x9, _vb2_dma_contig_memops@GOTPAGEOFF]
	stp	x9, x8, [x19, #56]
Lloh22:
	adrp	x8, _V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	movi.2s	v0, #4
	stur	d0, [x19, #36]
	ldr	w9, [x19]
	stp	w9, w8, [x19, #44]
	mov	x0, x21
	bl	_vb2_queue_init
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	w0, [x19]
Lloh25:
	adrp	x8, _rvin_irq@GOTPAGE
Lloh26:
	ldr	x8, [x8, _rvin_irq@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
Lloh28:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh30:
	ldr	w3, [x8]
Lloh31:
	adrp	x8, _KBUILD_MODNAME@GOTPAGE
Lloh32:
	ldr	x8, [x8, _KBUILD_MODNAME@GOTPAGEOFF]
Lloh33:
	ldr	w4, [x8]
	mov	x1, x20
	mov	x5, x19
	bl	_devm_request_irq
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.6:
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
	mov	x21, x0
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_vin_err
	mov	x0, x19
	bl	_rvin_dma_unregister
LBB0_9:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_STOPPED,4,2                    ; @STOPPED
	.comm	_HW_BUFFER_NUM,4,2              ; @HW_BUFFER_NUM
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_VB2_MMAP,4,2                   ; @VB2_MMAP
	.comm	_VB2_READ,4,2                   ; @VB2_READ
	.comm	_VB2_DMABUF,4,2                 ; @VB2_DMABUF
	.comm	_rvin_qops,4,2                  ; @rvin_qops
	.comm	_vb2_dma_contig_memops,4,2      ; @vb2_dma_contig_memops
	.comm	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,4,2 ; @V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to initialize VB2 queue\n"

	.comm	_rvin_irq,4,2                   ; @rvin_irq
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.comm	_KBUILD_MODNAME,4,2             ; @KBUILD_MODNAME
l_.str.1:                               ; @.str.1
	.asciz	"failed to request irq\n"

.subsections_via_symbols
