	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_kmem
_wait_kmem:                             ## @wait_kmem
	.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, %rbx
	movq	%rdi, %r15
	movq	16(%rsi), %r12
	leaq	8(%rsi), %r14
	movq	%r14, %rdi
	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	%r15, %rdi
	callq	_spin_lock
	movq	%r12, %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	leaq	4(%r15), %r13
	movq	%r13, %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	8(%r15), %rdi
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	incq	%rsi
	callq	_mod_timer
LBB0_5:
	movq	_RVT_S_WAIT_KMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%rbx)
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_list_add_tail
LBB0_6:
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	_RVT_S_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 12(%rbx)
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$8, %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	_jiffies,8,3                    ## @jiffies
	.comm	_RVT_S_WAIT_KMEM,4,2            ## @RVT_S_WAIT_KMEM
	.comm	_RVT_S_BUSY,4,2                 ## @RVT_S_BUSY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_wait_kmem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_kmem
_wait_kmem:                             ; @wait_kmem
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x1, #16]
	add	x19, x1, #8
	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_6
; %bb.1:
	mov	x0, x21
	bl	_spin_lock
	mov	x0, x22
	bl	_list_empty
	cbz	x0, LBB0_5
; %bb.2:
	add	x23, x21, #4
	mov	x0, x23
	bl	_list_empty
	cbz	x0, LBB0_4
; %bb.3:
	add	x0, x21, #8
Lloh6:
	adrp	x8, _jiffies@GOTPAGE
Lloh7:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x1, x8, #1
	bl	_mod_timer
LBB0_4:
Lloh9:
	adrp	x8, _RVT_S_WAIT_KMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RVT_S_WAIT_KMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20, #12]
	orr	w8, w9, w8
	str	w8, [x20, #12]
	mov	x0, x22
	mov	x1, x23
	bl	_list_add_tail
LBB0_5:
	mov	x0, x21
	bl	_spin_unlock
Lloh12:
	adrp	x8, _RVT_S_BUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RVT_S_BUSY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x20, #12]
	bic	w8, w9, w8
	str	w8, [x20, #12]
Lloh15:
	adrp	x8, _EBUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_6:
	mov	w20, #0
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.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	_jiffies,8,3                    ; @jiffies
	.comm	_RVT_S_WAIT_KMEM,4,2            ; @RVT_S_WAIT_KMEM
	.comm	_RVT_S_BUSY,4,2                 ; @RVT_S_BUSY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_wait_kmem
.subsections_via_symbols
