	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_adapter_reset
_ql_adapter_reset:                      ## @ql_adapter_reset
	.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	%rdi, %r14
	callq	_ql_clear_routing_entries
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_err
	jmp	LBB0_12
LBB0_2:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	$30, %edi
	callq	_usecs_to_jiffies
	movl	$1, %edi
	movl	%eax, %esi
	callq	_max
	movq	%rax, %r12
	movq	_QL_ASIC_RECOVERY@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	4(%r14), %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	jmp	LBB0_5
LBB0_3:
	movq	_MB_SET_MPI_TFK_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ql_mb_set_mgmnt_traffic_ctl
	movq	%r14, %rdi
	callq	_ql_wait_fifo_empty
LBB0_5:
	addq	%r15, %r12
	movq	_RST_FO@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_RST_FO_FR@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	%eax, %edx
	shll	$16, %edx
	orl	%eax, %edx
	movq	%r14, %rdi
	callq	_ql_write32
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_ql_read32
	testl	%eax, (%r13)
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_cpu_relax
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r12, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_6
## %bb.9:
	testl	%ebx, (%r13)
	movl	$0, %ebx
	je	LBB0_11
## %bb.10:
	movq	_ifdown@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_7:
	xorl	%ebx, %ebx
LBB0_11:
	movq	_MB_SET_MPI_TFK_RESUME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ql_mb_set_mgmnt_traffic_ctl
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ifup,4,2                       ## @ifup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to clear routing bits.\n"

	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_QL_ASIC_RECOVERY,4,2           ## @QL_ASIC_RECOVERY
	.comm	_MB_SET_MPI_TFK_STOP,4,2        ## @MB_SET_MPI_TFK_STOP
	.comm	_RST_FO,4,2                     ## @RST_FO
	.comm	_RST_FO_FR,4,2                  ## @RST_FO_FR
	.comm	_ifdown,4,2                     ## @ifdown
L_.str.1:                               ## @.str.1
	.asciz	"ETIMEDOUT!!! errored out of resetting the chip!\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_MB_SET_MPI_TFK_RESUME,4,2      ## @MB_SET_MPI_TFK_RESUME
	.no_dead_strip	_ql_adapter_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_adapter_reset
_ql_adapter_reset:                      ; @ql_adapter_reset
	.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	x19, x0
	bl	_ql_clear_routing_entries
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _ifup@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	b	LBB0_12
LBB0_2:
Lloh5:
	adrp	x22, _jiffies@GOTPAGE
Lloh6:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x20, [x22]
	mov	w0, #30
	bl	_usecs_to_jiffies
	mov	x1, x0
	mov	w0, #1
	bl	_max
	add	x20, x0, x20
Lloh7:
	adrp	x23, _QL_ASIC_RECOVERY@GOTPAGE
Lloh8:
	ldr	x23, [x23, _QL_ASIC_RECOVERY@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x21, x19, #4
	mov	x1, x21
	bl	_test_bit
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x23]
	mov	x1, x21
	bl	_clear_bit
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _MB_SET_MPI_TFK_STOP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MB_SET_MPI_TFK_STOP@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ql_mb_set_mgmnt_traffic_ctl
	mov	x0, x19
	bl	_ql_wait_fifo_empty
LBB0_5:
Lloh12:
	adrp	x23, _RST_FO@GOTPAGE
Lloh13:
	ldr	x23, [x23, _RST_FO@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh14:
	adrp	x24, _RST_FO_FR@GOTPAGE
Lloh15:
	ldr	x24, [x24, _RST_FO_FR@GOTPAGEOFF]
	ldr	w8, [x24]
	orr	w2, w8, w8, lsl #16
	mov	x0, x19
	bl	_ql_write32
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_ql_read32
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, x0
	bl	_cpu_relax
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_before
	cbnz	x0, LBB0_6
; %bb.8:
	ldr	w8, [x24]
	tst	w8, w21
	b.eq	LBB0_10
; %bb.9:
Lloh16:
	adrp	x8, _ifdown@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ifdown@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh19:
	adrp	x3, l_.str.1@PAGE
Lloh20:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh21:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_10:
	mov	w20, #0
LBB0_11:
Lloh24:
	adrp	x8, _MB_SET_MPI_TFK_RESUME@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MB_SET_MPI_TFK_RESUME@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ql_mb_set_mgmnt_traffic_ctl
LBB0_12:
	mov	x0, x20
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ifup,4,2                       ; @ifup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to clear routing bits.\n"

	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_QL_ASIC_RECOVERY,4,2           ; @QL_ASIC_RECOVERY
	.comm	_MB_SET_MPI_TFK_STOP,4,2        ; @MB_SET_MPI_TFK_STOP
	.comm	_RST_FO,4,2                     ; @RST_FO
	.comm	_RST_FO_FR,4,2                  ; @RST_FO_FR
	.comm	_ifdown,4,2                     ; @ifdown
l_.str.1:                               ; @.str.1
	.asciz	"ETIMEDOUT!!! errored out of resetting the chip!\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_MB_SET_MPI_TFK_RESUME,4,2      ; @MB_SET_MPI_TFK_RESUME
	.no_dead_strip	_ql_adapter_reset
.subsections_via_symbols
