	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _dpu_encoder_update_vsync_source
__dpu_encoder_update_vsync_source:      ## @_dpu_encoder_update_vsync_source
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, -40(%rbp)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	testq	%r14, %r14
	je	LBB0_2
## %bb.4:
	movl	(%rbx), %r15d
	movq	8(%rbx), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r15d
	jle	LBB0_6
## %bb.5:
	movl	(%rbx), %r14d
	movq	8(%rbx), %rdi
	callq	_ARRAY_SIZE
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	jmp	LBB0_3
LBB0_2:
	xorl	%edx, %edx
	testq	%r14, %r14
	setne	%dl
	xorl	%esi, %esi
	testq	%rbx, %rbx
	setne	%sil
	leaq	L_.str(%rip), %rdi
LBB0_3:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DPU_ERROR                      ## TAILCALL
LBB0_6:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_to_dpu_kms
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.11:
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_27
## %bb.12:
	movq	_MSM_DISPLAY_CAP_CMD_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	je	LBB0_27
## %bb.13:
	movslq	(%rbx), %rcx
	testq	%rcx, %rcx
	jle	LBB0_23
## %bb.14:
	cmpl	$8, %ecx
	jae	LBB0_16
## %bb.15:
	xorl	%edx, %edx
	jmp	LBB0_22
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_8
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
LBB0_8:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DPU_ERROR                      ## TAILCALL
LBB0_16:
	movq	%rcx, %rdx
	andq	$-8, %rdx
	leaq	-8(%rdx), %r8
	movq	%r8, %rbx
	shrq	$3, %rbx
	incq	%rbx
	movl	%ebx, %esi
	andl	$7, %esi
	cmpq	$56, %r8
	jb	LBB0_19
## %bb.17:
	andq	$-8, %rbx
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	addq	$-8, %rbx
	jne	LBB0_18
LBB0_19:
	testq	%rsi, %rsi
	je	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	decq	%rsi
	jne	LBB0_20
LBB0_21:
	cmpq	%rcx, %rdx
	je	LBB0_23
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	incq	%rdx
	cmpq	%rcx, %rdx
	jl	LBB0_22
LBB0_23:
	movl	%ecx, -48(%rbp)
	cmpq	$0, 8(%r14)
	jne	LBB0_24
## %bb.25:
	movq	_DPU_VSYNC0_SOURCE_GPIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_26
LBB0_24:
	movq	_DPU_VSYNC_SOURCE_WD_TIMER_0@GOTPCREL(%rip), %rcx
LBB0_26:
	movl	(%rcx), %ecx
	movl	%ecx, -44(%rbp)
	leaq	-48(%rbp), %rsi
	callq	*%rax
LBB0_27:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid param dpu_enc:%d or disp_info:%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid num phys enc %d/%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"invalid dpu_kms\n"

L_.str.3:                               ## @.str.3
	.asciz	"invalid mdptop\n"

	.comm	_MSM_DISPLAY_CAP_CMD_MODE,4,2   ## @MSM_DISPLAY_CAP_CMD_MODE
	.comm	_DPU_VSYNC_SOURCE_WD_TIMER_0,4,2 ## @DPU_VSYNC_SOURCE_WD_TIMER_0
	.comm	_DPU_VSYNC0_SOURCE_GPIO,4,2     ## @DPU_VSYNC0_SOURCE_GPIO
	.no_dead_strip	__dpu_encoder_update_vsync_source
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _dpu_encoder_update_vsync_source
__dpu_encoder_update_vsync_source:      ; @_dpu_encoder_update_vsync_source
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	stp	xzr, xzr, [sp, #32]
	cbz	x0, LBB0_4
; %bb.1:
	cbz	x19, LBB0_4
; %bb.2:
	ldr	w21, [x20]
	ldr	x0, [x20, #8]
	bl	_ARRAY_SIZE
	cmp	w21, w0
	b.le	LBB0_7
; %bb.3:
	ldr	x0, [x20, #8]
	ldr	w19, [x20]
	bl	_ARRAY_SIZE
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
	cmp	x19, #0
	cset	w8, ne
	cmp	x20, #0
	cset	w9, ne
	stp	x9, x8, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_5:
	bl	_DPU_ERROR
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_to_dpu_kms
	cbz	x0, LBB0_14
; %bb.8:
	ldr	x0, [x0]
	cbz	x0, LBB0_15
; %bb.9:
	ldr	x8, [x0]
	cbz	x8, LBB0_6
; %bb.10:
	ldr	w9, [x19]
Lloh4:
	adrp	x10, _MSM_DISPLAY_CAP_CMD_MODE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _MSM_DISPLAY_CAP_CMD_MODE@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.11:
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_21
; %bb.12:
	sxtw	x10, w9
	cmp	w9, #16
	b.hs	LBB0_17
; %bb.13:
	mov	x11, #0
	b	LBB0_20
LBB0_14:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_15:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_DPU_ERROR
LBB0_17:
	and	x11, x10, #0xfffffffffffffff0
	mov	x12, x11
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	subs	x12, x12, #16
	b.ne	LBB0_18
; %bb.19:
	cmp	x11, x10
	b.eq	LBB0_21
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	add	x11, x11, #1
	cmp	x11, x10
	b.lt	LBB0_20
LBB0_21:
	str	w9, [sp, #24]
	ldr	x9, [x19, #8]
Lloh11:
	adrp	x10, _DPU_VSYNC0_SOURCE_GPIO@GOTPAGE
Lloh12:
	ldr	x10, [x10, _DPU_VSYNC0_SOURCE_GPIO@GOTPAGEOFF]
Lloh13:
	adrp	x11, _DPU_VSYNC_SOURCE_WD_TIMER_0@GOTPAGE
Lloh14:
	ldr	x11, [x11, _DPU_VSYNC_SOURCE_WD_TIMER_0@GOTPAGEOFF]
	cmp	x9, #0
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
	str	w9, [sp, #28]
	add	x1, sp, #24
	blr	x8
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid param dpu_enc:%d or disp_info:%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid num phys enc %d/%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"invalid dpu_kms\n"

l_.str.3:                               ; @.str.3
	.asciz	"invalid mdptop\n"

	.comm	_MSM_DISPLAY_CAP_CMD_MODE,4,2   ; @MSM_DISPLAY_CAP_CMD_MODE
	.comm	_DPU_VSYNC_SOURCE_WD_TIMER_0,4,2 ; @DPU_VSYNC_SOURCE_WD_TIMER_0
	.comm	_DPU_VSYNC0_SOURCE_GPIO,4,2     ; @DPU_VSYNC0_SOURCE_GPIO
	.no_dead_strip	__dpu_encoder_update_vsync_source
.subsections_via_symbols
