	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_encoder_get_encoder_mode ## -- Begin function amdgpu_atombios_encoder_get_encoder_mode
	.p2align	4, 0x90
_amdgpu_atombios_encoder_get_encoder_mode: ## @amdgpu_atombios_encoder_get_encoder_mode
	.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
	callq	_to_amdgpu_encoder
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_amdgpu_encoder_get_dp_bridge_encoder_id
	movq	_ENCODER_OBJECT_ID_NONE@GOTPCREL(%rip), %rcx
	movq	_ATOM_ENCODER_MODE_DP@GOTPCREL(%rip), %r13
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.1:
	movq	(%r14), %rax
	movq	_ENCODER_OBJECT_ID_INTERNAL_DVO1@GOTPCREL(%rip), %rcx
	movq	_ATOM_ENCODER_MODE_DVO@GOTPCREL(%rip), %r12
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.2:
	movq	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.3:
	movq	%rbx, %rdi
	callq	_amdgpu_get_connector_for_encoder
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_amdgpu_get_connector_for_encoder_init
	movq	%rax, %r15
LBB0_5:
	movq	%r15, %rdi
	callq	_to_amdgpu_connector
	movq	%rax, %r14
	movl	(%r15), %eax
	addl	$-128, %eax
	cmpl	$11, %eax
	ja	LBB0_14
## %bb.6:
	movq	_ATOM_ENCODER_MODE_LVDS@GOTPCREL(%rip), %r12
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:
	movq	_ATOM_ENCODER_MODE_TV@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_10:
	movq	_amdgpu_audio@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movl	16(%r14), %eax
	je	LBB0_26
## %bb.11:
	testl	%eax, %eax
	je	LBB0_22
## %bb.12:
	movl	(%r14), %eax
	movq	_AMDGPU_AUDIO_ENABLE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_13
LBB0_22:
	movq	%r15, %rdi
	callq	_amdgpu_connector_edid
	movl	%eax, %edi
	callq	_drm_detect_hdmi_monitor
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:
	movl	(%r14), %eax
	movq	_AMDGPU_AUDIO_AUTO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_24
LBB0_13:
	movq	_ATOM_ENCODER_MODE_HDMI@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_19:
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movq	_CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.20:
	movq	_CONNECTOR_OBJECT_ID_eDP@GOTPCREL(%rip), %rcx
	movq	%r13, %r12
	cmpl	(%rcx), %eax
	je	LBB0_9
LBB0_14:
	movq	_amdgpu_audio@GOTPCREL(%rip), %rax
	movq	_ATOM_ENCODER_MODE_DVI@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rax)
	je	LBB0_18
## %bb.15:
	movl	(%r14), %eax
	movq	_AMDGPU_AUDIO_ENABLE@GOTPCREL(%rip), %rcx
	movq	_ATOM_ENCODER_MODE_HDMI@GOTPCREL(%rip), %r12
	cmpl	(%rcx), %eax
	je	LBB0_9
## %bb.16:
	movq	%r15, %rdi
	callq	_amdgpu_connector_edid
	movl	%eax, %edi
	callq	_drm_detect_hdmi_monitor
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	(%r14), %eax
	movq	_AMDGPU_AUDIO_AUTO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_9
LBB0_18:
	movq	%rbx, %r12
	jmp	LBB0_9
LBB0_8:
	movq	%r13, %r12
LBB0_9:
	movl	(%r12), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	testl	%eax, %eax
	jne	LBB0_25
LBB0_27:
	movq	_ATOM_ENCODER_MODE_CRT@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_24:
	cmpl	$0, 16(%r14)
	je	LBB0_27
LBB0_25:
	movq	_ATOM_ENCODER_MODE_DVI@GOTPCREL(%rip), %r12
	jmp	LBB0_9
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_27
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_14
	.long	L0_0_set_19
	.long	L0_0_set_10
	.long	L0_0_set_14
	.long	L0_0_set_27
	.long	L0_0_set_7
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ## @ENCODER_OBJECT_ID_NONE
	.comm	_ATOM_ENCODER_MODE_DP,4,2       ## @ATOM_ENCODER_MODE_DP
	.comm	_ENCODER_OBJECT_ID_INTERNAL_DVO1,8,3 ## @ENCODER_OBJECT_ID_INTERNAL_DVO1
	.comm	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1,8,3 ## @ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1
	.comm	_ATOM_ENCODER_MODE_DVO,4,2      ## @ATOM_ENCODER_MODE_DVO
	.comm	_amdgpu_audio,4,2               ## @amdgpu_audio
	.comm	_AMDGPU_AUDIO_ENABLE,4,2        ## @AMDGPU_AUDIO_ENABLE
	.comm	_ATOM_ENCODER_MODE_HDMI,4,2     ## @ATOM_ENCODER_MODE_HDMI
	.comm	_AMDGPU_AUDIO_AUTO,4,2          ## @AMDGPU_AUDIO_AUTO
	.comm	_ATOM_ENCODER_MODE_DVI,4,2      ## @ATOM_ENCODER_MODE_DVI
	.comm	_ATOM_ENCODER_MODE_CRT,4,2      ## @ATOM_ENCODER_MODE_CRT
	.comm	_ATOM_ENCODER_MODE_LVDS,4,2     ## @ATOM_ENCODER_MODE_LVDS
	.comm	_CONNECTOR_OBJECT_ID_DISPLAYPORT,4,2 ## @CONNECTOR_OBJECT_ID_DISPLAYPORT
	.comm	_CONNECTOR_OBJECT_ID_eDP,4,2    ## @CONNECTOR_OBJECT_ID_eDP
	.comm	_ATOM_ENCODER_MODE_TV,4,2       ## @ATOM_ENCODER_MODE_TV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_encoder_get_encoder_mode ; -- Begin function amdgpu_atombios_encoder_get_encoder_mode
	.p2align	2
_amdgpu_atombios_encoder_get_encoder_mode: ; @amdgpu_atombios_encoder_get_encoder_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_to_amdgpu_encoder
	mov	x20, x0
	mov	x0, x19
	bl	_amdgpu_encoder_get_dp_bridge_encoder_id
Lloh0:
	adrp	x8, _ENCODER_OBJECT_ID_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENCODER_OBJECT_ID_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _ENCODER_OBJECT_ID_INTERNAL_DVO1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ENCODER_OBJECT_ID_INTERNAL_DVO1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _ATOM_ENCODER_MODE_DVO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATOM_ENCODER_MODE_DVO@GOTPAGEOFF]
	b	LBB0_18
LBB0_3:
	mov	x0, x19
	bl	_amdgpu_get_connector_for_encoder
	mov	x20, x0
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_amdgpu_get_connector_for_encoder_init
	mov	x20, x0
LBB0_5:
	mov	x0, x20
	bl	_to_amdgpu_connector
	mov	x19, x0
	ldr	w8, [x20]
	sub	w9, w8, #128
	cmp	w9, #11
	b.hi	LBB0_19
; %bb.6:
Lloh11:
	adrp	x8, _ATOM_ENCODER_MODE_LVDS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATOM_ENCODER_MODE_LVDS@GOTPAGEOFF]
Lloh13:
	adrp	x10, lJTI0_0@PAGE
Lloh14:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_7
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_7:
Lloh15:
	adrp	x8, _ATOM_ENCODER_MODE_TV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ATOM_ENCODER_MODE_TV@GOTPAGEOFF]
	b	LBB0_18
LBB0_8:
Lloh17:
	adrp	x8, _ATOM_ENCODER_MODE_CRT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ATOM_ENCODER_MODE_CRT@GOTPAGEOFF]
	b	LBB0_18
LBB0_9:
Lloh19:
	adrp	x8, _amdgpu_audio@GOTPAGE
Lloh20:
	ldr	x8, [x8, _amdgpu_audio@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x8]
	ldr	w8, [x19, #16]
	cbz	w9, LBB0_15
; %bb.10:
	cbz	w8, LBB0_12
; %bb.11:
	ldr	w8, [x19]
Lloh22:
	adrp	x9, _AMDGPU_AUDIO_ENABLE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AMDGPU_AUDIO_ENABLE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_23
LBB0_12:
	mov	x0, x20
	bl	_amdgpu_connector_edid
	bl	_drm_detect_hdmi_monitor
	cbz	w0, LBB0_14
; %bb.13:
	ldr	w8, [x19]
Lloh25:
	adrp	x9, _AMDGPU_AUDIO_AUTO@GOTPAGE
Lloh26:
	ldr	x9, [x9, _AMDGPU_AUDIO_AUTO@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_23
LBB0_14:
	ldr	w8, [x19, #16]
LBB0_15:
Lloh28:
	adrp	x9, _ATOM_ENCODER_MODE_DVI@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ATOM_ENCODER_MODE_DVI@GOTPAGEOFF]
Lloh30:
	adrp	x10, _ATOM_ENCODER_MODE_CRT@GOTPAGE
Lloh31:
	ldr	x10, [x10, _ATOM_ENCODER_MODE_CRT@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x10, x9, eq
	b	LBB0_18
LBB0_16:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
Lloh35:
	adrp	x10, _CONNECTOR_OBJECT_ID_eDP@GOTPAGE
Lloh36:
	ldr	x10, [x10, _CONNECTOR_OBJECT_ID_eDP@GOTPAGEOFF]
Lloh37:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_19
LBB0_17:
Lloh38:
	adrp	x8, _ATOM_ENCODER_MODE_DP@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ATOM_ENCODER_MODE_DP@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_19:
Lloh40:
	adrp	x8, _amdgpu_audio@GOTPAGE
Lloh41:
	ldr	x8, [x8, _amdgpu_audio@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	cbz	w8, LBB0_24
; %bb.20:
	ldr	w8, [x19]
Lloh43:
	adrp	x9, _AMDGPU_AUDIO_ENABLE@GOTPAGE
Lloh44:
	ldr	x9, [x9, _AMDGPU_AUDIO_ENABLE@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_23
; %bb.21:
	mov	x0, x20
	bl	_amdgpu_connector_edid
	bl	_drm_detect_hdmi_monitor
	cbz	w0, LBB0_24
; %bb.22:
	ldr	w8, [x19]
Lloh46:
	adrp	x9, _AMDGPU_AUDIO_AUTO@GOTPAGE
Lloh47:
	ldr	x9, [x9, _AMDGPU_AUDIO_AUTO@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_24
LBB0_23:
Lloh49:
	adrp	x8, _ATOM_ENCODER_MODE_HDMI@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ATOM_ENCODER_MODE_HDMI@GOTPAGEOFF]
	b	LBB0_18
LBB0_24:
Lloh51:
	adrp	x8, _ATOM_ENCODER_MODE_DVI@GOTPAGE
Lloh52:
	ldr	x8, [x8, _ATOM_ENCODER_MODE_DVI@GOTPAGEOFF]
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_17-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_18-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_19-LBB0_7)>>2
	.byte	(LBB0_16-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_19-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
                                        ; -- End function
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ; @ENCODER_OBJECT_ID_NONE
	.comm	_ATOM_ENCODER_MODE_DP,4,2       ; @ATOM_ENCODER_MODE_DP
	.comm	_ENCODER_OBJECT_ID_INTERNAL_DVO1,8,3 ; @ENCODER_OBJECT_ID_INTERNAL_DVO1
	.comm	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1,8,3 ; @ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1
	.comm	_ATOM_ENCODER_MODE_DVO,4,2      ; @ATOM_ENCODER_MODE_DVO
	.comm	_amdgpu_audio,4,2               ; @amdgpu_audio
	.comm	_AMDGPU_AUDIO_ENABLE,4,2        ; @AMDGPU_AUDIO_ENABLE
	.comm	_ATOM_ENCODER_MODE_HDMI,4,2     ; @ATOM_ENCODER_MODE_HDMI
	.comm	_AMDGPU_AUDIO_AUTO,4,2          ; @AMDGPU_AUDIO_AUTO
	.comm	_ATOM_ENCODER_MODE_DVI,4,2      ; @ATOM_ENCODER_MODE_DVI
	.comm	_ATOM_ENCODER_MODE_CRT,4,2      ; @ATOM_ENCODER_MODE_CRT
	.comm	_ATOM_ENCODER_MODE_LVDS,4,2     ; @ATOM_ENCODER_MODE_LVDS
	.comm	_CONNECTOR_OBJECT_ID_DISPLAYPORT,4,2 ; @CONNECTOR_OBJECT_ID_DISPLAYPORT
	.comm	_CONNECTOR_OBJECT_ID_eDP,4,2    ; @CONNECTOR_OBJECT_ID_eDP
	.comm	_ATOM_ENCODER_MODE_TV,4,2       ; @ATOM_ENCODER_MODE_TV
.subsections_via_symbols
