	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t3_reset_adapter               ## -- Begin function t3_reset_adapter
	.p2align	4, 0x90
_t3_reset_adapter:                      ## @t3_reset_adapter
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	_T3_REV_B2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_is_pcie
	movl	$0, -28(%rbp)
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	(%rbx), %edi
	callq	_pci_save_state
	xorl	%r15d, %r15d
	jmp	LBB0_5
LBB0_3:
	movl	$0, -28(%rbp)
LBB0_4:
	movb	$1, %r15b
LBB0_5:
	movq	_A_PL_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_F_CRSTWRM@GOTPCREL(%rip), %rax
	movq	_F_CRSTWRMMODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_t3_write_reg
	movl	$50, %edi
	callq	_msleep
	movl	(%rbx), %edi
	xorl	%r14d, %r14d
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_pci_read_config_word
	cmpl	$5157, -28(%rbp)                ## imm = 0x1425
	je	LBB0_14
## %bb.6:
	movl	$50, %edi
	callq	_msleep
	movl	(%rbx), %edi
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_pci_read_config_word
	cmpl	$5157, -28(%rbp)                ## imm = 0x1425
	je	LBB0_14
## %bb.7:
	movl	$50, %edi
	callq	_msleep
	movl	(%rbx), %edi
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_pci_read_config_word
	cmpl	$5157, -28(%rbp)                ## imm = 0x1425
	je	LBB0_14
## %bb.8:
	movl	$50, %edi
	callq	_msleep
	movl	(%rbx), %edi
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_pci_read_config_word
	cmpl	$5157, -28(%rbp)                ## imm = 0x1425
	je	LBB0_14
## %bb.9:
	movl	$50, %edi
	callq	_msleep
	movl	(%rbx), %edi
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_pci_read_config_word
	cmpl	$5157, -28(%rbp)                ## imm = 0x1425
	je	LBB0_14
## %bb.10:
	movl	$50, %edi
	callq	_msleep
	movl	(%rbx), %edi
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_pci_read_config_word
	cmpl	$5157, -28(%rbp)                ## imm = 0x1425
	je	LBB0_14
## %bb.11:
	movl	$50, %edi
	callq	_msleep
	movl	(%rbx), %edi
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_pci_read_config_word
	cmpl	$5157, -28(%rbp)                ## imm = 0x1425
	je	LBB0_14
## %bb.12:
	movl	$50, %edi
	callq	_msleep
	movl	(%rbx), %edi
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_pci_read_config_word
	cmpl	$5157, -28(%rbp)                ## imm = 0x1425
	je	LBB0_14
## %bb.13:
	movl	$50, %edi
	callq	_msleep
	movl	(%rbx), %edi
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_pci_read_config_word
	cmpl	$5157, -28(%rbp)                ## imm = 0x1425
	jne	LBB0_17
LBB0_14:
	testb	%r15b, %r15b
	jne	LBB0_16
LBB0_15:
	movl	(%rbx), %edi
	callq	_pci_restore_state
	xorl	%r14d, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	$50, %edi
	callq	_msleep
	movl	(%rbx), %edi
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_pci_read_config_word
	xorl	%r14d, %r14d
	cmpl	$5157, -28(%rbp)                ## imm = 0x1425
	setne	%al
	orb	%al, %r15b
	je	LBB0_15
## %bb.18:
	movb	%al, %r14b
	negl	%r14d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_T3_REV_B2,8,3                  ## @T3_REV_B2
	.comm	_A_PL_RST,4,2                   ## @A_PL_RST
	.comm	_F_CRSTWRM,4,2                  ## @F_CRSTWRM
	.comm	_F_CRSTWRMMODE,4,2              ## @F_CRSTWRMMODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t3_reset_adapter               ; -- Begin function t3_reset_adapter
	.p2align	2
_t3_reset_adapter:                      ; @t3_reset_adapter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _T3_REV_B2@GOTPAGE
Lloh1:
	ldr	x9, [x9, _T3_REV_B2@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_is_pcie
	str	wzr, [sp, #12]
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x19]
	bl	_pci_save_state
	mov	w20, #0
	b	LBB0_5
LBB0_3:
	str	wzr, [sp, #12]
LBB0_4:
	mov	w20, #1
LBB0_5:
Lloh3:
	adrp	x8, _A_PL_RST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _A_PL_RST@GOTPAGEOFF]
Lloh5:
	adrp	x9, _F_CRSTWRM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _F_CRSTWRM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	ldr	w8, [x9]
Lloh9:
	adrp	x9, _F_CRSTWRMMODE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _F_CRSTWRMMODE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_t3_write_reg
	mov	w0, #50
	bl	_msleep
	ldr	w0, [x19]
	add	x2, sp, #12
	mov	w1, #0
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	mov	w21, #5157
	cmp	w8, w21
	b.eq	LBB0_14
; %bb.6:
	mov	w0, #50
	bl	_msleep
	ldr	w0, [x19]
	add	x2, sp, #12
	mov	w1, #0
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	cmp	w8, w21
	b.eq	LBB0_14
; %bb.7:
	mov	w0, #50
	bl	_msleep
	ldr	w0, [x19]
	add	x2, sp, #12
	mov	w1, #0
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	mov	w21, #5157
	cmp	w8, w21
	b.eq	LBB0_14
; %bb.8:
	mov	w0, #50
	bl	_msleep
	ldr	w0, [x19]
	add	x2, sp, #12
	mov	w1, #0
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	cmp	w8, w21
	b.eq	LBB0_14
; %bb.9:
	mov	w0, #50
	bl	_msleep
	ldr	w0, [x19]
	add	x2, sp, #12
	mov	w1, #0
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	mov	w21, #5157
	cmp	w8, w21
	b.eq	LBB0_14
; %bb.10:
	mov	w0, #50
	bl	_msleep
	ldr	w0, [x19]
	add	x2, sp, #12
	mov	w1, #0
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	cmp	w8, w21
	b.eq	LBB0_14
; %bb.11:
	mov	w0, #50
	bl	_msleep
	ldr	w0, [x19]
	add	x2, sp, #12
	mov	w1, #0
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	mov	w21, #5157
	cmp	w8, w21
	b.eq	LBB0_14
; %bb.12:
	mov	w0, #50
	bl	_msleep
	ldr	w0, [x19]
	add	x2, sp, #12
	mov	w1, #0
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	cmp	w8, w21
	b.eq	LBB0_14
; %bb.13:
	mov	w0, #50
	bl	_msleep
	ldr	w0, [x19]
	add	x2, sp, #12
	mov	w1, #0
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	mov	w21, #5157
	cmp	w8, w21
	b.ne	LBB0_18
LBB0_14:
	tbnz	w20, #0, LBB0_16
LBB0_15:
	ldr	w0, [x19]
	bl	_pci_restore_state
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	add	sp, sp, #64
	ret
LBB0_18:
	mov	w0, #50
	bl	_msleep
	ldr	w0, [x19]
	add	x2, sp, #12
	mov	w1, #0
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	cmp	w8, w21
	cset	w8, ne
	orr	w8, w8, w20
	csetm	w0, ne
	tbz	w8, #0, LBB0_15
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_T3_REV_B2,8,3                  ; @T3_REV_B2
	.comm	_A_PL_RST,4,2                   ; @A_PL_RST
	.comm	_F_CRSTWRM,4,2                  ; @F_CRSTWRM
	.comm	_F_CRSTWRMMODE,4,2              ; @F_CRSTWRMMODE
.subsections_via_symbols
