	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz4780_bch_reset
_jz4780_bch_reset:                      ## @jz4780_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, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_BCH_BHINT@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movq	(%r12), %rsi
	addq	(%r15), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	_BCH_BHCNT_BLOCKSIZE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	(%rbx), %eax
	shll	%cl, %eax
	movl	4(%rbx), %edi
	movq	_BCH_BHCNT_PARITYSIZE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	orl	%eax, %edi
	movq	_BCH_BHCNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	callq	_writel
	movq	_BCH_BHCR_BCHE@GOTPCREL(%rip), %rcx
	movq	_BCH_BHCR_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	8(%rbx), %edi
	movq	_BCH_BHCR_BSEL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movq	_BCH_BHCR_ENCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_2:
	orl	%r14d, %eax
	orl	%eax, %edi
	movq	_BCH_BHCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BCH_BHINT,8,3                  ## @BCH_BHINT
	.comm	_BCH_BHCNT_BLOCKSIZE_SHIFT,4,2  ## @BCH_BHCNT_BLOCKSIZE_SHIFT
	.comm	_BCH_BHCNT_PARITYSIZE_SHIFT,4,2 ## @BCH_BHCNT_PARITYSIZE_SHIFT
	.comm	_BCH_BHCNT,8,3                  ## @BCH_BHCNT
	.comm	_BCH_BHCR_BCHE,4,2              ## @BCH_BHCR_BCHE
	.comm	_BCH_BHCR_INIT,4,2              ## @BCH_BHCR_INIT
	.comm	_BCH_BHCR_BSEL_SHIFT,4,2        ## @BCH_BHCR_BSEL_SHIFT
	.comm	_BCH_BHCR_ENCE,4,2              ## @BCH_BHCR_ENCE
	.comm	_BCH_BHCR,8,3                   ## @BCH_BHCR
	.no_dead_strip	_jz4780_bch_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz4780_bch_reset
_jz4780_bch_reset:                      ; @jz4780_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	x19, x2
	mov	x20, x1
	mov	x21, 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, [x21]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
Lloh2:
	adrp	x8, _BCH_BHCNT_BLOCKSIZE_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BCH_BHCNT_BLOCKSIZE_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldp	w9, w10, [x20]
	lsl	w8, w9, w8
Lloh5:
	adrp	x9, _BCH_BHCNT_PARITYSIZE_SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BCH_BHCNT_PARITYSIZE_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	lsl	w9, w10, w9
	orr	w0, w9, w8
	ldr	x8, [x21]
Lloh8:
	adrp	x9, _BCH_BHCNT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BCH_BHCNT@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh11:
	adrp	x8, _BCH_BHCR_BCHE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BCH_BHCR_BCHE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _BCH_BHCR_INIT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BCH_BHCR_INIT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20, #8]
Lloh17:
	adrp	x10, _BCH_BHCR_BSEL_SHIFT@GOTPAGE
Lloh18:
	ldr	x10, [x10, _BCH_BHCR_BSEL_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh20:
	adrp	x10, _BCH_BHCR_ENCE@GOTPAGE
Lloh21:
	ldr	x10, [x10, _BCH_BHCR_ENCE@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh22:
	ldr	w9, [x10]
	cmp	w19, #0
	csel	w9, wzr, w9, eq
	orr	w0, w8, w9
	ldr	x8, [x21]
Lloh23:
	adrp	x9, _BCH_BHCR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _BCH_BHCR@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x1, x9, x8
	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
	b	_writel
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BCH_BHINT,8,3                  ; @BCH_BHINT
	.comm	_BCH_BHCNT_BLOCKSIZE_SHIFT,4,2  ; @BCH_BHCNT_BLOCKSIZE_SHIFT
	.comm	_BCH_BHCNT_PARITYSIZE_SHIFT,4,2 ; @BCH_BHCNT_PARITYSIZE_SHIFT
	.comm	_BCH_BHCNT,8,3                  ; @BCH_BHCNT
	.comm	_BCH_BHCR_BCHE,4,2              ; @BCH_BHCR_BCHE
	.comm	_BCH_BHCR_INIT,4,2              ; @BCH_BHCR_INIT
	.comm	_BCH_BHCR_BSEL_SHIFT,4,2        ; @BCH_BHCR_BSEL_SHIFT
	.comm	_BCH_BHCR_ENCE,4,2              ; @BCH_BHCR_ENCE
	.comm	_BCH_BHCR,8,3                   ; @BCH_BHCR
	.no_dead_strip	_jz4780_bch_reset
.subsections_via_symbols
