	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %r12d
	movl	12(%rsi), %edi
	callq	_be32_to_cpu
	movl	%eax, %r15d
	movl	8(%rbx), %edi
	callq	_be32_to_cpu
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %edi
	callq	_be32_to_cpu
	xorl	%r13d, %r13d
	cmpq	$0, (%r14)
	je	LBB0_13
## %bb.1:
	cmpl	8(%r14), %r15d
	jne	LBB0_2
## %bb.3:
	movq	16(%r14), %rcx
	movq	_UBI_STATIC_VOLUME@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.5:
	movq	_UBI_VID_STATIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	je	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_12
LBB0_2:
	leaq	L_.str(%rip), %rsi
LBB0_12:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ubi_err
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_ubi_err
	movq	%rbx, %rdi
	callq	_ubi_dump_vid_hdr
	movq	%r14, %rdi
	callq	_ubi_dump_av
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_13:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_UBI_VID_DYNAMIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	jne	LBB0_7
LBB0_8:
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	24(%r14), %ecx
	jne	LBB0_9
## %bb.10:
	cmpl	28(%r14), %eax
	je	LBB0_13
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	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:
	sub	sp, sp, #96
	.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
	mov	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w25, [x1]
	ldr	w0, [x1, #12]
	bl	_be32_to_cpu
	mov	x24, x0
	ldr	w0, [x20, #8]
	bl	_be32_to_cpu
	mov	x23, x0
	ldr	w0, [x20, #4]
	bl	_be32_to_cpu
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w8, [x19, #8]
	cmp	w24, 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	w25, w8
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x19, #24]
	cmp	w23, 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	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_7:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	mov	x0, x22
	bl	_ubi_err
	str	x21, [sp]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x22
	bl	_ubi_err
	mov	x0, x20
	bl	_ubi_dump_vid_hdr
	mov	x0, x19
	bl	_ubi_dump_av
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	add	sp, sp, #96
	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
