	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_attach_func
_qlcnic_attach_func:                    ## @qlcnic_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	24(%rax), %r14
	movq	_pci_channel_io_normal@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_pci_enable_device
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	%rbx, %rdi
	callq	_pci_set_master
	movq	%rbx, %rdi
	callq	_pci_restore_state
	movq	%rbx, %rdi
	callq	_qlcnic_is_first_func
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_qlcnic_api_lock
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_15
LBB0_3:
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movq	_QLCNIC_NON_PRIV_FUNC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.4:
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	movl	$1, (%r15)
	movq	___QLCNIC_START_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r15), %rsi
	callq	_set_bit
	movq	_QLCNIC_CRB_DEV_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QLCNIC_DEV_INITIALIZING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_QLC_SHARED_REG_WR32
	movq	_DRV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_QLCDB
LBB0_6:
	movq	%r15, %rdi
	callq	_qlcnic_api_unlock
	movq	%r15, %rdi
	callq	_qlcnic_start_firmware
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.7:
	movq	%r15, %rdi
	callq	_qlcnic_clr_drv_state
	movq	8(%r15), %rdi
	callq	_kfree
	movq	$0, 8(%r15)
	movq	%r15, %rdi
	callq	_qlcnic_setup_intr
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r12d
	movq	8(%r15), %rdi
	callq	_kfree
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
	jmp	LBB0_15
LBB0_9:
	movq	%r14, %rdi
	callq	_netif_running
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	movq	%r15, %rdi
	callq	_qlcnic_attach
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_qlcnic_clr_all_drv_state
	movq	___QLCNIC_AER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %r15
	movq	%r15, %rsi
	callq	_clear_bit
	jmp	LBB0_14
LBB0_12:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_qlcnic_up
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	_NETDEV_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_qlcnic_restore_indev_addr
	xorl	%r12d, %r12d
LBB0_14:
	movq	%r14, %rdi
	callq	_netif_device_attach
LBB0_15:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pci_channel_io_normal,4,2      ## @pci_channel_io_normal
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QLCNIC_NON_PRIV_FUNC,8,3       ## @QLCNIC_NON_PRIV_FUNC
	.comm	___QLCNIC_START_FW,4,2          ## @__QLCNIC_START_FW
	.comm	_QLCNIC_CRB_DEV_STATE,4,2       ## @QLCNIC_CRB_DEV_STATE
	.comm	_QLCNIC_DEV_INITIALIZING,4,2    ## @QLCNIC_DEV_INITIALIZING
	.comm	_DRV,4,2                        ## @DRV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Restarting fw\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to setup interrupt\n"

	.comm	___QLCNIC_AER,4,2               ## @__QLCNIC_AER
	.comm	_NETDEV_UP,4,2                  ## @NETDEV_UP
	.no_dead_strip	_qlcnic_attach_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_attach_func
_qlcnic_attach_func:                    ; @qlcnic_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	x22, x0
	bl	_pci_get_drvdata
	mov	x20, x0
	ldr	x19, [x0, #24]
Lloh0:
	adrp	x8, _pci_channel_io_normal@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pci_channel_io_normal@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x22]
	mov	x0, x22
	bl	_pci_enable_device
	mov	x21, x0
	cbnz	w0, LBB0_15
; %bb.1:
	mov	x0, x22
	bl	_pci_set_master
	mov	x0, x22
	bl	_pci_restore_state
	mov	x0, x22
	bl	_qlcnic_is_first_func
	mov	x21, x0
	mov	x0, x20
	bl	_qlcnic_api_lock
	cbz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_3:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _QLCNIC_NON_PRIV_FUNC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _QLCNIC_NON_PRIV_FUNC@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	w21, #0, #4, ne
	b.eq	LBB0_5
; %bb.4:
	mov	w8, #1
	mov	x1, x20
	str	w8, [x1], #4
Lloh9:
	adrp	x8, ___QLCNIC_START_FW@GOTPAGE
Lloh10:
	ldr	x8, [x8, ___QLCNIC_START_FW@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_set_bit
Lloh12:
	adrp	x8, _QLCNIC_CRB_DEV_STATE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _QLCNIC_CRB_DEV_STATE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _QLCNIC_DEV_INITIALIZING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _QLCNIC_DEV_INITIALIZING@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_QLC_SHARED_REG_WR32
Lloh18:
	adrp	x8, _DRV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DRV@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_QLCDB
LBB0_5:
	mov	x0, x20
	bl	_qlcnic_api_unlock
	mov	x0, x20
	bl	_qlcnic_start_firmware
	mov	x21, x0
	cbnz	w0, LBB0_15
; %bb.6:
	mov	x0, x20
	bl	_qlcnic_clr_drv_state
	ldr	x0, [x20, #8]
	bl	_kfree
	str	xzr, [x20, #8]
	mov	x0, x20
	bl	_qlcnic_setup_intr
	cbz	w0, LBB0_8
; %bb.7:
	mov	x21, x0
	ldr	x0, [x20, #8]
	bl	_kfree
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	b	LBB0_15
LBB0_8:
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_11
; %bb.9:
	mov	x0, x20
	bl	_qlcnic_attach
	cbz	w0, LBB0_12
; %bb.10:
	mov	x21, x0
	mov	x0, x20
	mov	w1, #1
	bl	_qlcnic_clr_all_drv_state
Lloh25:
	adrp	x8, ___QLCNIC_AER@GOTPAGE
Lloh26:
	ldr	x8, [x8, ___QLCNIC_AER@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	add	x1, x20, #4
	bl	_clear_bit
	b	LBB0_14
LBB0_11:
	mov	w21, #0
	b	LBB0_14
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_qlcnic_up
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.13:
Lloh28:
	adrp	x8, _NETDEV_UP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _NETDEV_UP@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qlcnic_restore_indev_addr
LBB0_14:
	mov	x0, x19
	bl	_netif_device_attach
LBB0_15:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_pci_channel_io_normal,4,2      ; @pci_channel_io_normal
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QLCNIC_NON_PRIV_FUNC,8,3       ; @QLCNIC_NON_PRIV_FUNC
	.comm	___QLCNIC_START_FW,4,2          ; @__QLCNIC_START_FW
	.comm	_QLCNIC_CRB_DEV_STATE,4,2       ; @QLCNIC_CRB_DEV_STATE
	.comm	_QLCNIC_DEV_INITIALIZING,4,2    ; @QLCNIC_DEV_INITIALIZING
	.comm	_DRV,4,2                        ; @DRV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Restarting fw\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to setup interrupt\n"

	.comm	___QLCNIC_AER,4,2               ; @__QLCNIC_AER
	.comm	_NETDEV_UP,4,2                  ; @NETDEV_UP
	.no_dead_strip	_qlcnic_attach_func
.subsections_via_symbols
