	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpi_send_cmd
_dpi_send_cmd:                          ## @dpi_send_cmd
	.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
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	(%rdi), %rdi
	callq	_to_i915
	movq	%rax, %r15
	movq	_DPI_LP_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %eax
	notl	%eax
	andl	%r13d, %eax
	orl	%r13d, %ebx
	testl	%r12d, %r12d
	cmovnel	%eax, %ebx
	movl	%r14d, %edi
	callq	_MIPI_INTR_STAT
	movq	_SPL_PKT_SENT_INTERRUPT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	%r14d, %edi
	callq	_MIPI_DPI_CONTROL
	movl	%eax, %edi
	callq	_I915_READ
	cmpl	%eax, %ebx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_DEBUG_KMS
LBB0_2:
	movl	%r14d, %edi
	callq	_MIPI_DPI_CONTROL
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r12), %r12d
	movl	%r14d, %edi
	callq	_MIPI_INTR_STAT
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	movl	$100, %ecx
	callq	_intel_de_wait_for_set
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_ERROR
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DPI_LP_MODE,4,2                ## @DPI_LP_MODE
	.comm	_SPL_PKT_SENT_INTERRUPT,4,2     ## @SPL_PKT_SENT_INTERRUPT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Same special packet %02x twice in a row.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Video mode command 0x%08x send failed.\n"

	.no_dead_strip	_dpi_send_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpi_send_cmd
_dpi_send_cmd:                          ; @dpi_send_cmd
	.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	x20, x3
	mov	x19, x2
	mov	x22, x1
	ldr	x0, [x0]
	bl	_to_i915
	mov	x21, x0
Lloh0:
	adrp	x8, _DPI_LP_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DPI_LP_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w9, w22, w8
	orr	w8, w8, w22
	cmp	w19, #0
	csel	w19, w8, w9, eq
	mov	x0, x20
	bl	_MIPI_INTR_STAT
Lloh3:
	adrp	x22, _SPL_PKT_SENT_INTERRUPT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SPL_PKT_SENT_INTERRUPT@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_I915_WRITE
	mov	x0, x20
	bl	_MIPI_DPI_CONTROL
	bl	_I915_READ
	cmp	w19, w0
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DRM_DEBUG_KMS
LBB0_2:
	mov	x0, x20
	bl	_MIPI_DPI_CONTROL
	mov	x1, x19
	bl	_I915_WRITE
	ldr	w22, [x22]
	mov	x0, x20
	bl	_MIPI_INTR_STAT
	mov	x1, x0
	mov	x0, x21
	mov	x2, x22
	mov	w3, #100
	bl	_intel_de_wait_for_set
	cbz	x0, LBB0_4
; %bb.3:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_DRM_ERROR
LBB0_4:
	mov	w0, #0
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DPI_LP_MODE,4,2                ; @DPI_LP_MODE
	.comm	_SPL_PKT_SENT_INTERRUPT,4,2     ; @SPL_PKT_SENT_INTERRUPT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Same special packet %02x twice in a row.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Video mode command 0x%08x send failed.\n"

	.no_dead_strip	_dpi_send_cmd
.subsections_via_symbols
