	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_pixel_clock_v3
_set_pixel_clock_v3:                    ## @set_pixel_clock_v3
	.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
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_BP_RESULT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_CLOCK_SOURCE_ID_PLL1@GOTPCREL(%rip), %rcx
	movq	(%rbx), %rax
	cmpq	%rax, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_ATOM_PPLL1@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_CLOCK_SOURCE_ID_PLL2@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_14
## %bb.3:
	movq	_ATOM_PPLL2@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	72(%rbx), %edi
	callq	_cpu_to_le16
	movq	%rax, -48(%rbp)
	movl	64(%rbx), %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movups	48(%rbx), %xmm0
	movups	%xmm0, -72(%rbp)
	movslq	8(%rbx), %rax
	imulq	$1374389535, %rax, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$37, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	%rax, -80(%rbp)
	movq	(%r15), %rax
	movq	8(%rax), %r12
	movl	44(%rbx), %edi
	callq	_dal_graphics_object_id_get_encoder_id
	movl	%eax, %edi
	callq	*%r12
	movl	%eax, -64(%rbp)
	movq	(%r15), %rax
	movl	40(%rbx), %edi
	xorl	%esi, %esi
	callq	*(%rax)
	movq	%rax, -72(%rbp)
	cmpq	$0, 32(%rbx)
	je	LBB0_6
## %bb.5:
	movq	_PIXEL_CLOCK_MISC_FORCE_PROG_PPLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -80(%rbp)
LBB0_6:
	cmpq	$0, 24(%rbx)
	je	LBB0_8
## %bb.7:
	movq	_PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -80(%rbp)
LBB0_8:
	movq	_CONTROLLER_ID_D1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	16(%rbx), %rax
	je	LBB0_10
## %bb.9:
	movq	_PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -80(%rbp)
LBB0_10:
	movq	_SetPixelClock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movups	-80(%rbp), %xmm0
	movups	-64(%rbp), %xmm1
	movups	-48(%rbp), %xmm2
	movups	%xmm2, 32(%rsp)
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_EXEC_BIOS_CMD_TABLE
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	_BP_RESULT_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_14:
	movq	_BP_RESULT_BADINPUT@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BP_RESULT_FAILURE,4,2          ## @BP_RESULT_FAILURE
	.comm	_CLOCK_SOURCE_ID_PLL1,8,3       ## @CLOCK_SOURCE_ID_PLL1
	.comm	_ATOM_PPLL1,4,2                 ## @ATOM_PPLL1
	.comm	_CLOCK_SOURCE_ID_PLL2,8,3       ## @CLOCK_SOURCE_ID_PLL2
	.comm	_ATOM_PPLL2,4,2                 ## @ATOM_PPLL2
	.comm	_BP_RESULT_BADINPUT,4,2         ## @BP_RESULT_BADINPUT
	.comm	_PIXEL_CLOCK_MISC_FORCE_PROG_PPLL,4,2 ## @PIXEL_CLOCK_MISC_FORCE_PROG_PPLL
	.comm	_PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK,4,2 ## @PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK
	.comm	_CONTROLLER_ID_D1,8,3           ## @CONTROLLER_ID_D1
	.comm	_PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2,4,2 ## @PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2
	.comm	_SetPixelClock,4,2              ## @SetPixelClock
	.comm	_BP_RESULT_OK,4,2               ## @BP_RESULT_OK
	.no_dead_strip	_set_pixel_clock_v3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_pixel_clock_v3
_set_pixel_clock_v3:                    ; @set_pixel_clock_v3
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _BP_RESULT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BP_RESULT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh3:
	adrp	x8, _CLOCK_SOURCE_ID_PLL1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CLOCK_SOURCE_ID_PLL1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x8]
	ldr	x8, [x19]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _ATOM_PPLL1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATOM_PPLL1@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh8:
	adrp	x9, _CLOCK_SOURCE_ID_PLL2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CLOCK_SOURCE_ID_PLL2@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.3:
Lloh11:
	adrp	x8, _ATOM_PPLL2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATOM_PPLL2@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	str	w8, [sp, #88]
	ldr	w0, [x19, #72]
	bl	_cpu_to_le16
	str	x0, [sp, #80]
	ldr	w0, [x19, #64]
	bl	_cpu_to_le16
	ldp	x9, x8, [x19, #48]
	stp	x8, x0, [sp, #64]
	str	x9, [sp, #56]
	ldrsw	x8, [x19, #8]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #5
	bl	_cpu_to_le16
	str	x0, [sp, #48]
	ldr	x8, [x20]
	ldr	x22, [x8, #8]
	ldr	w0, [x19, #44]
	bl	_dal_graphics_object_id_get_encoder_id
	blr	x22
	str	w0, [sp, #64]
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w0, [x19, #40]
	mov	w1, #0
	blr	x8
	str	x0, [sp, #56]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_6
; %bb.5:
Lloh13:
	adrp	x8, _PIXEL_CLOCK_MISC_FORCE_PROG_PPLL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PIXEL_CLOCK_MISC_FORCE_PROG_PPLL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [sp, #48]
	orr	w8, w9, w8
	str	w8, [sp, #48]
LBB0_6:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_8
; %bb.7:
Lloh16:
	adrp	x8, _PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [sp, #48]
	orr	w8, w9, w8
	str	w8, [sp, #48]
LBB0_8:
Lloh19:
	adrp	x8, _CONTROLLER_ID_D1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CONTROLLER_ID_D1@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldr	x9, [x19, #16]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.9:
Lloh22:
	adrp	x8, _PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [sp, #48]
	orr	w8, w9, w8
	str	w8, [sp, #48]
LBB0_10:
Lloh25:
	adrp	x8, _SetPixelClock@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SetPixelClock@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ldp	q0, q1, [sp, #48]
	stp	q0, q1, [sp]
	ldr	q0, [sp, #80]
	str	q0, [sp, #32]
	mov	x1, sp
	bl	_EXEC_BIOS_CMD_TABLE
Lloh28:
	adrp	x8, _BP_RESULT_OK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BP_RESULT_OK@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w21, w8, eq
	b	LBB0_12
LBB0_11:
Lloh31:
	adrp	x8, _BP_RESULT_BADINPUT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _BP_RESULT_BADINPUT@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
LBB0_12:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_BP_RESULT_FAILURE,4,2          ; @BP_RESULT_FAILURE
	.comm	_CLOCK_SOURCE_ID_PLL1,8,3       ; @CLOCK_SOURCE_ID_PLL1
	.comm	_ATOM_PPLL1,4,2                 ; @ATOM_PPLL1
	.comm	_CLOCK_SOURCE_ID_PLL2,8,3       ; @CLOCK_SOURCE_ID_PLL2
	.comm	_ATOM_PPLL2,4,2                 ; @ATOM_PPLL2
	.comm	_BP_RESULT_BADINPUT,4,2         ; @BP_RESULT_BADINPUT
	.comm	_PIXEL_CLOCK_MISC_FORCE_PROG_PPLL,4,2 ; @PIXEL_CLOCK_MISC_FORCE_PROG_PPLL
	.comm	_PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK,4,2 ; @PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK
	.comm	_CONTROLLER_ID_D1,8,3           ; @CONTROLLER_ID_D1
	.comm	_PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2,4,2 ; @PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2
	.comm	_SetPixelClock,4,2              ; @SetPixelClock
	.comm	_BP_RESULT_OK,4,2               ; @BP_RESULT_OK
	.no_dead_strip	_set_pixel_clock_v3
.subsections_via_symbols
