	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perf_msg_cmd_send
_perf_msg_cmd_send:                     ## @perf_msg_cmd_send
	.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
	movl	%edx, %ecx
	movl	%esi, %edx
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_dev_dbg
	movq	(%r12), %rdi
	callq	_ntb_msg_outbits
	movl	%eax, %r15d
	movq	_MSG_TRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$0, %ebx
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_perf_link_is_up
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rdi
	movl	%r15d, %esi
	callq	_ntb_msg_clear_sts
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	(%r12), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %r13
	movl	(%r14), %r14d
	movl	%r15d, %ebx
	movq	_PERF_MSG_LDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_lower_32_bits
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%ebx, %r15d
	movl	%eax, %ecx
	callq	_ntb_peer_msg_write
	movq	(%r12), %rdi
	callq	_ntb_msg_read_sts
	testl	%ebx, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MSG_UDELAY_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MSG_UDELAY_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usleep_range
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	incl	%ebx
	movq	_MSG_TRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %ebx
	movq	%r13, %r14
	jl	LBB0_2
	jmp	LBB0_8
LBB0_3:
	movq	_ENOLINK@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_7:
	movq	(%r12), %r15
	movl	(%r13), %r14d
	movq	_PERF_MSG_HDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_upper_32_bits
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_ntb_peer_msg_write
	movq	(%r12), %rdi
	movl	(%r13), %esi
	movq	_PERF_MSG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	callq	_ntb_peer_msg_write
	movq	_MSG_TRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
LBB0_8:
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	cmpl	%ecx, %ebx
	movl	$0, %ecx
	cmovll	%ecx, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CMD send: %d 0x%llx\n"

	.comm	_MSG_TRIES,4,2                  ## @MSG_TRIES
	.comm	_ENOLINK,4,2                    ## @ENOLINK
	.comm	_PERF_MSG_LDATA,4,2             ## @PERF_MSG_LDATA
	.comm	_MSG_UDELAY_LOW,4,2             ## @MSG_UDELAY_LOW
	.comm	_MSG_UDELAY_HIGH,4,2            ## @MSG_UDELAY_HIGH
	.comm	_PERF_MSG_HDATA,4,2             ## @PERF_MSG_HDATA
	.comm	_PERF_MSG_CMD,4,2               ## @PERF_MSG_CMD
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_perf_msg_cmd_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perf_msg_cmd_send
_perf_msg_cmd_send:                     ; @perf_msg_cmd_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x27, [x0, #8]
	ldr	x0, [x27]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x21
	bl	_dev_dbg
	ldr	x0, [x27]
	bl	_ntb_msg_outbits
Lloh2:
	adrp	x8, _MSG_TRIES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSG_TRIES@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x22, x0
	str	w19, [sp, #12]                  ; 4-byte Folded Spill
	mov	w26, #0
Lloh5:
	adrp	x19, _PERF_MSG_LDATA@GOTPAGE
Lloh6:
	ldr	x19, [x19, _PERF_MSG_LDATA@GOTPAGEOFF]
Lloh7:
	adrp	x28, _MSG_UDELAY_HIGH@GOTPAGE
Lloh8:
	ldr	x28, [x28, _MSG_UDELAY_HIGH@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_perf_link_is_up
	cbz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x27]
	mov	x1, x22
	bl	_ntb_msg_clear_sts
	cbnz	w0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x23, [x27]
	ldr	w24, [x20]
	ldr	w25, [x19]
	mov	x0, x21
	bl	_lower_32_bits
	mov	x3, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	bl	_ntb_peer_msg_write
	ldr	x0, [x27]
	bl	_ntb_msg_read_sts
	tst	w0, w22
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh9:
	adrp	x8, _MSG_UDELAY_LOW@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSG_UDELAY_LOW@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w1, [x28]
	bl	_usleep_range
	add	w26, w26, #1
Lloh12:
	adrp	x8, _MSG_TRIES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_TRIES@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w26, w8
	b.lt	LBB0_2
	b	LBB0_9
LBB0_6:
	mov	w26, #0
	b	LBB0_9
LBB0_7:
Lloh15:
	adrp	x8, _ENOLINK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOLINK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
	ldr	x22, [x27]
	ldr	w23, [x20]
Lloh18:
	adrp	x8, _PERF_MSG_HDATA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PERF_MSG_HDATA@GOTPAGEOFF]
Lloh20:
	ldr	w24, [x8]
	mov	x0, x21
	bl	_upper_32_bits
	mov	x3, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	bl	_ntb_peer_msg_write
	ldr	x0, [x27]
	ldr	w1, [x20]
Lloh21:
	adrp	x8, _PERF_MSG_CMD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PERF_MSG_CMD@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	ldr	w3, [sp, #12]                   ; 4-byte Folded Reload
	bl	_ntb_peer_msg_write
Lloh24:
	adrp	x8, _MSG_TRIES@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MSG_TRIES@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
LBB0_9:
Lloh27:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh28:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	cmp	w26, w8
	csneg	w0, wzr, w9, lt
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CMD send: %d 0x%llx\n"

	.comm	_MSG_TRIES,4,2                  ; @MSG_TRIES
	.comm	_ENOLINK,4,2                    ; @ENOLINK
	.comm	_PERF_MSG_LDATA,4,2             ; @PERF_MSG_LDATA
	.comm	_MSG_UDELAY_LOW,4,2             ; @MSG_UDELAY_LOW
	.comm	_MSG_UDELAY_HIGH,4,2            ; @MSG_UDELAY_HIGH
	.comm	_PERF_MSG_HDATA,4,2             ; @PERF_MSG_HDATA
	.comm	_PERF_MSG_CMD,4,2               ; @PERF_MSG_CMD
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_perf_msg_cmd_send
.subsections_via_symbols
