	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmveth_close
_ibmveth_close:                         ## @ibmveth_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, %r12
	movq	24(%rax), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_dbg
	leaq	88(%r12), %rdi
	callq	_napi_disable
	cmpl	$0, 84(%r12)
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_netif_stop_queue
LBB0_2:
	movq	24(%r12), %rax
	movl	4(%rax), %edi
	movq	_VIO_IRQ_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_h_vio_signal
	movq	_H_BUSY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rax
	movl	4(%rax), %edi
	callq	_h_free_logical_lan
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_H_IS_LONG_BUSY
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	(%r13), %rbx
	je	LBB0_3
## %bb.5:
	movq	_H_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_netdev_err
LBB0_7:
	movl	(%r14), %edi
	movq	%r14, %rsi
	callq	_free_irq
	movq	%r12, %rdi
	callq	_ibmveth_update_rx_no_buffer
	movl	80(%r12), %esi
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movq	%r15, %rdi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_dma_unmap_single
	movq	72(%r12), %rdi
	callq	_free_page
	movl	64(%r12), %esi
	movl	(%rbx), %ecx
	movq	%r15, %rdi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_dma_unmap_single
	movq	56(%r12), %rdi
	callq	_free_page
	movl	48(%r12), %esi
	movl	40(%r12), %ecx
	movl	44(%r12), %edx
	movq	%r15, %rdi
	callq	_dma_free_coherent
	movq	_IBMVETH_NUM_BUFF_POOLS@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	movslq	%eax, %rcx
	addq	$8, %rbx
	cmpq	%rcx, %r13
	jge	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rsi
	cmpq	$0, (%rsi,%rbx)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	addq	%rbx, %rsi
	movq	%r12, %rdi
	callq	_ibmveth_free_buffer_pool
	movl	(%r15), %eax
	jmp	LBB0_11
LBB0_12:
	movq	24(%r12), %rdi
	movl	16(%r12), %esi
	movq	8(%r12), %rax
	movq	_IBMVETH_BUFF_OH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	addl	(%rax), %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_unmap_single
	movl	(%r12), %edi
	callq	_kfree
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_dbg
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"close starting\n"

	.comm	_VIO_IRQ_DISABLE,4,2            ## @VIO_IRQ_DISABLE
	.comm	_H_BUSY,8,3                     ## @H_BUSY
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"h_free_logical_lan failed with %lx, continuing with close\n"

	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_IBMVETH_NUM_BUFF_POOLS,4,2     ## @IBMVETH_NUM_BUFF_POOLS
	.comm	_IBMVETH_BUFF_OH,4,2            ## @IBMVETH_BUFF_OH
L_.str.2:                               ## @.str.2
	.asciz	"close complete\n"

	.no_dead_strip	_ibmveth_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmveth_close
_ibmveth_close:                         ; @ibmveth_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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x21, [x0, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_dbg
	add	x0, x20, #88
	bl	_napi_disable
	ldr	w8, [x20, #84]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_netif_stop_queue
LBB0_2:
	ldr	x8, [x20, #24]
	ldr	w0, [x8, #4]
Lloh2:
	adrp	x8, _VIO_IRQ_DISABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VIO_IRQ_DISABLE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_h_vio_signal
Lloh5:
	adrp	x23, _H_BUSY@GOTPAGE
Lloh6:
	ldr	x23, [x23, _H_BUSY@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	w0, [x8, #4]
	bl	_h_free_logical_lan
	mov	x22, x0
	bl	_H_IS_LONG_BUSY
	ldr	x8, [x23]
	cmp	x0, #0
	ccmp	x22, x8, #4, eq
	b.eq	LBB0_3
; %bb.4:
Lloh7:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x22, x8
	b.eq	LBB0_6
; %bb.5:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_netdev_err
LBB0_6:
	ldr	w0, [x19]
	mov	x1, x19
	bl	_free_irq
	mov	x0, x20
	bl	_ibmveth_update_rx_no_buffer
	ldr	w1, [x20, #80]
Lloh12:
	adrp	x22, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh13:
	ldr	x22, [x22, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x0, x21
	mov	w2, #4096
	bl	_dma_unmap_single
	ldr	x0, [x20, #72]
	bl	_free_page
	ldr	w1, [x20, #64]
	ldr	w3, [x22]
	mov	x0, x21
	mov	w2, #4096
	bl	_dma_unmap_single
	ldr	x0, [x20, #56]
	bl	_free_page
	ldp	w2, w1, [x20, #44]
	ldr	w3, [x20, #40]
	mov	x0, x21
	bl	_dma_free_coherent
Lloh14:
	adrp	x21, _IBMVETH_NUM_BUFF_POOLS@GOTPAGE
Lloh15:
	ldr	x21, [x21, _IBMVETH_NUM_BUFF_POOLS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x23, #0
	mov	x24, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x24, x24, #1
	add	x23, x23, #8
	cmp	x24, w8, sxtw
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #32]
	add	x1, x9, x23
	ldr	x9, [x1]
	cbz	x9, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	bl	_ibmveth_free_buffer_pool
	ldr	w8, [x21]
	b	LBB0_8
LBB0_11:
	ldr	x0, [x20, #24]
	ldr	w1, [x20, #16]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _IBMVETH_BUFF_OH@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IBMVETH_BUFF_OH@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	add	w2, w9, w8
	ldr	w3, [x22]
	bl	_dma_unmap_single
	ldr	w0, [x20]
	bl	_kfree
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netdev_dbg
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"close starting\n"

	.comm	_VIO_IRQ_DISABLE,4,2            ; @VIO_IRQ_DISABLE
	.comm	_H_BUSY,8,3                     ; @H_BUSY
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"h_free_logical_lan failed with %lx, continuing with close\n"

	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_IBMVETH_NUM_BUFF_POOLS,4,2     ; @IBMVETH_NUM_BUFF_POOLS
	.comm	_IBMVETH_BUFF_OH,4,2            ; @IBMVETH_BUFF_OH
l_.str.2:                               ; @.str.2
	.asciz	"close complete\n"

	.no_dead_strip	_ibmveth_close
.subsections_via_symbols
