	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32_dma_chan_irq
_stm32_dma_chan_irq:                    ## @stm32_dma_chan_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	%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	%rsi, %r14
	movq	%rsi, %rdi
	callq	_stm32_dma_get_dev
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_spin_lock
	movq	%r14, %rdi
	callq	_stm32_dma_irq_status
	movl	%eax, %r13d
	movl	4(%r14), %edi
	callq	_STM32_DMA_SCR
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_stm32_dma_read
	movl	%eax, %r15d
	movl	4(%r14), %edi
	callq	_STM32_DMA_SFCR
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_stm32_dma_read
	movl	%eax, %r12d
	movq	_STM32_DMA_TCI@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	testl	%r13d, %esi
	je	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	callq	_stm32_dma_irq_clear
	movq	_STM32_DMA_SCR_TCIE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_stm32_dma_handle_chan_done
LBB0_3:
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, %r13d
LBB0_4:
	movq	_STM32_DMA_HTI@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	testl	%r13d, %esi
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_stm32_dma_irq_clear
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, %r13d
LBB0_6:
	movq	_STM32_DMA_FEI@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	testl	%r13d, %esi
	je	LBB0_11
## %bb.7:
	movq	%r14, %rdi
	callq	_stm32_dma_irq_clear
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, %r13d
	movq	_STM32_DMA_SFCR_FEIE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_11
## %bb.8:
	movq	_STM32_DMA_SCR_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%r15d, %ebx
	movq	%r14, %rdi
	callq	_chan2dev
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
LBB0_11:
	testl	%r13d, %r13d
	je	LBB0_14
LBB0_12:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_stm32_dma_irq_clear
	movq	%r14, %rdi
	callq	_chan2dev
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_STM32_DMA_SCR_EN@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_chan2dev
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
	testl	%r13d, %r13d
	jne	LBB0_12
LBB0_14:
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STM32_DMA_TCI,4,2              ## @STM32_DMA_TCI
	.comm	_STM32_DMA_SCR_TCIE,4,2         ## @STM32_DMA_SCR_TCIE
	.comm	_STM32_DMA_HTI,4,2              ## @STM32_DMA_HTI
	.comm	_STM32_DMA_FEI,4,2              ## @STM32_DMA_FEI
	.comm	_STM32_DMA_SFCR_FEIE,4,2        ## @STM32_DMA_SFCR_FEIE
	.comm	_STM32_DMA_SCR_EN,4,2           ## @STM32_DMA_SCR_EN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FIFO Error\n"

L_.str.1:                               ## @.str.1
	.asciz	"FIFO over/underrun\n"

L_.str.2:                               ## @.str.2
	.asciz	"DMA error: status=0x%08x\n"

L_.str.3:                               ## @.str.3
	.asciz	"chan disabled by HW\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_stm32_dma_chan_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32_dma_chan_irq
_stm32_dma_chan_irq:                    ; @stm32_dma_chan_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x0, x1
	bl	_stm32_dma_get_dev
	mov	x22, x0
	mov	x0, x19
	bl	_spin_lock
	mov	x0, x19
	bl	_stm32_dma_irq_status
	mov	x20, x0
	ldr	w0, [x19, #4]
	bl	_STM32_DMA_SCR
	mov	x1, x0
	mov	x0, x22
	bl	_stm32_dma_read
	mov	x21, x0
	ldr	w0, [x19, #4]
	bl	_STM32_DMA_SFCR
	mov	x1, x0
	mov	x0, x22
	bl	_stm32_dma_read
	mov	x22, x0
Lloh0:
	adrp	x23, _STM32_DMA_TCI@GOTPAGE
Lloh1:
	ldr	x23, [x23, _STM32_DMA_TCI@GOTPAGEOFF]
	ldr	w1, [x23]
	tst	w1, w20
	b.eq	LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_stm32_dma_irq_clear
Lloh2:
	adrp	x8, _STM32_DMA_SCR_TCIE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STM32_DMA_SCR_TCIE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_stm32_dma_handle_chan_done
LBB0_3:
	ldr	w8, [x23]
	bic	w20, w20, w8
LBB0_4:
Lloh5:
	adrp	x23, _STM32_DMA_HTI@GOTPAGE
Lloh6:
	ldr	x23, [x23, _STM32_DMA_HTI@GOTPAGEOFF]
	ldr	w1, [x23]
	tst	w1, w20
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_stm32_dma_irq_clear
	ldr	w8, [x23]
	bic	w20, w20, w8
LBB0_6:
Lloh7:
	adrp	x24, _STM32_DMA_FEI@GOTPAGE
Lloh8:
	ldr	x24, [x24, _STM32_DMA_FEI@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh9:
	adrp	x23, _STM32_DMA_SCR_EN@GOTPAGE
Lloh10:
	ldr	x23, [x23, _STM32_DMA_SCR_EN@GOTPAGEOFF]
	tst	w1, w20
	b.eq	LBB0_10
; %bb.7:
	mov	x0, x19
	bl	_stm32_dma_irq_clear
	ldr	w8, [x24]
	bic	w20, w20, w8
Lloh11:
	adrp	x8, _STM32_DMA_SFCR_FEIE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STM32_DMA_SFCR_FEIE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_10
; %bb.8:
	ldr	w8, [x23]
	and	w22, w8, w21
	mov	x0, x19
	bl	_chan2dev
	cbz	w22, LBB0_13
; %bb.9:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
LBB0_10:
	cbz	w20, LBB0_14
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_stm32_dma_irq_clear
	mov	x0, x19
	bl	_chan2dev
	str	x20, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	ldr	w8, [x23]
	tst	w8, w21
	b.ne	LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_chan2dev
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_14
LBB0_13:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	cbnz	w20, LBB0_11
LBB0_14:
	mov	x0, x19
	bl	_spin_unlock
Lloh22:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_STM32_DMA_TCI,4,2              ; @STM32_DMA_TCI
	.comm	_STM32_DMA_SCR_TCIE,4,2         ; @STM32_DMA_SCR_TCIE
	.comm	_STM32_DMA_HTI,4,2              ; @STM32_DMA_HTI
	.comm	_STM32_DMA_FEI,4,2              ; @STM32_DMA_FEI
	.comm	_STM32_DMA_SFCR_FEIE,4,2        ; @STM32_DMA_SFCR_FEIE
	.comm	_STM32_DMA_SCR_EN,4,2           ; @STM32_DMA_SCR_EN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FIFO Error\n"

l_.str.1:                               ; @.str.1
	.asciz	"FIFO over/underrun\n"

l_.str.2:                               ; @.str.2
	.asciz	"DMA error: status=0x%08x\n"

l_.str.3:                               ; @.str.3
	.asciz	"chan disabled by HW\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_stm32_dma_chan_irq
.subsections_via_symbols
