	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rvin_irq
_rvin_irq:                              ## @rvin_irq
	.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	%rsi, %rbx
	leaq	12(%rsi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	callq	_rvin_get_interrupt_status
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_rvin_ack_interrupt
	movq	(%rbx), %rax
	movq	_STOPPED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_5:
	movq	_STOPPING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_vin_dbg
LBB0_15:
	movl	$1, %ebx
LBB0_16:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IRQ_RETVAL                     ## TAILCALL
LBB0_7:
	movq	_VNMS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rvin_read
	movl	%eax, %r15d
	movq	_VNMS_FBS_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	_VNMS_FBS_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r15d
	movq	(%rbx), %rax
	movq	_STARTING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.8:
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_vin_dbg
	jmp	LBB0_15
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_vin_dbg
	movq	_RUNNING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_11:
	movq	16(%rbx), %rax
	movslq	%r15d, %r12
	movq	(%rax,%r12,8), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	24(%rbx), %ecx
	movl	%ecx, 8(%rax)
	movl	8(%rbx), %ecx
	movl	%ecx, (%rax)
	xorl	%eax, %eax
	callq	_ktime_get_ns
	movq	16(%rbx), %rcx
	movq	(%rcx,%r12,8), %rdi
	movl	%eax, 4(%rdi)
	addq	$4, %rdi
	movq	_VB2_BUF_STATE_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_vb2_buffer_done
	movq	16(%rbx), %rax
	movq	$0, (%rax,%r12,8)
	jmp	LBB0_14
LBB0_13:
	movl	8(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_vin_dbg
LBB0_14:
	incl	8(%rbx)
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_rvin_fill_hw_slot
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_STOPPED,8,3                    ## @STOPPED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IRQ while state stopped\n"

	.comm	_STOPPING,8,3                   ## @STOPPING
L_.str.1:                               ## @.str.1
	.asciz	"IRQ while state stopping\n"

	.comm	_VNMS_REG,4,2                   ## @VNMS_REG
	.comm	_VNMS_FBS_MASK,4,2              ## @VNMS_FBS_MASK
	.comm	_VNMS_FBS_SHIFT,4,2             ## @VNMS_FBS_SHIFT
	.comm	_STARTING,8,3                   ## @STARTING
L_.str.2:                               ## @.str.2
	.asciz	"Starting sync slot: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Capture start synced!\n"

	.comm	_RUNNING,8,3                    ## @RUNNING
	.comm	_VB2_BUF_STATE_DONE,4,2         ## @VB2_BUF_STATE_DONE
L_.str.4:                               ## @.str.4
	.asciz	"Dropping frame %u\n"

	.no_dead_strip	_rvin_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rvin_irq
_rvin_irq:                              ; @rvin_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	add	x19, x1, #12
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_rvin_get_interrupt_status
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_rvin_ack_interrupt
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _STOPPED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STOPPED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_3:
	mov	w20, #0
	b	LBB0_11
LBB0_4:
Lloh5:
	adrp	x9, _STOPPING@GOTPAGE
Lloh6:
	ldr	x9, [x9, _STOPPING@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_6:
Lloh10:
	adrp	x8, _VNMS_REG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VNMS_REG@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rvin_read
Lloh13:
	adrp	x8, _VNMS_FBS_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VNMS_FBS_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh16:
	adrp	x9, _VNMS_FBS_SHIFT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _VNMS_FBS_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	asr	w21, w8, w9
	ldr	x8, [x20]
Lloh19:
	adrp	x9, _STARTING@GOTPAGE
Lloh20:
	ldr	x9, [x9, _STARTING@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.7:
	cbz	w21, LBB0_12
; %bb.8:
	str	x21, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x20
	bl	_vin_dbg
LBB0_10:
	mov	w20, #1
LBB0_11:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	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
	add	sp, sp, #64
	b	_IRQ_RETVAL
LBB0_12:
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_vin_dbg
Lloh26:
	adrp	x8, _RUNNING@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RUNNING@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	str	x8, [x20]
LBB0_13:
	ldr	x8, [x20, #16]
	ldr	x8, [x8, w21, sxtw #3]
	cbz	x8, LBB0_15
; %bb.14:
	mov	x9, x21
	sxtw	x22, w9
	ldr	w9, [x20, #24]
	str	w9, [x8, #8]
	ldr	w9, [x20, #8]
	str	w9, [x8]
	bl	_ktime_get_ns
	ldr	x8, [x20, #16]
	lsl	x22, x22, #3
	ldr	x8, [x8, x22]
	str	w0, [x8, #4]!
Lloh29:
	adrp	x9, _VB2_BUF_STATE_DONE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _VB2_BUF_STATE_DONE@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x9]
	mov	x0, x8
	bl	_vb2_buffer_done
	ldr	x8, [x20, #16]
	str	xzr, [x8, x22]
	b	LBB0_16
LBB0_15:
	ldr	w8, [x20, #8]
	str	x8, [sp]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_vin_dbg
LBB0_16:
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_rvin_fill_hw_slot
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_STOPPED,8,3                    ; @STOPPED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IRQ while state stopped\n"

	.comm	_STOPPING,8,3                   ; @STOPPING
l_.str.1:                               ; @.str.1
	.asciz	"IRQ while state stopping\n"

	.comm	_VNMS_REG,4,2                   ; @VNMS_REG
	.comm	_VNMS_FBS_MASK,4,2              ; @VNMS_FBS_MASK
	.comm	_VNMS_FBS_SHIFT,4,2             ; @VNMS_FBS_SHIFT
	.comm	_STARTING,8,3                   ; @STARTING
l_.str.2:                               ; @.str.2
	.asciz	"Starting sync slot: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Capture start synced!\n"

	.comm	_RUNNING,8,3                    ; @RUNNING
	.comm	_VB2_BUF_STATE_DONE,4,2         ; @VB2_BUF_STATE_DONE
l_.str.4:                               ; @.str.4
	.asciz	"Dropping frame %u\n"

	.no_dead_strip	_rvin_irq
.subsections_via_symbols
