	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bsg_io_schedule
_bsg_io_schedule:                       ## @bsg_io_schedule
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DEFINE_WAIT
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	8(%rbx), %rax
	setg	%dil
	callq	_BUG_ON
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ENODATA@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_BSG_F_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%rbx), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_3
## %bb.6:
	addq	$20, %rbx
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_wait@GOTPCREL(%rip), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_prepare_to_wait
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_io_schedule
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_finish_wait
	jmp	LBB0_5
LBB0_3:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_spin_unlock_irq
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_BSG_F_BLOCK,4,2                ## @BSG_F_BLOCK
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.no_dead_strip	_bsg_io_schedule
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bsg_io_schedule
_bsg_io_schedule:                       ; @bsg_io_schedule
	.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, x0
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_DEFINE_WAIT
	add	x19, x20, #16
	mov	x0, x19
	bl	_spin_lock_irq
	ldp	x8, x9, [x20]
	cmp	x8, x9
	cset	w0, gt
	bl	_BUG_ON
	ldp	x8, x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENODATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
Lloh5:
	adrp	x8, _BSG_F_BLOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BSG_F_BLOCK@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x20, #24
	bl	_test_bit
	cbz	w0, LBB0_4
; %bb.3:
	add	x20, x20, #20
Lloh8:
	adrp	x8, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x21, _wait@GOTPAGE
Lloh12:
	ldr	x21, [x21, _wait@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x21
	bl	_prepare_to_wait
	mov	x0, x19
	bl	_spin_unlock_irq
	bl	_io_schedule
	mov	x0, x20
	mov	x1, x21
	bl	_finish_wait
	mov	w20, #0
	b	LBB0_6
LBB0_4:
Lloh13:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_spin_unlock_irq
LBB0_6:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_BSG_F_BLOCK,4,2                ; @BSG_F_BLOCK
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.no_dead_strip	_bsg_io_schedule
.subsections_via_symbols
