	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function doc_decode_ecc
LCPI0_0:
	.byte	15                              ## 0xf
	.byte	63                              ## 0x3f
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
LCPI0_1:
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	2                               ## 0x2
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
LCPI0_2:
	.long	256                             ## 0x100
	.long	64                              ## 0x40
	.long	16                              ## 0x10
	.long	4                               ## 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_doc_decode_ecc
	.p2align	4, 0x90
_doc_decode_ecc:                        ## @doc_decode_ecc
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_NN@GOTPCREL(%rip), %r12
	movl	(%r12), %r14d
	movq	_KK@GOTPCREL(%rip), %rax
	movl	%r14d, %ebx
	subl	(%rax), %ebx
	leal	1(%rbx), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	leal	4(,%r14,4), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_kmalloc
	movl	$-1, %ecx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_20
## %bb.1:
	movl	(%r12), %eax
	leal	4(,%rax,4), %edi
	movl	(%rbx), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %r14
	movq	%rax, %rsi
	callq	_generate_gf
	movzbl	4(%r13), %eax
	movb	5(%r13), %cl
	movl	%ecx, %edx
	andb	$3, %dl
	shrb	$2, %cl
	movzwl	2(%r13), %esi
	movd	%esi, %xmm0
	movl	%esi, %ebx
	pand	LCPI0_0(%rip), %xmm0
	movd	%eax, %xmm1
	movzbl	%cl, %eax
	pinsrb	$4, %eax, %xmm1
	shrb	$4, %bl
	movzbl	%bl, %eax
	pinsrb	$8, %eax, %xmm1
	shrl	$14, %esi
	pinsrb	$12, %esi, %xmm1
	movzbl	%dl, %eax
	movd	%eax, %xmm2
	punpcklbw	%xmm2, %xmm0            ## xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
	pshufb	LCPI0_1(%rip), %xmm0            ## xmm0 = xmm0[1,0,2,u,u,u,u,u,u,u,u,u,u,u,u,u]
	movzbl	1(%r13), %r12d
	pinsrb	$3, (%r13), %xmm0
	pmovzxbd	%xmm0, %xmm0                    ## xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
	pmaddwd	LCPI0_2(%rip), %xmm0
	por	%xmm1, %xmm0
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movdqa	%xmm0, (%rdx)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%r15, %r8
	xorl	%r9d, %r9d
	callq	_eras_dec_rs
	testl	%eax, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	jle	LBB0_19
## %bb.4:
	movl	%eax, %r10d
	xorl	%edx, %edx
	movq	_NB_DATA@GOTPCREL(%rip), %r14
	movq	_SECTOR_SIZE@GOTPCREL(%rip), %rdi
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%rdx
	cmpq	%rdx, %r10
	je	LBB0_18
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rdx,4), %ecx
	movl	(%r14), %eax
	cmpl	%eax, %ecx
	jl	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_KK@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %ecx
	jl	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%eax, %ecx
	jge	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	notl	%ecx
	addl	%ecx, %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %r9d
	leal	(%rax,%rax,4), %ecx
	addl	$-6, %ecx
	movl	%ecx, %ebx
	sarl	$3, %ebx
	movslq	%ebx, %rax
	xorq	$1, %rax
	cmpl	$6, %r9d
	setge	%sil
	movl	(%rdi), %r13d
	cmpl	%r13d, %eax
	setl	%r8b
	leal	1(%r13), %r11d
	testb	%r8b, %sil
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%r11d, %eax
	jne	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rsi,%rdx,4), %esi
	andb	$6, %cl
	addb	$2, %cl
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %esi
	xorl	%esi, %r12d
	cmpl	%r13d, %eax
	jge	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	xorb	%sil, (%rcx,%rax)
	movq	_SECTOR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leal	1(%r13), %r11d
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	movslq	%ebx, %rbx
	xorq	$1, %rbx
	cmpl	$-2, %r9d
	setge	%al
	cmpl	%r13d, %ebx
	setl	%cl
	testb	%cl, %al
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%r11d, %ebx
	jne	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	addl	$4, %r9d
	andl	$6, %r9d
	movb	$8, %al
	subb	%r9b, %al
	testl	%r9d, %r9d
	movzbl	%al, %ecx
	cmovel	%r9d, %ecx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rdx,4), %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	xorl	%eax, %r12d
	cmpl	%r13d, %ebx
	jge	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	xorb	%al, (%rcx,%rbx)
	jmp	LBB0_17
LBB0_2:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	movl	$-1, %ecx
	jmp	LBB0_20
LBB0_7:
	movl	$-1, -56(%rbp)                  ## 4-byte Folded Spill
	jmp	LBB0_19
LBB0_18:
	xorl	%eax, %eax
	negb	%r12b
	sbbl	%eax, %eax
	orl	%eax, -56(%rbp)                 ## 4-byte Folded Spill
LBB0_19:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movl	%ecx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SECTOR_SIZE,4,2                ## @SECTOR_SIZE
	.comm	_NN,4,2                         ## @NN
	.comm	_KK,4,2                         ## @KK
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_NB_DATA,4,2                    ## @NB_DATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_doc_decode_ecc                 ; -- Begin function doc_decode_ecc
	.p2align	2
_doc_decode_ecc:                        ; @doc_decode_ecc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
	mov	x24, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x23, _NN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NN@GOTPAGEOFF]
	ldr	w12, [x23]
Lloh5:
	adrp	x26, _KK@GOTPAGE
Lloh6:
	ldr	x26, [x26, _KK@GOTPAGEOFF]
	ldr	w8, [x26]
	sub	w8, w12, w8
	add	w9, w8, #1
	lsl	x9, x9, #2
	add	x10, x9, #15
	and	x13, x10, #0x7fffffff0
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x25, x9, x13
	mov	sp, x25
	lsl	x8, x8, #2
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x13, x10, #0x7fffffff0
	sub	x21, x9, x13
	mov	sp, x21
	mov	x9, x8
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x22, x8, x13
	mov	sp, x22
	lsl	w8, w12, #2
	add	w0, w8, #4
Lloh13:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x27]
	bl	_kmalloc
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x0
	ldr	w8, [x23]
	lsl	w8, w8, #2
	add	w0, w8, #4
	ldr	w1, [x27]
	bl	_kmalloc
	cbz	x0, LBB0_14
; %bb.2:
	mov	x23, x0
	mov	x0, x20
	mov	x1, x23
	bl	_generate_gf
	ldrb	w8, [x24, #4]
	ldrb	w9, [x24, #5]
	and	w10, w9, #0x3
	bfi	w8, w10, #8, #2
	lsr	w9, w9, #2
	ldrb	w10, [x24, #2]
	and	w11, w10, #0xf
	bfi	w9, w11, #6, #4
	ldrb	w27, [x24, #1]
	stp	w8, w9, [x25]
	lsr	w8, w10, #4
	ldrb	w9, [x24, #3]
	and	w10, w9, #0x3f
	bfi	w8, w10, #4, #6
	lsr	w9, w9, #6
	ldrb	w10, [x24]
	bfi	w9, w10, #2, #8
	stp	w8, w9, [x25, #8]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x25
	mov	x3, x21
	mov	x4, x22
	mov	w5, #0
	bl	_eras_dec_rs
	mov	x24, x0
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.3:
Lloh15:
	adrp	x8, _NB_DATA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NB_DATA@GOTPAGEOFF]
Lloh17:
	adrp	x9, _SECTOR_SIZE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SECTOR_SIZE@GOTPAGEOFF]
	mov	w10, #-3
	mov	w11, #8
	mov	w12, w24
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #4
	add	x22, x22, #4
	subs	x12, x12, #1
	b.eq	LBB0_16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x22]
	ldr	w14, [x8]
	ldr	w15, [x26]
	cmp	w13, w14
	ccmp	w13, w15, #0, ge
	b.lt	LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w13, w14
	b.ge	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mvn	w13, w13
	add	w13, w14, w13
	add	w13, w13, w13, lsl #2
	lsl	w13, w13, #1
	sub	w0, w13, #6
	sbfx	x15, x0, #3, #29
	eor	x17, x15, #0x1
	ldr	w14, [x9]
	cmp	w17, w14
	ccmp	w13, #5, #4, lt
	add	w16, w14, #1
	ccmp	w17, w16, #4, le
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w0, w0, #0x6
	ldr	w1, [x21]
	add	w0, w0, #2
	asr	w0, w1, w0
	eor	w27, w0, w27
	cmp	w17, w14
	b.ge	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w14, [x19, x17]
	eor	w14, w14, w0
	strb	w14, [x19, x17]
	ldr	w14, [x9]
	add	w16, w14, #1
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x15, x15, #1
	eor	x15, x15, #0x1
	cmp	w15, w14
	ccmp	w13, w10, #4, lt
	ccmp	w15, w16, #4, le
	b.ne	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	add	w13, w13, #4
	ands	w16, w13, #0x6
	sub	w16, w11, w16
	tst	w13, #0x6
	ldr	w13, [x21]
	csel	w16, wzr, w16, eq
	lsl	w13, w13, w16
	eor	w27, w13, w27
	cmp	w15, w14
	b.ge	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w14, [x19, x15]
	eor	w13, w14, w13
	strb	w13, [x19, x15]
	b	LBB0_4
LBB0_13:
	mov	w24, #-1
	b	LBB0_18
LBB0_14:
	mov	x0, x20
	bl	_kfree
	mov	w24, #-1
	b	LBB0_18
LBB0_15:
	mov	w24, #-1
	b	LBB0_17
LBB0_16:
	tst	w27, #0xff
	csinv	w24, w24, wzr, eq
LBB0_17:
	mov	x0, x20
	bl	_kfree
	mov	x0, x23
	bl	_kfree
LBB0_18:
	ldur	x8, [x29, #-88]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	mov	x0, x24
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SECTOR_SIZE,4,2                ; @SECTOR_SIZE
	.comm	_NN,4,2                         ; @NN
	.comm	_KK,4,2                         ; @KK
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_NB_DATA,4,2                    ; @NB_DATA
.subsections_via_symbols
