	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_check_vheader6
_via_check_vheader6:                    ## @via_check_vheader6
	.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
	movq	(%rdi), %rbx
	movq	%rsi, %rax
	subq	%rbx, %rax
	cmpq	$15, %rax
	jg	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_5
LBB0_2:
	cmpl	$16121856, 8(%rbx)              ## imm = 0xF60000
	jne	LBB0_4
## %bb.3:
	cmpl	$0, 12(%rbx)
	je	LBB0_8
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	callq	_DRM_ERROR
LBB0_6:
	movq	_state_error@GOTPCREL(%rip), %r13
LBB0_7:
	movl	(%r13), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rsi, %r15
	movl	4(%rbx), %r12d
	addq	$16, %rbx
	movq	%rsi, %rax
	subq	%rbx, %rax
	sarq	$2, %rax
	leal	(%r12,%r12), %edx
	movslq	%edx, %rcx
	cmpq	%rcx, %rax
	jl	LBB0_1
## %bb.9:
	movq	%rdi, %r14
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	testl	%r12d, %r12d
	jle	LBB0_13
## %bb.10:
	movq	_state_error@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_verify_mmio_address
	testq	%rax, %rax
	jne	LBB0_7
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	$8, %rbx
	decl	%r12d
	jne	LBB0_11
LBB0_13:
	movq	%rbx, -56(%rbp)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	$2, %eax
	je	LBB0_17
## %bb.14:
	movl	$4, %edx
	subl	%eax, %edx
	leaq	-56(%rbp), %rdi
	movq	%r15, %rsi
	callq	_verify_video_tail
	testq	%rax, %rax
	jne	LBB0_6
## %bb.16:
	movq	-56(%rbp), %rbx
LBB0_17:
	movq	%rbx, (%r14)
	movq	_state_command@GOTPCREL(%rip), %r13
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Illegal termination of video header6 command\n"

	.comm	_state_error,4,2                ## @state_error
L_.str.1:                               ## @.str.1
	.asciz	"Illegal header6 header data\n"

	.comm	_state_command,4,2              ## @state_command
	.no_dead_strip	_via_check_vheader6
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_check_vheader6
_via_check_vheader6:                    ; @via_check_vheader6
	.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
	ldr	x8, [x0]
	sub	x9, x1, x8
	cmp	x9, #15
	b.gt	LBB0_2
LBB0_1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_2:
	ldr	w9, [x8, #8]
	cmp	w9, #3936, lsl #12              ; =16121856
	b.ne	LBB0_4
; %bb.3:
	ldr	w9, [x8, #12]
	cbz	w9, LBB0_8
LBB0_4:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_DRM_ERROR
LBB0_6:
Lloh4:
	adrp	x22, _state_error@GOTPAGE
Lloh5:
	ldr	x22, [x22, _state_error@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x22]
	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
LBB0_8:
	mov	x20, x1
	ldr	w24, [x8, #4]
	add	x21, x8, #16
	sub	x8, x1, x21
	lsl	w23, w24, #1
	sxtw	x9, w23
	cmp	x9, x8, asr #2
	b.gt	LBB0_1
; %bb.9:
	mov	x19, x0
	cmp	w24, #1
	b.lt	LBB0_13
; %bb.10:
Lloh6:
	adrp	x22, _state_error@GOTPAGE
Lloh7:
	ldr	x22, [x22, _state_error@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_verify_mmio_address
	cbnz	x0, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x21, x21, #8
	subs	w24, w24, #1
	b.ne	LBB0_11
LBB0_13:
	str	x21, [sp, #8]
	tbz	w23, #1, LBB0_16
; %bb.14:
	and	w8, w23, #0x2
	mov	w9, #4
	sub	w2, w9, w8
	add	x0, sp, #8
	mov	x1, x20
	bl	_verify_video_tail
	cbnz	x0, LBB0_6
; %bb.15:
	ldr	x21, [sp, #8]
LBB0_16:
	str	x21, [x19]
Lloh8:
	adrp	x22, _state_command@GOTPAGE
Lloh9:
	ldr	x22, [x22, _state_command@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Illegal termination of video header6 command\n"

	.comm	_state_error,4,2                ; @state_error
l_.str.1:                               ; @.str.1
	.asciz	"Illegal header6 header data\n"

	.comm	_state_command,4,2              ; @state_command
	.no_dead_strip	_via_check_vheader6
.subsections_via_symbols
