	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function self_check_vid_hdr
_self_check_vid_hdr:                    ## @self_check_vid_hdr
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_ubi_dbg_chk_io
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movl	(%r15), %edi
	callq	_be32_to_cpu
	movq	_UBI_VID_HDR_MAGIC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	cmpq	%r8, %rax
	jne	LBB0_2
## %bb.3:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_validate_vid_hdr
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_ubi_err
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_ubi_err
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_ubi_err
	movq	%r15, %rdi
	callq	_ubi_dump_vid_hdr
	xorl	%eax, %eax
	callq	_dump_stack
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UBI_VID_HDR_MAGIC,8,3          ## @UBI_VID_HDR_MAGIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad VID header magic %#08x at PEB %d, must be %#08x"

L_.str.1:                               ## @.str.1
	.asciz	"self-check failed for PEB %d"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_self_check_vid_hdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function self_check_vid_hdr
_self_check_vid_hdr:                    ; @self_check_vid_hdr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_ubi_dbg_chk_io
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w0, [x19]
	bl	_be32_to_cpu
Lloh0:
	adrp	x8, _UBI_VID_HDR_MAGIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UBI_VID_HDR_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x21
	mov	x1, x19
	bl	_validate_vid_hdr
	cbz	w0, LBB0_6
; %bb.3:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	b	LBB0_5
LBB0_4:
	mov	x2, x0
	stp	x20, x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
                                        ; kill: def $w2 killed $w2 killed $x2
LBB0_5:
	bl	_ubi_err
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_ubi_err
	mov	x0, x19
	bl	_ubi_dump_vid_hdr
	bl	_dump_stack
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_UBI_VID_HDR_MAGIC,8,3          ; @UBI_VID_HDR_MAGIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad VID header magic %#08x at PEB %d, must be %#08x"

l_.str.1:                               ; @.str.1
	.asciz	"self-check failed for PEB %d"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_self_check_vid_hdr
.subsections_via_symbols
