	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_combios_external_tmds_setup ## -- Begin function radeon_combios_external_tmds_setup
	.p2align	4, 0x90
_radeon_combios_external_tmds_setup:    ## @radeon_combios_external_tmds_setup
	.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
	movq	(%rbx), %r14
	callq	_to_radeon_encoder
	movq	(%rax), %r15
	xorl	%r13d, %r13d
	testq	%r15, %r15
	je	LBB0_29
## %bb.1:
	movq	_RADEON_IS_IGP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_16
## %bb.2:
	movq	_COMBIOS_TMDS_POWER_ON_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_combios_get_table_offset
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_RBIOS8
	testl	%ebx, %ebx
	je	LBB0_29
## %bb.3:
	movl	%ebx, %edi
	callq	_RBIOS8
	cmpl	$2, %eax
	jl	LBB0_29
## %bb.4:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leal	3(%rbx), %edi
	callq	_RBIOS8
	movl	$1, %r13d
	testl	%eax, %eax
	jle	LBB0_29
## %bb.5:
	movl	%eax, %r15d
	addl	$4, %ebx
	incl	%r15d
	leaq	LJTI0_0(%rip), %r14
	jmp	LBB0_6
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_DRM_ERROR
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	decl	%r15d
	movl	%r12d, %ebx
	cmpl	$1, %r15d
	jle	LBB0_28
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_RBIOS16
	leal	2(%rbx), %r12d
	movl	%eax, %esi
	sarl	$13, %esi
	cmpl	$6, %esi
	ja	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %r13d
	movslq	(%r14,%rsi,4), %rax
	addq	%r14, %rax
	jmpq	*%rax
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	shll	$2, %r13d
	andl	$32764, %r13d                   ## imm = 0x7FFC
	movl	%r12d, %edi
	callq	_RBIOS32
	addl	$6, %ebx
	movl	%r13d, %edi
	movl	%eax, %esi
	jmp	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	shll	$2, %r13d
	andl	$32764, %r13d                   ## imm = 0x7FFC
	movl	%r12d, %edi
	callq	_RBIOS32
	movl	%eax, %r12d
	leal	6(%rbx), %edi
	callq	_RBIOS32
	movl	%eax, %r14d
	addl	$10, %ebx
	movl	%r13d, %edi
	callq	_RREG32
	andl	%eax, %r12d
	orl	%r14d, %r12d
	leaq	LJTI0_0(%rip), %r14
	movl	%r13d, %edi
	movl	%r12d, %esi
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	callq	_WREG32
	movl	%ebx, %r12d
	jmp	LBB0_15
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %edi
	callq	_RBIOS16
	addl	$4, %ebx
	movl	%eax, %edi
	callq	_udelay
	movl	%ebx, %r12d
	jmp	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %edi
	callq	_RBIOS16
	addl	$4, %ebx
	movl	%eax, %edi
	callq	_mdelay
	movl	%ebx, %r12d
	jmp	LBB0_15
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	shrl	%r13d
	andl	$127, %r13d
	leal	3(%rbx), %edi
	callq	_RBIOS8
	movl	%eax, %r14d
	leal	4(%rbx), %edi
	callq	_RBIOS8
	addl	$5, %ebx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %edi
	movl	%r13d, %esi
	movl	%r14d, %edx
	leaq	LJTI0_0(%rip), %r14
	movl	%eax, %ecx
	callq	_radeon_i2c_put_byte
	movl	%ebx, %r12d
	jmp	LBB0_15
LBB0_16:
	movq	_COMBIOS_EXT_TMDS_INFO_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_combios_get_table_offset
	testl	%eax, %eax
	je	LBB0_29
## %bb.17:
	movl	%eax, %r12d
	addl	$10, %r12d
	movl	%r12d, %edi
	callq	_RBIOS16
	movl	$1, %r13d
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	je	LBB0_29
## %bb.18:
	movl	%eax, %ebx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	LJTI0_1(%rip), %r15
	jmp	LBB0_19
LBB0_26:                                ##   in Loop: Header=BB0_19 Depth=1
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_DRM_ERROR
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	%r13d, %edi
	callq	_RBIOS16
	movl	%eax, %ebx
	movl	%r13d, %r12d
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	je	LBB0_28
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	leal	2(%r12), %r13d
	movl	%ebx, %esi
	sarl	$13, %esi
	cmpl	$6, %esi
	ja	LBB0_26
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movslq	(%r15,%rsi,4), %rax
	addq	%r15, %rax
	jmpq	*%rax
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	shll	$2, %ebx
	andl	$32764, %ebx                    ## imm = 0x7FFC
	movl	%r13d, %edi
	callq	_RBIOS32
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	jmp	LBB0_27
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	shll	$2, %ebx
	andl	$32764, %ebx                    ## imm = 0x7FFC
	movl	%r13d, %edi
	callq	_RBIOS32
	movl	%eax, %r14d
	leal	6(%r12), %edi
	callq	_RBIOS32
	movl	%eax, %r13d
	addl	$10, %r12d
	movl	%ebx, %edi
	callq	_RREG32
	andl	%eax, %r14d
	orl	%r13d, %r14d
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_WREG32
	movl	%r12d, %r13d
	jmp	LBB0_27
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	%r13d, %edi
	callq	_RBIOS16
	addl	$4, %r12d
	movl	%eax, %edi
	callq	_udelay
	movl	%r12d, %r13d
	jmp	LBB0_27
LBB0_24:                                ##   in Loop: Header=BB0_19 Depth=1
	andl	$8191, %ebx                     ## imm = 0x1FFF
	movl	%r13d, %edi
	callq	_RBIOS32
	movl	%eax, %r14d
	leal	6(%r12), %edi
	callq	_RBIOS32
	movl	%eax, %r13d
	addl	$10, %r12d
	movl	%ebx, %edi
	callq	_RREG32_PLL
	andl	%eax, %r14d
	orl	%r13d, %r14d
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_WREG32_PLL
	movl	%r12d, %r13d
	jmp	LBB0_27
LBB0_25:                                ##   in Loop: Header=BB0_19 Depth=1
	andl	$8191, %ebx                     ## imm = 0x1FFF
	movl	%r13d, %edi
	callq	_RBIOS8
	addl	$3, %r12d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %esi
	movl	4(%rcx), %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_radeon_i2c_put_byte
	movl	%r12d, %r13d
	jmp	LBB0_27
LBB0_28:
	movl	$1, %r13d
LBB0_29:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_14
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_14
	.long	L0_0_set_13
.set L0_1_set_21, LBB0_21-LJTI0_1
.set L0_1_set_26, LBB0_26-LJTI0_1
.set L0_1_set_22, LBB0_22-LJTI0_1
.set L0_1_set_23, LBB0_23-LJTI0_1
.set L0_1_set_24, LBB0_24-LJTI0_1
.set L0_1_set_25, LBB0_25-LJTI0_1
LJTI0_1:
	.long	L0_1_set_21
	.long	L0_1_set_26
	.long	L0_1_set_22
	.long	L0_1_set_26
	.long	L0_1_set_23
	.long	L0_1_set_24
	.long	L0_1_set_25
	.end_data_region
                                        ## -- End function
	.comm	_RADEON_IS_IGP,4,2              ## @RADEON_IS_IGP
	.comm	_COMBIOS_TMDS_POWER_ON_TABLE,4,2 ## @COMBIOS_TMDS_POWER_ON_TABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown id %d\n"

	.comm	_COMBIOS_EXT_TMDS_INFO_TABLE,4,2 ## @COMBIOS_EXT_TMDS_INFO_TABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_combios_external_tmds_setup ; -- Begin function radeon_combios_external_tmds_setup
	.p2align	2
_radeon_combios_external_tmds_setup:    ; @radeon_combios_external_tmds_setup
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x19, [x0]
	ldr	x20, [x19]
	bl	_to_radeon_encoder
	ldr	x25, [x0]
	cbz	x25, LBB0_6
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _RADEON_IS_IGP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RADEON_IS_IGP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.2:
Lloh3:
	adrp	x8, _COMBIOS_TMDS_POWER_ON_TABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _COMBIOS_TMDS_POWER_ON_TABLE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_combios_get_table_offset
	mov	x19, x0
	bl	_RBIOS8
	cbz	w19, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_RBIOS8
	cmp	w0, #2
	b.lt	LBB0_6
; %bb.4:
	add	w0, w19, #3
	bl	_RBIOS8
	cmp	w0, #1
	b.lt	LBB0_19
; %bb.5:
	add	w21, w19, #4
	add	w26, w0, #1
Lloh6:
	adrp	x19, l_.str@PAGE
Lloh7:
	add	x19, x19, l_.str@PAGEOFF
Lloh8:
	adrp	x27, lJTI0_0@PAGE
Lloh9:
	add	x27, x27, lJTI0_0@PAGEOFF
	b	LBB0_9
LBB0_6:
	mov	w0, #0
	b	LBB0_20
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_DRM_ERROR
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	sub	w26, w26, #1
	mov	x21, x20
	cmp	w26, #1
	b.le	LBB0_19
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_RBIOS16
	add	w20, w21, #2
	asr	w1, w0, #13
	cmp	w1, #6
	b.hi	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	adr	x8, LBB0_7
	ldrb	w9, [x27, x1]
	add	x8, x8, x9, lsl #2
	br	x8
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	ubfiz	w22, w0, #2, #13
	mov	x0, x20
	bl	_RBIOS32
	mov	x1, x0
	add	w20, w21, #6
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	ubfiz	w22, w0, #2, #13
	mov	x0, x20
	bl	_RBIOS32
	mov	x23, x0
	add	w0, w21, #6
	bl	_RBIOS32
	mov	x24, x0
	add	w20, w21, #10
	mov	x0, x22
	bl	_RREG32
	and	w8, w0, w23
	orr	w1, w8, w24
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x22
	bl	_WREG32
	b	LBB0_8
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	bl	_RBIOS16
	add	w20, w21, #4
	bl	_udelay
	b	LBB0_8
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	bl	_RBIOS16
	add	w20, w21, #4
	bl	_mdelay
	b	LBB0_8
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=1
	ubfx	w22, w0, #1, #7
	add	w0, w21, #3
	bl	_RBIOS8
	mov	x23, x0
	add	w0, w21, #4
	bl	_RBIOS8
	mov	x3, x0
	add	w20, w21, #5
	ldr	w0, [x25, #4]
	mov	x1, x22
	mov	x2, x23
	bl	_radeon_i2c_put_byte
	b	LBB0_8
LBB0_17:
Lloh10:
	adrp	x8, _COMBIOS_EXT_TMDS_INFO_TABLE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _COMBIOS_EXT_TMDS_INFO_TABLE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_combios_get_table_offset
	cbz	w0, LBB0_20
; %bb.18:
	add	w21, w0, #10
	mov	x0, x21
	bl	_RBIOS16
	mov	w26, #65535
	cmp	w0, w26
	b.ne	LBB0_21
LBB0_19:
	mov	w0, #1
LBB0_20:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_21:
Lloh13:
	adrp	x19, l_.str@PAGE
Lloh14:
	add	x19, x19, l_.str@PAGEOFF
Lloh15:
	adrp	x27, lJTI0_1@PAGE
Lloh16:
	add	x27, x27, lJTI0_1@PAGEOFF
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=1
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_DRM_ERROR
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	mov	x0, x20
	bl	_RBIOS16
	mov	x21, x20
	cmp	w0, w26
	b.eq	LBB0_19
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	add	w20, w21, #2
	asr	w1, w0, #13
	cmp	w1, #6
	b.hi	LBB0_22
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	adr	x8, LBB0_22
	ldrb	w9, [x27, x1]
	add	x8, x8, x9, lsl #2
	br	x8
LBB0_26:                                ;   in Loop: Header=BB0_24 Depth=1
	ubfiz	w21, w0, #2, #13
	mov	x0, x20
	bl	_RBIOS32
	mov	x1, x0
	mov	x0, x21
	bl	_WREG32
	b	LBB0_23
LBB0_27:                                ;   in Loop: Header=BB0_24 Depth=1
	ubfiz	w22, w0, #2, #13
	mov	x0, x20
	bl	_RBIOS32
	mov	x23, x0
	add	w0, w21, #6
	bl	_RBIOS32
	mov	x24, x0
	add	w20, w21, #10
	mov	x0, x22
	bl	_RREG32
	and	w8, w0, w23
	orr	w1, w8, w24
	mov	x0, x22
	bl	_WREG32
	b	LBB0_23
LBB0_28:                                ;   in Loop: Header=BB0_24 Depth=1
	mov	x0, x20
	bl	_RBIOS16
	add	w20, w21, #4
	bl	_udelay
	b	LBB0_23
LBB0_29:                                ;   in Loop: Header=BB0_24 Depth=1
	and	w22, w0, #0x1fff
	mov	x0, x20
	bl	_RBIOS32
	mov	x23, x0
	add	w0, w21, #6
	bl	_RBIOS32
	mov	x24, x0
	add	w20, w21, #10
	mov	x0, x22
	bl	_RREG32_PLL
	and	w8, w0, w23
	orr	w1, w8, w24
	mov	x0, x22
	bl	_WREG32_PLL
	b	LBB0_23
LBB0_30:                                ;   in Loop: Header=BB0_24 Depth=1
	and	w22, w0, #0x1fff
	mov	x0, x20
	bl	_RBIOS8
	mov	x3, x0
	add	w20, w21, #3
	ldp	w1, w0, [x25]
	mov	x2, x22
	bl	_radeon_i2c_put_byte
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_14-LBB0_7)>>2
	.byte	(LBB0_15-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_16-LBB0_7)>>2
lJTI0_1:
	.byte	(LBB0_26-LBB0_22)>>2
	.byte	(LBB0_22-LBB0_22)>>2
	.byte	(LBB0_27-LBB0_22)>>2
	.byte	(LBB0_22-LBB0_22)>>2
	.byte	(LBB0_28-LBB0_22)>>2
	.byte	(LBB0_29-LBB0_22)>>2
	.byte	(LBB0_30-LBB0_22)>>2
                                        ; -- End function
	.comm	_RADEON_IS_IGP,4,2              ; @RADEON_IS_IGP
	.comm	_COMBIOS_TMDS_POWER_ON_TABLE,4,2 ; @COMBIOS_TMDS_POWER_ON_TABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown id %d\n"

	.comm	_COMBIOS_EXT_TMDS_INFO_TABLE,4,2 ; @COMBIOS_EXT_TMDS_INFO_TABLE
.subsections_via_symbols
