	.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, %r12
	movq	(%r14), %rax
	movq	(%rax), %r15
	movl	4(%r12), %edi
	callq	_to_radeon_encoder
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE61
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	(%rbx), %rax
	movq	_ENCODER_OBJECT_ID_INTERNAL_UNIPHY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	8(%rbx), %rax
	cmpl	$0, (%rax)
	je	LBB0_16
LBB0_3:
	movl	4(%r12), %edi
	callq	_atombios_get_encoder_mode
	movl	%eax, %edi
	callq	_ENCODER_MODE_IS_DP
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	cmpq	$0, (%r15)
	jne	LBB0_23
## %bb.5:
	movq	%r14, %rdi
	callq	_radeon_get_shared_dp_ppll
	jmp	LBB0_12
LBB0_6:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE4
	testq	%rax, %rax
	je	LBB0_15
## %bb.7:
	movl	4(%r12), %edi
	callq	_atombios_get_encoder_mode
	movl	%eax, %edi
	callq	_ENCODER_MODE_IS_DP
	testq	%rax, %rax
	je	LBB0_17
## %bb.8:
	cmpq	$0, (%r15)
	jne	LBB0_23
## %bb.9:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE6
	testq	%rax, %rax
	je	LBB0_26
## %bb.10:
	movq	_ATOM_PPLL0@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_11:
	movq	%r14, %rdi
	callq	_radeon_get_shared_nondp_ppll
LBB0_12:
	movq	_ATOM_PPLL_INVALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_25
## %bb.13:
	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_25
## %bb.14:
	movq	_ATOM_PPLL1@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_15:
	movl	(%r12), %eax
	jmp	LBB0_25
LBB0_16:
	movq	_ATOM_PPLL2@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_17:
	movq	%r14, %rdi
	callq	_radeon_get_shared_nondp_ppll
LBB0_18:
	movq	_ATOM_PPLL_INVALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_25
## %bb.19:
	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_25
## %bb.20:
	movq	_ATOM_PPLL2@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
	btl	%eax, %ecx
	jae	LBB0_25
## %bb.22:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_23:
	movq	_ATOM_PPLL_INVALID@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
LBB0_25:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE5
	testq	%rax, %rax
	je	LBB0_28
## %bb.27:
	movq	_ATOM_DCPLL@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_28:
	movq	%r14, %rdi
	callq	_radeon_get_shared_dp_ppll
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_ENCODER_OBJECT_ID_INTERNAL_UNIPHY,8,3 ## @ENCODER_OBJECT_ID_INTERNAL_UNIPHY
	.comm	_ATOM_PPLL2,4,2                 ## @ATOM_PPLL2
	.comm	_ATOM_PPLL_INVALID,4,2          ## @ATOM_PPLL_INVALID
	.comm	_ATOM_PPLL0,4,2                 ## @ATOM_PPLL0
	.comm	_ATOM_PPLL1,4,2                 ## @ATOM_PPLL1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to allocate a PPLL\n"

	.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_DCE61
	cbz	x0, LBB0_6
; %bb.1:
	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_3
; %bb.2:
	ldr	x8, [x22, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_16
LBB0_3:
	ldr	w0, [x21, #4]
	bl	_atombios_get_encoder_mode
	bl	_ENCODER_MODE_IS_DP
	cbz	x0, LBB0_11
; %bb.4:
	ldr	x8, [x20]
	cbnz	x8, LBB0_23
; %bb.5:
	mov	x0, x19
	bl	_radeon_get_shared_dp_ppll
	b	LBB0_12
LBB0_6:
	mov	x0, x20
	bl	_ASIC_IS_DCE4
	cbz	x0, LBB0_15
; %bb.7:
	ldr	w0, [x21, #4]
	bl	_atombios_get_encoder_mode
	bl	_ENCODER_MODE_IS_DP
	cbz	x0, LBB0_17
; %bb.8:
	ldr	x8, [x20]
	cbnz	x8, LBB0_23
; %bb.9:
	mov	x0, x20
	bl	_ASIC_IS_DCE6
	cbz	x0, LBB0_26
; %bb.10:
Lloh3:
	adrp	x8, _ATOM_PPLL0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATOM_PPLL0@GOTPAGEOFF]
	b	LBB0_24
LBB0_11:
	mov	x0, x19
	bl	_radeon_get_shared_nondp_ppll
LBB0_12:
                                        ; kill: def $w0 killed $w0 def $x0
Lloh5:
	adrp	x8, _ATOM_PPLL_INVALID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATOM_PPLL_INVALID@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_25
; %bb.13:
	mov	x0, x19
	bl	_radeon_get_pll_use_mask
	mov	x8, x0
Lloh8:
	adrp	x9, _ATOM_PPLL0@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ATOM_PPLL0@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x9]
	lsr	w9, w8, w0
	tbz	w9, #0, LBB0_25
; %bb.14:
Lloh11:
	adrp	x9, _ATOM_PPLL1@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ATOM_PPLL1@GOTPAGEOFF]
	b	LBB0_21
LBB0_15:
	ldr	w0, [x21]
	b	LBB0_25
LBB0_16:
Lloh13:
	adrp	x8, _ATOM_PPLL2@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATOM_PPLL2@GOTPAGEOFF]
	b	LBB0_24
LBB0_17:
	mov	x0, x19
	bl	_radeon_get_shared_nondp_ppll
LBB0_18:
                                        ; kill: def $w0 killed $w0 def $x0
Lloh15:
	adrp	x8, _ATOM_PPLL_INVALID@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ATOM_PPLL_INVALID@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_25
; %bb.19:
	mov	x0, x19
	bl	_radeon_get_pll_use_mask
	mov	x8, x0
Lloh18:
	adrp	x9, _ATOM_PPLL1@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ATOM_PPLL1@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x9]
	lsr	w9, w8, w0
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	tbz	w9, #0, LBB0_25
; %bb.20:
Lloh21:
	adrp	x9, _ATOM_PPLL2@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ATOM_PPLL2@GOTPAGEOFF]
LBB0_21:
	ldr	w0, [x9]
	lsr	w8, w8, w0
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	tbz	w8, #0, LBB0_25
; %bb.22:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_23:
Lloh25:
	adrp	x8, _ATOM_PPLL_INVALID@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ATOM_PPLL_INVALID@GOTPAGEOFF]
LBB0_24:
	ldr	w0, [x8]
LBB0_25:
                                        ; 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_26:
	mov	x0, x20
	bl	_ASIC_IS_DCE5
	cbz	x0, LBB0_28
; %bb.27:
Lloh27:
	adrp	x8, _ATOM_DCPLL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ATOM_DCPLL@GOTPAGEOFF]
	b	LBB0_24
LBB0_28:
	mov	x0, x19
	bl	_radeon_get_shared_dp_ppll
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ENCODER_OBJECT_ID_INTERNAL_UNIPHY,8,3 ; @ENCODER_OBJECT_ID_INTERNAL_UNIPHY
	.comm	_ATOM_PPLL2,4,2                 ; @ATOM_PPLL2
	.comm	_ATOM_PPLL_INVALID,4,2          ; @ATOM_PPLL_INVALID
	.comm	_ATOM_PPLL0,4,2                 ; @ATOM_PPLL0
	.comm	_ATOM_PPLL1,4,2                 ; @ATOM_PPLL1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to allocate a PPLL\n"

	.comm	_ATOM_DCPLL,4,2                 ; @ATOM_DCPLL
	.no_dead_strip	_radeon_atom_pick_pll
.subsections_via_symbols
