	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_match_ecc_req
_nand_match_ecc_req:                    ## @nand_match_ecc_req
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -92(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movl	12(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movl	16(%rbx), %r10d
	testl	%r10d, %r10d
	je	LBB0_2
## %bb.3:
	movq	%rax, %r8
	movl	(%rax), %eax
	cltd
	idivl	%esi
	movl	%eax, %r9d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_2
## %bb.4:
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	imull	%r10d, %r9d
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
                                        ## implicit-def: $ecx
                                        ## kill: killed $ecx
                                        ## implicit-def: $ecx
                                        ## kill: killed $ecx
                                        ## implicit-def: $ecx
                                        ## kill: killed $ecx
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movl	%r10d, -48(%rbp)                ## 4-byte Spill
	movl	%r9d, -88(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movq	-112(%rbp), %rbx                ## 8-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_19
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx), %rcx
	movq	%rbx, %rdx
	shlq	$4, %rdx
	cmpl	$0, 4(%rcx,%rdx)
	jle	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movl	(%rcx,%rdx), %edi
	leaq	(%rcx,%rdx), %rbx
	addq	$4, %rbx
	xorl	%r15d, %r15d
	movl	%edi, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=2
	movl	(%r8), %eax
	cltd
	idivl	%edi
	testl	%edx, %edx
	je	LBB0_10
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=2
	incq	%r15
	movslq	(%rbx), %rax
	cmpq	%rax, %r15
	jge	LBB0_17
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	4(%rbx), %rax
	movl	(%rax,%r15,4), %r13d
	cmpl	%esi, %edi
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	cmpl	%r10d, %r13d
	jl	LBB0_16
	jmp	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	%eax, %r12d
	movl	%r13d, %esi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	callq	*8(%rax)
	movl	%eax, %r14d
	movl	%eax, %edi
	shrl	$31, %edi
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %r10d                ## 4-byte Reload
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	jmp	LBB0_16
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	%r12d, %eax
	imull	%r14d, %eax
	cmpl	-92(%rbp), %eax                 ## 4-byte Folded Reload
	jg	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=2
	imull	%r13d, %r12d
	cmpl	-88(%rbp), %r12d                ## 4-byte Folded Reload
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %r10d                ## 4-byte Reload
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	jl	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=2
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	%edi, -76(%rbp)                 ## 4-byte Spill
	movl	%r13d, -80(%rbp)                ## 4-byte Spill
	movl	%r14d, -84(%rbp)                ## 4-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_16
LBB0_19:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	movq	-104(%rbp), %rax                ## 8-byte Reload
	jne	LBB0_20
LBB0_2:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movl	-80(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 4(%rax)
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 8(%rax)
	xorl	%eax, %eax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_nand_match_ecc_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_match_ecc_req
_nand_match_ecc_req:                    ; @nand_match_ecc_req
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_nand_to_mtd
	ldp	w21, w26, [x19, #12]
	cmp	w21, #0
	ccmp	w26, #0, #4, ne
	b.eq	LBB0_14
; %bb.1:
	str	w20, [sp, #44]                  ; 4-byte Folded Spill
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.2:
	mov	x27, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	mov	x15, #0
	ldr	w9, [x0]
	sdiv	w9, w9, w21
	mul	w9, w9, w26
	str	w9, [sp, #40]                   ; 4-byte Folded Spill
Lloh0:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [sp, #60]                   ; 4-byte Folded Spill
                                        ; implicit-def: $w9
                                        ; kill: killed $w9
                                        ; implicit-def: $w9
                                        ; kill: killed $w9
                                        ; implicit-def: $w9
                                        ; kill: killed $w9
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x22]
	ldr	x15, [sp, #32]                  ; 8-byte Folded Reload
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x15, x15, #1
	cmp	x15, w8, sxtw
	b.ge	LBB0_13
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x9, [x22, #16]
	lsl	x10, x15, #4
	add	x19, x9, x10
	ldr	w11, [x19, #4]!
	cmp	w11, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x20, #0
	ldr	w23, [x9, x10]
	str	x15, [sp, #32]                  ; 8-byte Folded Spill
	add	x8, x9, x15, lsl #4
	add	x9, x8, #8
	str	x9, [sp, #48]                   ; 8-byte Folded Spill
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	w8, [x27]
	sdiv	w28, w8, w23
	msub	w8, w28, w23, w8
	cbz	w8, LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.ge	LBB0_3
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x9]
	ldr	w24, [x8, x20, lsl #2]
	cmp	w23, w21
	b.ge	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	cmp	w24, w26
	b.lt	LBB0_8
	b	LBB0_7
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x22, #8]
	mov	x0, x23
	mov	x1, x24
	blr	x8
	mov	x25, x0
	lsr	w0, w0, #31
	bl	_WARN_ON_ONCE
	cmp	x0, #0
	mul	w8, w28, w25
	mul	w9, w28, w24
	ldr	w10, [sp, #44]                  ; 4-byte Folded Reload
	ccmp	w8, w10, #0, eq
	ldr	w10, [sp, #40]                  ; 4-byte Folded Reload
	ccmp	w9, w10, #8, le
	ldr	w9, [sp, #60]                   ; 4-byte Folded Reload
	ccmp	w8, w9, #0, ge
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	b.ge	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	stp	w23, w24, [sp, #20]             ; 8-byte Folded Spill
	str	w25, [sp, #28]                  ; 4-byte Folded Spill
	str	w8, [sp, #60]                   ; 4-byte Folded Spill
	b	LBB0_8
LBB0_13:
Lloh3:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [sp, #60]                   ; 4-byte Folded Reload
	cmp	w9, w8
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	b.ne	LBB0_16
LBB0_14:
Lloh6:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_16:
	mov	w0, #0
	ldr	w10, [sp, #20]                  ; 4-byte Folded Reload
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	stp	w10, w9, [x8]
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	str	w9, [x8, #8]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_nand_match_ecc_req
.subsections_via_symbols
