	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ktcomplete
_ktcomplete:                            ## @ktcomplete
	.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	%rdi, %r14
	movq	%rsi, 16(%rdi)
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movq	_ncpus@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, %r15d
	movq	_iocq@GOTPCREL(%rip), %r12
	movslq	%edx, %rbx
	leaq	(,%rbx,8), %r13
	movq	(%r12), %rdi
	addq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	_kts@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax,%rbx,4)
	jne	LBB0_2
## %bb.1:
	addq	(%r12), %r13
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%r12), %rdi
	callq	_spin_lock_irqsave
	xorl	%r15d, %r15d
LBB0_2:
	movq	(%r12), %rax
	movslq	%r15d, %rbx
	leaq	(%rax,%rbx,8), %rsi
	addq	$4, %rsi
	leaq	(,%rbx,8), %r15
	movq	%r14, %rdi
	callq	_list_add_tail
	addq	(%r12), %r15
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	_ktiowq@GOTPCREL(%rip), %rax
	shlq	$2, %rbx
	addq	(%rax), %rbx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wake_up                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ncpus,4,2                      ## @ncpus
	.comm	_iocq,8,3                       ## @iocq
	.comm	_kts,8,3                        ## @kts
	.comm	_ktiowq,8,3                     ## @ktiowq
	.no_dead_strip	_ktcomplete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ktcomplete
_ktcomplete:                            ; @ktcomplete
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	str	x1, [x0, #16]
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _ncpus@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ncpus@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w21, w10, w9, w8
Lloh3:
	adrp	x20, _iocq@GOTPAGE
Lloh4:
	ldr	x20, [x20, _iocq@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x0, x8, w21, sxtw #3
	bl	_spin_lock_irqsave
Lloh5:
	adrp	x8, _kts@GOTPAGE
Lloh6:
	ldr	x8, [x8, _kts@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w8, [x8, w21, sxtw #2]
	cbnz	w8, LBB0_2
; %bb.1:
	sxtw	x8, w21
	ldr	x9, [x20]
	add	x0, x9, x8, lsl #3
	bl	_spin_unlock_irqrestore
	ldr	x0, [x20]
	bl	_spin_lock_irqsave
	mov	w21, #0
LBB0_2:
	ldr	x8, [x20]
	mov	x9, x21
	sbfiz	x22, x9, #3, #32
	add	x8, x8, x22
	add	x1, x8, #4
	mov	x0, x19
	bl	_list_add_tail
	ldr	x8, [x20]
	add	x0, x8, x22
	bl	_spin_unlock_irqrestore
Lloh8:
	adrp	x8, _ktiowq@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ktiowq@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	x0, x8, w21, sxtw #2
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_wake_up
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ncpus,4,2                      ; @ncpus
	.comm	_iocq,8,3                       ; @iocq
	.comm	_kts,8,3                        ; @kts
	.comm	_ktiowq,8,3                     ; @ktiowq
	.no_dead_strip	_ktcomplete
.subsections_via_symbols
