	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netxen_nic_reset_context       ## -- Begin function netxen_nic_reset_context
	.p2align	4, 0x90
_netxen_nic_reset_context:              ## @netxen_nic_reset_context
	.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, %r12
	movq	16(%rdi), %r14
	movq	___NX_RESETTING@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	8(%r12), %r15
	movq	%r15, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	movq	(%r12), %rax
	movq	_NETXEN_ADAPTER_UP_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.3:
	movq	%r14, %rdi
	callq	_netif_device_detach
	movq	%r14, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	___netxen_nic_down
LBB0_5:
	movq	%r12, %rdi
	callq	_netxen_nic_detach
	movq	%r14, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%r12, %rdi
	callq	_netxen_nic_attach
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	___netxen_nic_up
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
LBB0_8:
	movq	%r14, %rdi
	callq	_netif_device_attach
	xorl	%ebx, %ebx
LBB0_9:
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_clear_bit
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___NX_RESETTING,4,2             ## @__NX_RESETTING
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_NETXEN_ADAPTER_UP_MAGIC,8,3    ## @NETXEN_ADAPTER_UP_MAGIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netxen_nic_reset_context       ; -- Begin function netxen_nic_reset_context
	.p2align	2
_netxen_nic_reset_context:              ; @netxen_nic_reset_context
	.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	x21, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x23, ___NX_RESETTING@GOTPAGE
Lloh1:
	ldr	x23, [x23, ___NX_RESETTING@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x19, x21, #8
	mov	x1, x19
	bl	_test_and_set_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_2:
	ldr	x8, [x21]
Lloh5:
	adrp	x9, _NETXEN_ADAPTER_UP_MAGIC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NETXEN_ADAPTER_UP_MAGIC@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.3:
	mov	x0, x20
	bl	_netif_device_detach
	mov	x0, x20
	bl	_netif_running
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x21
	mov	x1, x20
	bl	___netxen_nic_down
LBB0_5:
	mov	x0, x21
	bl	_netxen_nic_detach
	mov	x0, x20
	bl	_netif_running
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x21
	bl	_netxen_nic_attach
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.7:
	mov	x0, x21
	mov	x1, x20
	bl	___netxen_nic_up
	mov	x22, x0
	cbnz	w0, LBB0_10
LBB0_8:
	mov	x0, x20
	bl	_netif_device_attach
LBB0_9:
	mov	w22, #0
LBB0_10:
	ldr	w0, [x23]
	mov	x1, x19
	bl	_clear_bit
LBB0_11:
	mov	x0, x22
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	___NX_RESETTING,4,2             ; @__NX_RESETTING
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_NETXEN_ADAPTER_UP_MAGIC,8,3    ; @NETXEN_ADAPTER_UP_MAGIC
.subsections_via_symbols
