	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_setup_rings             ## -- Begin function qlcnic_setup_rings
	.p2align	4, 0x90
_qlcnic_setup_rings:                    ## @qlcnic_setup_rings
	.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	%rdi, %r12
	movq	56(%rdi), %r15
	movq	___QLCNIC_RESETTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	32(%r12), %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%r12), %r14
	movq	8(%r12), %r13
	movq	%r15, %rdi
	callq	_netif_device_detach
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_qlcnic_set_real_num_queues
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
LBB0_20:
	movq	%r15, %rdi
	callq	_netif_device_attach
	movq	___QLCNIC_RESETTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_clear_bit
	jmp	LBB0_21
LBB0_3:
	movq	%r15, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	___qlcnic_down
LBB0_5:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_qlcnic_detach
	movq	%r12, %rdi
	callq	_qlcnic_83xx_check
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	callq	_qlcnic_83xx_free_mbx_intr
	movq	%r12, %rdi
	callq	_qlcnic_83xx_enable_mbx_poll
LBB0_7:
	movq	%r12, %rdi
	callq	_qlcnic_teardown_intr
	movq	%r12, %rdi
	callq	_qlcnic_setup_intr
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	movl	48(%r12), %edi
	callq	_kfree
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
LBB0_21:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	16(%r12), %rsi
	movq	24(%r12), %rdx
	cmpq	%rsi, %r14
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_11
## %bb.10:
	cmpq	%rdx, %r13
	je	LBB0_12
LBB0_11:
	movq	%r12, %rdi
	callq	_qlcnic_set_real_num_queues
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
LBB0_12:
	movq	%r12, %rdi
	callq	_qlcnic_83xx_check
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_qlcnic_83xx_initialize_nic
	movq	%r12, %rdi
	callq	_qlcnic_83xx_setup_mbx_intr
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_qlcnic_83xx_disable_mbx_poll
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.14:
	movq	40(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netif_running
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movq	%r12, %rdi
	callq	_qlcnic_attach
	movl	%eax, %ebx
	testl	%eax, %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_20
## %bb.18:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	___qlcnic_up
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movq	_NETDEV_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_qlcnic_restore_indev_addr
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_16:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	___QLCNIC_RESETTING,4,2         ## @__QLCNIC_RESETTING
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to setup interrupt\n"

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

	.comm	_NETDEV_UP,4,2                  ## @NETDEV_UP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_setup_rings             ; -- Begin function qlcnic_setup_rings
	.p2align	2
_qlcnic_setup_rings:                    ; @qlcnic_setup_rings
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x0
	ldr	x19, [x0, #56]
Lloh0:
	adrp	x25, ___QLCNIC_RESETTING@GOTPAGE
Lloh1:
	ldr	x25, [x25, ___QLCNIC_RESETTING@GOTPAGEOFF]
	ldr	w0, [x25]
	add	x20, x21, #32
	mov	x1, x20
	bl	_test_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_10
LBB0_2:
	ldp	x24, x23, [x21]
	mov	x0, x19
	bl	_netif_device_detach
	mov	x0, x21
	mov	x1, x24
	mov	x2, x23
	bl	_qlcnic_set_real_num_queues
	mov	x22, x0
	cbz	w0, LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_netif_device_attach
	ldr	w0, [x25]
	mov	x1, x20
	bl	_clear_bit
	b	LBB0_10
LBB0_4:
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x21
	mov	x1, x19
	bl	___qlcnic_down
LBB0_6:
	mov	x0, x21
	bl	_qlcnic_detach
	mov	x0, x21
	bl	_qlcnic_83xx_check
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_qlcnic_83xx_free_mbx_intr
	mov	x0, x21
	bl	_qlcnic_83xx_enable_mbx_poll
LBB0_8:
	mov	x0, x21
	bl	_qlcnic_teardown_intr
	mov	x0, x21
	bl	_qlcnic_setup_intr
	cbz	w0, LBB0_11
; %bb.9:
	mov	x22, x0
	ldr	w0, [x21, #48]
	bl	_kfree
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldp	x1, x2, [x21, #16]
	cmp	x24, x1
	b.ne	LBB0_13
; %bb.12:
	cmp	x23, x2
	b.eq	LBB0_14
LBB0_13:
	mov	x0, x21
	bl	_qlcnic_set_real_num_queues
	mov	x22, x0
	cbnz	w0, LBB0_3
LBB0_14:
	mov	x0, x21
	bl	_qlcnic_83xx_check
	cbz	x0, LBB0_17
; %bb.15:
	mov	x0, x21
	mov	w1, #1
	bl	_qlcnic_83xx_initialize_nic
	mov	x0, x21
	bl	_qlcnic_83xx_setup_mbx_intr
	mov	x22, x0
	mov	x0, x21
	bl	_qlcnic_83xx_disable_mbx_poll
	cbz	w22, LBB0_17
; %bb.16:
	ldr	x0, [x21, #40]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_3
LBB0_17:
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_21
; %bb.18:
	mov	x0, x21
	bl	_qlcnic_attach
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.19:
	mov	x0, x21
	mov	x1, x19
	bl	___qlcnic_up
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.20:
Lloh9:
	adrp	x8, _NETDEV_UP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NETDEV_UP@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qlcnic_restore_indev_addr
	b	LBB0_3
LBB0_21:
	mov	w22, #0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	___QLCNIC_RESETTING,4,2         ; @__QLCNIC_RESETTING
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to setup interrupt\n"

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

	.comm	_NETDEV_UP,4,2                  ; @NETDEV_UP
.subsections_via_symbols
