	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function temac_dma_bd_init
_temac_dma_bd_init:                     ## @temac_dma_bd_init
	.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	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	_RX_BD_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_devm_kcalloc
	movq	%rax, 64(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movl	(%r14), %edi
	movq	_TX_BD_NUM@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	shll	$3, %esi
	movl	(%rbx), %ecx
	movq	%r15, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, 72(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movl	(%r14), %edi
	movq	_RX_BD_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$5, %esi
	movq	%r15, %rdx
	addq	$4, %rdx
	movl	(%rbx), %ecx
	callq	_dma_alloc_coherent
	movq	%rax, 56(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movl	(%r12), %ecx
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%rbx), %r13
	movl	%r13d, %eax
	cltd
	idivl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	leal	(,%rdx,8), %edi
	addl	(%r15), %edi
	callq	_cpu_to_be32
	movq	72(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movslq	(%r12), %rcx
	movq	%r13, %rbx
	cmpq	%rcx, %r13
	jl	LBB0_5
LBB0_6:
	movq	_RX_BD_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.7:
	xorl	%ebx, %ebx
	movq	_XTE_MAX_JUMBO_FRAME_SIZE@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	incq	%r13
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%edx, %edi
	shll	$5, %edi
	addl	4(%r15), %edi
	callq	_cpu_to_be32
	movq	56(%r15), %rcx
	movq	%rax, 24(%rcx,%rbx,4)
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_netdev_alloc_skb_ip_align
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	64(%r15), %rcx
	movq	%rax, (%rcx,%rbx)
	movl	(%r14), %edi
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	56(%r15), %rcx
	movq	%rax, 16(%rcx,%rbx,4)
	movl	(%r12), %edi
	callq	_cpu_to_be32
	movq	56(%r15), %rcx
	movq	%rax, 8(%rcx,%rbx,4)
	movq	_STS_CTRL_APP0_IRQONEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be32
	movq	56(%r15), %rcx
	movq	%rax, (%rcx,%rbx,4)
	movq	_RX_BD_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	addq	$8, %rbx
	cmpq	%rcx, %r13
	jl	LBB0_8
LBB0_10:
	movq	_TX_CHNL_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r15), %edx
	movq	_CHNL_CTRL_IRQ_EN@GOTPCREL(%rip), %r13
	movq	_CHNL_CTRL_IRQ_ERR_EN@GOTPCREL(%rip), %r12
	movq	_CHNL_CTRL_IRQ_DLY_EN@GOTPCREL(%rip), %r14
	orl	(%r13), %edx
	orl	(%r12), %edx
	orl	(%r14), %edx
	movq	_CHNL_CTRL_IRQ_COAL_EN@GOTPCREL(%rip), %rbx
	orl	(%rbx), %edx
	orl	$1024, %edx                     ## imm = 0x400
	movq	%r15, %rdi
	callq	*16(%r15)
	movq	_RX_CHNL_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CHNL_CTRL_IRQ_IOE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	12(%r15), %edx
	orl	(%r13), %edx
	orl	(%r12), %edx
	orl	(%r14), %edx
	orl	(%rbx), %edx
	movq	%r15, %rdi
	callq	*16(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r15)
	movups	%xmm0, 40(%r15)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wmb
	movq	_RX_CURDESC_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15), %edx
	movq	%r15, %rdi
	callq	*16(%r15)
	movq	_RX_TAILDESC_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15), %eax
	movq	_RX_BD_NUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$5, %ecx
	leal	(%rax,%rcx), %edx
	addl	$-32, %edx
	movq	%r15, %rdi
	callq	*16(%r15)
	movq	_TX_CURDESC_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r15, %rdi
	callq	*16(%r15)
	jmp	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	callq	_temac_dma_bd_release
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_BD_NUM,4,2                  ## @RX_BD_NUM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_TX_BD_NUM,4,2                  ## @TX_BD_NUM
	.comm	_XTE_MAX_JUMBO_FRAME_SIZE,4,2   ## @XTE_MAX_JUMBO_FRAME_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_STS_CTRL_APP0_IRQONEND,4,2     ## @STS_CTRL_APP0_IRQONEND
	.comm	_TX_CHNL_CTRL,4,2               ## @TX_CHNL_CTRL
	.comm	_CHNL_CTRL_IRQ_EN,4,2           ## @CHNL_CTRL_IRQ_EN
	.comm	_CHNL_CTRL_IRQ_ERR_EN,4,2       ## @CHNL_CTRL_IRQ_ERR_EN
	.comm	_CHNL_CTRL_IRQ_DLY_EN,4,2       ## @CHNL_CTRL_IRQ_DLY_EN
	.comm	_CHNL_CTRL_IRQ_COAL_EN,4,2      ## @CHNL_CTRL_IRQ_COAL_EN
	.comm	_RX_CHNL_CTRL,4,2               ## @RX_CHNL_CTRL
	.comm	_CHNL_CTRL_IRQ_IOE,4,2          ## @CHNL_CTRL_IRQ_IOE
	.comm	_RX_CURDESC_PTR,4,2             ## @RX_CURDESC_PTR
	.comm	_RX_TAILDESC_PTR,4,2            ## @RX_TAILDESC_PTR
	.comm	_TX_CURDESC_PTR,4,2             ## @TX_CURDESC_PTR
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_temac_dma_bd_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function temac_dma_bd_init
_temac_dma_bd_init:                     ; @temac_dma_bd_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x21, _RX_BD_NUM@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RX_BD_NUM@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x0, x20
	mov	w2, #8
	bl	_devm_kcalloc
	str	x0, [x19, #64]
	cbz	x0, LBB0_11
; %bb.1:
	ldr	w0, [x20]
Lloh4:
	adrp	x22, _TX_BD_NUM@GOTPAGE
Lloh5:
	ldr	x22, [x22, _TX_BD_NUM@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	w1, w8, #3
	ldr	w3, [x23]
	mov	x2, x19
	bl	_dma_alloc_coherent
	str	x0, [x19, #72]
	cbz	x0, LBB0_11
; %bb.2:
	ldr	w0, [x20]
	ldr	w8, [x21]
	lsl	w1, w8, #5
	add	x2, x19, #4
	ldr	w3, [x23]
	bl	_dma_alloc_coherent
	str	x0, [x19, #56]
	cbz	x0, LBB0_11
; %bb.3:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x23, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19]
	add	x24, x23, #1
	sdiv	w10, w24, w8
	msub	w8, w10, w8, w24
	add	w0, w9, w8, lsl #3
	bl	_cpu_to_be32
	ldr	x8, [x19, #72]
	str	x0, [x8, x23, lsl #3]
	ldrsw	x8, [x22]
	mov	x23, x24
	cmp	x24, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x22, #0
	mov	x27, #0
Lloh6:
	adrp	x23, _XTE_MAX_JUMBO_FRAME_SIZE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _XTE_MAX_JUMBO_FRAME_SIZE@GOTPAGEOFF]
Lloh8:
	adrp	x24, _DMA_FROM_DEVICE@GOTPAGE
Lloh9:
	ldr	x24, [x24, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh10:
	adrp	x25, _STS_CTRL_APP0_IRQONEND@GOTPAGE
Lloh11:
	ldr	x25, [x25, _STS_CTRL_APP0_IRQONEND@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19, #4]
	add	x26, x27, #1
	sdiv	w10, w26, w8
	msub	w8, w10, w8, w26
	add	w0, w9, w8, lsl #5
	bl	_cpu_to_be32
	ldr	x8, [x19, #56]
	add	x8, x8, x22
	str	x0, [x8, #24]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_netdev_alloc_skb_ip_align
	cbz	x0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19, #64]
	str	x0, [x8, x27, lsl #3]
	ldr	w8, [x20]
	ldr	w1, [x0]
	ldr	w2, [x23]
	ldr	w3, [x24]
	mov	x0, x8
	bl	_dma_map_single
	bl	_cpu_to_be32
	ldr	x8, [x19, #56]
	add	x8, x8, x22
	str	x0, [x8, #16]
	ldr	w0, [x23]
	bl	_cpu_to_be32
	ldr	x8, [x19, #56]
	add	x8, x8, x22
	str	x0, [x8, #8]
	ldr	w0, [x25]
	bl	_cpu_to_be32
	ldr	x8, [x19, #56]
	str	x0, [x8, x22]
	ldrsw	x8, [x21]
	add	x22, x22, #32
	mov	x27, x26
	cmp	x26, x8
	b.lt	LBB0_8
LBB0_10:
	ldr	x8, [x19, #16]
Lloh12:
	adrp	x9, _TX_CHNL_CTRL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TX_CHNL_CTRL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x9]
	ldr	w9, [x19, #8]
Lloh15:
	adrp	x20, _CHNL_CTRL_IRQ_EN@GOTPAGE
Lloh16:
	ldr	x20, [x20, _CHNL_CTRL_IRQ_EN@GOTPAGEOFF]
	ldr	w10, [x20]
Lloh17:
	adrp	x22, _CHNL_CTRL_IRQ_ERR_EN@GOTPAGE
Lloh18:
	ldr	x22, [x22, _CHNL_CTRL_IRQ_ERR_EN@GOTPAGEOFF]
	ldr	w11, [x22]
Lloh19:
	adrp	x23, _CHNL_CTRL_IRQ_DLY_EN@GOTPAGE
Lloh20:
	ldr	x23, [x23, _CHNL_CTRL_IRQ_DLY_EN@GOTPAGEOFF]
	ldr	w12, [x23]
Lloh21:
	adrp	x24, _CHNL_CTRL_IRQ_COAL_EN@GOTPAGE
Lloh22:
	ldr	x24, [x24, _CHNL_CTRL_IRQ_COAL_EN@GOTPAGEOFF]
	ldr	w13, [x24]
	orr	w9, w9, w10
	orr	w9, w9, w11
	orr	w9, w9, w12
	orr	w9, w9, w13
	orr	w2, w9, #0x400
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #16]
Lloh23:
	adrp	x9, _RX_CHNL_CTRL@GOTPAGE
Lloh24:
	ldr	x9, [x9, _RX_CHNL_CTRL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x9]
	ldr	w9, [x19, #12]
Lloh26:
	adrp	x10, _CHNL_CTRL_IRQ_IOE@GOTPAGE
Lloh27:
	ldr	x10, [x10, _CHNL_CTRL_IRQ_IOE@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	w10, [x20]
	orr	w9, w9, w10
	ldr	w10, [x22]
	orr	w9, w9, w10
	ldr	w10, [x23]
	orr	w9, w9, w10
	ldr	w10, [x24]
	orr	w2, w9, w10
	mov	x0, x19
	blr	x8
	movi.2d	v0, #0000000000000000
	stur	q0, [x19, #24]
	stur	q0, [x19, #40]
	bl	_wmb
	ldr	x8, [x19, #16]
Lloh29:
	adrp	x9, _RX_CURDESC_PTR@GOTPAGE
Lloh30:
	ldr	x9, [x9, _RX_CURDESC_PTR@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x9]
	ldr	w2, [x19, #4]
	mov	x0, x19
	blr	x8
Lloh32:
	adrp	x8, _RX_TAILDESC_PTR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _RX_TAILDESC_PTR@GOTPAGEOFF]
	ldr	x9, [x19, #16]
Lloh34:
	ldr	w1, [x8]
	ldr	w8, [x19, #4]
	ldr	w10, [x21]
	add	w8, w8, w10, lsl #5
	sub	w2, w8, #32
	mov	x0, x19
	blr	x9
	ldr	x8, [x19, #16]
Lloh35:
	adrp	x9, _TX_CURDESC_PTR@GOTPAGE
Lloh36:
	ldr	x9, [x9, _TX_CURDESC_PTR@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x9]
	ldr	w2, [x19]
	mov	x0, x19
	blr	x8
	mov	w0, #0
	b	LBB0_12
LBB0_11:
	mov	x0, x20
	bl	_temac_dma_bd_release
Lloh38:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_BD_NUM,4,2                  ; @RX_BD_NUM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_TX_BD_NUM,4,2                  ; @TX_BD_NUM
	.comm	_XTE_MAX_JUMBO_FRAME_SIZE,4,2   ; @XTE_MAX_JUMBO_FRAME_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_STS_CTRL_APP0_IRQONEND,4,2     ; @STS_CTRL_APP0_IRQONEND
	.comm	_TX_CHNL_CTRL,4,2               ; @TX_CHNL_CTRL
	.comm	_CHNL_CTRL_IRQ_EN,4,2           ; @CHNL_CTRL_IRQ_EN
	.comm	_CHNL_CTRL_IRQ_ERR_EN,4,2       ; @CHNL_CTRL_IRQ_ERR_EN
	.comm	_CHNL_CTRL_IRQ_DLY_EN,4,2       ; @CHNL_CTRL_IRQ_DLY_EN
	.comm	_CHNL_CTRL_IRQ_COAL_EN,4,2      ; @CHNL_CTRL_IRQ_COAL_EN
	.comm	_RX_CHNL_CTRL,4,2               ; @RX_CHNL_CTRL
	.comm	_CHNL_CTRL_IRQ_IOE,4,2          ; @CHNL_CTRL_IRQ_IOE
	.comm	_RX_CURDESC_PTR,4,2             ; @RX_CURDESC_PTR
	.comm	_RX_TAILDESC_PTR,4,2            ; @RX_TAILDESC_PTR
	.comm	_TX_CURDESC_PTR,4,2             ; @TX_CURDESC_PTR
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_temac_dma_bd_init
.subsections_via_symbols
