	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_qp_broker_set_page_store  ## -- Begin function vmci_qp_broker_set_page_store
	.p2align	4, 0x90
_vmci_qp_broker_set_page_store:         ## @vmci_qp_broker_set_page_store
	.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
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	%rcx, %rdi
	callq	_vmci_ctx_get_id
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_vmci_handle_is_invalid
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.1:
	testq	%rax, %rax
	jne	LBB0_13
## %bb.2:
	movq	_VMCI_INVALID_ID@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_13
## %bb.3:
	testq	%r13, %r13
	je	LBB0_13
## %bb.4:
	testq	%r12, %r12
	je	LBB0_13
## %bb.5:
	movq	_qp_broker_list@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_vmci_ctx_qp_exists
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	movq	%r15, %rdi
	callq	_qp_broker_handle_to_entry
	testq	%rax, %rax
	je	LBB0_15
## %bb.7:
	movq	(%rax), %rdx
	cmpq	%r14, %rdx
	je	LBB0_10
## %bb.8:
	movq	_VMCI_HOST_CONTEXT_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_19
## %bb.9:
	cmpq	%r14, 8(%rax)
	jne	LBB0_19
LBB0_10:
	movq	16(%rax), %rdx
	movq	_VMCIQPB_CREATED_NO_MEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	je	LBB0_20
## %bb.11:
	movq	_VMCIQPB_ATTACHED_NO_MEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	je	LBB0_20
## %bb.12:
	movq	_VMCI_ERROR_UNAVAILABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_13:
	movq	_VMCI_ERROR_INVALID_ARGS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_18
LBB0_14:
	movq	%r15, %rdx
	shrq	$32, %rdx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r15d, %ecx
	callq	_pr_warn
LBB0_15:
	movq	_VMCI_ERROR_NOT_FOUND@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %ebx
LBB0_17:
	movq	_qp_broker_list@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_VMCI_ERROR_QUEUEPAIR_NOTOWNER@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_20:
	movl	36(%rax), %ecx
	movl	40(%rax), %edx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_qp_host_get_user_memory
	movl	%eax, %ebx
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jl	LBB0_17
## %bb.21:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	36(%rax), %esi
	movl	40(%rax), %edi
	callq	_qp_host_map_queues
	movl	(%r13), %ebx
	cmpl	%ebx, %eax
	jge	LBB0_23
## %bb.22:
	movl	%eax, %r12d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	36(%rax), %esi
	movl	40(%rax), %edi
	callq	_qp_host_unregister_user_memory
	movl	%r12d, %ebx
	jmp	LBB0_17
LBB0_23:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	16(%r12), %rdx
	movq	_VMCIQPB_ATTACHED_MEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rcx
	movq	_VMCIQPB_CREATED_NO_MEM@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_25
## %bb.24:
	movq	_VMCIQPB_CREATED_MEM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
LBB0_25:
	movq	%rcx, 16(%r12)
	movl	$1, 24(%r12)
	cmpq	%rax, %rcx
	jne	LBB0_17
## %bb.26:
	movq	(%r12), %rcx
	movl	$1, %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_qp_notify_peer
	movl	(%r13), %ebx
	cmpl	%ebx, %eax
	jge	LBB0_17
## %bb.27:
	movq	(%r12), %rsi
	movl	32(%r12), %edx
	movl	28(%r12), %ecx
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_warn
	movl	(%r13), %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_INVALID_ID,8,3            ## @VMCI_INVALID_ID
	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ## @VMCI_ERROR_INVALID_ARGS
	.comm	_qp_broker_list,4,2             ## @qp_broker_list
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Context (ID=0x%x) not attached to queue pair (handle=0x%x:0x%x)\n"

	.comm	_VMCI_ERROR_NOT_FOUND,4,2       ## @VMCI_ERROR_NOT_FOUND
	.comm	_VMCI_HOST_CONTEXT_ID,8,3       ## @VMCI_HOST_CONTEXT_ID
	.comm	_VMCI_ERROR_QUEUEPAIR_NOTOWNER,4,2 ## @VMCI_ERROR_QUEUEPAIR_NOTOWNER
	.comm	_VMCIQPB_CREATED_NO_MEM,8,3     ## @VMCIQPB_CREATED_NO_MEM
	.comm	_VMCIQPB_ATTACHED_NO_MEM,8,3    ## @VMCIQPB_ATTACHED_NO_MEM
	.comm	_VMCI_ERROR_UNAVAILABLE,4,2     ## @VMCI_ERROR_UNAVAILABLE
	.comm	_VMCI_SUCCESS,4,2               ## @VMCI_SUCCESS
	.comm	_VMCIQPB_CREATED_MEM,8,3        ## @VMCIQPB_CREATED_MEM
	.comm	_VMCIQPB_ATTACHED_MEM,8,3       ## @VMCIQPB_ATTACHED_MEM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to notify peer (ID=0x%x) of attach to queue pair (handle=0x%x:0x%x)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_qp_broker_set_page_store  ; -- Begin function vmci_qp_broker_set_page_store
	.p2align	2
_vmci_qp_broker_set_page_store:         ; @vmci_qp_broker_set_page_store
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	mov	x0, x3
	bl	_vmci_ctx_get_id
	mov	x20, x0
	mov	x0, x19
	bl	_vmci_handle_is_invalid
	cbz	x21, LBB0_13
; %bb.1:
	cbnz	x0, LBB0_13
; %bb.2:
Lloh0:
	adrp	x8, _VMCI_INVALID_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMCI_INVALID_ID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x20, x8
	b.eq	LBB0_13
; %bb.3:
	cbz	x23, LBB0_13
; %bb.4:
	cbz	x22, LBB0_13
; %bb.5:
Lloh3:
	adrp	x0, _qp_broker_list@GOTPAGE
Lloh4:
	ldr	x0, [x0, _qp_broker_list@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x21
	mov	x1, x19
	bl	_vmci_ctx_qp_exists
	cbz	w0, LBB0_14
; %bb.6:
	mov	x0, x19
	bl	_qp_broker_handle_to_entry
	cbz	x0, LBB0_15
; %bb.7:
	mov	x21, x0
	ldr	x8, [x0]
	cmp	x8, x20
	b.eq	LBB0_10
; %bb.8:
Lloh5:
	adrp	x9, _VMCI_HOST_CONTEXT_ID@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VMCI_HOST_CONTEXT_ID@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.9:
	ldr	x8, [x21, #8]
	cmp	x8, x20
	b.ne	LBB0_19
LBB0_10:
	ldr	x8, [x21, #16]
Lloh8:
	adrp	x25, _VMCIQPB_CREATED_NO_MEM@GOTPAGE
Lloh9:
	ldr	x25, [x25, _VMCIQPB_CREATED_NO_MEM@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_20
; %bb.11:
Lloh10:
	adrp	x9, _VMCIQPB_ATTACHED_NO_MEM@GOTPAGE
Lloh11:
	ldr	x9, [x9, _VMCIQPB_ATTACHED_NO_MEM@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_20
; %bb.12:
Lloh13:
	adrp	x8, _VMCI_ERROR_UNAVAILABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VMCI_ERROR_UNAVAILABLE@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
Lloh15:
	adrp	x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
	b	LBB0_18
LBB0_14:
	lsr	x2, x19, #32
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x19
	bl	_pr_warn
LBB0_15:
Lloh20:
	adrp	x8, _VMCI_ERROR_NOT_FOUND@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VMCI_ERROR_NOT_FOUND@GOTPAGEOFF]
LBB0_16:
	ldr	w22, [x8]
LBB0_17:
Lloh22:
	adrp	x0, _qp_broker_list@GOTPAGE
Lloh23:
	ldr	x0, [x0, _qp_broker_list@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_18:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_19:
Lloh24:
	adrp	x8, _VMCI_ERROR_QUEUEPAIR_NOTOWNER@GOTPAGE
Lloh25:
	ldr	x8, [x8, _VMCI_ERROR_QUEUEPAIR_NOTOWNER@GOTPAGEOFF]
	b	LBB0_16
LBB0_20:
	ldp	w3, w2, [x21, #36]
	mov	x0, x23
	mov	x1, x22
	bl	_qp_host_get_user_memory
	mov	x22, x0
Lloh26:
	adrp	x24, _VMCI_SUCCESS@GOTPAGE
Lloh27:
	ldr	x24, [x24, _VMCI_SUCCESS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.lt	LBB0_17
; %bb.21:
	ldp	w1, w0, [x21, #36]
	bl	_qp_host_map_queues
	ldr	w22, [x24]
	cmp	w0, w22
	b.ge	LBB0_23
; %bb.22:
	mov	x23, x0
	ldp	w1, w0, [x21, #36]
	bl	_qp_host_unregister_user_memory
	mov	x22, x23
	b	LBB0_17
LBB0_23:
	ldr	x8, [x21, #16]
	ldr	x9, [x25]
Lloh28:
	adrp	x10, _VMCIQPB_CREATED_MEM@GOTPAGE
Lloh29:
	ldr	x10, [x10, _VMCIQPB_CREATED_MEM@GOTPAGEOFF]
Lloh30:
	ldr	x10, [x10]
Lloh31:
	adrp	x11, _VMCIQPB_ATTACHED_MEM@GOTPAGE
Lloh32:
	ldr	x11, [x11, _VMCIQPB_ATTACHED_MEM@GOTPAGEOFF]
Lloh33:
	ldr	x11, [x11]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	str	x8, [x21, #16]
	mov	w9, #1
	str	w9, [x21, #24]
	cmp	x8, x11
	b.ne	LBB0_17
; %bb.24:
	ldr	x3, [x21]
	mov	w0, #1
	mov	x1, x19
	mov	x2, x20
	bl	_qp_notify_peer
	ldr	w22, [x24]
	cmp	w0, w22
	b.ge	LBB0_17
; %bb.25:
	ldr	x1, [x21]
	ldp	w3, w2, [x21, #28]
Lloh34:
	adrp	x0, l_.str.1@PAGE
Lloh35:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
	ldr	w22, [x24]
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_INVALID_ID,8,3            ; @VMCI_INVALID_ID
	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ; @VMCI_ERROR_INVALID_ARGS
	.comm	_qp_broker_list,4,2             ; @qp_broker_list
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Context (ID=0x%x) not attached to queue pair (handle=0x%x:0x%x)\n"

	.comm	_VMCI_ERROR_NOT_FOUND,4,2       ; @VMCI_ERROR_NOT_FOUND
	.comm	_VMCI_HOST_CONTEXT_ID,8,3       ; @VMCI_HOST_CONTEXT_ID
	.comm	_VMCI_ERROR_QUEUEPAIR_NOTOWNER,4,2 ; @VMCI_ERROR_QUEUEPAIR_NOTOWNER
	.comm	_VMCIQPB_CREATED_NO_MEM,8,3     ; @VMCIQPB_CREATED_NO_MEM
	.comm	_VMCIQPB_ATTACHED_NO_MEM,8,3    ; @VMCIQPB_ATTACHED_NO_MEM
	.comm	_VMCI_ERROR_UNAVAILABLE,4,2     ; @VMCI_ERROR_UNAVAILABLE
	.comm	_VMCI_SUCCESS,4,2               ; @VMCI_SUCCESS
	.comm	_VMCIQPB_CREATED_MEM,8,3        ; @VMCIQPB_CREATED_MEM
	.comm	_VMCIQPB_ATTACHED_MEM,8,3       ; @VMCIQPB_ATTACHED_MEM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to notify peer (ID=0x%x) of attach to queue pair (handle=0x%x:0x%x)\n"

.subsections_via_symbols
