	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___ata_change_queue_depth       ## -- Begin function __ata_change_queue_depth
	.p2align	4, 0x90
___ata_change_queue_depth:              ## @__ata_change_queue_depth
	.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	_SCSI_QDEPTH_DEFAULT@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_1
## %bb.3:
	movl	%edx, %r13d
	movq	%rsi, %r15
	movl	(%rsi), %ebx
	testl	%edx, %edx
	jle	LBB0_16
## %bb.4:
	cmpl	%r13d, %ebx
	jne	LBB0_6
## %bb.5:
	movl	%r13d, %ebx
	jmp	LBB0_16
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rdi, %r14
	movq	%r15, %rsi
	callq	_ata_scsi_find_dev
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_ata_dev_enabled
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	(%r14), %edi
	callq	_spin_lock_irqsave
	movq	_ATA_DFLAG_NCQ_OFF@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	%eax, %ecx
	notl	%ecx
	andl	4(%r12), %ecx
	movl	%ecx, 4(%r12)
	cmpl	$1, %r13d
	je	LBB0_12
## %bb.10:
	movq	%r12, %rdi
	callq	_ata_ncq_enabled
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movl	(%rbx), %eax
	movl	4(%r12), %ecx
LBB0_12:
	orl	%eax, %ecx
	movl	%ecx, 4(%r12)
	movl	$1, %r13d
LBB0_13:
	movl	(%r14), %edi
	callq	_spin_unlock_irqrestore
	movq	8(%r15), %rax
	movq	(%rax), %rsi
	movl	%r13d, %edi
	callq	_min
	movl	%eax, %ebx
	movl	(%r12), %edi
	callq	_ata_id_queue_depth
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_min
	movq	_ATA_MAX_QUEUE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	decq	%rsi
	movl	%eax, %edi
	callq	_min
	cmpl	%eax, (%r15)
	jne	LBB0_15
## %bb.14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_8:
	movl	(%r15), %ebx
	jmp	LBB0_16
LBB0_15:
	movl	%eax, %ebx
	movq	_MSG_SIMPLE_TAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_scsi_adjust_queue_depth
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_SCSI_QDEPTH_DEFAULT,4,2        ## @SCSI_QDEPTH_DEFAULT
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_ATA_DFLAG_NCQ_OFF,4,2          ## @ATA_DFLAG_NCQ_OFF
	.comm	_ATA_MAX_QUEUE,8,3              ## @ATA_MAX_QUEUE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MSG_SIMPLE_TAG,4,2             ## @MSG_SIMPLE_TAG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___ata_change_queue_depth       ; -- Begin function __ata_change_queue_depth
	.p2align	2
___ata_change_queue_depth:              ; @__ata_change_queue_depth
	.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
Lloh0:
	adrp	x8, _SCSI_QDEPTH_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCSI_QDEPTH_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w3
	b.ne	LBB0_11
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	ldr	w8, [x1]
	cmp	w2, #1
	b.lt	LBB0_13
; %bb.2:
	cmp	w8, w20
	b.eq	LBB0_16
; %bb.3:
	mov	x21, x0
	mov	x1, x19
	bl	_ata_scsi_find_dev
	cbz	x0, LBB0_14
; %bb.4:
	mov	x22, x0
	bl	_ata_dev_enabled
	cbz	w0, LBB0_14
; %bb.5:
	ldr	w0, [x21]
	bl	_spin_lock_irqsave
Lloh3:
	adrp	x23, _ATA_DFLAG_NCQ_OFF@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ATA_DFLAG_NCQ_OFF@GOTPAGEOFF]
	ldr	w8, [x23]
	ldr	w9, [x22, #4]
	bic	w9, w9, w8
	str	w9, [x22, #4]
	cmp	w20, #1
	b.eq	LBB0_8
; %bb.6:
	mov	x0, x22
	bl	_ata_ncq_enabled
	cbnz	w0, LBB0_9
; %bb.7:
	ldr	w8, [x23]
	ldr	w9, [x22, #4]
LBB0_8:
	orr	w8, w9, w8
	str	w8, [x22, #4]
	mov	w20, #1
LBB0_9:
	ldr	w0, [x21]
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19, #8]
	ldr	x1, [x8]
	mov	x0, x20
	bl	_min
	mov	x20, x0
	ldr	w0, [x22]
	bl	_ata_id_queue_depth
	mov	x1, x0
	mov	x0, x20
	bl	_min
Lloh5:
	adrp	x8, _ATA_MAX_QUEUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATA_MAX_QUEUE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	sub	x1, x8, #1
	bl	_min
	ldr	w8, [x19]
	cmp	w8, w0
	b.ne	LBB0_15
; %bb.10:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh10:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_16
LBB0_13:
	mov	x20, x8
	b	LBB0_16
LBB0_14:
	ldr	w20, [x19]
	b	LBB0_16
LBB0_15:
	mov	x20, x0
Lloh12:
	adrp	x8, _MSG_SIMPLE_TAG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_SIMPLE_TAG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_scsi_adjust_queue_depth
LBB0_16:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SCSI_QDEPTH_DEFAULT,4,2        ; @SCSI_QDEPTH_DEFAULT
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_ATA_DFLAG_NCQ_OFF,4,2          ; @ATA_DFLAG_NCQ_OFF
	.comm	_ATA_MAX_QUEUE,8,3              ; @ATA_MAX_QUEUE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MSG_SIMPLE_TAG,4,2             ; @MSG_SIMPLE_TAG
.subsections_via_symbols
