	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vx_read_status
_vx_read_status:                        ## @vx_read_status
	.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, %r15
	movl	(%rsi), %eax
	movq	_RMH_SSIZE_FIXED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	cmpq	$0, 8(%r14)
	je	LBB0_14
LBB0_2:
	movq	%r15, %rdi
	callq	_vx_wait_for_rx_full
	testl	%eax, %eax
	js	LBB0_15
## %bb.3:
	movq	_RXH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vx_inb
	movl	%eax, %r12d
	shll	$16, %r12d
	movq	_RXM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vx_inb
	movl	%eax, %ebx
	shll	$8, %ebx
	orl	%r12d, %ebx
	movq	_RXL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vx_inb
	orl	%eax, %ebx
	movl	(%r14), %ecx
	cmpl	$128, %ecx
	je	LBB0_7
## %bb.4:
	cmpl	$129, %ecx
	jne	LBB0_13
## %bb.5:
	movzbl	%al, %r13d
	andl	$16776960, %ebx                 ## imm = 0xFFFF00
	movq	16(%r14), %rax
	movl	%ebx, (%rax)
	jmp	LBB0_10
LBB0_7:
	movq	16(%r14), %rax
	movl	%ebx, (%rax)
	xorl	%r13d, %r13d
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.8:
	movl	%ebx, %eax
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %ecx
	andl	$1, %ecx
	addl	%ecx, %r13d
	sarl	%eax
	cmpl	$1, %ebx
	movl	%eax, %ebx
	ja	LBB0_9
LBB0_10:
	leal	1(%r13), %eax
	movq	%rax, 8(%r14)
	testl	%r13d, %r13d
	jle	LBB0_14
LBB0_11:
	movq	_SIZE_MAX_STATUS@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %r13d
	setg	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_13:
	movl	8(%r14), %r13d
	movq	16(%r14), %rax
	movl	%ebx, (%rax)
	decl	%r13d
	testl	%r13d, %r13d
	jg	LBB0_11
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	incl	%r13d
	movl	$1, %ebx
	movq	_IRQ_MESS_WRITE_NEXT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_vx_send_irq_dsp
	testl	%eax, %eax
	js	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r15, %rdi
	callq	_vx_wait_for_rx_full
	testl	%eax, %eax
	js	LBB0_15
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	_RXH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vx_inb
	shll	$16, %eax
	movq	16(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movq	_RXM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vx_inb
	shll	$8, %eax
	movq	16(%r14), %rcx
	orl	%eax, (%rcx,%rbx,4)
	movq	_RXL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vx_inb
	movq	16(%r14), %rcx
	orl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_17
## %bb.20:
	movq	_IRQ_MESS_WRITE_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vx_transfer_end                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RMH_SSIZE_FIXED,4,2            ## @RMH_SSIZE_FIXED
	.comm	_RXH,4,2                        ## @RXH
	.comm	_RXM,4,2                        ## @RXM
	.comm	_RXL,4,2                        ## @RXL
	.comm	_SIZE_MAX_STATUS,4,2            ## @SIZE_MAX_STATUS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IRQ_MESS_WRITE_NEXT,4,2        ## @IRQ_MESS_WRITE_NEXT
	.comm	_IRQ_MESS_WRITE_END,4,2         ## @IRQ_MESS_WRITE_END
	.no_dead_strip	_vx_read_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vx_read_status
_vx_read_status:                        ; @vx_read_status
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _RMH_SSIZE_FIXED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RMH_SSIZE_FIXED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_12
LBB0_2:
	mov	x0, x19
	bl	_vx_wait_for_rx_full
	tbnz	w0, #31, LBB0_13
; %bb.3:
Lloh3:
	adrp	x22, _RXH@GOTPAGE
Lloh4:
	ldr	x22, [x22, _RXH@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_vx_inb
	mov	x21, x0
Lloh5:
	adrp	x23, _RXM@GOTPAGE
Lloh6:
	ldr	x23, [x23, _RXM@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_vx_inb
	lsl	w8, w0, #8
	orr	w24, w8, w21, lsl #16
Lloh7:
	adrp	x21, _RXL@GOTPAGE
Lloh8:
	ldr	x21, [x21, _RXL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_vx_inb
	orr	w8, w24, w0
	ldr	w9, [x20]
	cmp	w9, #128
	b.eq	LBB0_6
; %bb.4:
	cmp	w9, #129
	b.ne	LBB0_11
; %bb.5:
	and	w24, w0, #0xff
	and	w8, w8, #0xffff00
	ldr	x9, [x20, #16]
	str	w8, [x9]
	b	LBB0_8
LBB0_6:
	ldr	x9, [x20, #16]
	str	w8, [x9]
	mov	w24, #0
	cbz	w8, LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	and	w9, w8, #0x1
	add	w24, w24, w9
	asr	w9, w8, #1
	cmp	w8, #1
	mov	x8, x9
	b.hi	LBB0_7
LBB0_8:
	add	w8, w24, #1
	str	x8, [x20, #8]
	cmp	w24, #1
	b.lt	LBB0_12
LBB0_9:
Lloh9:
	adrp	x8, _SIZE_MAX_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SIZE_MAX_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w24, w8
	cset	w0, gt
	bl	_snd_BUG_ON
	cbz	x0, LBB0_14
; %bb.10:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_11:
	ldr	w9, [x20, #8]
	ldr	x10, [x20, #16]
	str	w8, [x10]
	sub	w24, w9, #1
	cmp	w24, #1
	b.ge	LBB0_9
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
	add	w8, w24, #1
	lsl	x24, x8, #2
	mov	w25, #4
Lloh15:
	adrp	x26, _IRQ_MESS_WRITE_NEXT@GOTPAGE
Lloh16:
	ldr	x26, [x26, _IRQ_MESS_WRITE_NEXT@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	bl	_vx_send_irq_dsp
	tbnz	w0, #31, LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x19
	bl	_vx_wait_for_rx_full
	tbnz	w0, #31, LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_vx_inb
	lsl	w8, w0, #16
	ldr	x9, [x20, #16]
	str	w8, [x9, x25]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_vx_inb
	ldr	x8, [x20, #16]
	ldr	w9, [x8, x25]
	orr	w9, w9, w0, lsl #8
	str	w9, [x8, x25]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_vx_inb
	ldr	x8, [x20, #16]
	ldr	w9, [x8, x25]
	orr	w9, w9, w0
	str	w9, [x8, x25]
	add	x25, x25, #4
	cmp	x24, x25
	b.ne	LBB0_15
; %bb.18:
Lloh17:
	adrp	x8, _IRQ_MESS_WRITE_END@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IRQ_MESS_WRITE_END@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_vx_transfer_end
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_RMH_SSIZE_FIXED,4,2            ; @RMH_SSIZE_FIXED
	.comm	_RXH,4,2                        ; @RXH
	.comm	_RXM,4,2                        ; @RXM
	.comm	_RXL,4,2                        ; @RXL
	.comm	_SIZE_MAX_STATUS,4,2            ; @SIZE_MAX_STATUS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IRQ_MESS_WRITE_NEXT,4,2        ; @IRQ_MESS_WRITE_NEXT
	.comm	_IRQ_MESS_WRITE_END,4,2         ; @IRQ_MESS_WRITE_END
	.no_dead_strip	_vx_read_status
.subsections_via_symbols
