	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_83xx_diag_alloc_res
_qlcnic_83xx_diag_alloc_res:            ## @qlcnic_83xx_diag_alloc_res
	.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	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r13
	movq	(%rax), %rbx
	movq	%r14, %rdi
	callq	_netif_device_detach
	movq	%r14, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	___qlcnic_down
LBB0_2:
	movq	%r13, %rdi
	callq	_qlcnic_detach
	movq	_QLCNIC_SINGLE_RING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r13)
	movq	32(%r13), %rax
	movl	%r12d, (%rax)
	movq	$0, 24(%rax)
	movq	%r13, %rdi
	callq	_qlcnic_attach
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
LBB0_18:
	movq	%r14, %rdi
	callq	_netif_device_attach
LBB0_19:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r13, %rdi
	callq	_qlcnic_fw_create_ctx
	testl	%eax, %eax
	je	LBB0_5
## %bb.16:
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_qlcnic_detach
	movq	_QLCNIC_ADAPTER_UP_MAGIC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_18
## %bb.17:
	movq	%r15, 8(%r13)
	movq	%r13, %rdi
	callq	_qlcnic_attach
	jmp	LBB0_18
LBB0_5:
	cmpq	$0, 16(%r13)
	je	LBB0_8
## %bb.6:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r13), %rax
	movq	8(%rax), %rsi
	addq	%r14, %rsi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_qlcnic_post_rx_buffers
	incq	%rbx
	addq	$4, %r14
	cmpq	16(%r13), %rbx
	jb	LBB0_7
LBB0_8:
	movq	32(%r13), %rax
	movl	(%rax), %ecx
	movq	_QLCNIC_INTERRUPT_TEST@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_13
## %bb.9:
	cmpq	$0, 8(%r13)
	je	LBB0_13
## %bb.10:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%r13), %rax
	movq	(%rax), %rsi
	addq	%r14, %rsi
	movq	%r13, %rdi
	callq	_qlcnic_enable_sds_intr
	incq	%rbx
	addq	$4, %r14
	cmpq	8(%r13), %rbx
	jb	LBB0_11
## %bb.12:
	movq	32(%r13), %rax
	movl	(%rax), %ecx
LBB0_13:
	movq	_QLCNIC_LOOPBACK_TEST@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_15
## %bb.14:
	movq	$0, 16(%rax)
	movq	8(%rax), %rax
	movq	%r13, %rdi
	movl	$1, %esi
	callq	*(%rax)
LBB0_15:
	movq	___QLCNIC_DEV_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %r13
	movq	%r13, %rsi
	callq	_set_bit
	xorl	%r12d, %r12d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_QLCNIC_SINGLE_RING,8,3         ## @QLCNIC_SINGLE_RING
	.comm	_QLCNIC_ADAPTER_UP_MAGIC,8,3    ## @QLCNIC_ADAPTER_UP_MAGIC
	.comm	_QLCNIC_INTERRUPT_TEST,4,2      ## @QLCNIC_INTERRUPT_TEST
	.comm	_QLCNIC_LOOPBACK_TEST,4,2       ## @QLCNIC_LOOPBACK_TEST
	.comm	___QLCNIC_DEV_UP,4,2            ## @__QLCNIC_DEV_UP
	.no_dead_strip	_qlcnic_83xx_diag_alloc_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_83xx_diag_alloc_res
_qlcnic_83xx_diag_alloc_res:            ; @qlcnic_83xx_diag_alloc_res
	.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, x2
	mov	x22, x1
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	ldr	x23, [x0]
	mov	x0, x20
	bl	_netif_device_detach
	mov	x0, x20
	bl	_netif_running
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	___qlcnic_down
LBB0_2:
	mov	x0, x19
	bl	_qlcnic_detach
Lloh0:
	adrp	x8, _QLCNIC_SINGLE_RING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QLCNIC_SINGLE_RING@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	ldr	x8, [x19, #32]
	str	w22, [x8]
	str	xzr, [x8, #24]
	mov	x0, x19
	bl	_qlcnic_attach
	cbz	w0, LBB0_6
; %bb.3:
	mov	x22, x0
LBB0_4:
	mov	x0, x20
	bl	_netif_device_attach
LBB0_5:
	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
LBB0_6:
	mov	x0, x19
	bl	_qlcnic_fw_create_ctx
	cbz	w0, LBB0_9
; %bb.7:
	mov	x22, x0
	mov	x0, x19
	bl	_qlcnic_detach
Lloh3:
	adrp	x8, _QLCNIC_ADAPTER_UP_MAGIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QLCNIC_ADAPTER_UP_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x23, x8
	b.ne	LBB0_4
; %bb.8:
	str	x21, [x19, #8]
	mov	x0, x19
	bl	_qlcnic_attach
	b	LBB0_4
LBB0_9:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_12
; %bb.10:
	mov	x21, #0
	mov	x20, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	x8, [x8, #8]
	add	x1, x8, x21
	mov	x0, x19
	mov	x2, x20
	bl	_qlcnic_post_rx_buffers
	add	x20, x20, #1
	ldr	x8, [x19, #16]
	add	x21, x21, #4
	cmp	x20, x8
	b.lo	LBB0_11
LBB0_12:
	ldr	x8, [x19, #32]
	ldr	w9, [x8]
Lloh6:
	adrp	x10, _QLCNIC_INTERRUPT_TEST@GOTPAGE
Lloh7:
	ldr	x10, [x10, _QLCNIC_INTERRUPT_TEST@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_17
; %bb.13:
	ldr	x10, [x19, #8]
	cbz	x10, LBB0_17
; %bb.14:
	mov	x20, #0
	mov	x21, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	add	x1, x8, x20
	mov	x0, x19
	bl	_qlcnic_enable_sds_intr
	add	x21, x21, #1
	ldr	x8, [x19, #8]
	add	x20, x20, #4
	cmp	x21, x8
	b.lo	LBB0_15
; %bb.16:
	ldr	x8, [x19, #32]
	ldr	w9, [x8]
LBB0_17:
Lloh9:
	adrp	x10, _QLCNIC_LOOPBACK_TEST@GOTPAGE
Lloh10:
	ldr	x10, [x10, _QLCNIC_LOOPBACK_TEST@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_19
; %bb.18:
	str	xzr, [x8, #16]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	w1, #1
	blr	x8
LBB0_19:
Lloh12:
	adrp	x8, ___QLCNIC_DEV_UP@GOTPAGE
Lloh13:
	ldr	x8, [x8, ___QLCNIC_DEV_UP@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	add	x1, x19, #24
	bl	_set_bit
	mov	w22, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_QLCNIC_SINGLE_RING,8,3         ; @QLCNIC_SINGLE_RING
	.comm	_QLCNIC_ADAPTER_UP_MAGIC,8,3    ; @QLCNIC_ADAPTER_UP_MAGIC
	.comm	_QLCNIC_INTERRUPT_TEST,4,2      ; @QLCNIC_INTERRUPT_TEST
	.comm	_QLCNIC_LOOPBACK_TEST,4,2       ; @QLCNIC_LOOPBACK_TEST
	.comm	___QLCNIC_DEV_UP,4,2            ; @__QLCNIC_DEV_UP
	.no_dead_strip	_qlcnic_83xx_diag_alloc_res
.subsections_via_symbols
