	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function analogix_dp_config_video
_analogix_dp_config_video:              ## @analogix_dp_config_video
	.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, %r14
	callq	_analogix_dp_config_video_slave_mode
	movq	%r14, %rdi
	callq	_analogix_dp_set_video_color_format
	movq	%r14, %rdi
	callq	_analogix_dp_get_pll_lock_status
	movq	_PLL_UNLOCKED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.5:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_1:
	movq	%r14, %rdi
	callq	_analogix_dp_is_slave_video_stream_clock_on
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movl	$-1, %ebx
	movq	_DP_TIMEOUT_LOOP_COUNT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jge	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1001, %esi                     ## imm = 0x3E9
	callq	_usleep_range
	movq	%r14, %rdi
	callq	_analogix_dp_is_slave_video_stream_clock_on
	testq	%rax, %rax
	jne	LBB0_3
LBB0_8:
	movq	_CALCULATED_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_analogix_dp_set_video_cr_mn
	movq	_VIDEO_TIMING_FROM_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_analogix_dp_set_video_timing_mode
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_analogix_dp_enable_video_mute
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_analogix_dp_enable_video_master
	movq	%r14, %rdi
	callq	_analogix_dp_start_video
	movq	_DP_TIMEOUT_LOOP_COUNT@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_analogix_dp_is_video_stream_on
	movl	$0, %r13d
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$9, %ebx
	jg	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	incl	%ebx
	movl	%ebx, %r13d
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	(%r15), %r12d
	jge	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1001, %esi                     ## imm = 0x3E9
	callq	_usleep_range
	incl	%r12d
	movl	%r13d, %ebx
	jmp	LBB0_9
LBB0_13:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_4:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PLL_UNLOCKED,8,3               ## @PLL_UNLOCKED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PLL is not locked yet.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DP_TIMEOUT_LOOP_COUNT,4,2      ## @DP_TIMEOUT_LOOP_COUNT
L_.str.1:                               ## @.str.1
	.asciz	"Timeout of slave video streamclk ok\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_CALCULATED_M,4,2               ## @CALCULATED_M
	.comm	_VIDEO_TIMING_FROM_CAPTURE,4,2  ## @VIDEO_TIMING_FROM_CAPTURE
L_.str.2:                               ## @.str.2
	.asciz	"Ignoring timeout of video streamclk ok\n"

	.no_dead_strip	_analogix_dp_config_video
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function analogix_dp_config_video
_analogix_dp_config_video:              ; @analogix_dp_config_video
	.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, x0
	bl	_analogix_dp_config_video_slave_mode
	mov	x0, x19
	bl	_analogix_dp_set_video_color_format
	mov	x0, x19
	bl	_analogix_dp_get_pll_lock_status
Lloh0:
	adrp	x8, _PLL_UNLOCKED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PLL_UNLOCKED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_2:
	mov	x0, x19
	bl	_analogix_dp_is_slave_video_stream_clock_on
Lloh7:
	adrp	x20, _DP_TIMEOUT_LOOP_COUNT@GOTPAGE
Lloh8:
	ldr	x20, [x20, _DP_TIMEOUT_LOOP_COUNT@GOTPAGEOFF]
	cbz	x0, LBB0_6
; %bb.3:
	mov	w21, #-1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	add	w21, w21, #1
	cmp	w21, w8
	b.ge	LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1000
	mov	w1, #1001
	bl	_usleep_range
	mov	x0, x19
	bl	_analogix_dp_is_slave_video_stream_clock_on
	cbnz	x0, LBB0_4
LBB0_6:
Lloh9:
	adrp	x8, _CALCULATED_M@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CALCULATED_M@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_analogix_dp_set_video_cr_mn
Lloh12:
	adrp	x8, _VIDEO_TIMING_FROM_CAPTURE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VIDEO_TIMING_FROM_CAPTURE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_analogix_dp_set_video_timing_mode
	mov	x0, x19
	mov	w1, #0
	bl	_analogix_dp_enable_video_mute
	mov	x0, x19
	mov	w1, #0
	bl	_analogix_dp_enable_video_master
	mov	x0, x19
	bl	_analogix_dp_start_video
	mov	w21, #0
	mov	w22, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_analogix_dp_is_video_stream_on
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w22, #0
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	cmp	w22, #9
	b.gt	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	add	w22, w22, #1
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x20]
	cmp	w21, w8
	b.ge	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #1000
	mov	w1, #1001
	bl	_usleep_range
	add	w21, w21, #1
	b	LBB0_7
LBB0_13:
	ldr	w0, [x19]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
LBB0_14:
	mov	w0, #0
	b	LBB0_17
LBB0_15:
	ldr	w0, [x19]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh19:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	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	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PLL_UNLOCKED,8,3               ; @PLL_UNLOCKED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PLL is not locked yet.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DP_TIMEOUT_LOOP_COUNT,4,2      ; @DP_TIMEOUT_LOOP_COUNT
l_.str.1:                               ; @.str.1
	.asciz	"Timeout of slave video streamclk ok\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_CALCULATED_M,4,2               ; @CALCULATED_M
	.comm	_VIDEO_TIMING_FROM_CAPTURE,4,2  ; @VIDEO_TIMING_FROM_CAPTURE
l_.str.2:                               ; @.str.2
	.asciz	"Ignoring timeout of video streamclk ok\n"

	.no_dead_strip	_analogix_dp_config_video
.subsections_via_symbols
