	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_atom_pick_pll
_radeon_atom_pick_pll:                  ## @radeon_atom_pick_pll
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_radeon_crtc
	movq	%rax, %rbx
	movq	(%r14), %rax
	movq	(%rax), %r15
	movl	4(%rbx), %edi
	callq	_to_radeon_encoder
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE8
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	4(%rbx), %edi
	callq	_atombios_get_encoder_mode
	movl	%eax, %edi
	callq	_ENCODER_MODE_IS_DP
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	cmpq	$0, 8(%r15)
	jne	LBB0_40
## %bb.3:
	movq	%r14, %rdi
	callq	_radeon_get_shared_dp_ppll
	jmp	LBB0_11
LBB0_4:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE61
	testq	%rax, %rax
	je	LBB0_17
## %bb.5:
	movq	(%r12), %rax
	movq	_ENCODER_OBJECT_ID_INTERNAL_UNIPHY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	8(%r12), %rax
	cmpl	$0, (%rax)
	je	LBB0_32
LBB0_7:
	movl	4(%rbx), %edi
	callq	_atombios_get_encoder_mode
	movl	%eax, %edi
	callq	_ENCODER_MODE_IS_DP
	testq	%rax, %rax
	je	LBB0_23
## %bb.8:
	cmpq	$0, 8(%r15)
	jne	LBB0_40
## %bb.9:
	movq	%r14, %rdi
	callq	_radeon_get_shared_dp_ppll
	jmp	LBB0_24
LBB0_10:
	movq	%r14, %rdi
	callq	_radeon_get_shared_nondp_ppll
LBB0_11:
	movq	_ATOM_PPLL_INVALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_42
## %bb.12:
	movq	(%r15), %rbx
	movq	_CHIP_KABINI@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_CHIP_MULLINS@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	%r14, %rdi
	callq	_radeon_get_pll_use_mask
	movl	%eax, %edx
	movq	_ATOM_PPLL2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %esi
	movl	%eax, %ecx
	shll	%cl, %esi
	cmpq	%r12, %rbx
	je	LBB0_20
## %bb.13:
	cmpq	%r15, %rbx
	je	LBB0_20
## %bb.14:
	testl	%edx, %esi
	je	LBB0_42
## %bb.15:
	movq	_ATOM_PPLL1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	btl	%eax, %edx
	jae	LBB0_42
## %bb.16:
	movq	_ATOM_PPLL0@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_17:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE41
	testq	%rax, %rax
	je	LBB0_27
## %bb.18:
	movl	4(%rbx), %edi
	callq	_atombios_get_encoder_mode
	movl	%eax, %edi
	callq	_ENCODER_MODE_IS_DP
	testq	%rax, %rax
	je	LBB0_36
## %bb.19:
	cmpq	$0, 8(%r15)
	jne	LBB0_40
	jmp	LBB0_36
LBB0_20:
	testl	%edx, %esi
	je	LBB0_42
## %bb.21:
	movq	_ATOM_PPLL1@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %eax
	btl	%eax, %edx
	jb	LBB0_39
	jmp	LBB0_42
LBB0_23:
	movq	%r14, %rdi
	callq	_radeon_get_shared_nondp_ppll
LBB0_24:
	movq	_ATOM_PPLL_INVALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_42
## %bb.25:
	movq	%r14, %rdi
	callq	_radeon_get_pll_use_mask
	movl	%eax, %ecx
	movq	_ATOM_PPLL0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	btl	%eax, %ecx
	jae	LBB0_42
## %bb.26:
	movq	_ATOM_PPLL1@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_27:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE4
	testq	%rax, %rax
	je	LBB0_33
## %bb.28:
	movl	4(%rbx), %edi
	callq	_atombios_get_encoder_mode
	movl	%eax, %edi
	callq	_ENCODER_MODE_IS_DP
	testq	%rax, %rax
	je	LBB0_34
## %bb.29:
	cmpq	$0, 8(%r15)
	jne	LBB0_40
## %bb.30:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE6
	testq	%rax, %rax
	je	LBB0_43
## %bb.31:
	movq	_ATOM_PPLL0@GOTPCREL(%rip), %rax
	jmp	LBB0_41
LBB0_32:
	movq	_ATOM_PPLL2@GOTPCREL(%rip), %rax
	jmp	LBB0_41
LBB0_33:
	movl	(%rbx), %eax
	jmp	LBB0_42
LBB0_34:
	movq	%r14, %rdi
	callq	_radeon_get_shared_nondp_ppll
LBB0_35:
	movq	_ATOM_PPLL_INVALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_42
LBB0_36:
	movq	%r14, %rdi
	callq	_radeon_get_pll_use_mask
	movl	%eax, %ecx
	movq	_ATOM_PPLL1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	btl	%eax, %ecx
	jae	LBB0_42
## %bb.37:
	movq	_ATOM_PPLL2@GOTPCREL(%rip), %rax
LBB0_38:
	movl	(%rax), %eax
	btl	%eax, %ecx
	jae	LBB0_42
LBB0_39:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_40:
	movq	_ATOM_PPLL_INVALID@GOTPCREL(%rip), %rax
LBB0_41:
	movl	(%rax), %eax
LBB0_42:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_43:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE5
	testq	%rax, %rax
	je	LBB0_45
## %bb.44:
	movq	_ATOM_DCPLL@GOTPCREL(%rip), %rax
	jmp	LBB0_41
LBB0_45:
	movq	%r14, %rdi
	callq	_radeon_get_shared_dp_ppll
	jmp	LBB0_35
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_PPLL_INVALID,4,2          ## @ATOM_PPLL_INVALID
	.comm	_CHIP_KABINI,8,3                ## @CHIP_KABINI
	.comm	_CHIP_MULLINS,8,3               ## @CHIP_MULLINS
	.comm	_ATOM_PPLL2,4,2                 ## @ATOM_PPLL2
	.comm	_ATOM_PPLL1,4,2                 ## @ATOM_PPLL1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to allocate a PPLL\n"

	.comm	_ATOM_PPLL0,4,2                 ## @ATOM_PPLL0
	.comm	_ENCODER_OBJECT_ID_INTERNAL_UNIPHY,8,3 ## @ENCODER_OBJECT_ID_INTERNAL_UNIPHY
	.comm	_ATOM_DCPLL,4,2                 ## @ATOM_DCPLL
	.no_dead_strip	_radeon_atom_pick_pll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_atom_pick_pll
_radeon_atom_pick_pll:                  ; @radeon_atom_pick_pll
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_to_radeon_crtc
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x20, [x8]
	ldr	w0, [x0, #4]
	bl	_to_radeon_encoder
	mov	x22, x0
	mov	x0, x20
	bl	_ASIC_IS_DCE8
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w0, [x21, #4]
	bl	_atombios_get_encoder_mode
	bl	_ENCODER_MODE_IS_DP
	cbz	x0, LBB0_10
; %bb.2:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_37
; %bb.3:
	mov	x0, x19
	bl	_radeon_get_shared_dp_ppll
	b	LBB0_11
LBB0_4:
	mov	x0, x20
	bl	_ASIC_IS_DCE61
	cbz	x0, LBB0_14
; %bb.5:
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _ENCODER_OBJECT_ID_INTERNAL_UNIPHY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ENCODER_OBJECT_ID_INTERNAL_UNIPHY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [x22, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_29
LBB0_7:
	ldr	w0, [x21, #4]
	bl	_atombios_get_encoder_mode
	bl	_ENCODER_MODE_IS_DP
	cbz	x0, LBB0_20
; %bb.8:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_37
; %bb.9:
	mov	x0, x19
	bl	_radeon_get_shared_dp_ppll
	b	LBB0_21
LBB0_10:
	mov	x0, x19
	bl	_radeon_get_shared_nondp_ppll
LBB0_11:
                                        ; kill: def $w0 killed $w0 def $x0
Lloh3:
	adrp	x8, _ATOM_PPLL_INVALID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATOM_PPLL_INVALID@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_39
; %bb.12:
	ldr	x20, [x20]
Lloh6:
	adrp	x8, _CHIP_KABINI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CHIP_KABINI@GOTPAGEOFF]
Lloh8:
	ldr	x21, [x8]
Lloh9:
	adrp	x8, _CHIP_MULLINS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CHIP_MULLINS@GOTPAGEOFF]
Lloh11:
	ldr	x22, [x8]
	mov	x0, x19
	bl	_radeon_get_pll_use_mask
	mov	x8, x0
Lloh12:
	adrp	x9, _ATOM_PPLL2@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATOM_PPLL2@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x9]
	mov	w9, #1
	lsl	w9, w9, w0
	and	w9, w9, w8
	cmp	x20, x21
	ccmp	x20, x22, #4, ne
	b.ne	LBB0_17
; %bb.13:
	cbnz	w9, LBB0_23
	b	LBB0_39
LBB0_14:
	mov	x0, x20
	bl	_ASIC_IS_DCE41
	cbz	x0, LBB0_24
; %bb.15:
	ldr	w0, [x21, #4]
	bl	_atombios_get_encoder_mode
	bl	_ENCODER_MODE_IS_DP
	cbz	x0, LBB0_33
; %bb.16:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_37
	b	LBB0_33
LBB0_17:
	cbz	w9, LBB0_39
; %bb.18:
Lloh15:
	adrp	x9, _ATOM_PPLL1@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ATOM_PPLL1@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x9]
	lsr	w9, w8, w0
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	tbz	w9, #0, LBB0_39
; %bb.19:
Lloh18:
	adrp	x9, _ATOM_PPLL0@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ATOM_PPLL0@GOTPAGEOFF]
	b	LBB0_35
LBB0_20:
	mov	x0, x19
	bl	_radeon_get_shared_nondp_ppll
LBB0_21:
                                        ; kill: def $w0 killed $w0 def $x0
Lloh20:
	adrp	x8, _ATOM_PPLL_INVALID@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATOM_PPLL_INVALID@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_39
; %bb.22:
	mov	x0, x19
	bl	_radeon_get_pll_use_mask
	mov	x8, x0
Lloh23:
	adrp	x9, _ATOM_PPLL0@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ATOM_PPLL0@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x9]
	lsr	w9, w8, w0
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	tbz	w9, #0, LBB0_39
LBB0_23:
Lloh26:
	adrp	x9, _ATOM_PPLL1@GOTPAGE
Lloh27:
	ldr	x9, [x9, _ATOM_PPLL1@GOTPAGEOFF]
	b	LBB0_35
LBB0_24:
	mov	x0, x20
	bl	_ASIC_IS_DCE4
	cbz	x0, LBB0_30
; %bb.25:
	ldr	w0, [x21, #4]
	bl	_atombios_get_encoder_mode
	bl	_ENCODER_MODE_IS_DP
	cbz	x0, LBB0_31
; %bb.26:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_37
; %bb.27:
	mov	x0, x20
	bl	_ASIC_IS_DCE6
	cbz	x0, LBB0_40
; %bb.28:
Lloh28:
	adrp	x8, _ATOM_PPLL0@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ATOM_PPLL0@GOTPAGEOFF]
	b	LBB0_38
LBB0_29:
Lloh30:
	adrp	x8, _ATOM_PPLL2@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ATOM_PPLL2@GOTPAGEOFF]
	b	LBB0_38
LBB0_30:
	ldr	w0, [x21]
	b	LBB0_39
LBB0_31:
	mov	x0, x19
	bl	_radeon_get_shared_nondp_ppll
LBB0_32:
                                        ; kill: def $w0 killed $w0 def $x0
Lloh32:
	adrp	x8, _ATOM_PPLL_INVALID@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ATOM_PPLL_INVALID@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_39
LBB0_33:
	mov	x0, x19
	bl	_radeon_get_pll_use_mask
	mov	x8, x0
Lloh35:
	adrp	x9, _ATOM_PPLL1@GOTPAGE
Lloh36:
	ldr	x9, [x9, _ATOM_PPLL1@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x9]
	lsr	w9, w8, w0
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	tbz	w9, #0, LBB0_39
; %bb.34:
Lloh38:
	adrp	x9, _ATOM_PPLL2@GOTPAGE
Lloh39:
	ldr	x9, [x9, _ATOM_PPLL2@GOTPAGEOFF]
LBB0_35:
	ldr	w0, [x9]
	lsr	w8, w8, w0
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	tbz	w8, #0, LBB0_39
; %bb.36:
Lloh40:
	adrp	x0, l_.str@PAGE
Lloh41:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_37:
Lloh42:
	adrp	x8, _ATOM_PPLL_INVALID@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ATOM_PPLL_INVALID@GOTPAGEOFF]
LBB0_38:
	ldr	w0, [x8]
LBB0_39:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_40:
	mov	x0, x20
	bl	_ASIC_IS_DCE5
	cbz	x0, LBB0_42
; %bb.41:
Lloh44:
	adrp	x8, _ATOM_DCPLL@GOTPAGE
Lloh45:
	ldr	x8, [x8, _ATOM_DCPLL@GOTPAGEOFF]
	b	LBB0_38
LBB0_42:
	mov	x0, x19
	bl	_radeon_get_shared_dp_ppll
	b	LBB0_32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_PPLL_INVALID,4,2          ; @ATOM_PPLL_INVALID
	.comm	_CHIP_KABINI,8,3                ; @CHIP_KABINI
	.comm	_CHIP_MULLINS,8,3               ; @CHIP_MULLINS
	.comm	_ATOM_PPLL2,4,2                 ; @ATOM_PPLL2
	.comm	_ATOM_PPLL1,4,2                 ; @ATOM_PPLL1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to allocate a PPLL\n"

	.comm	_ATOM_PPLL0,4,2                 ; @ATOM_PPLL0
	.comm	_ENCODER_OBJECT_ID_INTERNAL_UNIPHY,8,3 ; @ENCODER_OBJECT_ID_INTERNAL_UNIPHY
	.comm	_ATOM_DCPLL,4,2                 ; @ATOM_DCPLL
	.no_dead_strip	_radeon_atom_pick_pll
.subsections_via_symbols
