	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdv_intel_crt_mode_set
_cdv_intel_crt_mode_set:                ## @cdv_intel_crt_mode_set
	.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, %r15
	movq	(%rdi), %rdi
	callq	_to_gma_crtc
	movq	%rax, %r12
	cmpq	$0, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_DPLL_A_MD@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_DPLL_B_MD@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	movq	_ADPA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_REG_READ
	movq	_DPLL_MD_UDI_MULTIPLIER_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%ebx, %edi
	callq	_REG_WRITE
	movl	(%r15), %esi
	movq	_DRM_MODE_FLAG_PHSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	je	LBB0_5
## %bb.4:
	movq	_ADPA_HSYNC_ACTIVE_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	je	LBB0_7
## %bb.6:
	movq	_ADPA_VSYNC_ACTIVE_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_7:
	orl	%eax, %esi
	cmpq	$0, (%r12)
	jne	LBB0_8
## %bb.9:
	movq	_ADPA_PIPE_A_SELECT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_ADPA_PIPE_B_SELECT@GOTPCREL(%rip), %rax
LBB0_10:
	orl	(%rax), %esi
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_WRITE                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DPLL_A_MD,4,2                  ## @DPLL_A_MD
	.comm	_DPLL_B_MD,4,2                  ## @DPLL_B_MD
	.comm	_ADPA,4,2                       ## @ADPA
	.comm	_DPLL_MD_UDI_MULTIPLIER_MASK,4,2 ## @DPLL_MD_UDI_MULTIPLIER_MASK
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ## @DRM_MODE_FLAG_PHSYNC
	.comm	_ADPA_HSYNC_ACTIVE_HIGH,4,2     ## @ADPA_HSYNC_ACTIVE_HIGH
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ## @DRM_MODE_FLAG_PVSYNC
	.comm	_ADPA_VSYNC_ACTIVE_HIGH,4,2     ## @ADPA_VSYNC_ACTIVE_HIGH
	.comm	_ADPA_PIPE_A_SELECT,4,2         ## @ADPA_PIPE_A_SELECT
	.comm	_ADPA_PIPE_B_SELECT,4,2         ## @ADPA_PIPE_B_SELECT
	.no_dead_strip	_cdv_intel_crt_mode_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdv_intel_crt_mode_set
_cdv_intel_crt_mode_set:                ; @cdv_intel_crt_mode_set
	.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
	ldr	x0, [x0]
	bl	_to_gma_crtc
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _DPLL_A_MD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DPLL_A_MD@GOTPAGEOFF]
Lloh2:
	adrp	x10, _DPLL_B_MD@GOTPAGE
Lloh3:
	ldr	x10, [x10, _DPLL_B_MD@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w21, [x8]
Lloh4:
	adrp	x8, _ADPA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ADPA@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_REG_READ
Lloh7:
	adrp	x8, _DPLL_MD_UDI_MULTIPLIER_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DPLL_MD_UDI_MULTIPLIER_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bic	w1, w0, w8
	mov	x0, x21
	bl	_REG_WRITE
	ldr	w8, [x19]
Lloh10:
	adrp	x9, _DRM_MODE_FLAG_PHSYNC@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DRM_MODE_FLAG_PHSYNC@GOTPAGEOFF]
Lloh12:
	adrp	x10, _ADPA_HSYNC_ACTIVE_HIGH@GOTPAGE
Lloh13:
	ldr	x10, [x10, _ADPA_HSYNC_ACTIVE_HIGH@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w9, wzr, w10, eq
Lloh16:
	adrp	x10, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh17:
	ldr	x10, [x10, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
Lloh19:
	adrp	x11, _ADPA_VSYNC_ACTIVE_HIGH@GOTPAGE
Lloh20:
	ldr	x11, [x11, _ADPA_VSYNC_ACTIVE_HIGH@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
	tst	w10, w8
	csel	w8, wzr, w11, eq
	orr	w8, w8, w9
	ldr	x9, [x20]
Lloh22:
	adrp	x10, _ADPA_PIPE_A_SELECT@GOTPAGE
Lloh23:
	ldr	x10, [x10, _ADPA_PIPE_A_SELECT@GOTPAGEOFF]
Lloh24:
	adrp	x11, _ADPA_PIPE_B_SELECT@GOTPAGE
Lloh25:
	ldr	x11, [x11, _ADPA_PIPE_B_SELECT@GOTPAGEOFF]
	cmp	x9, #0
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x22
	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
	b	_REG_WRITE
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DPLL_A_MD,4,2                  ; @DPLL_A_MD
	.comm	_DPLL_B_MD,4,2                  ; @DPLL_B_MD
	.comm	_ADPA,4,2                       ; @ADPA
	.comm	_DPLL_MD_UDI_MULTIPLIER_MASK,4,2 ; @DPLL_MD_UDI_MULTIPLIER_MASK
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ; @DRM_MODE_FLAG_PHSYNC
	.comm	_ADPA_HSYNC_ACTIVE_HIGH,4,2     ; @ADPA_HSYNC_ACTIVE_HIGH
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ; @DRM_MODE_FLAG_PVSYNC
	.comm	_ADPA_VSYNC_ACTIVE_HIGH,4,2     ; @ADPA_VSYNC_ACTIVE_HIGH
	.comm	_ADPA_PIPE_A_SELECT,4,2         ; @ADPA_PIPE_A_SELECT
	.comm	_ADPA_PIPE_B_SELECT,4,2         ; @ADPA_PIPE_B_SELECT
	.no_dead_strip	_cdv_intel_crt_mode_set
.subsections_via_symbols
