	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_congested
_rs_congested:                          ## @rs_congested
	.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, %r15
	callq	_sc_busy
	movq	_S_CONGESTED@GOTPCREL(%rip), %r13
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movq	%r15, %rdi
	callq	_RSSuspend
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	movq	%r15, %rdi
	callq	_RSProhibitWrites
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	movl	16(%r15), %r12d
	decq	%r12
	movq	_S_NOT_CONGESTED@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$-1, %r12
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r15), %rax
	movl	%r12d, %ecx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %edi
	callq	_bdev_get_queue
	movq	%rax, %rdi
	movl	%r14d, %esi
	callq	_bdi_congested
	decq	%r12
	testl	%eax, %eax
	je	LBB0_4
## %bb.7:
	movl	%eax, %ebx
	movq	_S_CONGESTED@GOTPCREL(%rip), %r13
	jmp	LBB0_8
LBB0_5:
	xorl	%ebx, %ebx
LBB0_8:
	movq	(%r15), %rdi
	addq	(%r13), %rdi
	callq	_atomic_inc
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S_CONGESTED,8,3                ## @S_CONGESTED
	.comm	_S_NOT_CONGESTED,8,3            ## @S_NOT_CONGESTED
	.no_dead_strip	_rs_congested
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_congested
_rs_congested:                          ; @rs_congested
	.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	x19, x0
	bl	_sc_busy
	cbnz	x0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_RSSuspend
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_RSProhibitWrites
	cbz	x0, LBB0_5
LBB0_3:
Lloh0:
	adrp	x22, _S_CONGESTED@GOTPAGE
Lloh1:
	ldr	x22, [x22, _S_CONGESTED@GOTPAGEOFF]
	mov	w21, #1
LBB0_4:
	ldr	x8, [x22]
	ldr	x9, [x19]
	add	x0, x9, x8
	bl	_atomic_inc
	mov	x0, x21
	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
LBB0_5:
	ldr	w8, [x19, #16]
	sub	x24, x8, #1
Lloh2:
	adrp	x23, _S_NOT_CONGESTED@GOTPAGE
Lloh3:
	ldr	x23, [x23, _S_NOT_CONGESTED@GOTPAGEOFF]
Lloh4:
	adrp	x22, _S_CONGESTED@GOTPAGE
Lloh5:
	ldr	x22, [x22, _S_CONGESTED@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmn	x24, #1
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, w24, uxtw #3]
	ldr	w0, [x8]
	bl	_bdev_get_queue
	mov	x1, x20
	bl	_bdi_congested
	mov	x21, x0
	sub	x24, x24, #1
	cbz	w0, LBB0_6
	b	LBB0_4
LBB0_8:
	mov	w21, #0
	mov	x22, x23
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_S_CONGESTED,8,3                ; @S_CONGESTED
	.comm	_S_NOT_CONGESTED,8,3            ; @S_NOT_CONGESTED
	.no_dead_strip	_rs_congested
.subsections_via_symbols
