	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_host_irq
_dsi_host_irq:                          ## @dsi_host_irq
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 16(%rsi)
	je	LBB0_7
## %bb.1:
	movq	%rsi, %rbx
	leaq	12(%rsi), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_REG_DSI_INTR_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_dsi_read
	movl	%eax, %r14d
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dsi_write
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_DBG
	movq	_DSI_IRQ_ERROR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_dsi_error
LBB0_3:
	movq	_DSI_IRQ_VIDEO_DONE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_5
## %bb.4:
	leaq	4(%rbx), %rdi
	callq	_complete
LBB0_5:
	movq	_DSI_IRQ_CMD_DMA_DONE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_complete
LBB0_7:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_REG_DSI_INTR_CTRL,4,2          ## @REG_DSI_INTR_CTRL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"isr=0x%x, id=%d"

	.comm	_DSI_IRQ_ERROR,4,2              ## @DSI_IRQ_ERROR
	.comm	_DSI_IRQ_VIDEO_DONE,4,2         ## @DSI_IRQ_VIDEO_DONE
	.comm	_DSI_IRQ_CMD_DMA_DONE,4,2       ## @DSI_IRQ_CMD_DMA_DONE
	.no_dead_strip	_dsi_host_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsi_host_irq
_dsi_host_irq:                          ; @dsi_host_irq
	.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
	ldr	w8, [x1, #16]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x19, x1
	add	x21, x1, #12
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x22, _REG_DSI_INTR_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_DSI_INTR_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_dsi_read
	mov	x20, x0
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_dsi_write
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w2, [x19, #8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DBG
Lloh4:
	adrp	x8, _DSI_IRQ_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DSI_IRQ_ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_dsi_error
LBB0_3:
Lloh7:
	adrp	x8, _DSI_IRQ_VIDEO_DONE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DSI_IRQ_VIDEO_DONE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
	add	x0, x19, #4
	bl	_complete
LBB0_5:
Lloh10:
	adrp	x8, _DSI_IRQ_CMD_DMA_DONE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DSI_IRQ_CMD_DMA_DONE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_complete
LBB0_7:
Lloh13:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_REG_DSI_INTR_CTRL,4,2          ; @REG_DSI_INTR_CTRL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"isr=0x%x, id=%d"

	.comm	_DSI_IRQ_ERROR,4,2              ; @DSI_IRQ_ERROR
	.comm	_DSI_IRQ_VIDEO_DONE,4,2         ; @DSI_IRQ_VIDEO_DONE
	.comm	_DSI_IRQ_CMD_DMA_DONE,4,2       ; @DSI_IRQ_CMD_DMA_DONE
	.no_dead_strip	_dsi_host_irq
.subsections_via_symbols
