	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r5c_update_log_state
_r5c_update_log_state:                  ## @r5c_update_log_state
	.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, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r14
	callq	_r5c_is_writeback
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_r5l_ring_distance
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_r5c_log_required_to_flush_cache
	movl	%eax, %r12d
	leal	(%r12,%r12), %eax
	movq	_R5C_LOG_CRITICAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	%r14, %rsi
	cmpl	%eax, %r15d
	jge	LBB0_3
## %bb.2:
	callq	_set_bit
	xorl	%r13d, %r13d
	jmp	LBB0_4
LBB0_3:
	callq	_test_bit
	xorl	%r13d, %r13d
	testq	%rax, %rax
	setne	%r13b
	movq	_R5C_LOG_CRITICAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
LBB0_4:
	leal	(%r12,%r12,2), %eax
	movq	_R5C_LOG_TIGHT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	%r14, %rsi
	cmpl	%eax, %r15d
	jge	LBB0_6
## %bb.5:
	callq	_set_bit
	testl	%r13d, %r13d
	je	LBB0_8
LBB0_9:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_r5l_wake_reclaim               ## TAILCALL
LBB0_6:
	callq	_clear_bit
	testl	%r13d, %r13d
	jne	LBB0_9
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R5C_LOG_CRITICAL,4,2           ## @R5C_LOG_CRITICAL
	.comm	_R5C_LOG_TIGHT,4,2              ## @R5C_LOG_TIGHT
	.no_dead_strip	_r5c_update_log_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r5c_update_log_state
_r5c_update_log_state:                  ; @r5c_update_log_state
	.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	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x20, [x8]
	bl	_r5c_is_writeback
	cbz	w0, LBB0_8
; %bb.1:
	ldp	w2, w1, [x19]
	mov	x0, x19
	bl	_r5l_ring_distance
	mov	x21, x0
	mov	x0, x20
	bl	_r5c_log_required_to_flush_cache
	mov	x22, x0
Lloh0:
	adrp	x24, _R5C_LOG_CRITICAL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _R5C_LOG_CRITICAL@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x1, x20
	cmp	w21, w22, lsl #1
	b.ge	LBB0_3
; %bb.2:
	bl	_set_bit
	mov	w23, #0
	b	LBB0_4
LBB0_3:
	bl	_test_bit
	cmp	x0, #0
	cset	w23, ne
	ldr	w0, [x24]
	mov	x1, x20
	bl	_clear_bit
LBB0_4:
	add	w8, w22, w22, lsl #1
Lloh2:
	adrp	x9, _R5C_LOG_TIGHT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _R5C_LOG_TIGHT@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x9]
	mov	x1, x20
	cmp	w21, w8
	b.ge	LBB0_7
; %bb.5:
	bl	_set_bit
	cbz	w23, LBB0_8
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	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	_r5l_wake_reclaim
LBB0_7:
	bl	_clear_bit
	cbnz	w23, LBB0_6
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_R5C_LOG_CRITICAL,4,2           ; @R5C_LOG_CRITICAL
	.comm	_R5C_LOG_TIGHT,4,2              ; @R5C_LOG_TIGHT
	.no_dead_strip	_r5c_update_log_state
.subsections_via_symbols
