	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function self_check_ec
_self_check_ec:                         ## @self_check_ec
	.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	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_ubi_dbg_chk_gen
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	movq	_GFP_NOFS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	callq	_ubi_io_read_ec_hdr
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	_UBI_IO_BITFLIPS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
LBB0_6:
	movl	(%r15), %edi
	callq	_be64_to_cpu
	movslq	%r14d, %rcx
	movq	%rax, %rdx
	subq	%rcx, %rdx
	je	LBB0_9
## %bb.7:
	cmpq	$2, %rdx
	jl	LBB0_9
## %bb.8:
	movq	%rax, %r13
	movslq	%r12d, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ubi_err
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_ubi_err
	xorl	%eax, %eax
	callq	_dump_stack
	movl	$1, %r13d
LBB0_9:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_10
LBB0_1:
	xorl	%r13d, %r13d
	jmp	LBB0_10
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOFS,4,2                   ## @GFP_NOFS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_UBI_IO_BITFLIPS,4,2            ## @UBI_IO_BITFLIPS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"self-check failed for PEB %d"

L_.str.1:                               ## @.str.1
	.asciz	"read EC is %lld, should be %d"

	.no_dead_strip	_self_check_ec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function self_check_ec
_self_check_ec:                         ; @self_check_ec
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_ubi_dbg_chk_gen
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _GFP_NOFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_NOFS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x19, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	mov	w3, #0
	bl	_ubi_io_read_ec_hdr
	mov	w23, #0
Lloh3:
	adrp	x8, _UBI_IO_BITFLIPS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UBI_IO_BITFLIPS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, #0
	ccmp	w0, w8, #4, ne
	b.ne	LBB0_8
; %bb.3:
	ldr	w0, [x19]
	bl	_be64_to_cpu
	sxtw	x8, w21
	subs	x8, x0, x8
	ccmp	x8, #2, #8, ne
	b.ge	LBB0_7
; %bb.4:
	mov	w23, #0
	b	LBB0_8
LBB0_5:
	mov	w23, #0
	b	LBB0_9
LBB0_6:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_9
LBB0_7:
	mov	x23, x0
	sxtw	x2, w22
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ubi_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	bl	_ubi_err
	bl	_dump_stack
	mov	w23, #1
LBB0_8:
	mov	x0, x19
	bl	_kfree
LBB0_9:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOFS,4,2                   ; @GFP_NOFS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_UBI_IO_BITFLIPS,4,2            ; @UBI_IO_BITFLIPS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"self-check failed for PEB %d"

l_.str.1:                               ; @.str.1
	.asciz	"read EC is %lld, should be %d"

	.no_dead_strip	_self_check_ec
.subsections_via_symbols
