	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scc_softreset
_scc_softreset:                         ## @scc_softreset
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r15
	movq	_ATA_FLAG_SLAVE_POSS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	(%r15), %r14d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DPRINTK
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_scc_devchk
	xorl	%ebx, %ebx
	testq	%rax, %rax
	setne	%bl
	andl	%r13d, %r14d
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_scc_devchk
	leal	2(%rbx), %ecx
	testq	%rax, %rax
	cmovel	%ebx, %ecx
	movl	%ecx, %ebx
LBB0_2:
	movq	16(%r15), %rax
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	*(%rax)
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DPRINTK
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	callq	_scc_bus_softreset
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_KERN_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %ecx
	callq	_ata_port_printk
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_9
LBB0_4:
	movq	8(%r15), %rdi
	movl	%ebx, %esi
	andl	$1, %esi
	leaq	-44(%rbp), %rdx
	callq	_ata_sff_dev_classify
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, (%r12)
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	cmpl	$129, -44(%rbp)
	je	LBB0_6
## %bb.7:
	movq	8(%r15), %rdi
	addq	$4, %rdi
	andl	$-2, %ebx
	leaq	-44(%rbp), %rdx
	movl	%ebx, %esi
	callq	_ata_sff_dev_classify
	movl	%eax, %edx
	movl	%eax, 4(%r12)
	movl	(%r12), %eax
	jmp	LBB0_8
LBB0_6:
	movl	4(%r12), %edx
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	xorl	%r13d, %r13d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DPRINTK
LBB0_9:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_FLAG_SLAVE_POSS,4,2        ## @ATA_FLAG_SLAVE_POSS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ENTER\n"

L_.str.1:                               ## @.str.1
	.asciz	"about to softreset, devmask=%x\n"

	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
L_.str.2:                               ## @.str.2
	.asciz	"SRST failed (err_mask=0x%x)\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.3:                               ## @.str.3
	.asciz	"EXIT, classes[0]=%u [1]=%u\n"

	.no_dead_strip	_scc_softreset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scc_softreset
_scc_softreset:                         ; @scc_softreset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x2
	mov	x19, x1
	ldr	x20, [x0]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _ATA_FLAG_SLAVE_POSS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_FLAG_SLAVE_POSS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w23, w9, w8
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
	mov	x0, x20
	mov	w1, #0
	bl	_scc_devchk
	cmp	x0, #0
	cset	w21, ne
	cbz	w23, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #1
	bl	_scc_devchk
	orr	w8, w21, #0x2
	cmp	x0, #0
	csel	w21, w21, w8, eq
LBB0_2:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	mov	x0, x20
	mov	w1, #0
	blr	x8
	str	x21, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTK
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_scc_bus_softreset
	cbz	w0, LBB0_4
; %bb.3:
	mov	x3, x0
Lloh7:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str.2@PAGE
Lloh11:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_ata_port_printk
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_4:
	ldr	x0, [x20, #8]
	and	w1, w21, #0x1
	add	x2, sp, #28
	bl	_ata_sff_dev_classify
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x19]
	cbz	w23, LBB0_7
; %bb.5:
	ldr	w8, [sp, #28]
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.6:
	ldr	x8, [x20, #8]
	add	x0, x8, #4
	and	w1, w21, #0x2
	add	x2, sp, #28
	bl	_ata_sff_dev_classify
	mov	x8, x0
	str	w0, [x19, #4]
	ldr	w0, [x19]
	b	LBB0_8
LBB0_7:
	ldr	w8, [x19, #4]
LBB0_8:
	stp	x0, x8, [sp]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DPRINTK
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_FLAG_SLAVE_POSS,4,2        ; @ATA_FLAG_SLAVE_POSS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ENTER\n"

l_.str.1:                               ; @.str.1
	.asciz	"about to softreset, devmask=%x\n"

	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
l_.str.2:                               ; @.str.2
	.asciz	"SRST failed (err_mask=0x%x)\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.3:                               ; @.str.3
	.asciz	"EXIT, classes[0]=%u [1]=%u\n"

	.no_dead_strip	_scc_softreset
.subsections_via_symbols
