	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_scsi_activity_store
_ata_scsi_activity_store:               ## @ata_scsi_activity_store
	.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	%rcx, %r14
	movq	%rdx, %r15
	callq	_to_scsi_device
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_ata_shost_to_port
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_ata_scsi_find_dev
	movq	%rax, %r12
	movq	8(%r13), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movq	_ATA_FLAG_SW_ACTIVITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_4
## %bb.2:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_simple_strtoul
                                        ## kill: def $eax killed $eax def $rax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	ja	LBB0_4
## %bb.3:
	movq	8(%r13), %rcx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	*(%rcx)
	testl	%eax, %eax
	cltq
	cmoveq	%r14, %rax
	jmp	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_FLAG_SW_ACTIVITY,4,2       ## @ATA_FLAG_SW_ACTIVITY
	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_ata_scsi_activity_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_scsi_activity_store
_ata_scsi_activity_store:               ; @ata_scsi_activity_store
	.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	x19, x3
	mov	x21, x2
	bl	_to_scsi_device
	mov	x22, x0
	ldr	w0, [x0]
	bl	_ata_shost_to_port
	mov	x20, x0
	mov	x1, x22
	bl	_ata_scsi_find_dev
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _ATA_FLAG_SW_ACTIVITY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_FLAG_SW_ACTIVITY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	mov	x22, x0
	mov	x0, x21
	mov	x1, #0
	mov	w2, #0
	bl	_simple_strtoul
	sub	w8, w0, #128
	cmp	w8, #2
	b.hi	LBB0_4
; %bb.3:
	mov	x1, x0
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	mov	x0, x22
	blr	x8
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	w0, #0
	csel	x0, x19, x8, eq
	b	LBB0_5
LBB0_4:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_FLAG_SW_ACTIVITY,4,2       ; @ATA_FLAG_SW_ACTIVITY
	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_ata_scsi_activity_store
.subsections_via_symbols
