	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_reset
_do_reset:                              ## @do_reset
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	56(%rdi), %r14
	movq	(%rsi), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_dbg
	xorl	%eax, %eax
	callq	_rtnl_lock
	movq	%r14, %rdi
	callq	_netif_carrier_off
	movq	(%rbx), %rax
	movq	%rax, (%r13)
	movq	8(%r13), %rbx
	movq	16(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	24(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	32(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_ibmvnic_cleanup
	movq	_VNIC_OPEN@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_5
## %bb.1:
	movq	(%r13), %rax
	movq	_VNIC_RESET_MOBILITY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.2:
	movq	_VNIC_RESET_FAILOVER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_VNIC_CLOSING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r13)
	xorl	%eax, %eax
	callq	_rtnl_unlock
	movq	_IBMVNIC_LOGICAL_LNK_DN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_set_link_state
	movl	%eax, %r12d
	xorl	%eax, %eax
	callq	_rtnl_lock
	testl	%r12d, %r12d
	jne	LBB0_34
## %bb.4:
	movq	40(%r13), %rax
	movl	$-1, %r12d
	movq	_VNIC_CLOSING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_34
LBB0_5:
	movq	(%r13), %rax
	movq	_VNIC_RESET_NON_FATAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_26:
	movq	_VNIC_CLOSED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r13)
	xorl	%r12d, %r12d
	cmpq	%r15, %rax
	je	LBB0_34
## %bb.27:
	movq	%r14, %rdi
	callq	___ibmvnic_open
	testl	%eax, %eax
	je	LBB0_29
## %bb.28:
	movq	_IBMVNIC_OPEN_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_34
LBB0_6:
	movq	_VNIC_PROBED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 40(%r13)
	movq	_VNIC_RESET_MOBILITY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	callq	_ibmvnic_reenable_crq_queue
	movl	%eax, %r12d
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_release_sub_crqs
	testl	%r12d, %r12d
	jne	LBB0_11
	jmp	LBB0_12
LBB0_8:
	movq	%r13, %rdi
	callq	_ibmvnic_reset_crq
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movl	64(%r13), %edi
	callq	_vio_enable_interrupts
	movl	%eax, %r12d
	testl	%r12d, %r12d
	je	LBB0_12
LBB0_11:
	movq	56(%r13), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	callq	_netdev_err
LBB0_34:
	xorl	%eax, %eax
	callq	_rtnl_unlock
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r13, %rdi
	callq	_ibmvnic_reset_init
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movq	_IBMVNIC_INIT_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_34
LBB0_29:
	movq	%r14, %rdi
	callq	_ibmvnic_set_multi
	cmpq	$0, 8(%r13)
	jle	LBB0_32
## %bb.30:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r13), %rdi
	addq	%r15, %rdi
	callq	_napi_schedule
	incq	%rbx
	addq	$4, %r15
	cmpq	%rbx, 8(%r13)
	jg	LBB0_31
LBB0_32:
	movq	(%r13), %rax
	movq	_VNIC_RESET_FAILOVER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_34
## %bb.33:
	movq	_NETDEV_NOTIFY_PEERS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_call_netdevice_notifiers
	jmp	LBB0_34
LBB0_14:
	xorl	%r12d, %r12d
	movq	_VNIC_PROBED@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	je	LBB0_34
## %bb.15:
	movq	%r14, %rdi
	callq	_ibmvnic_login
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %r12d
	movq	%r15, 40(%r13)
	jmp	LBB0_34
LBB0_17:
	cmpq	%rbx, 8(%r13)
	jne	LBB0_21
## %bb.18:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, 16(%r13)
	jne	LBB0_21
## %bb.19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, 24(%r13)
	jne	LBB0_21
## %bb.20:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, 32(%r13)
	jne	LBB0_21
## %bb.22:
	movq	%r13, %rdi
	callq	_reset_tx_pools
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_34
## %bb.23:
	movq	%r13, %rdi
	callq	_reset_rx_pools
	jmp	LBB0_24
LBB0_21:
	movq	%r13, %rdi
	callq	_release_rx_pools
	movq	%r13, %rdi
	callq	_release_tx_pools
	movq	%r13, %rdi
	callq	_release_napi
	movq	%r13, %rdi
	callq	_release_vpd_data
	movq	%r13, %rdi
	callq	_init_resources
LBB0_24:
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_34
## %bb.25:
	movq	%r13, %rdi
	callq	_ibmvnic_disable_irqs
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Re-setting driver (%d)\n"

	.comm	_VNIC_OPEN,8,3                  ## @VNIC_OPEN
	.comm	_VNIC_RESET_MOBILITY,8,3        ## @VNIC_RESET_MOBILITY
	.comm	_VNIC_RESET_FAILOVER,8,3        ## @VNIC_RESET_FAILOVER
	.comm	_VNIC_CLOSING,8,3               ## @VNIC_CLOSING
	.comm	_IBMVNIC_LOGICAL_LNK_DN,4,2     ## @IBMVNIC_LOGICAL_LNK_DN
	.comm	_VNIC_CLOSED,8,3                ## @VNIC_CLOSED
	.comm	_VNIC_RESET_NON_FATAL,8,3       ## @VNIC_RESET_NON_FATAL
	.comm	_VNIC_PROBED,8,3                ## @VNIC_PROBED
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't initialize crq. rc=%d\n"

	.comm	_IBMVNIC_INIT_FAILED,4,2        ## @IBMVNIC_INIT_FAILED
	.comm	_IBMVNIC_OPEN_FAILED,4,2        ## @IBMVNIC_OPEN_FAILED
	.comm	_NETDEV_NOTIFY_PEERS,4,2        ## @NETDEV_NOTIFY_PEERS
	.no_dead_strip	_do_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_reset
_do_reset:                              ; @do_reset
	.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	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x19, [x0, #56]
	ldr	x2, [x1]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_dbg
	bl	_rtnl_lock
	mov	x0, x19
	bl	_netif_carrier_off
	ldr	x8, [x22]
	str	x8, [x20]
	ldp	x26, x25, [x20, #8]
	ldp	x24, x23, [x20, #24]
	mov	x0, x19
	bl	_ibmvnic_cleanup
Lloh2:
	adrp	x8, _VNIC_OPEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VNIC_OPEN@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _VNIC_RESET_MOBILITY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VNIC_RESET_MOBILITY@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _VNIC_RESET_FAILOVER@GOTPAGE
Lloh9:
	ldr	x10, [x10, _VNIC_RESET_FAILOVER@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_7
LBB0_2:
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _VNIC_RESET_NON_FATAL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _VNIC_RESET_NON_FATAL@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
LBB0_3:
Lloh14:
	adrp	x8, _VNIC_CLOSED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VNIC_CLOSED@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	x8, [x20, #40]
	cmp	x8, x21
	b.ne	LBB0_10
LBB0_4:
	mov	w22, #0
	b	LBB0_15
LBB0_5:
Lloh17:
	adrp	x27, _VNIC_PROBED@GOTPAGE
Lloh18:
	ldr	x27, [x27, _VNIC_PROBED@GOTPAGEOFF]
	ldr	x9, [x27]
	str	x9, [x20, #40]
Lloh19:
	adrp	x9, _VNIC_RESET_MOBILITY@GOTPAGE
Lloh20:
	ldr	x9, [x9, _VNIC_RESET_MOBILITY@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	mov	x0, x20
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.6:
	bl	_ibmvnic_reenable_crq_queue
	mov	x22, x0
	mov	x0, x20
	mov	w1, #1
	bl	_release_sub_crqs
	cbnz	w22, LBB0_14
	b	LBB0_16
LBB0_7:
Lloh22:
	adrp	x27, _VNIC_CLOSING@GOTPAGE
Lloh23:
	ldr	x27, [x27, _VNIC_CLOSING@GOTPAGEOFF]
	ldr	x8, [x27]
	str	x8, [x20, #40]
	bl	_rtnl_unlock
Lloh24:
	adrp	x8, _IBMVNIC_LOGICAL_LNK_DN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IBMVNIC_LOGICAL_LNK_DN@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_set_link_state
	mov	x22, x0
	bl	_rtnl_lock
	cbnz	w22, LBB0_15
; %bb.8:
	ldr	x8, [x20, #40]
	ldr	x9, [x27]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.9:
	mov	w22, #-1
	b	LBB0_15
LBB0_10:
	mov	x0, x19
	bl	___ibmvnic_open
	cbz	w0, LBB0_18
; %bb.11:
Lloh27:
	adrp	x8, _IBMVNIC_OPEN_FAILED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IBMVNIC_OPEN_FAILED@GOTPAGEOFF]
Lloh29:
	ldr	w22, [x8]
	b	LBB0_15
LBB0_12:
	bl	_ibmvnic_reset_crq
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.13:
	ldr	w0, [x20, #64]
	bl	_vio_enable_interrupts
	mov	x22, x0
	cbz	w22, LBB0_16
LBB0_14:
	ldr	x0, [x20, #56]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_netdev_err
LBB0_15:
	bl	_rtnl_unlock
	mov	x0, x22
	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
LBB0_16:
	mov	x0, x20
	bl	_ibmvnic_reset_init
	cbz	w0, LBB0_23
; %bb.17:
Lloh32:
	adrp	x8, _IBMVNIC_INIT_FAILED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IBMVNIC_INIT_FAILED@GOTPAGEOFF]
Lloh34:
	ldr	w22, [x8]
	b	LBB0_15
LBB0_18:
	mov	x0, x19
	bl	_ibmvnic_set_multi
	ldr	x8, [x20, #8]
	cmp	x8, #1
	b.lt	LBB0_21
; %bb.19:
	mov	x21, #0
	mov	x22, #0
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #48]
	add	x0, x8, x21
	bl	_napi_schedule
	add	x22, x22, #1
	ldr	x8, [x20, #8]
	add	x21, x21, #4
	cmp	x8, x22
	b.gt	LBB0_20
LBB0_21:
	ldr	x8, [x20]
Lloh35:
	adrp	x9, _VNIC_RESET_FAILOVER@GOTPAGE
Lloh36:
	ldr	x9, [x9, _VNIC_RESET_FAILOVER@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.22:
Lloh38:
	adrp	x8, _NETDEV_NOTIFY_PEERS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _NETDEV_NOTIFY_PEERS@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_call_netdevice_notifiers
	b	LBB0_4
LBB0_23:
	ldr	x8, [x27]
	cmp	x8, x21
	b.eq	LBB0_4
; %bb.24:
	mov	x0, x19
	bl	_ibmvnic_login
	cbz	w0, LBB0_26
; %bb.25:
	mov	x22, x0
	str	x21, [x20, #40]
	b	LBB0_15
LBB0_26:
	ldr	x8, [x20, #8]
	cmp	x8, x26
	b.ne	LBB0_32
; %bb.27:
	ldr	x8, [x20, #16]
	cmp	x8, x25
	b.ne	LBB0_32
; %bb.28:
	ldr	x8, [x20, #24]
	cmp	x8, x24
	b.ne	LBB0_32
; %bb.29:
	ldr	x8, [x20, #32]
	cmp	x8, x23
	b.ne	LBB0_32
; %bb.30:
	mov	x0, x20
	bl	_reset_tx_pools
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.31:
	mov	x0, x20
	bl	_reset_rx_pools
	b	LBB0_33
LBB0_32:
	mov	x0, x20
	bl	_release_rx_pools
	mov	x0, x20
	bl	_release_tx_pools
	mov	x0, x20
	bl	_release_napi
	mov	x0, x20
	bl	_release_vpd_data
	mov	x0, x20
	bl	_init_resources
LBB0_33:
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.34:
	mov	x0, x20
	bl	_ibmvnic_disable_irqs
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Re-setting driver (%d)\n"

	.comm	_VNIC_OPEN,8,3                  ; @VNIC_OPEN
	.comm	_VNIC_RESET_MOBILITY,8,3        ; @VNIC_RESET_MOBILITY
	.comm	_VNIC_RESET_FAILOVER,8,3        ; @VNIC_RESET_FAILOVER
	.comm	_VNIC_CLOSING,8,3               ; @VNIC_CLOSING
	.comm	_IBMVNIC_LOGICAL_LNK_DN,4,2     ; @IBMVNIC_LOGICAL_LNK_DN
	.comm	_VNIC_CLOSED,8,3                ; @VNIC_CLOSED
	.comm	_VNIC_RESET_NON_FATAL,8,3       ; @VNIC_RESET_NON_FATAL
	.comm	_VNIC_PROBED,8,3                ; @VNIC_PROBED
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't initialize crq. rc=%d\n"

	.comm	_IBMVNIC_INIT_FAILED,4,2        ; @IBMVNIC_INIT_FAILED
	.comm	_IBMVNIC_OPEN_FAILED,4,2        ; @IBMVNIC_OPEN_FAILED
	.comm	_NETDEV_NOTIFY_PEERS,4,2        ; @NETDEV_NOTIFY_PEERS
	.no_dead_strip	_do_reset
.subsections_via_symbols
