	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_nic_attach_func
_netxen_nic_attach_func:                ## @netxen_nic_attach_func
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_pci_get_drvdata
	movq	%rax, %r15
	movq	8(%rax), %r14
	movq	%rbx, %rdi
	callq	_pci_enable_device
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	_PCI_D0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pci_set_power_state
	movq	%rbx, %rdi
	callq	_pci_set_master
	movq	%rbx, %rdi
	callq	_pci_restore_state
	movq	$-1, (%r15)
	movq	%r15, %rdi
	callq	_netxen_start_firmware
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	jmp	LBB0_10
LBB0_3:
	movq	%r14, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%r15, %rdi
	callq	_netxen_nic_attach
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_netxen_nic_up
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_netxen_nic_detach
LBB0_9:
	movq	%r15, %rdi
	callq	_nx_decr_dev_ref_cnt
	jmp	LBB0_10
LBB0_6:
	movq	_NETDEV_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_netxen_restore_indev_addr
LBB0_7:
	movq	%r14, %rdi
	callq	_netif_device_attach
	movq	_netxen_fw_poll_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FW_POLL_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_netxen_schedule_work
	xorl	%r12d, %r12d
LBB0_10:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_D0,4,2                     ## @PCI_D0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to start firmware\n"

	.comm	_NETDEV_UP,4,2                  ## @NETDEV_UP
	.comm	_netxen_fw_poll_work,4,2        ## @netxen_fw_poll_work
	.comm	_FW_POLL_DELAY,4,2              ## @FW_POLL_DELAY
	.no_dead_strip	_netxen_nic_attach_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netxen_nic_attach_func
_netxen_nic_attach_func:                ; @netxen_nic_attach_func
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	bl	_pci_get_drvdata
	mov	x19, x0
	ldr	x20, [x0, #8]
	mov	x0, x21
	bl	_pci_enable_device
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.1:
Lloh0:
	adrp	x8, _PCI_D0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_D0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_pci_set_power_state
	mov	x0, x21
	bl	_pci_set_master
	mov	x0, x21
	bl	_pci_restore_state
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x19]
	mov	x0, x19
	bl	_netxen_start_firmware
	cbz	w0, LBB0_3
; %bb.2:
	mov	x22, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_10
LBB0_3:
	mov	x0, x20
	bl	_netif_running
	cbz	x0, LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_netxen_nic_attach
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_netxen_nic_up
	cbz	w0, LBB0_8
; %bb.6:
	mov	x22, x0
	mov	x0, x19
	bl	_netxen_nic_detach
LBB0_7:
	mov	x0, x19
	bl	_nx_decr_dev_ref_cnt
	b	LBB0_10
LBB0_8:
Lloh5:
	adrp	x8, _NETDEV_UP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NETDEV_UP@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_netxen_restore_indev_addr
LBB0_9:
	mov	x0, x20
	bl	_netif_device_attach
Lloh8:
	adrp	x8, _netxen_fw_poll_work@GOTPAGE
Lloh9:
	ldr	x8, [x8, _netxen_fw_poll_work@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _FW_POLL_DELAY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FW_POLL_DELAY@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_netxen_schedule_work
	mov	w22, #0
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_D0,4,2                     ; @PCI_D0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to start firmware\n"

	.comm	_NETDEV_UP,4,2                  ; @NETDEV_UP
	.comm	_netxen_fw_poll_work,4,2        ; @netxen_fw_poll_work
	.comm	_FW_POLL_DELAY,4,2              ; @FW_POLL_DELAY
	.no_dead_strip	_netxen_nic_attach_func
.subsections_via_symbols
