	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bsg_remove_queue               ## -- Begin function bsg_remove_queue
	.p2align	4, 0x90
_bsg_remove_queue:                      ## @bsg_remove_queue
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	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
	movl	(%rdi), %edi
	callq	_spin_lock_irq
	movq	%r14, %rdi
	callq	_blk_stop_queue
	movq	%r14, %rdi
	callq	_blk_fetch_request
	movq	%rax, %r13
	movq	8(%r14), %rax
	movl	4(%rax), %r15d
	addl	(%rax), %r15d
	movq	16(%r14), %rax
	addl	(%rax), %r15d
	movl	(%r14), %edi
	movl	4(%rax), %r12d
	callq	_spin_unlock_irq
	addl	%r15d, %r12d
	jne	LBB0_2
LBB0_6:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bsg_unregister_queue           ## TAILCALL
LBB0_7:
	retq
LBB0_2:
	movq	_ENXIO@GOTPCREL(%rip), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$200, %edi
	callq	_msleep
	movl	(%r14), %edi
	callq	_spin_lock_irq
	movq	%r14, %rdi
	callq	_blk_fetch_request
	movq	%rax, %r13
	movq	8(%r14), %rax
	movl	4(%rax), %ebx
	addl	(%rax), %ebx
	movq	16(%r14), %rax
	addl	(%rax), %ebx
	movl	(%r14), %edi
	movl	4(%rax), %r12d
	callq	_spin_unlock_irq
	addl	%ebx, %r12d
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testq	%r13, %r13
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	subl	(%r15), %eax
	movl	%eax, (%r13)
	xorl	%esi, %esi
	subl	(%r15), %esi
	movq	%r13, %rdi
	callq	_blk_end_request_all
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bsg_remove_queue               ; -- Begin function bsg_remove_queue
	.p2align	2
_bsg_remove_queue:                      ; @bsg_remove_queue
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_3
; %bb.1:
	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
	.cfi_remember_state
	mov	x19, x0
	ldr	w0, [x0]
	bl	_spin_lock_irq
	mov	x0, x19
	bl	_blk_stop_queue
	mov	x0, x19
	bl	_blk_fetch_request
	mov	x20, x0
	ldp	x8, x9, [x19, #8]
	ldp	w10, w8, [x8]
	ldp	w11, w21, [x9]
	add	w8, w8, w10
	add	w22, w8, w11
	ldr	w0, [x19]
	bl	_spin_unlock_irq
	cmn	w22, w21
	b.ne	LBB0_4
LBB0_2:
	mov	x0, x19
	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
	b	_bsg_unregister_queue
LBB0_3:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	ret
LBB0_4:
	.cfi_restore_state
Lloh0:
	adrp	x21, _ENXIO@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ENXIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #200
	bl	_msleep
	ldr	w0, [x19]
	bl	_spin_lock_irq
	mov	x0, x19
	bl	_blk_fetch_request
	mov	x20, x0
	ldp	x8, x9, [x19, #8]
	ldp	w10, w8, [x8]
	ldp	w11, w22, [x9]
	add	w8, w8, w10
	add	w23, w8, w11
	ldr	w0, [x19]
	bl	_spin_unlock_irq
	cmn	w23, w22
	b.eq	LBB0_2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x20, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x21]
	neg	w8, w8
	str	w8, [x20]
	ldr	w8, [x21]
	neg	w1, w8
	mov	x0, x20
	bl	_blk_end_request_all
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
.subsections_via_symbols
