	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz4780_correct
_jz4780_correct:                        ## @jz4780_correct
	.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	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r13
	callq	_mutex_lock
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_jz4780_bch_reset
	movl	4(%rbx), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_jz4780_bch_write_data
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_jz4780_bch_write_data
	movq	_BCH_BHINT_DECF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	_jz4780_bch_wait_complete
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	-44(%rbp), %r14d
	movq	_BCH_BHINT_UNCOR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_4
## %bb.3:
	movl	16(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
	movq	_EBADMSG@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_1:
	movl	16(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_4:
	movq	_BCH_BHINT_ERR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_5
## %bb.6:
	movq	_BCH_BHINT_ERRC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	movq	_BCH_BHINT_ERRC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_BCH_BHINT_TERRC_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r14d
	movq	_BCH_BHINT_TERRC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %r14d
	testl	%eax, %eax
	jle	LBB0_9
## %bb.7:
	movl	%eax, %r12d
	shlq	$2, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rdi
	movq	_BCH_BHERR0@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	addq	%rbx, %rdi
	callq	_readl
                                        ## kill: def $eax killed $eax def $rax
	movq	_BCH_BHERR_MASK_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%eax, %edx
	movq	_BCH_BHERR_MASK_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	sarl	%cl, %edx
	movl	%eax, -44(%rbp)
	movq	_BCH_BHERR_INDEX_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_BCH_BHERR_INDEX_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	sarl	%cl, %eax
	leal	(%rax,%rax), %ecx
	movslq	%ecx, %rcx
	xorl	%edx, (%r15,%rcx,4)
	sarl	$8, %edx
	addl	%eax, %eax
	incl	%eax
	cltq
	xorl	%edx, (%r15,%rax,4)
	addq	$4, %rbx
	cmpq	%rbx, %r12
	jne	LBB0_8
	jmp	LBB0_9
LBB0_5:
	xorl	%r14d, %r14d
LBB0_9:
	movq	%r13, %rdi
	callq	_jz4780_bch_disable
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCH_BHINT_DECF,4,2             ## @BCH_BHINT_DECF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timed out while correcting data\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_BCH_BHINT_UNCOR,4,2            ## @BCH_BHINT_UNCOR
L_.str.1:                               ## @.str.1
	.asciz	"uncorrectable ECC error\n"

	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.comm	_BCH_BHINT_ERR,4,2              ## @BCH_BHINT_ERR
	.comm	_BCH_BHINT_ERRC_MASK,4,2        ## @BCH_BHINT_ERRC_MASK
	.comm	_BCH_BHINT_ERRC_SHIFT,4,2       ## @BCH_BHINT_ERRC_SHIFT
	.comm	_BCH_BHINT_TERRC_MASK,4,2       ## @BCH_BHINT_TERRC_MASK
	.comm	_BCH_BHINT_TERRC_SHIFT,4,2      ## @BCH_BHINT_TERRC_SHIFT
	.comm	_BCH_BHERR0,8,3                 ## @BCH_BHERR0
	.comm	_BCH_BHERR_MASK_MASK,4,2        ## @BCH_BHERR_MASK_MASK
	.comm	_BCH_BHERR_MASK_SHIFT,4,2       ## @BCH_BHERR_MASK_SHIFT
	.comm	_BCH_BHERR_INDEX_MASK,4,2       ## @BCH_BHERR_INDEX_MASK
	.comm	_BCH_BHERR_INDEX_SHIFT,4,2      ## @BCH_BHERR_INDEX_SHIFT
	.no_dead_strip	_jz4780_correct
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz4780_correct
_jz4780_correct:                        ; @jz4780_correct
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	_jz4780_bch_reset
	ldr	w2, [x22, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_jz4780_bch_write_data
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_jz4780_bch_write_data
Lloh0:
	adrp	x8, _BCH_BHINT_DECF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BCH_BHINT_DECF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_jz4780_bch_wait_complete
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _BCH_BHINT_UNCOR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BCH_BHINT_UNCOR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
Lloh8:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	ldr	w0, [x19, #16]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh12:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x19
	bl	_jz4780_bch_disable
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
Lloh14:
	adrp	x9, _BCH_BHINT_ERR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BCH_BHINT_ERR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.7:
Lloh17:
	adrp	x9, _BCH_BHINT_ERRC_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BCH_BHINT_ERRC_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _BCH_BHINT_ERRC_SHIFT@GOTPAGE
Lloh21:
	ldr	x10, [x10, _BCH_BHINT_ERRC_SHIFT@GOTPAGEOFF]
	and	w9, w9, w8
Lloh22:
	ldr	w10, [x10]
	asr	w9, w9, w10
Lloh23:
	adrp	x10, _BCH_BHINT_TERRC_MASK@GOTPAGE
Lloh24:
	ldr	x10, [x10, _BCH_BHINT_TERRC_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	and	w8, w10, w8
Lloh26:
	adrp	x10, _BCH_BHINT_TERRC_SHIFT@GOTPAGE
Lloh27:
	ldr	x10, [x10, _BCH_BHINT_TERRC_SHIFT@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	asr	w21, w8, w10
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.8:
	mov	x22, #0
	lsl	x23, x9, #2
Lloh29:
	adrp	x24, _BCH_BHERR0@GOTPAGE
Lloh30:
	ldr	x24, [x24, _BCH_BHERR0@GOTPAGEOFF]
Lloh31:
	adrp	x25, _BCH_BHERR_MASK_MASK@GOTPAGE
Lloh32:
	ldr	x25, [x25, _BCH_BHERR_MASK_MASK@GOTPAGEOFF]
Lloh33:
	adrp	x26, _BCH_BHERR_MASK_SHIFT@GOTPAGE
Lloh34:
	ldr	x26, [x26, _BCH_BHERR_MASK_SHIFT@GOTPAGEOFF]
Lloh35:
	adrp	x27, _BCH_BHERR_INDEX_MASK@GOTPAGE
Lloh36:
	ldr	x27, [x27, _BCH_BHERR_INDEX_MASK@GOTPAGEOFF]
Lloh37:
	adrp	x28, _BCH_BHERR_INDEX_SHIFT@GOTPAGE
Lloh38:
	ldr	x28, [x28, _BCH_BHERR_INDEX_SHIFT@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x24]
	add	x8, x8, x9
	add	x0, x22, x8
	bl	_readl
	str	w0, [sp, #12]
	ldr	w8, [x25]
	and	w8, w8, w0
	ldr	w9, [x26]
	asr	w8, w8, w9
	ldr	w9, [x27]
	and	w9, w9, w0
	ldr	w10, [x28]
	asr	w9, w9, w10
	lsl	w10, w9, #1
	sbfiz	x10, x10, #2, #32
	ldr	w11, [x20, x10]
	eor	w11, w11, w8
	str	w11, [x20, x10]
	add	x9, x20, w9, sxtw #3
	ldr	w10, [x9, #4]
	eor	w8, w10, w8, asr #8
	str	w8, [x9, #4]
	add	x22, x22, #4
	cmp	x23, x22
	b.ne	LBB0_9
	b	LBB0_5
LBB0_10:
	mov	w21, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_BCH_BHINT_DECF,4,2             ; @BCH_BHINT_DECF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timed out while correcting data\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_BCH_BHINT_UNCOR,4,2            ; @BCH_BHINT_UNCOR
l_.str.1:                               ; @.str.1
	.asciz	"uncorrectable ECC error\n"

	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.comm	_BCH_BHINT_ERR,4,2              ; @BCH_BHINT_ERR
	.comm	_BCH_BHINT_ERRC_MASK,4,2        ; @BCH_BHINT_ERRC_MASK
	.comm	_BCH_BHINT_ERRC_SHIFT,4,2       ; @BCH_BHINT_ERRC_SHIFT
	.comm	_BCH_BHINT_TERRC_MASK,4,2       ; @BCH_BHINT_TERRC_MASK
	.comm	_BCH_BHINT_TERRC_SHIFT,4,2      ; @BCH_BHINT_TERRC_SHIFT
	.comm	_BCH_BHERR0,8,3                 ; @BCH_BHERR0
	.comm	_BCH_BHERR_MASK_MASK,4,2        ; @BCH_BHERR_MASK_MASK
	.comm	_BCH_BHERR_MASK_SHIFT,4,2       ; @BCH_BHERR_MASK_SHIFT
	.comm	_BCH_BHERR_INDEX_MASK,4,2       ; @BCH_BHERR_INDEX_MASK
	.comm	_BCH_BHERR_INDEX_SHIFT,4,2      ; @BCH_BHERR_INDEX_SHIFT
	.no_dead_strip	_jz4780_correct
.subsections_via_symbols
