	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perf_setup_peer_mw
_perf_setup_peer_mw:                    ## @perf_setup_peer_mw
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	16(%rdi), %rbx
	movq	(%rbx), %rdi
	movl	8(%rbx), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rcx
	callq	_ntb_peer_mw_get_addr
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_1
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	(%rbx), %rdi
	movl	-28(%rbp), %esi
	movq	(%r14), %rdx
	callq	_devm_ioremap_wc
	movl	%eax, 24(%r14)
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_max_mw_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	cmpq	%rax, (%r14)
	jle	LBB0_6
## %bb.5:
	movq	%rax, (%r14)
	movq	16(%r14), %rax
	movq	(%rax), %rdi
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rcx
	callq	_dev_warn
	jmp	LBB0_6
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_max_mw_size,8,3                ## @max_mw_size
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Peer %d outbuf reduced to %pa\n"

	.no_dead_strip	_perf_setup_peer_mw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perf_setup_peer_mw
_perf_setup_peer_mw:                    ; @perf_setup_peer_mw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	x0, [x20]
	ldr	w1, [x20, #8]
	add	x2, sp, #12
	mov	x3, x19
	bl	_ntb_peer_mw_get_addr
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	x0, [x20]
	ldr	w1, [sp, #12]
	ldr	x2, [x19]
	bl	_devm_ioremap_wc
	str	w0, [x19, #24]
	cbz	w0, LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _max_mw_size@GOTPAGE
Lloh1:
	ldr	x8, [x8, _max_mw_size@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x9, [x19]
	cmp	x9, x8
	b.le	LBB0_5
; %bb.4:
	str	x8, [x19]
	ldr	x8, [x19, #16]
	ldr	x0, [x8]
	ldr	w2, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	bl	_dev_warn
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_max_mw_size,8,3                ; @max_mw_size
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Peer %d outbuf reduced to %pa\n"

	.no_dead_strip	_perf_setup_peer_mw
.subsections_via_symbols
