	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hinic_close
_hinic_close:                           ## @hinic_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, %rbx
	leaq	12(%rax), %r15
	movq	%r15, %rdi
	callq	_down
	movl	(%rbx), %r12d
	movq	_HINIC_INTF_UP@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	notl	%eax
	andl	%r12d, %eax
	movl	%eax, (%rbx)
	movq	%r14, %rdi
	callq	_netif_carrier_off
	movq	%r14, %rdi
	callq	_netif_tx_disable
	movq	%rbx, %rdi
	callq	_update_nic_stats
	movq	%r15, %rdi
	callq	_up
	movq	_HINIC_FUNC_PORT_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hinic_port_set_func_state
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %r15d
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	_HINIC_PORT_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hinic_port_set_state
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r15d
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
LBB0_2:
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_netif_err
	andl	(%r13), %r12d
	orl	%r12d, (%rbx)
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_HINIC_RSS_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_hinic_rss_deinit
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_hinic_rss_template_free
LBB0_7:
	movq	%rbx, %rdi
	callq	_free_rxqs
	movq	%rbx, %rdi
	callq	_free_txqs
	testl	%r12d, (%r13)
	je	LBB0_9
## %bb.8:
	movl	4(%rbx), %edi
	callq	_hinic_hwdev_ifdown
LBB0_9:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_netif_info
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_HINIC_INTF_UP,4,2              ## @HINIC_INTF_UP
	.comm	_HINIC_FUNC_PORT_DISABLE,4,2    ## @HINIC_FUNC_PORT_DISABLE
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set func port state\n"

	.comm	_HINIC_PORT_DISABLE,4,2         ## @HINIC_PORT_DISABLE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to set port state\n"

	.comm	_HINIC_RSS_ENABLE,4,2           ## @HINIC_RSS_ENABLE
L_.str.2:                               ## @.str.2
	.asciz	"HINIC_INTF is DOWN\n"

	.no_dead_strip	_hinic_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hinic_close
_hinic_close:                           ; @hinic_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
	add	x21, x0, #12
	mov	x0, x21
	bl	_down
	ldr	w22, [x19]
Lloh0:
	adrp	x23, _HINIC_INTF_UP@GOTPAGE
Lloh1:
	ldr	x23, [x23, _HINIC_INTF_UP@GOTPAGEOFF]
	ldr	w8, [x23]
	bic	w8, w22, w8
	str	w8, [x19]
	mov	x0, x20
	bl	_netif_carrier_off
	mov	x0, x20
	bl	_netif_tx_disable
	mov	x0, x19
	bl	_update_nic_stats
	mov	x0, x21
	bl	_up
Lloh2:
	adrp	x8, _HINIC_FUNC_PORT_DISABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HINIC_FUNC_PORT_DISABLE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hinic_port_set_func_state
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh5:
	adrp	x8, _drv@GOTPAGE
Lloh6:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
Lloh10:
	adrp	x8, _HINIC_PORT_DISABLE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HINIC_PORT_DISABLE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hinic_port_set_state
	cbz	w0, LBB0_6
; %bb.3:
	mov	x21, x0
Lloh13:
	adrp	x8, _drv@GOTPAGE
Lloh14:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x3, l_.str.1@PAGE
Lloh17:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	mov	x2, x20
	bl	_netif_err
	ldr	w8, [x23]
	and	w8, w8, w22
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_5:
	mov	x0, x21
	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
LBB0_6:
	ldr	w8, [x19]
Lloh18:
	adrp	x9, _HINIC_RSS_ENABLE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HINIC_RSS_ENABLE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_hinic_rss_deinit
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_hinic_rss_template_free
LBB0_8:
	mov	x0, x19
	bl	_free_rxqs
	mov	x0, x19
	bl	_free_txqs
	ldr	w8, [x23]
	tst	w8, w22
	b.eq	LBB0_10
; %bb.9:
	ldr	w0, [x19, #4]
	bl	_hinic_hwdev_ifdown
LBB0_10:
Lloh21:
	adrp	x8, _drv@GOTPAGE
Lloh22:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x3, l_.str.2@PAGE
Lloh25:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_netif_info
	mov	w21, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_HINIC_INTF_UP,4,2              ; @HINIC_INTF_UP
	.comm	_HINIC_FUNC_PORT_DISABLE,4,2    ; @HINIC_FUNC_PORT_DISABLE
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set func port state\n"

	.comm	_HINIC_PORT_DISABLE,4,2         ; @HINIC_PORT_DISABLE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to set port state\n"

	.comm	_HINIC_RSS_ENABLE,4,2           ; @HINIC_RSS_ENABLE
l_.str.2:                               ; @.str.2
	.asciz	"HINIC_INTF is DOWN\n"

	.no_dead_strip	_hinic_close
.subsections_via_symbols
