	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efx_reset                      ## -- Begin function efx_reset
	.p2align	4, 0x90
_efx_reset:                             ## @efx_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_drv@GOTPCREL(%rip), %r13
	movl	(%r13), %r14d
	movl	4(%rdi), %r12d
	movl	%esi, %edi
	callq	_RESET_TYPE
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	movl	%eax, %r8d
	callq	_netif_info
	movq	%rbx, %rdi
	callq	_efx_device_detach_sync
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_efx_reset_down
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	*(%rax)
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r13), %esi
	movl	4(%rbx), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%rbx, %rdi
	callq	_netif_err
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_2:
	movq	_RESET_TYPE_MAX_METHOD@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jbe	LBB0_4
## %bb.3:
	movl	$-2, %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	andl	%eax, (%rbx)
	jmp	LBB0_5
LBB0_4:
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	___clear_bit
LBB0_5:
	movl	12(%rbx), %edi
	callq	_pci_set_master
	movq	_RESET_TYPE_DISABLE@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_7
## %bb.6:
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_7:
	movq	_RESET_TYPE_RECOVER_OR_DISABLE@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	setne	%r12b
LBB0_8:
	movzbl	%r12b, %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_efx_reset_up
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	testb	%r12b, %r12b
	je	LBB0_10
## %bb.11:
	movl	(%r13), %esi
	movl	4(%rbx), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	%rbx, %rdi
	callq	_netif_dbg
	movq	%rbx, %rdi
	callq	_efx_device_attach_if_not_resetting
	jmp	LBB0_12
LBB0_10:
	movl	4(%rbx), %edi
	callq	_dev_close
	movl	(%r13), %esi
	movl	4(%rbx), %edx
	leaq	L_.str.2(%rip), %rcx
	movq	%rbx, %rdi
	callq	_netif_err
	movq	_STATE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
LBB0_12:
	testl	%r14d, %r14d
	movl	%r14d, %eax
	cmovel	%r15d, %eax
	testl	%r15d, %r15d
	cmovel	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"resetting (%s)\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to reset hardware\n"

	.comm	_RESET_TYPE_MAX_METHOD,4,2      ## @RESET_TYPE_MAX_METHOD
	.comm	_RESET_TYPE_DISABLE,4,2         ## @RESET_TYPE_DISABLE
	.comm	_RESET_TYPE_RECOVER_OR_DISABLE,4,2 ## @RESET_TYPE_RECOVER_OR_DISABLE
L_.str.2:                               ## @.str.2
	.asciz	"has been disabled\n"

	.comm	_STATE_DISABLED,4,2             ## @STATE_DISABLED
L_.str.3:                               ## @.str.3
	.asciz	"reset complete\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efx_reset                      ; -- Begin function efx_reset
	.p2align	2
_efx_reset:                             ; @efx_reset
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _drv@GOTPAGE
Lloh1:
	ldr	x23, [x23, _drv@GOTPAGEOFF]
	ldr	w20, [x23]
	ldr	w22, [x0, #4]
	mov	x0, x1
	bl	_RESET_TYPE
	mov	x4, x0
Lloh2:
	adrp	x3, l_.str@PAGE
Lloh3:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_netif_info
	mov	x0, x19
	bl	_efx_device_detach_sync
	mov	x0, x19
	mov	x1, x21
	bl	_efx_reset_down
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w1, [x23]
	ldr	w2, [x19, #4]
Lloh4:
	adrp	x3, l_.str.1@PAGE
Lloh5:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	mov	w22, #0
	b	LBB0_8
LBB0_2:
Lloh6:
	adrp	x8, _RESET_TYPE_MAX_METHOD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RESET_TYPE_MAX_METHOD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ls	LBB0_4
; %bb.3:
	mov	w8, #-2
	lsl	w8, w8, w21
	ldr	w9, [x19]
	and	w8, w9, w8
	str	w8, [x19]
	b	LBB0_5
LBB0_4:
	mov	x0, x21
	mov	x1, x19
	bl	___clear_bit
LBB0_5:
	ldr	w0, [x19, #12]
	bl	_pci_set_master
Lloh9:
	adrp	x8, _RESET_TYPE_DISABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RESET_TYPE_DISABLE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_7
; %bb.6:
	mov	w22, #0
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _RESET_TYPE_RECOVER_OR_DISABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RESET_TYPE_RECOVER_OR_DISABLE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w21
	cset	w22, ne
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_efx_reset_up
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.9:
	tbz	w22, #0, LBB0_11
; %bb.10:
	ldr	w1, [x23]
	ldr	w2, [x19, #4]
Lloh15:
	adrp	x3, l_.str.3@PAGE
Lloh16:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_netif_dbg
	mov	x0, x19
	bl	_efx_device_attach_if_not_resetting
	b	LBB0_12
LBB0_11:
	ldr	w0, [x19, #4]
	bl	_dev_close
	ldr	w1, [x23]
	ldr	w2, [x19, #4]
Lloh17:
	adrp	x3, l_.str.2@PAGE
Lloh18:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh19:
	adrp	x8, _STATE_DISABLED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _STATE_DISABLED@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x19, #8]
LBB0_12:
	cmp	w20, #0
	csel	w8, w21, w20, eq
	cmp	w21, #0
	csel	w0, w20, w8, eq
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"resetting (%s)\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to reset hardware\n"

	.comm	_RESET_TYPE_MAX_METHOD,4,2      ; @RESET_TYPE_MAX_METHOD
	.comm	_RESET_TYPE_DISABLE,4,2         ; @RESET_TYPE_DISABLE
	.comm	_RESET_TYPE_RECOVER_OR_DISABLE,4,2 ; @RESET_TYPE_RECOVER_OR_DISABLE
l_.str.2:                               ; @.str.2
	.asciz	"has been disabled\n"

	.comm	_STATE_DISABLED,4,2             ; @STATE_DISABLED
l_.str.3:                               ; @.str.3
	.asciz	"reset complete\n"

.subsections_via_symbols
