	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pio_wait
_pio_wait:                              ## @pio_wait
	.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
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	16(%rdi), %r13
	movq	8(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addq	$12, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	_ib_rvt_state_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movq	_RVT_PROCESS_RECV_OK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax,%rcx,4)
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_write_seqlock
	movq	(%r15), %rsi
	movq	16(%r15), %rdi
	callq	_list_add_tail
	leaq	8(%r13), %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	_RVT_S_WAIT_PIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	cmpl	$1, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	sbbl	$-1, (%rcx)
	movq	_HFI1_S_WAIT_PIO_DRAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	cmpl	$1, %eax
	sbbl	$-1, 4(%rcx)
	orl	%r14d, 8(%rbx)
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_list_empty
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_iowait_get_priority
	movl	8(%r15), %edi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_iowait_queue
	movq	%r12, (%r13)
	movq	_RVT_S_WAIT_PIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_trace_hfi1_qpsleep
	movq	%rbx, %rdi
	callq	_rvt_get_qp
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_hfi1_sc_wantpiobuf_intr
LBB0_5:
	movq	%r12, %rdi
	callq	_write_sequnlock
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_hfi1_qp_unbusy
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ib_rvt_state_ops,8,3           ## @ib_rvt_state_ops
	.comm	_RVT_PROCESS_RECV_OK,4,2        ## @RVT_PROCESS_RECV_OK
	.comm	_RVT_S_WAIT_PIO,4,2             ## @RVT_S_WAIT_PIO
	.comm	_HFI1_S_WAIT_PIO_DRAIN,4,2      ## @HFI1_S_WAIT_PIO_DRAIN
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_pio_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pio_wait
_pio_wait:                              ; @pio_wait
	.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	x24, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x23, [x0, #16]
	ldr	x25, [x1, #8]
	add	x19, x0, #12
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _ib_rvt_state_ops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ib_rvt_state_ops@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x20]
	ldr	w8, [x8, x9, lsl #2]
Lloh3:
	adrp	x9, _RVT_PROCESS_RECV_OK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RVT_PROCESS_RECV_OK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	mov	x0, x22
	bl	_write_seqlock
	ldr	x0, [x21, #16]
	ldr	x1, [x21]
	bl	_list_add_tail
	add	x0, x23, #8
	bl	_list_empty
	cbz	w0, LBB0_4
; %bb.2:
Lloh6:
	adrp	x26, _RVT_S_WAIT_PIO@GOTPAGE
Lloh7:
	ldr	x26, [x26, _RVT_S_WAIT_PIO@GOTPAGEOFF]
	ldr	w8, [x26]
	tst	w8, w24
	ldp	w8, w9, [x25]
	cinc	w8, w8, ne
	str	w8, [x25]
Lloh8:
	adrp	x8, _HFI1_S_WAIT_PIO_DRAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HFI1_S_WAIT_PIO_DRAIN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w24
	cinc	w8, w9, ne
	str	w8, [x25, #4]
	ldr	w8, [x20, #8]
	orr	w8, w8, w24
	str	w8, [x20, #8]
	add	x24, x22, #4
	mov	x0, x24
	bl	_list_empty
	mov	x25, x0
	mov	x0, x23
	bl	_iowait_get_priority
	ldr	w0, [x21, #8]
	mov	x1, x23
	mov	x2, x24
	bl	_iowait_queue
	str	x22, [x23]
	ldr	w1, [x26]
	mov	x0, x20
	bl	_trace_hfi1_qpsleep
	mov	x0, x20
	bl	_rvt_get_qp
	cbz	w25, LBB0_4
; %bb.3:
	mov	x0, x22
	mov	w1, #1
	bl	_hfi1_sc_wantpiobuf_intr
LBB0_4:
	mov	x0, x22
	bl	_write_sequnlock
	ldr	x1, [x21]
	mov	x0, x20
	bl	_hfi1_qp_unbusy
Lloh11:
	adrp	x8, _EBUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ib_rvt_state_ops,8,3           ; @ib_rvt_state_ops
	.comm	_RVT_PROCESS_RECV_OK,4,2        ; @RVT_PROCESS_RECV_OK
	.comm	_RVT_S_WAIT_PIO,4,2             ; @RVT_S_WAIT_PIO
	.comm	_HFI1_S_WAIT_PIO_DRAIN,4,2      ; @HFI1_S_WAIT_PIO_DRAIN
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_pio_wait
.subsections_via_symbols
