	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function awg_setup_dma
_awg_setup_dma:                         ## @awg_setup_dma
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	callq	_device_get_softc
	movq	%rax, %r13
	movl	%ebx, %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	_TX_DESC_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	92(%r13), %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_2
## %bb.1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_2:
	movl	92(%r13), %edi
	leaq	80(%r13), %r12
	movq	_BUS_DMA_COHERENT@GOTPCREL(%rip), %rax
	movq	_BUS_DMA_WAITOK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_BUS_DMA_ZERO@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	leaq	88(%r13), %rcx
	movq	%r12, %rsi
	callq	_bus_dmamem_alloc
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movl	%ebx, %edi
LBB0_5:
	callq	_device_printf
LBB0_6:
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	92(%r13), %edi
	movl	88(%r13), %esi
	movq	80(%r13), %rdx
	movl	(%r14), %ecx
	movq	_awg_dmamap_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r13, %rbx
	addq	$48, %r13
	movl	$0, (%rsp)
	movq	%r13, %r9
	callq	_bus_dmamap_load
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
LBB0_9:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	jmp	LBB0_5
LBB0_10:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_TX_DESC_COUNT@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %r14
	movl	%ebx, %edi
	callq	_TX_NEXT
	movl	%eax, %edi
	callq	_DESC_OFF
	addq	%rax, %r14
	movq	%r14, %rdi
	callq	_htole32
	movq	(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_13:
	movq	%r15, %r14
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edi
	callq	_bus_get_dma_tag
	movq	_BUS_SPACE_MAXADDR_32BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	_MCLBYTES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_TX_MAX_SEGS@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	64(%rbx), %rdi
	movq	%rdi, 56(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rsp)
	movl	%edx, 24(%rsp)
	movl	%esi, 16(%rsp)
	movl	%edx, 8(%rsp)
	movl	$0, 32(%rsp)
	movq	$0, (%rsp)
	movl	%eax, %edi
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_bus_dma_tag_create
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	movl	%r12d, %edi
	jmp	LBB0_5
LBB0_15:
	movq	$0, 72(%rbx)
	movq	%r14, %rax
	cmpl	$0, (%r14)
	jle	LBB0_19
## %bb.16:
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	64(%rax), %edi
	movq	56(%rax), %rdx
	addq	%r12, %rdx
	xorl	%esi, %esi
	callq	_bus_dmamap_create
	testl	%eax, %eax
	jne	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	incq	%r13
	movq	%r14, %rax
	movslq	(%r14), %rax
	addq	$4, %r12
	cmpq	%rax, %r13
	jl	LBB0_17
LBB0_19:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %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	_RX_DESC_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	12(%rbx), %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_22
## %bb.20:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_30
LBB0_21:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_9
LBB0_22:
	movl	12(%rbx), %edi
	movq	_BUS_DMA_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BUS_DMA_COHERENT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	leaq	32(%rbx), %rsi
	movq	_BUS_DMA_ZERO@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	leaq	8(%rbx), %rcx
	callq	_bus_dmamem_alloc
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:
	movl	%eax, %r15d
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_30
LBB0_24:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	movq	32(%rbx), %rdx
	movl	(%r12), %ecx
	movq	_awg_dmamap_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$0, (%rsp)
	movq	%rbx, %r9
	callq	_bus_dmamap_load
	testl	%eax, %eax
	je	LBB0_26
## %bb.25:
	movl	%eax, %r15d
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_30
LBB0_26:
	movl	%r13d, %edi
	callq	_bus_get_dma_tag
	movq	_BUS_SPACE_MAXADDR_32BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	_MCLBYTES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	leaq	24(%rbx), %rsi
	movq	%rsi, 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
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_bus_dma_tag_create
	testl	%eax, %eax
	je	LBB0_28
## %bb.27:
	movl	%eax, %r15d
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_30
LBB0_28:
	movl	24(%rbx), %edi
	addq	$40, %rbx
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_bus_dmamap_create
	testl	%eax, %eax
	je	LBB0_31
## %bb.29:
	movl	%eax, %r15d
	leaq	L_.str.9(%rip), %rsi
LBB0_30:
	movl	%r13d, %edi
	jmp	LBB0_5
LBB0_31:
	movq	_RX_DESC_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_36
## %bb.32:
	movl	$8, %r13d
	xorl	%r12d, %r12d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rbx
	movl	%r12d, %edi
	callq	_RX_NEXT
	movl	%eax, %edi
	callq	_DESC_OFF
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_htole32
	movq	32(%r14), %rcx
	movq	%rax, (%rcx,%r12,8)
	movl	24(%r14), %edi
	movq	16(%r14), %rdx
	addq	%r13, %rdx
	xorl	%esi, %esi
	callq	_bus_dmamap_create
	testl	%eax, %eax
	jne	LBB0_37
## %bb.34:                              ##   in Loop: Header=BB0_33 Depth=1
	movq	16(%r14), %rax
	movq	$0, -8(%rax,%r13)
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_awg_newbuf_rx
	testl	%eax, %eax
	jne	LBB0_38
## %bb.35:                              ##   in Loop: Header=BB0_33 Depth=1
	incq	%r12
	movq	_RX_DESC_COUNT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$16, %r13
	cmpq	%rax, %r12
	jl	LBB0_33
LBB0_36:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	movq	_BUS_DMASYNC_PREWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_bus_dmamap_sync
	movq	_EMAC_TX_DMA_LIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	48(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_WR4
	movq	_EMAC_RX_DMA_LIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_WR4
	xorl	%r15d, %r15d
	jmp	LBB0_6
LBB0_37:
	movl	%eax, %r15d
	leaq	L_.str.10(%rip), %rsi
	jmp	LBB0_9
LBB0_38:
	movl	%eax, %r15d
	leaq	L_.str.11(%rip), %rsi
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.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	_TX_DESC_SIZE,4,2               ## @TX_DESC_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot create TX descriptor ring tag\n"

	.comm	_BUS_DMA_COHERENT,4,2           ## @BUS_DMA_COHERENT
	.comm	_BUS_DMA_WAITOK,4,2             ## @BUS_DMA_WAITOK
	.comm	_BUS_DMA_ZERO,4,2               ## @BUS_DMA_ZERO
L_.str.1:                               ## @.str.1
	.asciz	"cannot allocate TX descriptor ring\n"

	.comm	_awg_dmamap_cb,4,2              ## @awg_dmamap_cb
L_.str.2:                               ## @.str.2
	.asciz	"cannot load TX descriptor ring\n"

	.comm	_TX_DESC_COUNT,4,2              ## @TX_DESC_COUNT
	.comm	_MCLBYTES,4,2                   ## @MCLBYTES
	.comm	_TX_MAX_SEGS,4,2                ## @TX_MAX_SEGS
L_.str.3:                               ## @.str.3
	.asciz	"cannot create TX buffer tag\n"

L_.str.4:                               ## @.str.4
	.asciz	"cannot create TX buffer map\n"

	.comm	_RX_DESC_SIZE,4,2               ## @RX_DESC_SIZE
L_.str.5:                               ## @.str.5
	.asciz	"cannot create RX descriptor ring tag\n"

L_.str.6:                               ## @.str.6
	.asciz	"cannot allocate RX descriptor ring\n"

L_.str.7:                               ## @.str.7
	.asciz	"cannot load RX descriptor ring\n"

L_.str.8:                               ## @.str.8
	.asciz	"cannot create RX buffer tag\n"

L_.str.9:                               ## @.str.9
	.asciz	"cannot create RX buffer spare map\n"

	.comm	_RX_DESC_COUNT,4,2              ## @RX_DESC_COUNT
L_.str.10:                              ## @.str.10
	.asciz	"cannot create RX buffer map\n"

L_.str.11:                              ## @.str.11
	.asciz	"cannot create RX buffer\n"

	.comm	_BUS_DMASYNC_PREWRITE,4,2       ## @BUS_DMASYNC_PREWRITE
	.comm	_EMAC_TX_DMA_LIST,4,2           ## @EMAC_TX_DMA_LIST
	.comm	_EMAC_RX_DMA_LIST,4,2           ## @EMAC_RX_DMA_LIST
	.no_dead_strip	_awg_setup_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function awg_setup_dma
_awg_setup_dma:                         ; @awg_setup_dma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x0, x19
	bl	_bus_get_dma_tag
Lloh0:
	adrp	x26, _DESC_ALIGN@GOTPAGE
Lloh1:
	ldr	x26, [x26, _DESC_ALIGN@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh2:
	adrp	x24, _BUS_SPACE_MAXADDR_32BIT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _BUS_SPACE_MAXADDR_32BIT@GOTPAGEOFF]
Lloh4:
	adrp	x25, _BUS_SPACE_MAXADDR@GOTPAGE
Lloh5:
	ldr	x25, [x25, _BUS_SPACE_MAXADDR@GOTPAGEOFF]
	ldr	w3, [x24]
	ldr	w4, [x25]
Lloh6:
	adrp	x23, _TX_DESC_SIZE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _TX_DESC_SIZE@GOTPAGEOFF]
	ldr	w7, [x23]
	add	x8, x20, #92
	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_2
; %bb.1:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_26
LBB0_2:
	ldr	w0, [x20, #92]
	add	x22, x20, #80
Lloh10:
	adrp	x8, _BUS_DMA_COHERENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BUS_DMA_COHERENT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _BUS_DMA_WAITOK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BUS_DMA_WAITOK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh16:
	adrp	x9, _BUS_DMA_ZERO@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BUS_DMA_ZERO@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w2, w8, w9
	add	x3, x20, #88
	mov	x1, x22
	bl	_bus_dmamem_alloc
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_26
LBB0_4:
	ldp	w1, w0, [x20, #88]
	ldr	x2, [x20, #80]
	ldr	w3, [x23]
Lloh21:
	adrp	x8, _awg_dmamap_cb@GOTPAGE
Lloh22:
	ldr	x8, [x8, _awg_dmamap_cb@GOTPAGEOFF]
Lloh23:
	ldr	w4, [x8]
	add	x23, x20, #48
	mov	x5, x23
	mov	w6, #0
	bl	_bus_dmamap_load
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_26
LBB0_6:
Lloh26:
	adrp	x28, _TX_DESC_COUNT@GOTPAGE
Lloh27:
	ldr	x28, [x28, _TX_DESC_COUNT@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x21, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x23]
	mov	x0, x21
	bl	_TX_NEXT
	bl	_DESC_OFF
	add	x0, x0, x27
	bl	_htole32
	ldr	x8, [x22]
	str	x0, [x8, x21, lsl #3]
	add	x21, x21, #1
	ldrsw	x8, [x28]
	cmp	x21, x8
	b.lt	LBB0_8
LBB0_9:
	mov	x0, x19
	bl	_bus_get_dma_tag
	ldr	w3, [x24]
Lloh28:
	adrp	x27, _MCLBYTES@GOTPAGE
Lloh29:
	ldr	x27, [x27, _MCLBYTES@GOTPAGEOFF]
	ldr	w4, [x25]
	ldr	w7, [x27]
Lloh30:
	adrp	x8, _TX_MAX_SEGS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _TX_MAX_SEGS@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	add	x9, x20, #64
	stp	xzr, xzr, [sp, #16]
	str	x9, [sp, #32]
	stp	w7, wzr, [sp, #4]
	str	w8, [sp]
	mov	w1, #1
	mov	w2, #0
	mov	x5, #0
	mov	x6, #0
	bl	_bus_dma_tag_create
	cbz	w0, LBB0_11
; %bb.10:
	mov	x21, x0
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_26
LBB0_11:
	str	xzr, [x20, #72]
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.12:
	mov	x23, #0
	mov	x22, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #64]
	ldr	x8, [x20, #56]
	add	x2, x8, x23
	mov	w1, #0
	bl	_bus_dmamap_create
	cbnz	w0, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x28]
	add	x23, x23, #4
	cmp	x22, x8
	b.lt	LBB0_13
LBB0_15:
	mov	x0, x19
	bl	_bus_get_dma_tag
	ldr	w1, [x26]
	ldr	w3, [x24]
	ldr	w4, [x25]
Lloh35:
	adrp	x23, _RX_DESC_SIZE@GOTPAGE
Lloh36:
	ldr	x23, [x23, _RX_DESC_SIZE@GOTPAGEOFF]
	ldr	w7, [x23]
	add	x8, x20, #12
	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_18
; %bb.16:
	mov	x21, x0
Lloh37:
	adrp	x1, l_.str.5@PAGE
Lloh38:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_26
LBB0_17:
	mov	x21, x0
Lloh39:
	adrp	x1, l_.str.4@PAGE
Lloh40:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_26
LBB0_18:
	ldr	w0, [x20, #12]
	add	x1, x20, #32
Lloh41:
	adrp	x8, _BUS_DMA_COHERENT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _BUS_DMA_COHERENT@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	adrp	x9, _BUS_DMA_WAITOK@GOTPAGE
Lloh45:
	ldr	x9, [x9, _BUS_DMA_WAITOK@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh47:
	adrp	x9, _BUS_DMA_ZERO@GOTPAGE
Lloh48:
	ldr	x9, [x9, _BUS_DMA_ZERO@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	orr	w2, w8, w9
	add	x3, x20, #8
	bl	_bus_dmamem_alloc
	cbz	w0, LBB0_20
; %bb.19:
	mov	x21, x0
Lloh50:
	adrp	x1, l_.str.6@PAGE
Lloh51:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_26
LBB0_20:
	ldp	w1, w0, [x20, #8]
	ldr	x2, [x20, #32]
	ldr	w3, [x23]
Lloh52:
	adrp	x8, _awg_dmamap_cb@GOTPAGE
Lloh53:
	ldr	x8, [x8, _awg_dmamap_cb@GOTPAGEOFF]
Lloh54:
	ldr	w4, [x8]
	mov	x5, x20
	mov	w6, #0
	bl	_bus_dmamap_load
	cbz	w0, LBB0_22
; %bb.21:
	mov	x21, x0
Lloh55:
	adrp	x1, l_.str.7@PAGE
Lloh56:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_26
LBB0_22:
	mov	x0, x19
	bl	_bus_get_dma_tag
	ldr	w3, [x24]
	ldr	w4, [x25]
	add	x8, x20, #24
	ldr	w7, [x27]
	stp	xzr, xzr, [sp, #16]
	str	x8, [sp, #32]
	stp	w7, wzr, [sp, #4]
	mov	w8, #1
	str	w8, [sp]
	mov	w1, #1
	mov	w2, #0
	mov	x5, #0
	mov	x6, #0
	bl	_bus_dma_tag_create
	cbz	w0, LBB0_24
; %bb.23:
	mov	x21, x0
Lloh57:
	adrp	x1, l_.str.8@PAGE
Lloh58:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_26
LBB0_24:
	ldr	w0, [x20, #24]
	add	x2, x20, #40
	mov	w1, #0
	bl	_bus_dmamap_create
	cbz	w0, LBB0_28
; %bb.25:
	mov	x21, x0
Lloh59:
	adrp	x1, l_.str.9@PAGE
Lloh60:
	add	x1, x1, l_.str.9@PAGEOFF
LBB0_26:
	mov	x0, x19
	bl	_device_printf
LBB0_27:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_28:
Lloh61:
	adrp	x23, _RX_DESC_COUNT@GOTPAGE
Lloh62:
	ldr	x23, [x23, _RX_DESC_COUNT@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_33
; %bb.29:
	mov	x24, #0
	mov	x22, #0
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x20]
	mov	x0, x22
	bl	_RX_NEXT
	bl	_DESC_OFF
	add	x0, x0, x21
	bl	_htole32
	ldr	x8, [x20, #32]
	str	x0, [x8, x22, lsl #3]
	ldr	w0, [x20, #24]
	ldr	x8, [x20, #16]
	add	x8, x8, x24
	add	x2, x8, #8
	mov	w1, #0
	bl	_bus_dmamap_create
	cbnz	w0, LBB0_34
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	ldr	x8, [x20, #16]
	str	xzr, [x8, x24]
	mov	x0, x20
	mov	x1, x22
	bl	_awg_newbuf_rx
	cbnz	w0, LBB0_35
; %bb.32:                               ;   in Loop: Header=BB0_30 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x23]
	add	x24, x24, #16
	cmp	x22, x8
	b.lt	LBB0_30
LBB0_33:
	ldp	w1, w0, [x20, #8]
Lloh63:
	adrp	x8, _BUS_DMASYNC_PREWRITE@GOTPAGE
Lloh64:
	ldr	x8, [x8, _BUS_DMASYNC_PREWRITE@GOTPAGEOFF]
Lloh65:
	ldr	w2, [x8]
	bl	_bus_dmamap_sync
Lloh66:
	adrp	x8, _EMAC_TX_DMA_LIST@GOTPAGE
Lloh67:
	ldr	x8, [x8, _EMAC_TX_DMA_LIST@GOTPAGEOFF]
Lloh68:
	ldr	w1, [x8]
	ldr	x2, [x20, #48]
	mov	x0, x20
	bl	_WR4
Lloh69:
	adrp	x8, _EMAC_RX_DMA_LIST@GOTPAGE
Lloh70:
	ldr	x8, [x8, _EMAC_RX_DMA_LIST@GOTPAGEOFF]
Lloh71:
	ldr	w1, [x8]
	ldr	x2, [x20]
	mov	x0, x20
	bl	_WR4
	mov	w21, #0
	b	LBB0_27
LBB0_34:
	mov	x21, x0
Lloh72:
	adrp	x1, l_.str.10@PAGE
Lloh73:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_26
LBB0_35:
	mov	x21, x0
Lloh74:
	adrp	x1, l_.str.11@PAGE
Lloh75:
	add	x1, x1, l_.str.11@PAGEOFF
	b	LBB0_26
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpAdd	Lloh74, Lloh75
	.cfi_endproc
                                        ; -- End function
	.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	_TX_DESC_SIZE,4,2               ; @TX_DESC_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot create TX descriptor ring tag\n"

	.comm	_BUS_DMA_COHERENT,4,2           ; @BUS_DMA_COHERENT
	.comm	_BUS_DMA_WAITOK,4,2             ; @BUS_DMA_WAITOK
	.comm	_BUS_DMA_ZERO,4,2               ; @BUS_DMA_ZERO
l_.str.1:                               ; @.str.1
	.asciz	"cannot allocate TX descriptor ring\n"

	.comm	_awg_dmamap_cb,4,2              ; @awg_dmamap_cb
l_.str.2:                               ; @.str.2
	.asciz	"cannot load TX descriptor ring\n"

	.comm	_TX_DESC_COUNT,4,2              ; @TX_DESC_COUNT
	.comm	_MCLBYTES,4,2                   ; @MCLBYTES
	.comm	_TX_MAX_SEGS,4,2                ; @TX_MAX_SEGS
l_.str.3:                               ; @.str.3
	.asciz	"cannot create TX buffer tag\n"

l_.str.4:                               ; @.str.4
	.asciz	"cannot create TX buffer map\n"

	.comm	_RX_DESC_SIZE,4,2               ; @RX_DESC_SIZE
l_.str.5:                               ; @.str.5
	.asciz	"cannot create RX descriptor ring tag\n"

l_.str.6:                               ; @.str.6
	.asciz	"cannot allocate RX descriptor ring\n"

l_.str.7:                               ; @.str.7
	.asciz	"cannot load RX descriptor ring\n"

l_.str.8:                               ; @.str.8
	.asciz	"cannot create RX buffer tag\n"

l_.str.9:                               ; @.str.9
	.asciz	"cannot create RX buffer spare map\n"

	.comm	_RX_DESC_COUNT,4,2              ; @RX_DESC_COUNT
l_.str.10:                              ; @.str.10
	.asciz	"cannot create RX buffer map\n"

l_.str.11:                              ; @.str.11
	.asciz	"cannot create RX buffer\n"

	.comm	_BUS_DMASYNC_PREWRITE,4,2       ; @BUS_DMASYNC_PREWRITE
	.comm	_EMAC_TX_DMA_LIST,4,2           ; @EMAC_TX_DMA_LIST
	.comm	_EMAC_RX_DMA_LIST,4,2           ; @EMAC_RX_DMA_LIST
	.no_dead_strip	_awg_setup_dma
.subsections_via_symbols
