	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RIOQueueCmdBlk                 ## -- Begin function RIOQueueCmdBlk
	.p2align	4, 0x90
_RIOQueueCmdBlk:                        ## @RIOQueueCmdBlk
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %edx
	movq	_MAX_RUP@GOTPCREL(%rip), %rax
	movq	_LINKS_PER_UNIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	(%rax), %ecx
	movzwl	%cx, %eax
	cmpl	%esi, %eax
	jbe	LBB0_1
## %bb.2:
	movq	%rdi, %r12
	movq	16(%rdi), %r14
	movzwl	%dx, %r13d
	shlq	$5, %r13
	leaq	(%r14,%r13), %rbx
	movq	%rbx, %rdi
	callq	_rio_spin_lock_irqsave
	cmpq	$0, 8(%r14,%r13)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_8
## %bb.3:
	cmpq	$0, 24(%r14,%r13)
	jne	LBB0_8
## %bb.4:
	movq	16(%r14,%r13), %rdi
	callq	_readw
	movq	_TX_RUP_INACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	24(%r15), %edi
	movq	%r15, %rsi
	callq	*%rax
	testl	%eax, %eax
	je	LBB0_8
LBB0_7:
	addq	%r13, %r14
	addq	$24, %r14
	movq	_RIO_DEBUG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_rio_dprintk
	movq	8(%r12), %r13
	movl	(%r12), %ebx
	movq	-8(%r14), %rdi
	addq	$4, %rdi
	callq	_readw
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_RIO_PTR
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%ebx, %ebx
	movl	%eax, %esi
	movl	$4, %edx
	callq	*%r13
	movq	%r15, (%r14)
	movq	_TX_PACKET_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-8(%r14), %rsi
	callq	_writew
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rio_spin_unlock_irqrestore
	jmp	LBB0_19
LBB0_1:
	movq	_RIO_DEBUG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_rio_dprintk
	movq	%r15, %rdi
	callq	_RIOFreeCmdBlk
	movq	_RIO_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_19
LBB0_8:
	leaq	(%r14,%r13), %rbx
	addq	$8, %rbx
	movq	_RIO_DEBUG_CMD@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_rio_dprintk
	cmpq	$0, (%rbx)
	je	LBB0_10
## %bb.9:
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_rio_dprintk
LBB0_10:
	cmpq	$0, 24(%r14,%r13)
	je	LBB0_12
## %bb.11:
	movl	(%r12), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_rio_dprintk
LBB0_12:
	movq	16(%r14,%r13), %rdi
	callq	_readw
	movq	_TX_RUP_INACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%r12, %r13
	je	LBB0_14
## %bb.13:
	movl	(%r13), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_rio_dprintk
LBB0_14:
	movl	(%r13), %edi
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_rio_dprintk
	movq	(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_15
## %bb.16:
	leaq	L_.str.8(%rip), %r14
	movq	%r15, %r12
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	leaq	L_.str.7(%rip), %rsi
	xorl	%eax, %eax
	callq	_rio_dprintk
	movq	(%rbx), %r15
	leaq	8(%r15), %rbx
	movl	(%r13), %edi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_rio_dprintk
	movq	8(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_17
	jmp	LBB0_18
LBB0_15:
	movq	%r15, %r12
LBB0_18:
	movl	(%r13), %edi
	leaq	L_.str.9(%rip), %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_rio_dprintk
	movq	%r12, (%rbx)
	movq	$0, 8(%r12)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rio_spin_unlock_irqrestore
	xorl	%ebx, %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_RUP,8,3                    ## @MAX_RUP
	.comm	_LINKS_PER_UNIT,8,3             ## @LINKS_PER_UNIT
	.comm	_RIO_DEBUG_CMD,4,2              ## @RIO_DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Illegal rup number %d in RIOQueueCmdBlk\n"

	.comm	_RIO_FAIL,4,2                   ## @RIO_FAIL
	.comm	_TX_RUP_INACTIVE,8,3            ## @TX_RUP_INACTIVE
L_.str.1:                               ## @.str.1
	.asciz	"RUP inactive-placing command straight on. Cmd byte is 0x%x\n"

	.comm	_TX_PACKET_READY,4,2            ## @TX_PACKET_READY
L_.str.2:                               ## @.str.2
	.asciz	"RUP active - en-queing\n"

L_.str.3:                               ## @.str.3
	.asciz	"Rup active - command waiting\n"

L_.str.4:                               ## @.str.4
	.asciz	"Rup active - command pending\n"

L_.str.5:                               ## @.str.5
	.asciz	"Rup active - command rup not ready\n"

L_.str.6:                               ## @.str.6
	.asciz	"First try to queue cmdblk %p at %p\n"

L_.str.7:                               ## @.str.7
	.asciz	"Command cmdblk %p here\n"

L_.str.8:                               ## @.str.8
	.asciz	"Now try to queue cmd cmdblk %p at %p\n"

L_.str.9:                               ## @.str.9
	.asciz	"Will queue cmdblk %p at %p\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RIOQueueCmdBlk                 ; -- Begin function RIOQueueCmdBlk
	.p2align	2
_RIOQueueCmdBlk:                        ; @RIOQueueCmdBlk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
                                        ; kill: def $w1 killed $w1 def $x1
Lloh0:
	adrp	x8, _MAX_RUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_RUP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _LINKS_PER_UNIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LINKS_PER_UNIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	w8, w9, w8
	cmp	w1, w8, uxth
	b.hs	LBB0_7
; %bb.1:
	mov	x21, x0
	ldr	x25, [x0, #16]
	mov	w26, w1
	add	x20, x25, x26, lsl #5
	mov	x0, x20
	bl	_rio_spin_lock_irqsave
	mov	x23, x20
	ldr	x8, [x23, #8]!
Lloh6:
	adrp	x22, _TX_RUP_INACTIVE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _TX_RUP_INACTIVE@GOTPAGEOFF]
	cbnz	x8, LBB0_8
; %bb.2:
	mov	x24, x20
	ldr	x8, [x24, #24]!
	cbnz	x8, LBB0_8
; %bb.3:
	add	x27, x25, x26, lsl #5
	ldr	x0, [x27, #16]!
	bl	_readw
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.4:
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w0, [x19, #24]
	mov	x1, x19
	blr	x8
	cbz	w0, LBB0_8
LBB0_6:
Lloh8:
	adrp	x8, _RIO_DEBUG_CMD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RIO_DEBUG_CMD@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x22, x19
	ldr	x8, [x22, #16]!
	ldr	w8, [x8]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_rio_dprintk
	ldr	x23, [x21, #8]
	ldr	w21, [x21]
	ldr	x8, [x27]
	add	x0, x8, #4
	bl	_readw
	mov	x1, x0
	mov	x0, x21
	bl	_RIO_PTR
	mov	x1, x0
	mov	x0, x22
	mov	w2, #4
	blr	x23
	str	x19, [x24]
Lloh13:
	adrp	x8, _TX_PACKET_READY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TX_PACKET_READY@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	x1, [x27]
	bl	_writew
	b	LBB0_18
LBB0_7:
Lloh16:
	adrp	x8, _RIO_DEBUG_CMD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RIO_DEBUG_CMD@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	str	x1, [sp]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_rio_dprintk
	mov	x0, x19
	bl	_RIOFreeCmdBlk
Lloh21:
	adrp	x8, _RIO_FAIL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RIO_FAIL@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	b	LBB0_19
LBB0_8:
Lloh24:
	adrp	x24, _RIO_DEBUG_CMD@GOTPAGE
Lloh25:
	ldr	x24, [x24, _RIO_DEBUG_CMD@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_rio_dprintk
	ldr	x8, [x23]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w0, [x24]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_rio_dprintk
LBB0_10:
	add	x21, x25, x26, lsl #5
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	w0, [x24]
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_rio_dprintk
LBB0_12:
	ldr	x0, [x21, #16]
	bl	_readw
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_14
; %bb.13:
	ldr	w0, [x24]
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_rio_dprintk
LBB0_14:
	ldr	w0, [x24]
	stp	x19, x23, [sp]
Lloh34:
	adrp	x1, l_.str.6@PAGE
Lloh35:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_rio_dprintk
	ldr	x8, [x23]
	cbz	x8, LBB0_17
; %bb.15:
Lloh36:
	adrp	x21, l_.str.7@PAGE
Lloh37:
	add	x21, x21, l_.str.7@PAGEOFF
Lloh38:
	adrp	x22, l_.str.8@PAGE
Lloh39:
	add	x22, x22, l_.str.8@PAGEOFF
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	str	x8, [sp]
	mov	x1, x21
	bl	_rio_dprintk
	ldr	x25, [x23]
	add	x23, x25, #8
	ldr	w0, [x24]
	stp	x19, x23, [sp]
	mov	x1, x22
	bl	_rio_dprintk
	ldr	x8, [x25, #8]
	cbnz	x8, LBB0_16
LBB0_17:
	ldr	w0, [x24]
	stp	x19, x23, [sp]
Lloh40:
	adrp	x1, l_.str.9@PAGE
Lloh41:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_rio_dprintk
	str	x19, [x23]
	str	xzr, [x19, #8]
LBB0_18:
	mov	x0, x20
	bl	_rio_spin_unlock_irqrestore
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_RUP,8,3                    ; @MAX_RUP
	.comm	_LINKS_PER_UNIT,8,3             ; @LINKS_PER_UNIT
	.comm	_RIO_DEBUG_CMD,4,2              ; @RIO_DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Illegal rup number %d in RIOQueueCmdBlk\n"

	.comm	_RIO_FAIL,4,2                   ; @RIO_FAIL
	.comm	_TX_RUP_INACTIVE,8,3            ; @TX_RUP_INACTIVE
l_.str.1:                               ; @.str.1
	.asciz	"RUP inactive-placing command straight on. Cmd byte is 0x%x\n"

	.comm	_TX_PACKET_READY,4,2            ; @TX_PACKET_READY
l_.str.2:                               ; @.str.2
	.asciz	"RUP active - en-queing\n"

l_.str.3:                               ; @.str.3
	.asciz	"Rup active - command waiting\n"

l_.str.4:                               ; @.str.4
	.asciz	"Rup active - command pending\n"

l_.str.5:                               ; @.str.5
	.asciz	"Rup active - command rup not ready\n"

l_.str.6:                               ; @.str.6
	.asciz	"First try to queue cmdblk %p at %p\n"

l_.str.7:                               ; @.str.7
	.asciz	"Command cmdblk %p here\n"

l_.str.8:                               ; @.str.8
	.asciz	"Now try to queue cmd cmdblk %p at %p\n"

l_.str.9:                               ; @.str.9
	.asciz	"Will queue cmdblk %p at %p\n"

.subsections_via_symbols
