	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_dma_workaround_write
_dsi_dma_workaround_write:              ## @dsi_dma_workaround_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	32(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.1:
	movq	16(%rdi), %rax
	movq	%rdx, (%rax)
	movq	(%rbx), %rax
	addq	8(%rdi), %rsi
	movl	(%rdi), %edx
	movq	%rbx, %rdi
	movl	$4, %ecx
	xorl	%r8d, %r8d
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	%rax, %rdi
	callq	*(%rax)
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_dma_submit_error
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_8:
	addq	24(%rdi), %rsi
	movq	%rdx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_9:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_5:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_dma_sync_wait
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	movl	%eax, %esi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set up DMA register write\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to submit DMA: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to wait for DMA: %d\n"

	.no_dead_strip	_dsi_dma_workaround_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsi_dma_workaround_write
_dsi_dma_workaround_write:              ; @dsi_dma_workaround_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x19, [x0, #32]
	cbz	x19, LBB0_4
; %bb.1:
	ldr	x8, [x0, #16]
	str	x2, [x8]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x9, [x0, #8]
	add	x1, x9, x1
	ldr	w2, [x0]
	mov	x0, x19
	mov	w3, #4
	mov	w4, #0
	blr	x8
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x0]
	blr	x8
	mov	x20, x0
	bl	_dma_submit_error
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_6
; %bb.3:
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_4:
	ldr	x8, [x0, #24]
	add	x1, x8, x1
	mov	x0, x2
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_writel
LBB0_5:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_DRM_ERROR
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_dma_sync_wait
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_9
; %bb.7:
	str	x0, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_DRM_ERROR
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set up DMA register write\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to submit DMA: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to wait for DMA: %d\n"

	.no_dead_strip	_dsi_dma_workaround_write
.subsections_via_symbols
