	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_hdw_setup_std
_pvr2_hdw_setup_std:                    ## @pvr2_hdw_setup_std
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_get_default_standard
	movl	%eax, %r15d
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	24(%r12), %rax
	movl	(%rax), %r14d
LBB0_2:
	movl	(%r12), %edx
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$40, %esi
	callq	_pvr2_std_id_to_str
	movq	_PVR2_TRACE_STD@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	movq	%rbx, %rcx
	callq	_pvr2_trace
	movl	(%r12), %eax
	movl	%eax, 4(%r12)
	movl	%r14d, %ecx
	orl	%r15d, %ecx
	movl	%eax, %ebx
	notl	%ebx
	andl	%ecx, %ebx
	je	LBB0_4
## %bb.3:
	leaq	-96(%rbp), %rdi
	movl	$40, %esi
	movl	%ebx, %edx
	callq	_pvr2_std_id_to_str
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	leaq	-96(%rbp), %rcx
	callq	_pvr2_trace
	orl	4(%r12), %ebx
	movl	%ebx, 4(%r12)
	movl	%ebx, %eax
LBB0_4:
	movl	%eax, 16(%r12)
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.5:
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$40, %esi
	movl	%r15d, %edx
	callq	_pvr2_std_id_to_str
	movq	_PVR2_TRACE_STD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	movq	%rbx, %rcx
	callq	_pvr2_trace
	movl	%r15d, %r14d
	jmp	LBB0_15
LBB0_6:
	testl	%r14d, %r14d
	movq	_PVR2_TRACE_STD@GOTPCREL(%rip), %r15
	je	LBB0_7
## %bb.14:
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$40, %esi
	movl	%r14d, %edx
	callq	_pvr2_std_id_to_str
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	movq	%rbx, %rcx
	callq	_pvr2_trace
LBB0_15:
	movl	%r14d, 8(%r12)
	movl	$1, 12(%r12)
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_std_eeprom_maps@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_16
## %bb.8:
	movl	$8, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%edx, %ecx
	je	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addq	$12, %r13
	cmpq	%rax, %rbx
	jae	LBB0_16
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movl	-8(%rdi,%r13), %eax
	movl	-4(%rdi,%r13), %ecx
	movl	(%r12), %edx
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%ecx, %edx
	testl	%eax, %edx
	jne	LBB0_11
LBB0_13:
	movl	(%rdi,%r13), %edx
	leaq	-96(%rbp), %r14
	movq	%r14, %rdi
	movl	$40, %esi
	callq	_pvr2_std_id_to_str
	movq	_PVR2_TRACE_STD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %edx
	movq	%r14, %rcx
	callq	_pvr2_trace
	movq	(%r15), %rax
	movl	(%rax,%r13), %r14d
	jmp	LBB0_15
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PVR2_TRACE_STD,4,2             ## @PVR2_TRACE_STD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Supported video standard(s) reported available in hardware: %.*s"

L_.str.1:                               ## @.str.1
	.asciz	"Expanding supported video standards to include: %.*s"

L_.str.2:                               ## @.str.2
	.asciz	"Initial video standard forced to %.*s"

L_.str.3:                               ## @.str.3
	.asciz	"Initial video standard (determined by device type): %.*s"

	.comm	_std_eeprom_maps,8,3            ## @std_eeprom_maps
L_.str.4:                               ## @.str.4
	.asciz	"Initial video standard guessed as %.*s"

	.no_dead_strip	_pvr2_hdw_setup_std
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_hdw_setup_std
_pvr2_hdw_setup_std:                    ; @pvr2_hdw_setup_std
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	bl	_get_default_standard
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #24]
	ldr	w21, [x8]
LBB0_3:
	ldr	w2, [x19]
	mov	x0, sp
	mov	w1, #40
	bl	_pvr2_std_id_to_str
	mov	x2, x0
Lloh3:
	adrp	x23, _PVR2_TRACE_STD@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PVR2_TRACE_STD@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, sp
	bl	_pvr2_trace
	ldr	w8, [x19]
	str	w8, [x19, #4]
	orr	w9, w21, w20
	bics	w22, w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, sp
	mov	w1, #40
	mov	x2, x22
	bl	_pvr2_std_id_to_str
	mov	x2, x0
	ldr	w0, [x23]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, sp
	bl	_pvr2_trace
	ldr	w8, [x19, #4]
	orr	w8, w8, w22
	str	w8, [x19, #4]
LBB0_5:
	str	w8, [x19, #16]
	cbz	w20, LBB0_7
; %bb.6:
	mov	x0, sp
	mov	w1, #40
	mov	x2, x20
	bl	_pvr2_std_id_to_str
	mov	x2, x0
	ldr	w0, [x23]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x3, sp
	bl	_pvr2_trace
	b	LBB0_9
LBB0_7:
	cbz	w21, LBB0_12
; %bb.8:
	mov	x0, sp
	mov	w1, #40
	mov	x2, x21
	bl	_pvr2_std_id_to_str
	mov	x2, x0
	ldr	w0, [x23]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x3, sp
	bl	_pvr2_trace
	mov	x20, x21
LBB0_9:
	mov	w8, #1
	stp	w20, w8, [x19, #8]
LBB0_10:
	ldr	x8, [sp, #40]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.11:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
Lloh16:
	adrp	x20, _std_eeprom_maps@GOTPAGE
Lloh17:
	ldr	x20, [x20, _std_eeprom_maps@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_10
; %bb.13:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	cmp	w9, w10
	b.eq	LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	add	x21, x21, #12
	cmp	x22, w0, uxtw
	b.hs	LBB0_10
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	add	x9, x0, x21
	ldp	w8, w9, [x9]
	ldr	w10, [x19]
	cbz	w8, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	eor	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_15
LBB0_18:
	add	x8, x0, x21
	ldr	w2, [x8, #8]
	mov	x0, sp
	mov	w1, #40
	bl	_pvr2_std_id_to_str
	mov	x2, x0
	ldr	w0, [x23]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x3, sp
	bl	_pvr2_trace
	ldr	x8, [x20]
	add	x8, x8, x21
	ldr	w20, [x8, #8]
	b	LBB0_9
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_PVR2_TRACE_STD,4,2             ; @PVR2_TRACE_STD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Supported video standard(s) reported available in hardware: %.*s"

l_.str.1:                               ; @.str.1
	.asciz	"Expanding supported video standards to include: %.*s"

l_.str.2:                               ; @.str.2
	.asciz	"Initial video standard forced to %.*s"

l_.str.3:                               ; @.str.3
	.asciz	"Initial video standard (determined by device type): %.*s"

	.comm	_std_eeprom_maps,8,3            ; @std_eeprom_maps
l_.str.4:                               ; @.str.4
	.asciz	"Initial video standard guessed as %.*s"

	.no_dead_strip	_pvr2_hdw_setup_std
.subsections_via_symbols
