	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idt_ntb_peer_msg_write
_idt_ntb_peer_msg_write:                ## @idt_ntb_peer_msg_write
	.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
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movl	%esi, %r13d
	callq	_to_ndev_ntb
	testl	%ebx, %ebx
	js	LBB0_2
## %bb.1:
	movq	%rax, %r15
	movq	_IDT_MSG_CNT@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jle	LBB0_2
## %bb.3:
	testl	%r13d, %r13d
	js	LBB0_2
## %bb.4:
	cmpl	%r13d, (%r15)
	jle	LBB0_2
## %bb.5:
	movq	_SWPxMSGCTL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_SET_FIELD
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%eax, %r14d
	movq	_SWPxMSGCTL_PART@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r15), %rax
	movl	%r13d, %ecx
	movl	(%rax,%rcx,4), %edx
	xorl	%esi, %esi
	callq	_SET_FIELD
	orl	%eax, %r14d
	movl	%ebx, %r13d
	leaq	(,%r13,4), %rbx
	movq	16(%r15), %rdi
	addq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_partdata_tbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax,%r13,4), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_idt_sw_write
	movq	_ntdata_tbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %esi
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_idt_nt_write
	addq	16(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_6:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDT_MSG_CNT,4,2                ## @IDT_MSG_CNT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SWPxMSGCTL_REG,4,2             ## @SWPxMSGCTL_REG
	.comm	_SWPxMSGCTL_PART,4,2            ## @SWPxMSGCTL_PART
	.comm	_partdata_tbl,8,3               ## @partdata_tbl
	.comm	_ntdata_tbl,8,3                 ## @ntdata_tbl
	.no_dead_strip	_idt_ntb_peer_msg_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function idt_ntb_peer_msg_write
_idt_ntb_peer_msg_write:                ; @idt_ntb_peer_msg_write
	.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
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	bl	_to_ndev_ntb
	tbnz	w21, #31, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _IDT_MSG_CNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IDT_MSG_CNT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.le	LBB0_5
; %bb.2:
	tbnz	w22, #31, LBB0_5
; %bb.3:
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, w22
	b.le	LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _SWPxMSGCTL_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SWPxMSGCTL_REG@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #0
	mov	x2, x21
	bl	_SET_FIELD
	mov	x23, x0
Lloh6:
	adrp	x8, _SWPxMSGCTL_PART@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SWPxMSGCTL_PART@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	x8, [x20, #24]
	ldr	w2, [x8, w22, uxtw #2]
	mov	w1, #0
	bl	_SET_FIELD
	orr	w22, w0, w23
	ldr	x8, [x20, #16]
	mov	w9, w21
	lsl	x21, x9, #2
	add	x0, x8, x21
	bl	_spin_lock_irqsave
Lloh9:
	adrp	x8, _partdata_tbl@GOTPAGE
Lloh10:
	ldr	x8, [x8, _partdata_tbl@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w1, [x8, x21]
	mov	x0, x20
	mov	x2, x22
	bl	_idt_sw_write
Lloh12:
	adrp	x8, _ntdata_tbl@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ntdata_tbl@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	w1, [x8, x21]
	mov	x0, x20
	mov	x2, x19
	bl	_idt_nt_write
	ldr	x8, [x20, #16]
	add	x0, x8, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IDT_MSG_CNT,4,2                ; @IDT_MSG_CNT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SWPxMSGCTL_REG,4,2             ; @SWPxMSGCTL_REG
	.comm	_SWPxMSGCTL_PART,4,2            ; @SWPxMSGCTL_PART
	.comm	_partdata_tbl,8,3               ; @partdata_tbl
	.comm	_ntdata_tbl,8,3                 ; @ntdata_tbl
	.no_dead_strip	_idt_ntb_peer_msg_write
.subsections_via_symbols
