	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_encoder_mode_fixup ## -- Begin function amdgpu_atombios_encoder_mode_fixup
	.p2align	4, 0x90
_amdgpu_atombios_encoder_mode_fixup:    ## @amdgpu_atombios_encoder_mode_fixup
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_to_amdgpu_encoder
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_amdgpu_encoder_set_active_device
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_drm_mode_set_crtcinfo
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.2:
	movq	16(%rbx), %rax
	leaq	2(%rax), %rcx
	cmpq	%rcx, 8(%rbx)
	jge	LBB0_4
## %bb.3:
	movq	16(%r14), %rcx
	addq	$2, %rcx
	movq	%rcx, 8(%r14)
LBB0_4:
	cmpq	%rax, 8(%rbx)
	jne	LBB0_6
LBB0_5:
	incq	8(%r14)
LBB0_6:
	movq	_ATOM_DEVICE_LCD_SUPPORT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, (%r15)
	jne	LBB0_8
## %bb.7:
	movq	8(%r15), %rax
	movq	_RMX_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
LBB0_8:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_amdgpu_panel_mode_fixup
LBB0_9:
	movq	_ATOM_DEVICE_DFP_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rbx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%r15)
	jne	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	callq	_amdgpu_encoder_get_dp_bridge_encoder_id
	movq	_ENCODER_OBJECT_ID_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
LBB0_11:
	movq	%r12, %rdi
	callq	_amdgpu_get_connector_for_encoder
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_amdgpu_atombios_dp_set_link_config
LBB0_12:
	movl	$1, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	16(%rbx), %rax
	cmpq	%rax, 8(%rbx)
	je	LBB0_5
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_ATOM_DEVICE_LCD_SUPPORT,4,2    ## @ATOM_DEVICE_LCD_SUPPORT
	.comm	_RMX_OFF,8,3                    ## @RMX_OFF
	.comm	_ATOM_DEVICE_DFP_SUPPORT,4,2    ## @ATOM_DEVICE_DFP_SUPPORT
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ## @ENCODER_OBJECT_ID_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_encoder_mode_fixup ; -- Begin function amdgpu_atombios_encoder_mode_fixup
	.p2align	2
_amdgpu_atombios_encoder_mode_fixup:    ; @amdgpu_atombios_encoder_mode_fixup
	.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, x2
	mov	x22, x1
	mov	x20, x0
	bl	_to_amdgpu_encoder
	mov	x21, x0
	mov	x0, x20
	bl	_amdgpu_encoder_set_active_device
	mov	x0, x19
	mov	w1, #0
	bl	_drm_mode_set_crtcinfo
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldp	x9, x8, [x22, #8]
	add	x10, x8, #2
	cmp	x9, x10
	b.ge	LBB0_4
; %bb.2:
	ldr	x9, [x19, #16]
	add	x9, x9, #2
	str	x9, [x19, #8]
	b	LBB0_4
LBB0_3:
	ldr	x8, [x22, #16]
LBB0_4:
	ldr	x9, [x22, #8]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
LBB0_6:
	ldr	w8, [x21]
Lloh3:
	adrp	x22, _ATOM_DEVICE_LCD_SUPPORT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ATOM_DEVICE_LCD_SUPPORT@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x21, #8]
Lloh5:
	adrp	x9, _RMX_OFF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RMX_OFF@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_amdgpu_panel_mode_fixup
LBB0_9:
	ldr	w8, [x21]
Lloh8:
	adrp	x9, _ATOM_DEVICE_DFP_SUPPORT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ATOM_DEVICE_DFP_SUPPORT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	ldr	w10, [x22]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_amdgpu_encoder_get_dp_bridge_encoder_id
Lloh11:
	adrp	x8, _ENCODER_OBJECT_ID_NONE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENCODER_OBJECT_ID_NONE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_12
LBB0_11:
	mov	x0, x20
	bl	_amdgpu_get_connector_for_encoder
	mov	x1, x19
	bl	_amdgpu_atombios_dp_set_link_config
LBB0_12:
	mov	w0, #1
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_ATOM_DEVICE_LCD_SUPPORT,4,2    ; @ATOM_DEVICE_LCD_SUPPORT
	.comm	_RMX_OFF,8,3                    ; @RMX_OFF
	.comm	_ATOM_DEVICE_DFP_SUPPORT,4,2    ; @ATOM_DEVICE_DFP_SUPPORT
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ; @ENCODER_OBJECT_ID_NONE
.subsections_via_symbols
