	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_restore_tv_timing_tables
_radeon_restore_tv_timing_tables:       ## @radeon_restore_tv_timing_tables
	.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, %r14
	movq	(%rdi), %r12
	movq	_RADEON_TV_UV_ADR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r12), %esi
	callq	_WREG32
	movl	16(%r12), %edi
	callq	_radeon_get_htiming_tables_addr
	movl	%eax, %ebx
	movl	16(%r12), %edi
	callq	_radeon_get_vtiming_tables_addr
	movl	%eax, %r15d
	movq	_MAX_H_CODE_TIMING_LEN@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_5
## %bb.1:
	movq	(%r12), %rax
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%r13,8), %edx
	shll	$14, %edx
	orl	8(%rax,%r13,8), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_legacy_tv_write_fifo
	movq	(%r12), %rax
	cmpq	$0, (%rax,%r13,8)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 8(%rax,%r13,8)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$2, %r13
	decl	%ebx
	movq	_MAX_H_CODE_TIMING_LEN@GOTPCREL(%rip), %rcx
	cmpl	%r13d, (%rcx)
	jg	LBB0_2
LBB0_5:
	movq	_MAX_V_CODE_TIMING_LEN@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_10
## %bb.6:
	movq	8(%r12), %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rax,%rbx,8), %edx
	shll	$14, %edx
	orl	(%rax,%rbx,8), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_radeon_legacy_tv_write_fifo
	movq	8(%r12), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, 8(%rax,%rbx,8)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	addq	$2, %rbx
	incl	%r15d
	cmpl	%ebx, (%r13)
	jg	LBB0_7
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_TV_UV_ADR,4,2           ## @RADEON_TV_UV_ADR
	.comm	_MAX_H_CODE_TIMING_LEN,4,2      ## @MAX_H_CODE_TIMING_LEN
	.comm	_MAX_V_CODE_TIMING_LEN,4,2      ## @MAX_V_CODE_TIMING_LEN
	.no_dead_strip	_radeon_restore_tv_timing_tables
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_restore_tv_timing_tables
_radeon_restore_tv_timing_tables:       ; @radeon_restore_tv_timing_tables
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _RADEON_TV_UV_ADR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RADEON_TV_UV_ADR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x22, #16]
	bl	_WREG32
	ldr	w0, [x22, #16]
	bl	_radeon_get_htiming_tables_addr
	mov	x21, x0
	ldr	w0, [x22, #16]
	bl	_radeon_get_vtiming_tables_addr
	mov	x20, x0
Lloh3:
	adrp	x23, _MAX_H_CODE_TIMING_LEN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MAX_H_CODE_TIMING_LEN@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x24, #0
	ldr	x8, [x22]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x25, x24, #3
	add	x8, x8, x25
	ldr	w9, [x8]
	ldr	w8, [x8, #8]
	orr	w2, w8, w9, lsl #14
	mov	x0, x19
	mov	x1, x21
	bl	_radeon_legacy_tv_write_fifo
	ldr	x8, [x22]
	ldr	x9, [x8, x25]
	cbz	x9, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x8, x24, lsl #3
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #2
	sub	w21, w21, #1
	ldr	w9, [x23]
	cmp	w9, w24
	b.gt	LBB0_2
LBB0_5:
Lloh5:
	adrp	x21, _MAX_V_CODE_TIMING_LEN@GOTPAGE
Lloh6:
	ldr	x21, [x21, _MAX_V_CODE_TIMING_LEN@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x23, #0
	ldr	x8, [x22, #8]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x24, x23, #3
	add	x8, x8, x24
	ldr	w9, [x8, #8]
	ldr	w8, [x8]
	orr	w2, w8, w9, lsl #14
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_legacy_tv_write_fifo
	ldr	x8, [x22, #8]
	ldr	x9, [x8, x24]
	cbz	x9, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x9, x8, x23, lsl #3
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #2
	add	w20, w20, #1
	ldr	w9, [x21]
	cmp	w9, w23
	b.gt	LBB0_7
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_TV_UV_ADR,4,2           ; @RADEON_TV_UV_ADR
	.comm	_MAX_H_CODE_TIMING_LEN,4,2      ; @MAX_H_CODE_TIMING_LEN
	.comm	_MAX_V_CODE_TIMING_LEN,4,2      ; @MAX_V_CODE_TIMING_LEN
	.no_dead_strip	_radeon_restore_tv_timing_tables
.subsections_via_symbols
