	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VIDEO_Configure                ## -- Begin function VIDEO_Configure
	.p2align	4, 0x90
_VIDEO_Configure:                       ## @VIDEO_Configure
	.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
	movq	%rdi, %rbx
	callq	__CPU_ISR_Disable
	movl	(%rbx), %edi
	movl	%edi, %eax
	andl	$3, %eax
	movq	_HorVer@GOTPCREL(%rip), %r15
	cmpl	(%r15), %eax
	je	LBB0_2
## %bb.1:
	movq	_changeMode@GOTPCREL(%rip), %rcx
	movl	$1, (%rcx)
	movl	%eax, (%r15)
	movl	(%rbx), %edi
LBB0_2:
	movl	$2, %esi
	movl	$3, %edx
	callq	__SHIFTR
	movl	%eax, 4(%r15)
	movl	32(%rbx), %ecx
	movl	%ecx, 128(%r15)
	movl	4(%rbx), %edx
	movl	%edx, 8(%r15)
	movl	(%r15), %esi
	movq	_VI_NON_INTERLACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %esi
	jne	LBB0_4
## %bb.3:
	addl	%edx, %edx
	movl	%edx, 8(%r15)
LBB0_4:
	movl	28(%rbx), %edx
	movl	%edx, 100(%r15)
	movl	24(%rbx), %edx
	movl	%edx, 96(%r15)
	movl	8(%rbx), %edi
	movl	%edi, 12(%r15)
	movq	16(%rbx), %rbx
	movq	%rbx, 16(%r15)
	movl	%edx, 80(%r15)
	movl	%edi, 24(%r15)
	movq	_VI_PROGRESSIVE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %esi
	setne	%r8b
	orl	%edx, %ecx
	xorl	%edx, %edx
	cmpl	%ecx, %esi
	sete	%dl
	setne	%r9b
	movq	_VI_XFBMODE_SF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	sete	%cl
	andb	%r8b, %cl
	andb	%r9b, %cl
	shll	%cl, %edi
	movq	$0, 88(%r15)
	movq	$0, 120(%r15)
	movl	%edi, 28(%r15)
	movl	%edx, 32(%r15)
	movl	%eax, %edi
	callq	_VI_TVMODE
	movl	%eax, %edi
	callq	___gettiming
	movq	%rax, %r14
	movq	%rax, 112(%r15)
	movl	16(%rax), %edi
	callq	___adjustPosition
	movq	%r14, %rdi
	callq	___setInterruptRegs
	movq	_regs@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	$-781, %r13d                    ## imm = 0xFCF3
	andl	4(%rax), %r13d
	movl	32(%r15), %edi
	movl	$3, %esi
	movl	$1, %edx
	callq	__SHIFTL
	movl	%eax, %ebx
	orl	%r13d, %ebx
	movq	_VI_PROGRESSIVE@GOTPCREL(%rip), %r13
	movl	(%r15), %edi
	movl	(%r13), %eax
	cmpl	%eax, %edi
	je	LBB0_6
## %bb.5:
	movq	_VI_NON_INTERLACE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	cmpl	%eax, %edi
	jne	LBB0_7
LBB0_6:
	orl	$4, %ebx
	jmp	LBB0_8
LBB0_7:
	movl	$2, %esi
	movl	$1, %edx
	callq	__SHIFTL
	orl	%eax, %ebx
LBB0_8:
	movl	4(%r15), %edi
	movq	_VI_EURGB60@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	je	LBB0_10
## %bb.9:
	movl	$8, %esi
	movl	$2, %edx
	callq	__SHIFTL
	orl	%eax, %ebx
LBB0_10:
	movq	(%r12), %rax
	movl	%ebx, 4(%rax)
	movl	$1, %edi
	callq	_VI_REGCHANGE
	movq	_changed@GOTPCREL(%rip), %rbx
	orl	%eax, (%rbx)
	movq	(%r12), %rax
	movl	216(%rax), %ecx
	movl	%ecx, %edx
	andl	$-2, %edx
	movl	%edx, 216(%rax)
	movl	(%r15), %edx
	movl	(%r13), %esi
	cmpl	%esi, %edx
	je	LBB0_12
## %bb.11:
	movq	_VI_NON_INTERLACE@GOTPCREL(%rip), %rdi
	orl	(%rdi), %esi
	cmpl	%esi, %edx
	jne	LBB0_13
LBB0_12:
	orl	$1, %ecx
	movl	%ecx, 216(%rax)
LBB0_13:
	movl	$54, %edi
	callq	_VI_REGCHANGE
	orl	%eax, (%rbx)
	movl	32(%r15), %edx
	movl	80(%r15), %edi
	movl	100(%r15), %esi
	callq	___setScalingRegs
	movl	100(%r15), %edx
	movl	104(%r15), %esi
	movq	%r14, %rdi
	callq	___setHorizontalRegs
	movq	%r14, %rdi
	callq	___setBBIntervalRegs
	movl	96(%r15), %edi
	movq	16(%r15), %rsi
	movq	88(%r15), %rdx
	movl	80(%r15), %ecx
	leaq	64(%r15), %rax
	leaq	68(%r15), %rbx
	leaq	76(%r15), %r8
	leaq	72(%r15), %r9
	pushq	%rax
	pushq	%rbx
	callq	___setPicConfig
	addq	$16, %rsp
	movq	_fbSet@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.14:
	leaq	60(%r15), %rsi
	leaq	56(%r15), %rdx
	leaq	52(%r15), %rcx
	leaq	48(%r15), %r8
	movq	%r15, %rdi
	callq	___setFbbRegs
LBB0_15:
	movl	44(%r15), %edi
	movl	36(%r15), %r10d
	movl	40(%r15), %esi
	movl	20(%r14), %edx
	movl	16(%r14), %ecx
	movl	12(%r14), %r8d
	movl	8(%r14), %r9d
	movl	(%r14), %ebx
	movl	4(%r14), %eax
	subq	$8, %rsp
	pushq	%r10
	pushq	%rbx
	pushq	%rax
	callq	___setVerticalRegs
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__CPU_ISR_Restore               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HorVer,136,3                   ## @HorVer
	.comm	_changeMode,4,2                 ## @changeMode
	.comm	_VI_NON_INTERLACE,4,2           ## @VI_NON_INTERLACE
	.comm	_VI_PROGRESSIVE,4,2             ## @VI_PROGRESSIVE
	.comm	_VI_XFBMODE_SF,8,3              ## @VI_XFBMODE_SF
	.comm	_regs,8,3                       ## @regs
	.comm	_VI_EURGB60,4,2                 ## @VI_EURGB60
	.comm	_changed,4,2                    ## @changed
	.comm	_fbSet,8,3                      ## @fbSet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VIDEO_Configure                ; -- Begin function VIDEO_Configure
	.p2align	2
_VIDEO_Configure:                       ; @VIDEO_Configure
	.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	x20, x0
	bl	__CPU_ISR_Disable
	ldr	w0, [x20]
	and	w8, w0, #0x3
Lloh0:
	adrp	x19, _HorVer@GOTPAGE
Lloh1:
	ldr	x19, [x19, _HorVer@GOTPAGEOFF]
	ldr	w9, [x19]
	cmp	w8, w9
	b.eq	LBB0_2
; %bb.1:
Lloh2:
	adrp	x9, _changeMode@GOTPAGE
Lloh3:
	ldr	x9, [x9, _changeMode@GOTPAGEOFF]
	mov	w10, #1
Lloh4:
	str	w10, [x9]
	str	w8, [x19]
	ldr	w0, [x20]
LBB0_2:
	mov	w1, #2
	mov	w2, #3
	bl	__SHIFTR
	ldr	w8, [x20, #32]
	str	w8, [x19, #128]
	ldr	w9, [x20, #4]
	stp	w0, w9, [x19, #4]
	ldr	w1, [x19]
Lloh5:
	adrp	x21, _VI_NON_INTERLACE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _VI_NON_INTERLACE@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w1, w8
	b.ne	LBB0_4
; %bb.3:
	lsl	w9, w9, #1
	str	w9, [x19, #8]
LBB0_4:
	ldr	d0, [x20, #24]
	str	d0, [x19, #96]
	ldr	w9, [x20, #8]
	str	w9, [x19, #12]
	ldr	x10, [x20, #16]
	str	x10, [x19, #16]
	str	s0, [x19, #80]
	str	xzr, [x19, #88]
	str	xzr, [x19, #120]
Lloh7:
	adrp	x22, _VI_PROGRESSIVE@GOTPAGE
Lloh8:
	ldr	x22, [x22, _VI_PROGRESSIVE@GOTPAGEOFF]
	ldr	w11, [x22]
	cmp	w1, w11
	cset	w12, ne
	orr	w8, w11, w8
	cmp	w1, w8
	cset	w8, eq
	cset	w11, ne
	and	w11, w12, w11
Lloh9:
	adrp	x12, _VI_XFBMODE_SF@GOTPAGE
Lloh10:
	ldr	x12, [x12, _VI_XFBMODE_SF@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
	cmp	x10, x12
	cset	w10, eq
	and	w10, w11, w10
	lsl	w10, w9, w10
	stp	w9, w10, [x19, #24]
	str	w8, [x19, #32]
	bl	_VI_TVMODE
	bl	___gettiming
	mov	x20, x0
	str	x0, [x19, #112]
	ldr	w0, [x0, #16]
	bl	___adjustPosition
	mov	x0, x20
	bl	___setInterruptRegs
Lloh12:
	adrp	x23, _regs@GOTPAGE
Lloh13:
	ldr	x23, [x23, _regs@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	w8, [x8, #4]
	mov	w9, #-781
	and	w24, w8, w9
	ldr	w0, [x19, #32]
	mov	w1, #3
	mov	w2, #1
	bl	__SHIFTL
	orr	w24, w0, w24
	ldr	w0, [x19]
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	w9, [x21]
	orr	w8, w9, w8
	cmp	w0, w8
	b.ne	LBB0_7
LBB0_6:
	orr	w24, w24, #0x4
	b	LBB0_8
LBB0_7:
	mov	w1, #2
	mov	w2, #1
	bl	__SHIFTL
	orr	w24, w0, w24
LBB0_8:
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x8, _VI_EURGB60@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VI_EURGB60@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_10
; %bb.9:
	mov	w1, #8
	mov	w2, #2
	bl	__SHIFTL
	orr	w24, w0, w24
LBB0_10:
	ldr	x8, [x23]
	str	w24, [x8, #4]
	mov	w0, #1
	bl	_VI_REGCHANGE
Lloh17:
	adrp	x24, _changed@GOTPAGE
Lloh18:
	ldr	x24, [x24, _changed@GOTPAGEOFF]
	ldr	w8, [x24]
	orr	w8, w8, w0
	str	w8, [x24]
	ldr	x8, [x23]
	ldr	w9, [x8, #216]
	and	w10, w9, #0xfffffffe
	str	w10, [x8, #216]
	ldr	w10, [x19]
	ldr	w11, [x22]
	cmp	w10, w11
	b.eq	LBB0_12
; %bb.11:
	ldr	w12, [x21]
	orr	w11, w12, w11
	cmp	w10, w11
	b.ne	LBB0_13
LBB0_12:
	orr	w9, w9, #0x1
	str	w9, [x8, #216]
LBB0_13:
	mov	w0, #54
	bl	_VI_REGCHANGE
	ldr	w8, [x24]
	orr	w8, w8, w0
	str	w8, [x24]
	ldr	w0, [x19, #80]
	ldr	w1, [x19, #100]
	ldr	w2, [x19, #32]
	bl	___setScalingRegs
	ldp	w2, w1, [x19, #100]
	mov	x0, x20
	bl	___setHorizontalRegs
	mov	x0, x20
	bl	___setBBIntervalRegs
	ldr	w0, [x19, #96]
	ldr	x1, [x19, #16]
	ldr	x2, [x19, #88]
	ldr	w3, [x19, #80]
	add	x4, x19, #76
	add	x5, x19, #72
	add	x6, x19, #68
	add	x7, x19, #64
	bl	___setPicConfig
Lloh19:
	adrp	x8, _fbSet@GOTPAGE
Lloh20:
	ldr	x8, [x8, _fbSet@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.14:
	add	x1, x19, #60
	add	x2, x19, #56
	add	x3, x19, #52
	add	x4, x19, #48
	mov	x0, x19
	bl	___setFbbRegs
LBB0_15:
	ldp	w1, w0, [x19, #40]
	ldp	w3, w2, [x20, #16]
	ldp	w5, w4, [x20, #8]
	ldp	w7, w6, [x20]
	ldr	w8, [x19, #36]
	str	w8, [sp]
	bl	___setVerticalRegs
	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
	b	__CPU_ISR_Restore
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_HorVer,136,3                   ; @HorVer
	.comm	_changeMode,4,2                 ; @changeMode
	.comm	_VI_NON_INTERLACE,4,2           ; @VI_NON_INTERLACE
	.comm	_VI_PROGRESSIVE,4,2             ; @VI_PROGRESSIVE
	.comm	_VI_XFBMODE_SF,8,3              ; @VI_XFBMODE_SF
	.comm	_regs,8,3                       ; @regs
	.comm	_VI_EURGB60,4,2                 ; @VI_EURGB60
	.comm	_changed,4,2                    ; @changed
	.comm	_fbSet,8,3                      ; @fbSet
.subsections_via_symbols
