	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_erase_write_errors
_parse_erase_write_errors:              ## @parse_erase_write_errors
	.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
	movl	%esi, %r12d
	movq	%rdi, %r13
	leaq	4(%rdi), %r15
	movq	%r15, %rdi
	callq	_get_qcom_nand_controller
	movq	%rax, %r14
	movq	_NAND_CMD_PAGEPROG@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_1
## %bb.2:
	movl	(%r15), %ebx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_nandc_read_buffer_sync
	testl	%ebx, %ebx
	jg	LBB0_3
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	$1, %ebx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_nandc_read_buffer_sync
LBB0_3:
	leal	-1(%rbx), %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r12d
	xorl	%ebx, %ebx
	movq	_FS_OP_ERR@GOTPCREL(%rip), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_NAND_STATUS_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_le32_to_cpu
	movq	_FS_MPU_ERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_NAND_STATUS_WP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, (%r13)
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	testl	%eax, (%r15)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rbx, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_FS_DEVICE_STS_ERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_PAGEPROG,4,2          ## @NAND_CMD_PAGEPROG
	.comm	_FS_MPU_ERR,4,2                 ## @FS_MPU_ERR
	.comm	_NAND_STATUS_WP,4,2             ## @NAND_STATUS_WP
	.comm	_FS_OP_ERR,4,2                  ## @FS_OP_ERR
	.comm	_FS_DEVICE_STS_ERR,4,2          ## @FS_DEVICE_STS_ERR
	.comm	_NAND_STATUS_FAIL,4,2           ## @NAND_STATUS_FAIL
	.no_dead_strip	_parse_erase_write_errors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_erase_write_errors
_parse_erase_write_errors:              ; @parse_erase_write_errors
	.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
	mov	x22, x1
	mov	x19, x0
	add	x21, x0, #4
	mov	x0, x21
	bl	_get_qcom_nand_controller
	mov	x20, x0
Lloh0:
	adrp	x8, _NAND_CMD_PAGEPROG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_CMD_PAGEPROG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_3
; %bb.1:
	ldr	w27, [x21]
	mov	x0, x20
	mov	w1, #1
	bl	_nandc_read_buffer_sync
	cmp	w27, #1
	b.ge	LBB0_4
LBB0_2:
	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_3:
	mov	w27, #1
	mov	x0, x20
	mov	w1, #1
	bl	_nandc_read_buffer_sync
LBB0_4:
	mov	x21, #0
Lloh3:
	adrp	x22, _FS_MPU_ERR@GOTPAGE
Lloh4:
	ldr	x22, [x22, _FS_MPU_ERR@GOTPAGEOFF]
Lloh5:
	adrp	x23, _FS_OP_ERR@GOTPAGE
Lloh6:
	ldr	x23, [x23, _FS_OP_ERR@GOTPAGEOFF]
Lloh7:
	adrp	x24, _FS_DEVICE_STS_ERR@GOTPAGE
Lloh8:
	ldr	x24, [x24, _FS_DEVICE_STS_ERR@GOTPAGEOFF]
	sub	w25, w27, #1
Lloh9:
	adrp	x26, _NAND_STATUS_FAIL@GOTPAGE
Lloh10:
	ldr	x26, [x26, _NAND_STATUS_FAIL@GOTPAGEOFF]
	mov	w27, w27
Lloh11:
	adrp	x28, _NAND_STATUS_WP@GOTPAGE
Lloh12:
	ldr	x28, [x28, _NAND_STATUS_WP@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x21, x21, #1
	cmp	x27, x21
	b.eq	LBB0_2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	w0, [x8, x21, lsl #2]
	bl	_le32_to_cpu
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x28]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	cmp	x25, x21
	b.ne	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_5
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_PAGEPROG,4,2          ; @NAND_CMD_PAGEPROG
	.comm	_FS_MPU_ERR,4,2                 ; @FS_MPU_ERR
	.comm	_NAND_STATUS_WP,4,2             ; @NAND_STATUS_WP
	.comm	_FS_OP_ERR,4,2                  ; @FS_OP_ERR
	.comm	_FS_DEVICE_STS_ERR,4,2          ; @FS_DEVICE_STS_ERR
	.comm	_NAND_STATUS_FAIL,4,2           ; @NAND_STATUS_FAIL
	.no_dead_strip	_parse_erase_write_errors
.subsections_via_symbols
