	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c2_nsmr_register_phys_kern     ## -- Begin function c2_nsmr_register_phys_kern
	.p2align	4, 0x90
_c2_nsmr_register_phys_kern:            ## @c2_nsmr_register_phys_kern
	.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
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.2:
	movl	%r8d, %r15d
	testl	%r8d, %r8d
	je	LBB0_4
## %bb.3:
	cmpq	$0, 16(%rbp)
	je	LBB0_4
## %bb.6:
	movl	%ecx, %ebx
	movq	_C2_PBL_MAX_DEPTH@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jge	LBB0_7
LBB0_4:
	movq	_EINTR@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_28:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%r9d, %r13d
	movq	%rdi, %r12
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	callq	_vq_req_alloc
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movl	%r13d, -72(%rbp)                ## 4-byte Spill
	movl	(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%rax, %r13
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	24(%rbp), %ebx
	movq	_CCWR_NSMR_REGISTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_c2_wr_set_id
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 80(%r13)
	movl	4(%r12), %eax
	movl	%eax, 76(%r13)
	movq	_MEM_VA_BASED@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_MEM_REMOTE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movslq	(%r12), %rax
	movabsq	$17179869096, %rcx              ## imm = 0x3FFFFFFA8
	addq	%rax, %rcx
	shrq	$2, %rcx
	xorl	%r12d, %r12d
	movl	$0, %eax
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	cmpl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	jl	LBB0_13
## %bb.12:
	movq	_MEM_PBL_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be16
	movl	%eax, 72(%r13)
	movq	$0, 64(%r13)
	movq	16(%rbp), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be64
	movq	%rax, 56(%r13)
	movq	32(%rbp), %rax
	movq	8(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r13)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be32
	movq	%rax, 40(%r13)
	movl	%r15d, %edi
	callq	_cpu_to_be32
	movq	%rax, 32(%r13)
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	%rax, 24(%r13)
	movl	-72(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be32
	movq	%rax, 16(%r13)
	movl	%ebx, %edi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_min
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	%rax, 8(%r13)
	testl	%ebx, %ebx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	jle	LBB0_16
## %bb.14:
	movl	%ebx, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %edi
	callq	_cpu_to_be64
	movq	(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_15
LBB0_16:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_vq_req_get
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_vq_send_wr
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %ebx
	movq	%r15, %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_vq_req_put
	jmp	LBB0_26
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_27
LBB0_18:
	movq	%r15, %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_vq_wait_for_reply
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_19
LBB0_26:
	movq	%r13, %rdi
	callq	_kfree
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_27:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_vq_req_free
	jmp	LBB0_28
LBB0_19:
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.21:
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_c2_errno
	testl	%eax, %eax
	je	LBB0_22
## %bb.25:
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_vq_repbuf_free
	jmp	LBB0_26
LBB0_20:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_22:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	callq	_be32_to_cpu
	movq	32(%rbp), %rcx
	movl	%eax, 4(%rcx)
	movl	%eax, (%rcx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_vq_repbuf_free
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_24
## %bb.23:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	subl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	$0, (%r15)
	movq	%r15, %rdi
	addq	$8, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	32(%rbp), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be32
	leaq	(%r14,%r12,4), %rdx
	movq	_PBL_PHYS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	movl	%ebx, %ecx
	movq	%r15, %r8
	callq	_send_pbl_messages
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_26
LBB0_24:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_vq_req_free
	movq	%r13, %rdi
	callq	_kfree
	xorl	%ebx, %ebx
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_C2_PBL_MAX_DEPTH,4,2           ## @C2_PBL_MAX_DEPTH
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_CCWR_NSMR_REGISTER,4,2         ## @CCWR_NSMR_REGISTER
	.comm	_MEM_VA_BASED,4,2               ## @MEM_VA_BASED
	.comm	_MEM_REMOTE,4,2                 ## @MEM_REMOTE
	.comm	_MEM_PBL_COMPLETE,4,2           ## @MEM_PBL_COMPLETE
	.comm	_PBL_PHYS,4,2                   ## @PBL_PHYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c2_nsmr_register_phys_kern     ; -- Begin function c2_nsmr_register_phys_kern
	.p2align	2
_c2_nsmr_register_phys_kern:            ; @c2_nsmr_register_phys_kern
	.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
	cbz	w3, LBB0_5
; %bb.1:
	mov	x22, x1
	cbz	x1, LBB0_5
; %bb.2:
	mov	x25, x4
	cbz	w4, LBB0_5
; %bb.3:
	mov	x27, x6
	cbz	x6, LBB0_5
; %bb.4:
	mov	x23, x3
Lloh0:
	adrp	x8, _C2_PBL_MAX_DEPTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _C2_PBL_MAX_DEPTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w3
	b.ge	LBB0_8
LBB0_5:
Lloh3:
	adrp	x8, _EINTR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_7:
	mov	x0, x25
	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
LBB0_8:
	mov	x28, x7
	mov	x24, x5
	mov	x26, x2
	mov	x19, x0
	bl	_vq_req_alloc
	cbz	x0, LBB0_13
; %bb.9:
	mov	x20, x0
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_14
; %bb.10:
	mov	x21, x0
	ldr	x8, [x29, #16]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh8:
	adrp	x8, _CCWR_NSMR_REGISTER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CCWR_NSMR_REGISTER@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_c2_wr_set_id
	ldp	w9, w8, [x19]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	str	w8, [x21, #76]
Lloh11:
	adrp	x8, _MEM_VA_BASED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MEM_VA_BASED@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w8, w8, w28
Lloh14:
	adrp	x10, _MEM_REMOTE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _MEM_REMOTE@GOTPAGEOFF]
	str	x20, [sp]                       ; 8-byte Folded Spill
	str	x20, [x21, #80]
Lloh16:
	ldr	w10, [x10]
	orr	w8, w8, w10
	mov	x10, #17179803648
	movk	x10, #65448
	add	x9, x9, x10
	lsr	x28, x9, #2
Lloh17:
	adrp	x9, _MEM_PBL_COMPLETE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MEM_PBL_COMPLETE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w28, w23
	csel	w9, wzr, w9, lt
	orr	w0, w8, w9
	bl	_cpu_to_be16
	str	w0, [x21, #72]
	str	xzr, [x21, #64]
	ldr	w0, [x27]
	bl	_cpu_to_be64
	str	x0, [x21, #56]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x8, #8]
	ldr	w8, [x8]
	str	w8, [x21, #48]
	mov	x0, x26
	bl	_cpu_to_be32
	str	x0, [x21, #40]
	mov	x0, x25
	bl	_cpu_to_be32
	str	x0, [x21, #32]
	mov	x0, x23
	bl	_cpu_to_be32
	str	x0, [x21, #24]
	mov	x0, x24
	bl	_cpu_to_be32
	str	x0, [x21, #16]
	mov	x0, x23
	mov	x1, x28
	bl	_min
	mov	x24, x0
	bl	_cpu_to_be32
	str	x0, [x21, #8]
	cmp	w24, #1
	b.lt	LBB0_15
; %bb.11:
	mov	x25, #0
	mov	w27, w24
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22, x25, lsl #2]
	bl	_cpu_to_be64
	ldr	x8, [x21]
	str	x0, [x8, x25, lsl #3]
	add	x25, x25, #1
	cmp	x27, x25
	b.ne	LBB0_12
	b	LBB0_16
LBB0_13:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_14:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_20
LBB0_15:
	mov	x27, #0
LBB0_16:
	ldr	x20, [sp]                       ; 8-byte Folded Reload
	mov	x0, x19
	mov	x1, x20
	bl	_vq_req_get
	mov	x0, x19
	mov	x1, x21
	bl	_vq_send_wr
	cbz	w0, LBB0_18
; %bb.17:
	mov	x25, x0
	mov	x0, x19
	mov	x1, x20
	bl	_vq_req_put
	b	LBB0_19
LBB0_18:
	mov	x0, x19
	mov	x1, x20
	bl	_vq_wait_for_reply
	mov	x25, x0
	cbz	w0, LBB0_21
LBB0_19:
	mov	x0, x21
	bl	_kfree
LBB0_20:
	mov	x0, x19
	mov	x1, x20
	bl	_vq_req_free
	b	LBB0_7
LBB0_21:
	ldr	x26, [x20]
	cbz	x26, LBB0_24
; %bb.22:
	mov	x0, x26
	bl	_c2_errno
	cbz	w0, LBB0_25
; %bb.23:
	mov	x25, x0
	mov	x0, x19
	mov	x1, x26
	bl	_vq_repbuf_free
	b	LBB0_19
LBB0_24:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_19
LBB0_25:
	ldr	w0, [x26]
	bl	_be32_to_cpu
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	stp	w0, w0, [x8]
	mov	x0, x19
	mov	x1, x26
	bl	_vq_repbuf_free
	cmp	w24, w23
	b.eq	LBB0_27
; %bb.26:
	sub	w23, w23, w24
	mov	x0, x20
	str	xzr, [x0], #8
	mov	w1, #0
	bl	_atomic_set
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w0, [x8]
	bl	_cpu_to_be32
	mov	x1, x0
	add	x2, x22, x27, lsl #2
Lloh28:
	adrp	x8, _PBL_PHYS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PBL_PHYS@GOTPAGEOFF]
Lloh30:
	ldr	w5, [x8]
	mov	x0, x19
	mov	x3, x23
	mov	x4, x20
	bl	_send_pbl_messages
	mov	x25, x0
	cbnz	w0, LBB0_19
LBB0_27:
	mov	x0, x19
	mov	x1, x20
	bl	_vq_req_free
	mov	x0, x21
	bl	_kfree
	mov	w25, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_C2_PBL_MAX_DEPTH,4,2           ; @C2_PBL_MAX_DEPTH
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_CCWR_NSMR_REGISTER,4,2         ; @CCWR_NSMR_REGISTER
	.comm	_MEM_VA_BASED,4,2               ; @MEM_VA_BASED
	.comm	_MEM_REMOTE,4,2                 ; @MEM_REMOTE
	.comm	_MEM_PBL_COMPLETE,4,2           ; @MEM_PBL_COMPLETE
	.comm	_PBL_PHYS,4,2                   ; @PBL_PHYS
.subsections_via_symbols
