	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz4725b_bch_reset
_jz4725b_bch_reset:                     ## @jz4725b_bch_reset
	.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
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_BCH_BHINT@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	movq	(%r12), %rsi
	addq	(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	%rbx, %rdi
	movl	$31, %esi
	callq	_jz4725b_bch_config_clear
	movq	_BCH_BHCR_BCHE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_jz4725b_bch_config_set
	cmpl	$8, (%r14)
	movq	_BCH_BHCR_BSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	jne	LBB0_2
## %bb.1:
	callq	_jz4725b_bch_config_set
	jmp	LBB0_3
LBB0_2:
	callq	_jz4725b_bch_config_clear
LBB0_3:
	movq	_BCH_BHCR_ENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.4:
	callq	_jz4725b_bch_config_set
	jmp	LBB0_6
LBB0_5:
	callq	_jz4725b_bch_config_clear
LBB0_6:
	movq	_BCH_BHCR_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_jz4725b_bch_config_set
	movq	_BCH_BHCNT_ENC_COUNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BCH_BHCNT_ENC_COUNT_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	4(%r14), %esi
	cmpl	%edx, %esi
	jg	LBB0_7
## %bb.8:
	movq	_BCH_BHCNT_DEC_COUNT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_BCH_BHCNT_DEC_COUNT_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%r8d, %ecx
	sarl	%cl, %edx
	movl	8(%r14), %edi
	addl	%esi, %edi
	cmpl	%edx, %edi
	jle	LBB0_9
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %ecx
	shll	%cl, %esi
	movl	%r8d, %ecx
	shll	%cl, %edi
	orl	%esi, %edi
	movq	_BCH_BHCNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCH_BHINT,8,3                  ## @BCH_BHINT
	.comm	_BCH_BHCR_BCHE,4,2              ## @BCH_BHCR_BCHE
	.comm	_BCH_BHCR_BSEL,4,2              ## @BCH_BHCR_BSEL
	.comm	_BCH_BHCR_ENCE,4,2              ## @BCH_BHCR_ENCE
	.comm	_BCH_BHCR_INIT,4,2              ## @BCH_BHCR_INIT
	.comm	_BCH_BHCNT_ENC_COUNT_MASK,4,2   ## @BCH_BHCNT_ENC_COUNT_MASK
	.comm	_BCH_BHCNT_ENC_COUNT_SHIFT,4,2  ## @BCH_BHCNT_ENC_COUNT_SHIFT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BCH_BHCNT_DEC_COUNT_MASK,4,2   ## @BCH_BHCNT_DEC_COUNT_MASK
	.comm	_BCH_BHCNT_DEC_COUNT_SHIFT,4,2  ## @BCH_BHCNT_DEC_COUNT_SHIFT
	.comm	_BCH_BHCNT,8,3                  ## @BCH_BHCNT
	.no_dead_strip	_jz4725b_bch_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz4725b_bch_reset
_jz4725b_bch_reset:                     ; @jz4725b_bch_reset
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _BCH_BHINT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BCH_BHINT@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x19
	mov	w1, #31
	bl	_jz4725b_bch_config_clear
Lloh2:
	adrp	x8, _BCH_BHCR_BCHE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BCH_BHCR_BCHE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_jz4725b_bch_config_set
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _BCH_BHCR_BSEL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BCH_BHCR_BSEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x9]
	mov	x0, x19
	cmp	w8, #8
	b.ne	LBB0_2
; %bb.1:
	bl	_jz4725b_bch_config_set
	b	LBB0_3
LBB0_2:
	bl	_jz4725b_bch_config_clear
LBB0_3:
Lloh8:
	adrp	x8, _BCH_BHCR_ENCE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BCH_BHCR_ENCE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	cbz	w21, LBB0_5
; %bb.4:
	bl	_jz4725b_bch_config_set
	b	LBB0_6
LBB0_5:
	bl	_jz4725b_bch_config_clear
LBB0_6:
Lloh11:
	adrp	x8, _BCH_BHCR_INIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BCH_BHCR_INIT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_jz4725b_bch_config_set
Lloh14:
	adrp	x8, _BCH_BHCNT_ENC_COUNT_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BCH_BHCNT_ENC_COUNT_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x8]
Lloh17:
	adrp	x8, _BCH_BHCNT_ENC_COUNT_SHIFT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BCH_BHCNT_ENC_COUNT_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	asr	w10, w9, w8
	ldr	w9, [x20, #4]
	cmp	w9, w10
	b.gt	LBB0_8
; %bb.7:
Lloh20:
	adrp	x10, _BCH_BHCNT_DEC_COUNT_MASK@GOTPAGE
Lloh21:
	ldr	x10, [x10, _BCH_BHCNT_DEC_COUNT_MASK@GOTPAGEOFF]
Lloh22:
	adrp	x11, _BCH_BHCNT_DEC_COUNT_SHIFT@GOTPAGE
Lloh23:
	ldr	x11, [x11, _BCH_BHCNT_DEC_COUNT_SHIFT@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x10]
Lloh25:
	ldr	w10, [x11]
	asr	w12, w12, w10
	ldr	w11, [x20, #8]
	add	w11, w11, w9
	cmp	w11, w12
	b.le	LBB0_9
LBB0_8:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	lsl	w8, w9, w8
	lsl	w9, w11, w10
	orr	w0, w9, w8
	ldr	x8, [x19]
Lloh29:
	adrp	x9, _BCH_BHCNT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _BCH_BHCNT@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #0
LBB0_10:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_BCH_BHINT,8,3                  ; @BCH_BHINT
	.comm	_BCH_BHCR_BCHE,4,2              ; @BCH_BHCR_BCHE
	.comm	_BCH_BHCR_BSEL,4,2              ; @BCH_BHCR_BSEL
	.comm	_BCH_BHCR_ENCE,4,2              ; @BCH_BHCR_ENCE
	.comm	_BCH_BHCR_INIT,4,2              ; @BCH_BHCR_INIT
	.comm	_BCH_BHCNT_ENC_COUNT_MASK,4,2   ; @BCH_BHCNT_ENC_COUNT_MASK
	.comm	_BCH_BHCNT_ENC_COUNT_SHIFT,4,2  ; @BCH_BHCNT_ENC_COUNT_SHIFT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BCH_BHCNT_DEC_COUNT_MASK,4,2   ; @BCH_BHCNT_DEC_COUNT_MASK
	.comm	_BCH_BHCNT_DEC_COUNT_SHIFT,4,2  ; @BCH_BHCNT_DEC_COUNT_SHIFT
	.comm	_BCH_BHCNT,8,3                  ; @BCH_BHCNT
	.no_dead_strip	_jz4725b_bch_reset
.subsections_via_symbols
