	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_blk_drain_queue                ## -- Begin function blk_drain_queue
	.p2align	4, 0x90
_blk_drain_queue:                       ## @blk_drain_queue
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	leaq	56(%rdi), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r12), %edi
	callq	_spin_lock_irq
	movq	%r12, %rdi
	callq	_elv_drain_elevator
	movq	%r12, %rdi
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	callq	_blk_throtl_drain
	movq	%r12, %rdi
	callq	___blk_run_queue
	movl	16(%r12), %r13d
	movq	%r15, %rdi
	callq	_list_empty
	xorl	%ebx, %ebx
	testl	%eax, %eax
	sete	%bl
	orl	%r13d, %ebx
	movq	24(%r12), %rax
	orl	(%rax), %ebx
	movq	(%r12), %rax
	orl	(%rax), %ebx
	movq	48(%r12), %rdi
	callq	_list_empty
	xorl	%r13d, %r13d
	testl	%eax, %eax
	sete	%r13b
	orl	%ebx, %r13d
	movq	(%r12), %rax
	movq	24(%r12), %rcx
	orl	4(%rcx), %r13d
	orl	4(%rax), %r13d
	movq	48(%r12), %rdi
	addq	$4, %rdi
	callq	_list_empty
	xorl	%ebx, %ebx
	testl	%eax, %eax
	sete	%bl
	orl	%r13d, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	callq	___blk_run_queue
	movl	16(%r12), %ebx
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	8(%r12), %edi
	callq	_spin_unlock_irq
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_msleep
	jmp	LBB0_1
LBB0_6:
	cmpq	$0, 40(%r12)
	je	LBB0_11
## %bb.7:
	movl	8(%r12), %edi
	callq	_spin_lock_irq
	movq	32(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_10
## %bb.8:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rdi
	addq	%r14, %rdi
	callq	_wake_up_all
	incq	%r15
	movq	32(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r14
	cmpq	%rax, %r15
	jl	LBB0_9
LBB0_10:
	movl	8(%r12), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irq                ## TAILCALL
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_blk_drain_queue                ; -- Begin function blk_drain_queue
	.p2align	2
_blk_drain_queue:                       ; @blk_drain_queue
	.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	x20, x1
	mov	x19, x0
	add	x21, x0, #56
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #8]
	bl	_spin_lock_irq
	mov	x0, x19
	bl	_elv_drain_elevator
	mov	x0, x19
	cbz	w20, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_blk_throtl_drain
	mov	x0, x19
	bl	___blk_run_queue
	ldr	w22, [x19, #16]
	mov	x0, x21
	bl	_list_empty
	cmp	w0, #0
	cset	w8, eq
	orr	w8, w22, w8
	ldr	x9, [x19, #24]
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	x9, [x19]
	ldr	w9, [x9]
	orr	w22, w8, w9
	ldr	x0, [x19, #48]
	bl	_list_empty
	cmp	w0, #0
	cset	w8, eq
	orr	w8, w22, w8
	ldr	x9, [x19, #24]
	ldr	w9, [x9, #4]
	orr	w8, w9, w8
	ldr	x9, [x19]
	ldr	w9, [x9, #4]
	orr	w22, w8, w9
	ldr	x8, [x19, #48]
	add	x0, x8, #4
	bl	_list_empty
	cmp	w0, #0
	cset	w8, eq
	orr	w22, w22, w8
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	bl	___blk_run_queue
	ldr	w22, [x19, #16]
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x19, #8]
	bl	_spin_unlock_irq
	cbz	w22, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_msleep
	b	LBB0_1
LBB0_6:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_11
; %bb.7:
	ldr	w0, [x19, #8]
	bl	_spin_lock_irq
	ldr	x0, [x19, #32]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x20, #0
	mov	x21, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	add	x0, x8, x20
	bl	_wake_up_all
	add	x21, x21, #1
	ldr	x0, [x19, #32]
	bl	_ARRAY_SIZE
	add	x20, x20, #4
	cmp	x21, w0, sxtw
	b.lt	LBB0_9
LBB0_10:
	ldr	w0, [x19, #8]
	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	_spin_unlock_irq
LBB0_11:
	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
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
