	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function a31dmac_attach
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_a31dmac_attach:                        ## @a31dmac_attach
	.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
	subq	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %r15
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_ofw_bus_search_compatible
	movq	(%rax), %r12
	movq	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	movq	_a31dmac_spec@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	8(%r15), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	jmp	LBB0_18
LBB0_2:
	leaq	36(%r15), %rbx
	movq	_MTX_SPIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mtx_init
	leaq	-48(%rbp), %rcx
	movl	%r14d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_clk_get_by_ofw_index
	testq	%rax, %rax
	je	LBB0_19
## %bb.3:
	leaq	L_.str.2(%rip), %r12
	jmp	LBB0_4
LBB0_19:
	movq	-48(%rbp), %rdi
	callq	_clk_enable
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.3(%rip), %r12
	jmp	LBB0_4
LBB0_21:
	leaq	-56(%rbp), %rcx
	movl	%r14d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_hwreset_get_by_ofw_idx
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	leaq	L_.str.4(%rip), %r12
	jmp	LBB0_4
LBB0_23:
	movq	-56(%rbp), %rdi
	callq	_hwreset_deassert
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	leaq	L_.str.5(%rip), %r12
	jmp	LBB0_4
LBB0_25:
	movl	%r14d, %edi
	callq	_bus_get_dma_tag
	movq	_DESC_ALIGN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_BUS_SPACE_MAXADDR_32BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	_DESC_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	leaq	32(%r15), %rdi
	movq	%rdi, 56(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rsp)
	movl	%edx, 24(%rsp)
	movl	%edx, 8(%rsp)
	movl	$0, 32(%rsp)
	movl	$1, 16(%rsp)
	movq	$0, (%rsp)
	movl	%eax, %edi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_bus_dma_tag_create
	testl	%eax, %eax
	je	LBB0_27
## %bb.26:
	leaq	L_.str.6(%rip), %r12
LBB0_4:
	movl	%r14d, %edi
	movq	%r12, %rsi
	callq	_device_printf
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	movl	$16, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	movslq	%eax, %rcx
	addq	$48, %rbx
	cmpq	%rcx, %r12
	jae	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rcx
	cmpq	$0, (%rcx,%rbx)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	32(%r15), %edi
	movl	-8(%rcx,%rbx), %esi
	callq	_bus_dmamap_unload
	movl	32(%r15), %edi
	movq	24(%r15), %rax
	movq	(%rax,%rbx), %rsi
	movl	-8(%rax,%rbx), %edx
	callq	_bus_dmamem_free
	movl	(%r15), %eax
	jmp	LBB0_8
LBB0_9:
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	movq	_M_DEVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
LBB0_11:
	movq	16(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_13
## %bb.12:
	movq	8(%r15), %rax
	movl	4(%rax), %esi
	movl	%r14d, %edi
	callq	_bus_teardown_intr
LBB0_13:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_hwreset_release
LBB0_15:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:
	callq	_clk_release
LBB0_17:
	movl	(%r13), %esi
	movq	8(%r15), %rdx
	movl	%r14d, %edi
	callq	_bus_release_resources
LBB0_18:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_37:
	movl	%r12d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_DMA_IRQ_EN_REG0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_DMA_WRITE
	movq	_DMA_IRQ_EN_REG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_DMA_WRITE
	movq	_DMA_IRQ_PEND_REG0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$-1, %edx
	callq	_DMA_WRITE
	movq	_DMA_IRQ_PEND_REG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$-1, %edx
	callq	_DMA_WRITE
	movl	(%r12), %eax
	movl	%eax, (%r15)
	shll	$4, %eax
	leal	(%rax,%rax,2), %edi
	movq	_M_DEVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_malloc
	movq	%rax, 24(%r15)
	cmpl	$0, (%r15)
	je	LBB0_34
## %bb.28:
	movl	$1, %ecx
	xorl	%ebx, %ebx
	movq	_BUS_DMA_WAITOK@GOTPCREL(%rip), %r8
	leaq	L_.str.7(%rip), %r12
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	decq	%rcx
	movq	%r15, 40(%rax,%rbx)
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, (%rax,%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rax,%rbx)
	movl	32(%r15), %edi
	leaq	(%rax,%rbx), %rsi
	addq	$16, %rsi
	movq	_BUS_DMA_COHERENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%r8), %edx
	leaq	(%rax,%rbx), %rcx
	addq	$8, %rcx
	callq	_bus_dmamem_alloc
	testl	%eax, %eax
	jne	LBB0_4
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	32(%r15), %edi
	movq	24(%r15), %rax
	leaq	(%rax,%rbx), %r9
	movl	8(%rax,%rbx), %esi
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rax,%rbx), %rdx
	movq	_a31dmac_dmamap_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_BUS_DMA_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movl	$4, %ecx
	callq	_bus_dmamap_load
	testl	%eax, %eax
	jne	LBB0_31
## %bb.32:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_DMA_EN_REG
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_DMA_WRITE
	movslq	(%r15), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rax, %rcx
	jae	LBB0_34
## %bb.33:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	24(%r15), %rax
	incq	%rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	addq	$48, %rbx
	movq	_BUS_DMA_WAITOK@GOTPCREL(%rip), %r8
	jmp	LBB0_29
LBB0_34:
	movq	8(%r15), %rax
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rcx
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	4(%rax), %esi
	movq	_a31dmac_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rax
	addq	$16, %rax
	movq	%rax, (%rsp)
	xorl	%r12d, %r12d
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	movq	%r15, %r9
	callq	_bus_setup_intr
	testl	%eax, %eax
	je	LBB0_36
## %bb.35:
	leaq	L_.str.9(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	movl	(%r13), %esi
	movq	8(%r15), %rdx
	movl	%r14d, %edi
	callq	_bus_release_resources
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mtx_destroy
	jmp	LBB0_18
LBB0_31:
	leaq	L_.str.8(%rip), %r12
	jmp	LBB0_4
LBB0_36:
	movl	%r14d, %edi
	callq	_ofw_bus_get_node
	movl	%eax, %edi
	callq	_OF_xref_from_node
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_OF_device_register_xref
	jmp	LBB0_37
	.cfi_endproc
                                        ## -- End function
	.comm	_compat_data,4,2                ## @compat_data
	.comm	_a31dmac_spec,4,2               ## @a31dmac_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot allocate resources for device\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"a31 dmac"

	.comm	_MTX_SPIN,4,2                   ## @MTX_SPIN
L_.str.2:                               ## @.str.2
	.asciz	"cannot get clock\n"

L_.str.3:                               ## @.str.3
	.asciz	"cannot enable clock\n"

L_.str.4:                               ## @.str.4
	.asciz	"cannot get hwreset\n"

L_.str.5:                               ## @.str.5
	.asciz	"cannot de-assert reset\n"

	.comm	_DESC_ALIGN,4,2                 ## @DESC_ALIGN
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ## @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ## @BUS_SPACE_MAXADDR
	.comm	_DESC_SIZE,4,2                  ## @DESC_SIZE
L_.str.6:                               ## @.str.6
	.asciz	"cannot create dma tag\n"

	.comm	_DMA_IRQ_EN_REG0,4,2            ## @DMA_IRQ_EN_REG0
	.comm	_DMA_IRQ_EN_REG1,4,2            ## @DMA_IRQ_EN_REG1
	.comm	_DMA_IRQ_PEND_REG0,4,2          ## @DMA_IRQ_PEND_REG0
	.comm	_DMA_IRQ_PEND_REG1,4,2          ## @DMA_IRQ_PEND_REG1
	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_BUS_DMA_WAITOK,4,2             ## @BUS_DMA_WAITOK
	.comm	_BUS_DMA_COHERENT,4,2           ## @BUS_DMA_COHERENT
L_.str.7:                               ## @.str.7
	.asciz	"cannot allocate dma mem\n"

	.comm	_a31dmac_dmamap_cb,4,2          ## @a31dmac_dmamap_cb
L_.str.8:                               ## @.str.8
	.asciz	"cannot load dma map\n"

	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_a31dmac_intr,4,2               ## @a31dmac_intr
L_.str.9:                               ## @.str.9
	.asciz	"could not setup interrupt handler\n"

	.no_dead_strip	_a31dmac_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a31dmac_attach
_a31dmac_attach:                        ; @a31dmac_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
Lloh0:
	adrp	x8, _compat_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	x22, [x0]
	stp	xzr, xzr, [sp, #48]
Lloh3:
	adrp	x24, _a31dmac_spec@GOTPAGE
Lloh4:
	ldr	x24, [x24, _a31dmac_spec@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	x2, [x20, #8]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	b	LBB0_26
LBB0_2:
	add	x21, x20, #36
Lloh7:
	adrp	x8, _MTX_SPIN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MTX_SPIN@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_mtx_init
	add	x3, sp, #48
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_clk_get_by_ofw_index
	cbz	x0, LBB0_4
; %bb.3:
Lloh12:
	adrp	x22, l_.str.2@PAGE
Lloh13:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_4:
	ldr	x0, [sp, #48]
	bl	_clk_enable
	cbz	x0, LBB0_6
; %bb.5:
Lloh14:
	adrp	x22, l_.str.3@PAGE
Lloh15:
	add	x22, x22, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_6:
	add	x3, sp, #56
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_hwreset_get_by_ofw_idx
	cbz	x0, LBB0_8
; %bb.7:
Lloh16:
	adrp	x22, l_.str.4@PAGE
Lloh17:
	add	x22, x22, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_8:
	ldr	x0, [sp, #56]
	bl	_hwreset_deassert
	cbz	x0, LBB0_10
; %bb.9:
Lloh18:
	adrp	x22, l_.str.5@PAGE
Lloh19:
	add	x22, x22, l_.str.5@PAGEOFF
	b	LBB0_12
LBB0_10:
	mov	x0, x19
	bl	_bus_get_dma_tag
Lloh20:
	adrp	x8, _DESC_ALIGN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DESC_ALIGN@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _BUS_SPACE_MAXADDR_32BIT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BUS_SPACE_MAXADDR_32BIT@GOTPAGEOFF]
Lloh25:
	adrp	x9, _BUS_SPACE_MAXADDR@GOTPAGE
Lloh26:
	ldr	x9, [x9, _BUS_SPACE_MAXADDR@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
Lloh28:
	ldr	w4, [x9]
Lloh29:
	adrp	x8, _DESC_SIZE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _DESC_SIZE@GOTPAGEOFF]
Lloh31:
	ldr	w7, [x8]
	add	x8, x20, #32
	stp	xzr, xzr, [sp, #16]
	str	x8, [sp, #32]
	stp	w7, wzr, [sp, #4]
	mov	w8, #1
	str	w8, [sp]
	mov	w2, #0
	mov	x5, #0
	mov	x6, #0
	bl	_bus_dma_tag_create
	cbz	w0, LBB0_28
; %bb.11:
Lloh32:
	adrp	x22, l_.str.6@PAGE
Lloh33:
	add	x22, x22, l_.str.6@PAGEOFF
LBB0_12:
	mov	x0, x19
	mov	x1, x22
	bl	_device_printf
	ldr	w8, [x20]
	cbz	w8, LBB0_17
; %bb.13:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x22, x22, #1
	add	x21, x21, #48
	cmp	x22, w8, sxtw
	b.hs	LBB0_17
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #24]
	add	x9, x9, x21
	ldr	x10, [x9, #16]
	cbz	x10, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w0, [x20, #32]
	ldr	w1, [x9, #8]
	bl	_bus_dmamap_unload
	ldr	w0, [x20, #32]
	ldr	x8, [x20, #24]
	add	x8, x8, x21
	ldr	x1, [x8, #16]
	ldr	w2, [x8, #8]
	bl	_bus_dmamem_free
	ldr	w8, [x20]
	b	LBB0_14
LBB0_17:
	ldr	x0, [x20, #24]
	cbz	x0, LBB0_19
; %bb.18:
Lloh34:
	adrp	x8, _M_DEVBUF@GOTPAGE
Lloh35:
	ldr	x8, [x8, _M_DEVBUF@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	bl	_free
LBB0_19:
	ldr	x2, [x20, #16]
	cbz	x2, LBB0_21
; %bb.20:
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_bus_teardown_intr
LBB0_21:
	ldr	x0, [sp, #56]
	cbz	x0, LBB0_23
; %bb.22:
	bl	_hwreset_release
LBB0_23:
	ldr	x0, [sp, #48]
	cbz	x0, LBB0_25
; %bb.24:
	bl	_clk_release
LBB0_25:
	ldr	w1, [x24]
	ldr	x2, [x20, #8]
	mov	x0, x19
	bl	_bus_release_resources
LBB0_26:
Lloh37:
	adrp	x8, _ENXIO@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
LBB0_27:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_28:
Lloh40:
	adrp	x8, _DMA_IRQ_EN_REG0@GOTPAGE
Lloh41:
	ldr	x8, [x8, _DMA_IRQ_EN_REG0@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_DMA_WRITE
Lloh43:
	adrp	x8, _DMA_IRQ_EN_REG1@GOTPAGE
Lloh44:
	ldr	x8, [x8, _DMA_IRQ_EN_REG1@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_DMA_WRITE
Lloh46:
	adrp	x8, _DMA_IRQ_PEND_REG0@GOTPAGE
Lloh47:
	ldr	x8, [x8, _DMA_IRQ_PEND_REG0@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #-1
	bl	_DMA_WRITE
Lloh49:
	adrp	x8, _DMA_IRQ_PEND_REG1@GOTPAGE
Lloh50:
	ldr	x8, [x8, _DMA_IRQ_PEND_REG1@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #-1
	bl	_DMA_WRITE
	ldr	w8, [x22]
	str	w8, [x20]
	add	w8, w8, w8, lsl #1
	lsl	w0, w8, #4
Lloh52:
	adrp	x8, _M_DEVBUF@GOTPAGE
Lloh53:
	ldr	x8, [x8, _M_DEVBUF@GOTPAGEOFF]
Lloh54:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh55:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
Lloh57:
	ldr	w8, [x9]
Lloh58:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh59:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh60:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_malloc
	str	x0, [x20, #24]
	ldr	w8, [x20]
	cbz	w8, LBB0_34
; %bb.29:
	mov	x25, #0
	mov	w26, #1
Lloh61:
	adrp	x27, _BUS_DMA_WAITOK@GOTPAGE
Lloh62:
	ldr	x27, [x27, _BUS_DMA_WAITOK@GOTPAGEOFF]
Lloh63:
	adrp	x28, _BUS_DMA_COHERENT@GOTPAGE
Lloh64:
	ldr	x28, [x28, _BUS_DMA_COHERENT@GOTPAGEOFF]
Lloh65:
	adrp	x22, l_.str.7@PAGE
Lloh66:
	add	x22, x22, l_.str.7@PAGEOFF
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	sub	x23, x26, #1
	add	x8, x0, x25
	stp	xzr, x20, [x8, #32]
	str	x23, [x8]
	str	xzr, [x8, #24]
	ldr	w0, [x20, #32]
	add	x1, x8, #16
	ldr	w9, [x27]
	ldr	w10, [x28]
	orr	w2, w10, w9
	add	x3, x8, #8
	bl	_bus_dmamem_alloc
	cbnz	w0, LBB0_12
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	ldr	w0, [x20, #32]
	ldr	x8, [x20, #24]
	add	x5, x8, x25
	ldr	w1, [x5, #8]
	ldr	x2, [x5, #16]
Lloh67:
	adrp	x8, _a31dmac_dmamap_cb@GOTPAGE
Lloh68:
	ldr	x8, [x8, _a31dmac_dmamap_cb@GOTPAGEOFF]
Lloh69:
	ldr	w4, [x8]
	ldr	w6, [x27]
	mov	w3, #4
	bl	_bus_dmamap_load
	cbnz	w0, LBB0_36
; %bb.32:                               ;   in Loop: Header=BB0_30 Depth=1
	mov	x0, x23
	bl	_DMA_EN_REG
	mov	x1, x0
	mov	x0, x20
	mov	w2, #0
	bl	_DMA_WRITE
	ldrsw	x8, [x20]
	cmp	x26, x8
	b.hs	LBB0_34
; %bb.33:                               ;   in Loop: Header=BB0_30 Depth=1
	ldr	x0, [x20, #24]
	add	x26, x26, #1
	add	x25, x25, #48
	b	LBB0_30
LBB0_34:
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #4]
Lloh70:
	adrp	x8, _INTR_MPSAFE@GOTPAGE
Lloh71:
	ldr	x8, [x8, _INTR_MPSAFE@GOTPAGEOFF]
Lloh72:
	ldr	w8, [x8]
Lloh73:
	adrp	x9, _INTR_TYPE_MISC@GOTPAGE
Lloh74:
	ldr	x9, [x9, _INTR_TYPE_MISC@GOTPAGEOFF]
Lloh75:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh76:
	adrp	x8, _a31dmac_intr@GOTPAGE
Lloh77:
	ldr	x8, [x8, _a31dmac_intr@GOTPAGEOFF]
Lloh78:
	ldr	w4, [x8]
	add	x6, x20, #16
	mov	x0, x19
	mov	x3, #0
	mov	x5, x20
	bl	_bus_setup_intr
	cbz	w0, LBB0_37
; %bb.35:
Lloh79:
	adrp	x1, l_.str.9@PAGE
Lloh80:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	ldr	w1, [x24]
	ldr	x2, [x20, #8]
	mov	x0, x19
	bl	_bus_release_resources
	mov	x0, x21
	bl	_mtx_destroy
	b	LBB0_26
LBB0_36:
Lloh81:
	adrp	x22, l_.str.8@PAGE
Lloh82:
	add	x22, x22, l_.str.8@PAGEOFF
	b	LBB0_12
LBB0_37:
	mov	x0, x19
	bl	_ofw_bus_get_node
	bl	_OF_xref_from_node
	mov	x1, x19
	bl	_OF_device_register_xref
	mov	w0, #0
	b	LBB0_27
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh56
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpAdd	Lloh79, Lloh80
	.loh AdrpAdd	Lloh81, Lloh82
	.cfi_endproc
                                        ; -- End function
	.comm	_compat_data,4,2                ; @compat_data
	.comm	_a31dmac_spec,4,2               ; @a31dmac_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot allocate resources for device\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"a31 dmac"

	.comm	_MTX_SPIN,4,2                   ; @MTX_SPIN
l_.str.2:                               ; @.str.2
	.asciz	"cannot get clock\n"

l_.str.3:                               ; @.str.3
	.asciz	"cannot enable clock\n"

l_.str.4:                               ; @.str.4
	.asciz	"cannot get hwreset\n"

l_.str.5:                               ; @.str.5
	.asciz	"cannot de-assert reset\n"

	.comm	_DESC_ALIGN,4,2                 ; @DESC_ALIGN
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ; @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ; @BUS_SPACE_MAXADDR
	.comm	_DESC_SIZE,4,2                  ; @DESC_SIZE
l_.str.6:                               ; @.str.6
	.asciz	"cannot create dma tag\n"

	.comm	_DMA_IRQ_EN_REG0,4,2            ; @DMA_IRQ_EN_REG0
	.comm	_DMA_IRQ_EN_REG1,4,2            ; @DMA_IRQ_EN_REG1
	.comm	_DMA_IRQ_PEND_REG0,4,2          ; @DMA_IRQ_PEND_REG0
	.comm	_DMA_IRQ_PEND_REG1,4,2          ; @DMA_IRQ_PEND_REG1
	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_BUS_DMA_WAITOK,4,2             ; @BUS_DMA_WAITOK
	.comm	_BUS_DMA_COHERENT,4,2           ; @BUS_DMA_COHERENT
l_.str.7:                               ; @.str.7
	.asciz	"cannot allocate dma mem\n"

	.comm	_a31dmac_dmamap_cb,4,2          ; @a31dmac_dmamap_cb
l_.str.8:                               ; @.str.8
	.asciz	"cannot load dma map\n"

	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_a31dmac_intr,4,2               ; @a31dmac_intr
l_.str.9:                               ; @.str.9
	.asciz	"could not setup interrupt handler\n"

	.no_dead_strip	_a31dmac_attach
.subsections_via_symbols
