	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsxx_slot_reset
_rsxx_slot_reset:                       ## @rsxx_slot_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	_pci_get_drvdata
	movq	%rax, %r15
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movq	%r14, %rdi
	callq	_pci_enable_device
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	%r15, %r12
	movq	%r14, %rdi
	callq	_pci_set_master
	movq	%r15, %rdi
	callq	_rsxx_eeh_fifo_flush_poll
	testl	%eax, %eax
	je	LBB0_2
LBB0_13:
	movq	%r14, %rdi
	callq	_rsxx_eeh_failure
	movq	_PCI_ERS_RESULT_DISCONNECT@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r12, %rdi
	callq	_rsxx_dma_queue_reset
	cmpl	$0, (%r12)
	jle	LBB0_14
## %bb.3:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rsi
	addq	%r13, %rsi
	movq	%r14, %rdi
	callq	_rsxx_hw_buffers_init
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	(%r12), %rax
	addq	$48, %r13
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_14:
	cmpq	$0, 40(%r12)
	je	LBB0_16
## %bb.15:
	movq	%r12, %rdi
	callq	_rsxx_dma_configure
LBB0_16:
	movq	_ISR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%r12), %rdi
	callq	_ioread32
	movq	$0, 24(%r12)
	addq	$20, %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_RSXX_MAX_TARGETS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r12), %eax
	jne	LBB0_17
## %bb.18:
	movq	_CR_INTR_ALL_C@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movq	_CR_INTR_ALL_G@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rsxx_enable_ier_and_isr
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r12, %rdi
	callq	_rsxx_kick_creg_queue
	cmpl	$0, (%r12)
	jle	LBB0_24
## %bb.20:
	movl	$44, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	incq	%r13
	movslq	(%r12), %rax
	addq	$48, %rbx
	cmpq	%rax, %r13
	jge	LBB0_24
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	leaq	(%rax,%rbx), %rdi
	addq	$-4, %rdi
	callq	_spin_lock
	movq	8(%r12), %rdi
	addq	%rbx, %rdi
	callq	_list_empty
	movq	%rax, %r15
	movq	8(%r12), %rax
	leaq	(%rax,%rbx), %rdi
	addq	$-4, %rdi
	callq	_spin_unlock
	testq	%r15, %r15
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	8(%r12), %rax
	movl	-8(%rax,%rbx), %edi
	leaq	(%rax,%rbx), %rsi
	addq	$-12, %rsi
	callq	_queue_work
	jmp	LBB0_23
LBB0_24:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movq	_PCI_ERS_RESULT_RECOVERED@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_6:
	cmpl	$0, (%r12)
	jle	LBB0_13
## %bb.7:
	xorl	%ebx, %ebx
	movq	_STATUS_BUFFER_SIZE8@GOTPCREL(%rip), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r15
	movslq	(%r12), %rax
	addq	$48, %rbx
	cmpq	%rax, %r15
	jge	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	24(%rax,%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	16(%r12), %edi
	movl	(%r13), %esi
	movl	16(%rax,%rbx), %ecx
	callq	_pci_free_consistent
	movq	8(%r12), %rax
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%rax,%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	16(%r12), %edi
	movq	_COMMAND_BUFFER_SIZE8@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rax,%rbx), %ecx
	callq	_pci_free_consistent
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IBM Flash Adapter PCI: recovering from slot reset.\n"

	.comm	_ISR,8,3                        ## @ISR
	.comm	_RSXX_MAX_TARGETS,4,2           ## @RSXX_MAX_TARGETS
	.comm	_CR_INTR_ALL_G,4,2              ## @CR_INTR_ALL_G
	.comm	_CR_INTR_ALL_C,4,2              ## @CR_INTR_ALL_C
L_.str.1:                               ## @.str.1
	.asciz	"IBM Flash Adapter PCI: recovery complete.\n"

	.comm	_PCI_ERS_RESULT_RECOVERED,4,2   ## @PCI_ERS_RESULT_RECOVERED
	.comm	_STATUS_BUFFER_SIZE8,4,2        ## @STATUS_BUFFER_SIZE8
	.comm	_COMMAND_BUFFER_SIZE8,4,2       ## @COMMAND_BUFFER_SIZE8
	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ## @PCI_ERS_RESULT_DISCONNECT
	.no_dead_strip	_rsxx_slot_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsxx_slot_reset
_rsxx_slot_reset:                       ; @rsxx_slot_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	_pci_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	mov	x0, x19
	bl	_pci_enable_device
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_pci_set_master
	mov	x0, x20
	bl	_rsxx_eeh_fifo_flush_poll
	cbz	w0, LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_rsxx_eeh_failure
Lloh2:
	adrp	x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	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_4:
	mov	x0, x20
	bl	_rsxx_dma_queue_reset
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x21, #0
	mov	x22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x1, x8, x21
	mov	x0, x19
	bl	_rsxx_hw_buffers_init
	cbnz	w0, LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #48
	cmp	x22, x8
	b.lt	LBB0_6
LBB0_8:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_rsxx_dma_configure
LBB0_10:
	ldr	x8, [x20, #32]
Lloh4:
	adrp	x9, _ISR@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ISR@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread32
	str	xzr, [x20, #24]
	add	x21, x20, #20
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
Lloh7:
	adrp	x9, _RSXX_MAX_TARGETS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _RSXX_MAX_TARGETS@GOTPAGEOFF]
Lloh9:
	adrp	x10, _CR_INTR_ALL_C@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CR_INTR_ALL_C@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x11, _CR_INTR_ALL_G@GOTPAGE
Lloh13:
	ldr	x11, [x11, _CR_INTR_ALL_G@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rsxx_enable_ier_and_isr
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_rsxx_kick_creg_queue
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.11:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x20]
	add	x22, x22, #48
	cmp	x23, x8
	b.ge	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	add	x0, x8, #40
	bl	_spin_lock
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	add	x0, x8, #44
	bl	_list_empty
	mov	x21, x0
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	add	x0, x8, #40
	bl	_spin_unlock
	cbnz	x21, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	ldr	w0, [x8, #36]
	add	x1, x8, #32
	bl	_queue_work
	b	LBB0_12
LBB0_15:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_info
Lloh16:
	adrp	x8, _PCI_ERS_RESULT_RECOVERED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PCI_ERS_RESULT_RECOVERED@GOTPAGEOFF]
	b	LBB0_3
LBB0_16:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.17:
	mov	x21, #0
	mov	x22, #0
Lloh18:
	adrp	x23, _COMMAND_BUFFER_SIZE8@GOTPAGE
Lloh19:
	ldr	x23, [x23, _COMMAND_BUFFER_SIZE8@GOTPAGEOFF]
Lloh20:
	adrp	x24, _STATUS_BUFFER_SIZE8@GOTPAGE
Lloh21:
	ldr	x24, [x24, _STATUS_BUFFER_SIZE8@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #48
	cmp	x22, x8
	b.ge	LBB0_2
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x9, x8, x21
	ldr	x2, [x9, #24]
	cbz	x2, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w0, [x20, #16]
	ldr	w1, [x24]
	ldr	w3, [x9, #16]
	bl	_pci_free_consistent
	ldr	x8, [x20, #8]
LBB0_21:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x9, x8, x21
	ldr	x2, [x9, #8]
	cbz	x2, LBB0_18
; %bb.22:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w0, [x20, #16]
	ldr	w1, [x23]
	ldr	w3, [x8, x21]
	bl	_pci_free_consistent
	b	LBB0_18
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IBM Flash Adapter PCI: recovering from slot reset.\n"

	.comm	_ISR,8,3                        ; @ISR
	.comm	_RSXX_MAX_TARGETS,4,2           ; @RSXX_MAX_TARGETS
	.comm	_CR_INTR_ALL_G,4,2              ; @CR_INTR_ALL_G
	.comm	_CR_INTR_ALL_C,4,2              ; @CR_INTR_ALL_C
l_.str.1:                               ; @.str.1
	.asciz	"IBM Flash Adapter PCI: recovery complete.\n"

	.comm	_PCI_ERS_RESULT_RECOVERED,4,2   ; @PCI_ERS_RESULT_RECOVERED
	.comm	_STATUS_BUFFER_SIZE8,4,2        ; @STATUS_BUFFER_SIZE8
	.comm	_COMMAND_BUFFER_SIZE8,4,2       ; @COMMAND_BUFFER_SIZE8
	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ; @PCI_ERS_RESULT_DISCONNECT
	.no_dead_strip	_rsxx_slot_reset
.subsections_via_symbols
