	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_enter_ulps
_dsi_enter_ulps:                        ## @dsi_enter_ulps
	.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, %rbx
	movq	_completion@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DECLARE_COMPLETION_ONSTACK
	leaq	L_.str(%rip), %rdi
	callq	_DSSDBG
	movq	%rbx, %rdi
	callq	_dsi_bus_is_locked
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movl	(%rbx), %edi
	callq	_WARN_ON
	xorl	%r14d, %r14d
	cmpl	$0, (%rbx)
	jne	LBB0_21
## %bb.1:
	movq	_DSI_CLK_CTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$13, %edx
	movl	$13, %ecx
	callq	_REG_GET
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_dsi_if_enable
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$13, %ecx
	movl	$13, %r8d
	callq	_REG_FLD_MOD
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_dsi_if_enable
LBB0_3:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_dsi_sync_vc
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_dsi_sync_vc
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_dsi_sync_vc
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_dsi_sync_vc
	movq	%rbx, %rdi
	callq	_dsi_force_tx_stop_mode_io
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_dsi_vc_enable
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_dsi_vc_enable
	movq	%rbx, %rdi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_dsi_vc_enable
	movq	%rbx, %rdi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_dsi_vc_enable
	movq	_DSI_COMPLEXIO_CFG2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$16, %edx
	movl	$16, %ecx
	callq	_REG_GET
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_DSSERR
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_21
LBB0_5:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$17, %edx
	movl	$17, %ecx
	callq	_REG_GET
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	callq	_DSSERR
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_21
LBB0_7:
	movq	_dsi_completion_handler@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_DSI_CIO_IRQ_ULPSACTIVENOT_ALL0@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	_completion@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	callq	_dsi_register_isr_cio
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.8:
	movl	4(%rbx), %r9d
	testl	%r9d, %r9d
	jle	LBB0_9
## %bb.10:
	movq	8(%rbx), %r8
	movq	_DSI_LANE_UNUSED@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	leaq	-1(%r9), %rax
	movl	%r9d, %r14d
	andl	$3, %r14d
	cmpq	$3, %rax
	jae	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	LBB0_15
LBB0_9:
	xorl	%edx, %edx
	jmp	LBB0_18
LBB0_12:
	andl	$-4, %r9d
	xorl	%r10d, %r10d
	xorl	%eax, %eax
	xorl	%edx, %edx
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	movl	%eax, %ecx
	shll	%cl, %edi
	cmpq	%r11, (%r8,%rax,8)
	cmovel	%r10d, %edi
	leal	1(%rax), %ecx
	movl	$1, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	orl	%edx, %edi
	cmpq	%r11, 8(%r8,%rax,8)
	cmovel	%r10d, %esi
	leal	2(%rax), %ecx
	movl	$1, %r12d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	cmpq	%r11, 16(%r8,%rax,8)
	cmovel	%r10d, %r12d
	orl	%esi, %r12d
	orl	%edi, %r12d
	leal	3(%rax), %ecx
	movl	$1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	cmpq	%r11, 24(%r8,%rax,8)
	cmovel	%r10d, %edx
	orl	%r12d, %edx
	addq	$4, %rax
	cmpq	%r9, %rax
	jne	LBB0_13
## %bb.14:
	movq	_dsi_completion_handler@GOTPCREL(%rip), %r12
LBB0_15:
	testq	%r14, %r14
	je	LBB0_18
## %bb.16:
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %esi
	movl	%eax, %ecx
	shll	%cl, %esi
	cmpq	%r11, (%r8,%rax,8)
	cmovel	%edi, %esi
	orl	%esi, %edx
	incq	%rax
	decq	%r14
	jne	LBB0_17
LBB0_18:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$9, %ecx
	movl	$5, %r8d
	callq	_REG_FLD_MOD
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_dsi_read_reg
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	_completion@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_19
## %bb.20:
	movl	(%r12), %esi
	movl	(%r13), %ecx
	movq	_completion@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	callq	_dsi_unregister_isr_cio
	movl	(%r15), %esi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$9, %ecx
	movl	$5, %r8d
	callq	_REG_FLD_MOD
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_dsi_read_reg
	movq	_DSI_COMPLEXIO_POWER_ULPS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dsi_cio_power
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_dsi_if_enable
	movl	$1, (%rbx)
	jmp	LBB0_21
LBB0_19:
	leaq	L_.str.3(%rip), %rdi
	callq	_DSSERR
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movl	(%r12), %esi
	movl	(%r13), %ecx
	movq	_completion@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	callq	_dsi_unregister_isr_cio
LBB0_21:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_completion,4,2                 ## @completion
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Entering ULPS"

	.comm	_DSI_CLK_CTRL,4,2               ## @DSI_CLK_CTRL
	.comm	_DSI_COMPLEXIO_CFG2,4,2         ## @DSI_COMPLEXIO_CFG2
L_.str.1:                               ## @.str.1
	.asciz	"HS busy when enabling ULPS\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"LP busy when enabling ULPS\n"

	.comm	_dsi_completion_handler,4,2     ## @dsi_completion_handler
	.comm	_DSI_CIO_IRQ_ULPSACTIVENOT_ALL0,4,2 ## @DSI_CIO_IRQ_ULPSACTIVENOT_ALL0
	.comm	_DSI_LANE_UNUSED,8,3            ## @DSI_LANE_UNUSED
L_.str.3:                               ## @.str.3
	.asciz	"ULPS enable timeout\n"

	.comm	_DSI_COMPLEXIO_POWER_ULPS,4,2   ## @DSI_COMPLEXIO_POWER_ULPS
	.no_dead_strip	_dsi_enter_ulps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function dsi_enter_ulps
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_dsi_enter_ulps:                        ; @dsi_enter_ulps
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _completion@GOTPAGE
Lloh1:
	ldr	x8, [x8, _completion@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_DECLARE_COMPLETION_ONSTACK
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DSSDBG
	mov	x0, x19
	bl	_dsi_bus_is_locked
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w0, [x19]
	bl	_WARN_ON
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_9
LBB0_2:
Lloh5:
	adrp	x20, _DSI_CLK_CTRL@GOTPAGE
Lloh6:
	ldr	x20, [x20, _DSI_CLK_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #13
	mov	w3, #13
	bl	_REG_GET
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	bl	_dsi_if_enable
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #13
	mov	w4, #13
	bl	_REG_FLD_MOD
	mov	x0, x19
	mov	w1, #1
	bl	_dsi_if_enable
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	bl	_dsi_sync_vc
	mov	x0, x19
	mov	w1, #1
	bl	_dsi_sync_vc
	mov	x0, x19
	mov	w1, #2
	bl	_dsi_sync_vc
	mov	x0, x19
	mov	w1, #3
	bl	_dsi_sync_vc
	mov	x0, x19
	bl	_dsi_force_tx_stop_mode_io
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_dsi_vc_enable
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_dsi_vc_enable
	mov	x0, x19
	mov	w1, #2
	mov	w2, #0
	bl	_dsi_vc_enable
	mov	x0, x19
	mov	w1, #3
	mov	w2, #0
	bl	_dsi_vc_enable
Lloh7:
	adrp	x21, _DSI_COMPLEXIO_CFG2@GOTPAGE
Lloh8:
	ldr	x21, [x21, _DSI_COMPLEXIO_CFG2@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #16
	mov	w3, #16
	bl	_REG_GET
	cbz	x0, LBB0_6
; %bb.5:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #17
	mov	w3, #17
	bl	_REG_GET
	cbz	x0, LBB0_10
; %bb.7:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_DSSERR
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh16:
	adrp	x22, _dsi_completion_handler@GOTPAGE
Lloh17:
	ldr	x22, [x22, _dsi_completion_handler@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh18:
	adrp	x23, _DSI_CIO_IRQ_ULPSACTIVENOT_ALL0@GOTPAGE
Lloh19:
	ldr	x23, [x23, _DSI_CIO_IRQ_ULPSACTIVENOT_ALL0@GOTPAGEOFF]
	ldr	w3, [x23]
Lloh20:
	adrp	x2, _completion@GOTPAGE
Lloh21:
	ldr	x2, [x2, _completion@GOTPAGEOFF]
	mov	x0, x19
	bl	_dsi_register_isr_cio
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.11:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	ldr	x9, [x19, #8]
Lloh22:
	adrp	x10, _DSI_LANE_UNUSED@GOTPAGE
Lloh23:
	ldr	x10, [x10, _DSI_LANE_UNUSED@GOTPAGEOFF]
Lloh24:
	ldr	x10, [x10]
	cmp	w8, #8
	b.hs	LBB0_15
; %bb.13:
	mov	x11, #0
	mov	w2, #0
	b	LBB0_18
LBB0_14:
	mov	w2, #0
	b	LBB0_20
LBB0_15:
	and	x11, x8, #0xfffffff8
	dup.2d	v0, x10
	movi.2d	v1, #0000000000000000
	movi.2s	v2, #2
	movi.2s	v3, #4
Lloh25:
	adrp	x12, lCPI0_0@PAGE
Lloh26:
	ldr	d4, [x12, lCPI0_0@PAGEOFF]
	add	x12, x9, #32
	movi.2s	v5, #6
	movi.2s	v6, #1
	movi.2s	v7, #8
	mov	x13, x11
	movi.2d	v16, #0000000000000000
	movi.2d	v17, #0000000000000000
	movi.2d	v18, #0000000000000000
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	add.2s	v19, v4, v2
	add.2s	v20, v4, v3
	add.2s	v21, v4, v5
	ldp	q22, q23, [x12, #-32]
	ldp	q24, q25, [x12], #64
	cmeq.2d	v22, v22, v0
	xtn.2s	v22, v22
	cmeq.2d	v23, v23, v0
	xtn.2s	v23, v23
	cmeq.2d	v24, v24, v0
	xtn.2s	v24, v24
	cmeq.2d	v25, v25, v0
	xtn.2s	v25, v25
	ushl.2s	v26, v6, v4
	ushl.2s	v19, v6, v19
	ushl.2s	v20, v6, v20
	ushl.2s	v21, v6, v21
	bic.8b	v22, v26, v22
	bic.8b	v19, v19, v23
	bic.8b	v20, v20, v24
	bic.8b	v21, v21, v25
	orr.8b	v1, v22, v1
	orr.8b	v16, v19, v16
	orr.8b	v17, v20, v17
	orr.8b	v18, v21, v18
	add.2s	v4, v4, v7
	subs	x13, x13, #8
	b.ne	LBB0_16
; %bb.17:
	orr.8b	v0, v16, v1
	orr.8b	v0, v17, v0
	orr.8b	v0, v18, v0
	mov.s	w12, v0[1]
	fmov	w13, s0
	orr	w2, w13, w12
	cmp	x11, x8
	b.eq	LBB0_20
LBB0_18:
	mov	w12, #1
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x9, x11, lsl #3]
	lsl	w14, w12, w11
	cmp	x13, x10
	csel	w13, wzr, w14, eq
	orr	w2, w13, w2
	add	x11, x11, #1
	cmp	x8, x11
	b.ne	LBB0_19
LBB0_20:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w3, #9
	mov	w4, #5
	bl	_REG_FLD_MOD
	ldr	w1, [x21]
	mov	x0, x19
	bl	_dsi_read_reg
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
Lloh27:
	adrp	x0, _completion@GOTPAGE
Lloh28:
	ldr	x0, [x0, _completion@GOTPAGEOFF]
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_22
; %bb.21:
	ldr	w1, [x22]
	ldr	w3, [x23]
Lloh29:
	adrp	x2, _completion@GOTPAGE
Lloh30:
	ldr	x2, [x2, _completion@GOTPAGEOFF]
	mov	x0, x19
	bl	_dsi_unregister_isr_cio
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #9
	mov	w4, #5
	bl	_REG_FLD_MOD
	ldr	w1, [x21]
	mov	x0, x19
	bl	_dsi_read_reg
Lloh31:
	adrp	x8, _DSI_COMPLEXIO_POWER_ULPS@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DSI_COMPLEXIO_POWER_ULPS@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dsi_cio_power
	mov	x0, x19
	mov	w1, #0
	bl	_dsi_if_enable
	mov	w20, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_9
LBB0_22:
Lloh34:
	adrp	x0, l_.str.3@PAGE
Lloh35:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DSSERR
Lloh36:
	adrp	x8, _EIO@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	w1, [x22]
	ldr	w3, [x23]
Lloh39:
	adrp	x2, _completion@GOTPAGE
Lloh40:
	ldr	x2, [x2, _completion@GOTPAGEOFF]
	mov	x0, x19
	bl	_dsi_unregister_isr_cio
	b	LBB0_9
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdr	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_completion,4,2                 ; @completion
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Entering ULPS"

	.comm	_DSI_CLK_CTRL,4,2               ; @DSI_CLK_CTRL
	.comm	_DSI_COMPLEXIO_CFG2,4,2         ; @DSI_COMPLEXIO_CFG2
l_.str.1:                               ; @.str.1
	.asciz	"HS busy when enabling ULPS\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"LP busy when enabling ULPS\n"

	.comm	_dsi_completion_handler,4,2     ; @dsi_completion_handler
	.comm	_DSI_CIO_IRQ_ULPSACTIVENOT_ALL0,4,2 ; @DSI_CIO_IRQ_ULPSACTIVENOT_ALL0
	.comm	_DSI_LANE_UNUSED,8,3            ; @DSI_LANE_UNUSED
l_.str.3:                               ; @.str.3
	.asciz	"ULPS enable timeout\n"

	.comm	_DSI_COMPLEXIO_POWER_ULPS,4,2   ; @DSI_COMPLEXIO_POWER_ULPS
	.no_dead_strip	_dsi_enter_ulps
.subsections_via_symbols
