	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_diag_alloc_res          ## -- Begin function qlcnic_diag_alloc_res
	.p2align	4, 0x90
_qlcnic_diag_alloc_res:                 ## @qlcnic_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_netif_device_detach
	movq	%r14, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	___qlcnic_down
LBB0_2:
	movq	%r12, %rdi
	callq	_qlcnic_detach
	movl	$1, (%r12)
	movq	16(%r12), %rax
	movl	%r15d, (%rax)
	movq	$0, 16(%rax)
	movq	%r12, %rdi
	callq	_qlcnic_attach
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %r15d
	jmp	LBB0_4
LBB0_5:
	movq	%r12, %rdi
	callq	_qlcnic_fw_create_ctx
	testl	%eax, %eax
	je	LBB0_6
## %bb.18:
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_qlcnic_detach
LBB0_4:
	movq	%r14, %rdi
	callq	_netif_device_attach
LBB0_17:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$0, 4(%r12)
	jle	LBB0_9
## %bb.7:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rax
	movq	8(%rax), %rsi
	addq	%r14, %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_qlcnic_post_rx_buffers
	incq	%rbx
	movslq	4(%r12), %rax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_9:
	movq	16(%r12), %rax
	movl	(%rax), %ecx
	movq	_QLCNIC_INTERRUPT_TEST@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_14
## %bb.10:
	cmpl	$0, (%r12)
	jle	LBB0_14
## %bb.11:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rax
	movq	(%rax), %rdi
	addq	%r14, %rdi
	callq	_qlcnic_enable_int
	incq	%rbx
	movslq	(%r12), %rax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_12
## %bb.13:
	movq	16(%r12), %rax
	movl	(%rax), %ecx
LBB0_14:
	movq	_QLCNIC_LOOPBACK_TEST@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_16
## %bb.15:
	movq	$0, 8(%rax)
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_qlcnic_linkevent_request
LBB0_16:
	movq	___QLCNIC_DEV_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %r12
	movq	%r12, %rsi
	callq	_set_bit
	xorl	%r15d, %r15d
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.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
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_diag_alloc_res          ; -- Begin function qlcnic_diag_alloc_res
	.p2align	2
_qlcnic_diag_alloc_res:                 ; @qlcnic_diag_alloc_res
	.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, x1
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, 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
	mov	w8, #1
	str	w8, [x19]
	ldr	x8, [x19, #16]
	str	w21, [x8]
	str	xzr, [x8, #16]
	mov	x0, x19
	bl	_qlcnic_attach
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_qlcnic_fw_create_ctx
	cbz	w0, LBB0_8
; %bb.5:
	mov	x21, x0
	mov	x0, x19
	bl	_qlcnic_detach
LBB0_6:
	mov	x0, x20
	bl	_netif_device_attach
LBB0_7:
	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
LBB0_8:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x21, #0
	mov	x20, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #8]
	add	x1, x8, x21
	mov	x0, x19
	mov	x2, x20
	bl	_qlcnic_post_rx_buffers
	add	x20, x20, #1
	ldrsw	x8, [x19, #4]
	add	x21, x21, #4
	cmp	x20, x8
	b.lt	LBB0_10
LBB0_11:
	ldr	x8, [x19, #16]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _QLCNIC_INTERRUPT_TEST@GOTPAGE
Lloh1:
	ldr	x10, [x10, _QLCNIC_INTERRUPT_TEST@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_16
; %bb.12:
	ldr	w10, [x19]
	cmp	w10, #1
	b.lt	LBB0_16
; %bb.13:
	mov	x20, #0
	mov	x21, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	add	x0, x8, x20
	bl	_qlcnic_enable_int
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x20, x20, #4
	cmp	x21, x8
	b.lt	LBB0_14
; %bb.15:
	ldr	x8, [x19, #16]
	ldr	w9, [x8]
LBB0_16:
Lloh3:
	adrp	x10, _QLCNIC_LOOPBACK_TEST@GOTPAGE
Lloh4:
	ldr	x10, [x10, _QLCNIC_LOOPBACK_TEST@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_18
; %bb.17:
	str	xzr, [x8, #8]
	mov	x0, x19
	mov	w1, #1
	bl	_qlcnic_linkevent_request
LBB0_18:
Lloh6:
	adrp	x8, ___QLCNIC_DEV_UP@GOTPAGE
Lloh7:
	ldr	x8, [x8, ___QLCNIC_DEV_UP@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
	mov	w21, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.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
.subsections_via_symbols
