	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sonic_close
_sonic_close:                           ## @sonic_close
	.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	_sonic_debug@GOTPCREL(%rip), %rax
	cmpl	$3, (%rax)
	jl	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_printk
LBB0_2:
	movq	%r14, %rdi
	callq	_netif_stop_queue
	movq	_SONIC_IMR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_SONIC_WRITE
	movq	_SONIC_ISR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$32767, %esi                    ## imm = 0x7FFF
	callq	_SONIC_WRITE
	movq	_SONIC_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SONIC_CR_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SONIC_WRITE
	movq	_SONIC_NUM_TDS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_9
## %bb.3:
	xorl	%ebx, %ebx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%r15), %edi
	movq	40(%r15), %rax
	movl	(%rax,%rbx,4), %edx
	movl	(%r12), %ecx
	callq	_dma_unmap_single
	movq	32(%r15), %rax
	movq	$0, (%rax,%rbx,8)
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	callq	_dev_kfree_skb
	movq	24(%r15), %rax
	movq	$0, (%rax,%rbx,8)
	jmp	LBB0_8
LBB0_9:
	movq	_SONIC_NUM_RRS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_16
## %bb.10:
	xorl	%ebx, %ebx
	movq	_SONIC_RBSIZE@GOTPCREL(%rip), %r12
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %r13
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_16
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	16(%r15), %edi
	movl	(%r12), %edx
	movl	(%r13), %ecx
	callq	_dma_unmap_single
	movq	8(%r15), %rax
	movq	$0, (%rax,%rbx,8)
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	callq	_dev_kfree_skb
	movq	(%r15), %rax
	movq	$0, (%rax,%rbx,8)
	jmp	LBB0_15
LBB0_16:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sonic_debug,4,2                ## @sonic_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sonic_close\n"

	.comm	_SONIC_IMR,4,2                  ## @SONIC_IMR
	.comm	_SONIC_ISR,4,2                  ## @SONIC_ISR
	.comm	_SONIC_CMD,4,2                  ## @SONIC_CMD
	.comm	_SONIC_CR_RST,4,2               ## @SONIC_CR_RST
	.comm	_SONIC_NUM_TDS,4,2              ## @SONIC_NUM_TDS
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_SONIC_NUM_RRS,4,2              ## @SONIC_NUM_RRS
	.comm	_SONIC_RBSIZE,4,2               ## @SONIC_RBSIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_sonic_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sonic_close
_sonic_close:                           ; @sonic_close
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _sonic_debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sonic_debug@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #3
	b.lt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
LBB0_2:
	mov	x0, x20
	bl	_netif_stop_queue
Lloh5:
	adrp	x8, _SONIC_IMR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SONIC_IMR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_SONIC_WRITE
Lloh8:
	adrp	x8, _SONIC_ISR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SONIC_ISR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w1, #32767
	bl	_SONIC_WRITE
Lloh11:
	adrp	x8, _SONIC_CMD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SONIC_CMD@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _SONIC_CR_RST@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SONIC_CR_RST@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_SONIC_WRITE
Lloh17:
	adrp	x20, _SONIC_NUM_TDS@GOTPAGE
Lloh18:
	ldr	x20, [x20, _SONIC_NUM_TDS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	x21, #0
Lloh19:
	adrp	x22, _DMA_TO_DEVICE@GOTPAGE
Lloh20:
	ldr	x22, [x22, _DMA_TO_DEVICE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x1, [x8, x21, lsl #3]
	cbz	x1, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #16]
	ldr	x8, [x19, #40]
	ldr	w2, [x8, x21, lsl #2]
	ldr	w3, [x22]
	bl	_dma_unmap_single
	ldr	x8, [x19, #32]
	str	xzr, [x8, x21, lsl #3]
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x21, lsl #3]
	cbz	x0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_dev_kfree_skb
	ldr	x8, [x19, #24]
	str	xzr, [x8, x21, lsl #3]
	b	LBB0_4
LBB0_9:
Lloh21:
	adrp	x20, _SONIC_NUM_RRS@GOTPAGE
Lloh22:
	ldr	x20, [x20, _SONIC_NUM_RRS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.10:
	mov	x21, #0
Lloh23:
	adrp	x22, _SONIC_RBSIZE@GOTPAGE
Lloh24:
	ldr	x22, [x22, _SONIC_RBSIZE@GOTPAGEOFF]
Lloh25:
	adrp	x23, _DMA_FROM_DEVICE@GOTPAGE
Lloh26:
	ldr	x23, [x23, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x1, [x8, x21, lsl #3]
	cbz	x1, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x19, #16]
	ldr	w2, [x22]
	ldr	w3, [x23]
	bl	_dma_unmap_single
	ldr	x8, [x19, #8]
	str	xzr, [x8, x21, lsl #3]
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x19]
	ldr	x0, [x8, x21, lsl #3]
	cbz	x0, LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_dev_kfree_skb
	ldr	x8, [x19]
	str	xzr, [x8, x21, lsl #3]
	b	LBB0_11
LBB0_16:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_sonic_debug,4,2                ; @sonic_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sonic_close\n"

	.comm	_SONIC_IMR,4,2                  ; @SONIC_IMR
	.comm	_SONIC_ISR,4,2                  ; @SONIC_ISR
	.comm	_SONIC_CMD,4,2                  ; @SONIC_CMD
	.comm	_SONIC_CR_RST,4,2               ; @SONIC_CR_RST
	.comm	_SONIC_NUM_TDS,4,2              ; @SONIC_NUM_TDS
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_SONIC_NUM_RRS,4,2              ; @SONIC_NUM_RRS
	.comm	_SONIC_RBSIZE,4,2               ; @SONIC_RBSIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_sonic_close
.subsections_via_symbols
