	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function es2_cport_quiesce
_es2_cport_quiesce:                     ## @es2_cport_quiesce
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movl	%esi, %r15d
	callq	_hd_to_es2
	movq	%rax, %r12
	movq	_U16_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r14, %rax
	jb	LBB0_1
## %bb.2:
	movl	%ebx, %r13d
	cmpq	%r13, %rax
	jae	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	callq	_cpu_to_le16
	movq	%rax, -64(%rbp)
	movl	%r14d, %edi
	callq	_cpu_to_le16
	movq	%rax, -72(%rbp)
	movl	%ebx, %edi
	callq	_cpu_to_le16
	movq	%rax, -80(%rbp)
	movq	_ARPC_TYPE_CPORT_QUIESCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ES2_ARPC_CPORT_TIMEOUT@GOTPCREL(%rip), %rax
	addq	(%rax), %r13
	leaq	-80(%rbp), %rdx
	leaq	-44(%rbp), %r8
	movq	%r12, %rdi
	movl	$24, %ecx
	movq	%r13, %r9
	callq	_arpc_sync
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movl	-44(%rbp), %r8d
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_dev_err
	jmp	LBB0_6
LBB0_4:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_U16_MAX,8,3                    ## @U16_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ARPC_TYPE_CPORT_QUIESCE,4,2    ## @ARPC_TYPE_CPORT_QUIESCE
	.comm	_ES2_ARPC_CPORT_TIMEOUT,8,3     ## @ES2_ARPC_CPORT_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to quiesce cport %u: %d (%d)\n"

	.no_dead_strip	_es2_cport_quiesce
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function es2_cport_quiesce
_es2_cport_quiesce:                     ; @es2_cport_quiesce
	.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, x3
	mov	x23, x2
	mov	x19, x1
	bl	_hd_to_es2
Lloh0:
	adrp	x8, _U16_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _U16_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x23
	b.lo	LBB0_2
; %bb.1:
	mov	w24, w22
	cmp	x8, x24
	b.hs	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x20
	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
LBB0_4:
	mov	x20, x0
	ldr	x21, [x0]
	mov	x0, x19
	bl	_cpu_to_le16
	str	x0, [sp, #24]
	mov	x0, x23
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	mov	x0, x22
	bl	_cpu_to_le16
Lloh6:
	adrp	x8, _ARPC_TYPE_CPORT_QUIESCE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ARPC_TYPE_CPORT_QUIESCE@GOTPAGEOFF]
	str	x0, [sp, #8]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _ES2_ARPC_CPORT_TIMEOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ES2_ARPC_CPORT_TIMEOUT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x5, x8, x24
	add	x2, sp, #8
	add	x4, sp, #4
	mov	x0, x20
	mov	w3, #24
	bl	_arpc_sync
	mov	x20, x0
	cbz	w0, LBB0_3
; %bb.5:
	ldr	w4, [sp, #4]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	mov	x3, x20
	bl	_dev_err
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_U16_MAX,8,3                    ; @U16_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ARPC_TYPE_CPORT_QUIESCE,4,2    ; @ARPC_TYPE_CPORT_QUIESCE
	.comm	_ES2_ARPC_CPORT_TIMEOUT,8,3     ; @ES2_ARPC_CPORT_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to quiesce cport %u: %d (%d)\n"

	.no_dead_strip	_es2_cport_quiesce
.subsections_via_symbols
