	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function validate_vid_hdr
_validate_vid_hdr:                      ## @validate_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	%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, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %r15d
	movl	12(%rdi), %edi
	callq	_be32_to_cpu
	movl	%eax, %r13d
	movl	8(%rbx), %edi
	callq	_be32_to_cpu
	movl	%eax, %r12d
	movl	4(%rbx), %edi
	callq	_be32_to_cpu
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpq	$0, (%r14)
	je	LBB0_13
## %bb.1:
	cmpl	8(%r14), %r13d
	jne	LBB0_2
## %bb.3:
	movq	16(%r14), %rdx
	movq	_UBI_STATIC_VOLUME@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_4
## %bb.5:
	movq	_UBI_VID_STATIC@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r15d
	je	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_12
LBB0_2:
	leaq	L_.str(%rip), %rdi
LBB0_12:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	callq	_dbg_err
	leaq	L_.str.4(%rip), %rdi
	movl	%r15d, %esi
	callq	_ubi_err
	movq	%rbx, %rdi
	callq	_ubi_dbg_dump_vid_hdr
	movq	%r14, %rdi
	callq	_ubi_dbg_dump_sv
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_UBI_VID_DYNAMIC@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r15d
	jne	LBB0_7
LBB0_8:
	cmpl	24(%r14), %r12d
	jne	LBB0_9
## %bb.10:
	cmpl	28(%r14), %ecx
	je	LBB0_13
## %bb.11:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"inconsistent vol_id"

	.comm	_UBI_STATIC_VOLUME,8,3          ## @UBI_STATIC_VOLUME
	.comm	_UBI_VID_STATIC,4,2             ## @UBI_VID_STATIC
	.comm	_UBI_VID_DYNAMIC,4,2            ## @UBI_VID_DYNAMIC
L_.str.1:                               ## @.str.1
	.asciz	"inconsistent vol_type"

L_.str.2:                               ## @.str.2
	.asciz	"inconsistent used_ebs"

L_.str.3:                               ## @.str.3
	.asciz	"inconsistent data_pad"

L_.str.4:                               ## @.str.4
	.asciz	"inconsistent VID header at PEB %d"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function validate_vid_hdr
_validate_vid_hdr:                      ; @validate_vid_hdr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w24, [x0]
	ldr	w0, [x0, #12]
	bl	_be32_to_cpu
	mov	x23, x0
	ldr	w0, [x20, #8]
	bl	_be32_to_cpu
	mov	x22, x0
	ldr	w0, [x20, #4]
	bl	_be32_to_cpu
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w8, [x19, #8]
	cmp	w23, w8
	b.ne	LBB0_6
; %bb.2:
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x9, _UBI_STATIC_VOLUME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _UBI_STATIC_VOLUME@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _UBI_VID_STATIC@GOTPAGE
Lloh4:
	ldr	x10, [x10, _UBI_VID_STATIC@GOTPAGEOFF]
Lloh5:
	adrp	x11, _UBI_VID_DYNAMIC@GOTPAGE
Lloh6:
	ldr	x11, [x11, _UBI_VID_DYNAMIC@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	cmp	w24, w8
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x19, #24]
	cmp	w22, w8
	b.ne	LBB0_8
; %bb.4:
	ldr	w8, [x19, #28]
	cmp	w0, w8
	b.ne	LBB0_9
LBB0_5:
	mov	w0, #0
	b	LBB0_11
LBB0_6:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_7:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_10:
	bl	_dbg_err
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x21
	bl	_ubi_err
	mov	x0, x20
	bl	_ubi_dbg_dump_vid_hdr
	mov	x0, x19
	bl	_ubi_dbg_dump_sv
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"inconsistent vol_id"

	.comm	_UBI_STATIC_VOLUME,8,3          ; @UBI_STATIC_VOLUME
	.comm	_UBI_VID_STATIC,4,2             ; @UBI_VID_STATIC
	.comm	_UBI_VID_DYNAMIC,4,2            ; @UBI_VID_DYNAMIC
l_.str.1:                               ; @.str.1
	.asciz	"inconsistent vol_type"

l_.str.2:                               ; @.str.2
	.asciz	"inconsistent used_ebs"

l_.str.3:                               ; @.str.3
	.asciz	"inconsistent data_pad"

l_.str.4:                               ; @.str.4
	.asciz	"inconsistent VID header at PEB %d"

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