	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_qp_broker_map             ## -- Begin function vmci_qp_broker_map
	.p2align	4, 0x90
_vmci_qp_broker_map:                    ## @vmci_qp_broker_map
	.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	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_vmci_ctx_get_id
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_vmci_handle_is_invalid
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.1:
	testq	%rax, %rax
	jne	LBB0_9
## %bb.2:
	movq	_VMCI_INVALID_ID@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_9
## %bb.3:
	movq	%r13, %r14
	shrq	$32, %r14
	movq	_qp_broker_list@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_vmci_ctx_qp_exists
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	movl	%r12d, %ebx
	movq	%r13, %rdi
	callq	_qp_broker_handle_to_entry
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movq	%rax, %r12
	cmpq	(%rax), %r15
	je	LBB0_7
## %bb.6:
	cmpq	8(%r12), %r15
	jne	LBB0_19
LBB0_7:
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %r14
	movq	_VMCI_HOST_CONTEXT_ID@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_16
## %bb.8:
	movl	(%r14), %ebx
	jmp	LBB0_14
LBB0_9:
	movq	_VMCI_ERROR_INVALID_ARGS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_10:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
LBB0_12:
	movq	%r15, %rsi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	callq	_pr_devel
	movq	_VMCI_ERROR_NOT_FOUND@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %ebx
LBB0_14:
	movq	_qp_broker_list@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	%ebx, -44(%rbp)
	movl	44(%r12), %edi
	callq	_QPE_NUM_PAGES
	movl	%eax, -48(%rbp)
	movl	36(%r12), %edi
	callq	_qp_acquire_queue_mutex
	movq	%r12, %rdi
	callq	_qp_reset_saved_headers
	movl	36(%r12), %esi
	movl	40(%r12), %edx
	leaq	-48(%rbp), %rdi
	callq	_qp_host_register_user_memory
	movl	%eax, %ebx
	movl	36(%r12), %edi
	callq	_qp_release_queue_mutex
	cmpl	(%r14), %ebx
	jne	LBB0_14
## %bb.17:
	incl	32(%r12)
	movq	24(%r12), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.18:
	movl	16(%r12), %edi
	callq	*%rax
	jmp	LBB0_14
LBB0_19:
	movq	_VMCI_ERROR_QUEUEPAIR_NOTATTACHED@GOTPCREL(%rip), %rax
	jmp	LBB0_13
	.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
L_.str.1:                               ## @.str.1
	.asciz	"Context (ID=0x%x) reports being attached to queue pair (handle=0x%x:0x%x) that isn't present in broker\n"

	.comm	_VMCI_ERROR_QUEUEPAIR_NOTATTACHED,4,2 ## @VMCI_ERROR_QUEUEPAIR_NOTATTACHED
	.comm	_VMCI_SUCCESS,4,2               ## @VMCI_SUCCESS
	.comm	_VMCI_HOST_CONTEXT_ID,8,3       ## @VMCI_HOST_CONTEXT_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_qp_broker_map             ; -- Begin function vmci_qp_broker_map
	.p2align	2
_vmci_qp_broker_map:                    ; @vmci_qp_broker_map
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	x0, x1
	bl	_vmci_ctx_get_id
	mov	x20, x0
	mov	x0, x22
	bl	_vmci_handle_is_invalid
	cbz	x21, LBB0_9
; %bb.1:
	cbnz	x0, LBB0_9
; %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_9
; %bb.3:
	lsr	x23, x22, #32
Lloh3:
	adrp	x0, _qp_broker_list@GOTPAGE
Lloh4:
	ldr	x0, [x0, _qp_broker_list@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x21
	mov	x1, x22
	bl	_vmci_ctx_qp_exists
	cbz	w0, LBB0_10
; %bb.4:
	mov	x0, x22
	bl	_qp_broker_handle_to_entry
	cbz	x0, LBB0_11
; %bb.5:
	mov	x21, x0
	ldr	x8, [x0]
	cmp	x20, x8
	b.eq	LBB0_7
; %bb.6:
	ldr	x8, [x21, #8]
	cmp	x20, x8
	b.ne	LBB0_19
LBB0_7:
Lloh5:
	adrp	x22, _VMCI_SUCCESS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _VMCI_SUCCESS@GOTPAGEOFF]
Lloh7:
	adrp	x8, _VMCI_HOST_CONTEXT_ID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VMCI_HOST_CONTEXT_ID@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_16
; %bb.8:
	ldr	w19, [x22]
	b	LBB0_14
LBB0_9:
Lloh10:
	adrp	x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
	b	LBB0_15
LBB0_10:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_12:
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	bl	_pr_devel
Lloh17:
	adrp	x8, _VMCI_ERROR_NOT_FOUND@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VMCI_ERROR_NOT_FOUND@GOTPAGEOFF]
LBB0_13:
	ldr	w19, [x8]
LBB0_14:
Lloh19:
	adrp	x0, _qp_broker_list@GOTPAGE
Lloh20:
	ldr	x0, [x0, _qp_broker_list@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_15:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
LBB0_16:
	str	w19, [sp, #12]
	ldr	w0, [x21, #44]
	bl	_QPE_NUM_PAGES
	str	w0, [sp, #8]
	ldr	w0, [x21, #36]
	bl	_qp_acquire_queue_mutex
	mov	x0, x21
	bl	_qp_reset_saved_headers
	ldp	w1, w2, [x21, #36]
	add	x0, sp, #8
	bl	_qp_host_register_user_memory
	mov	x19, x0
	ldr	w0, [x21, #36]
	bl	_qp_release_queue_mutex
	ldr	w8, [x22]
	cmp	w19, w8
	b.ne	LBB0_14
; %bb.17:
	ldr	w8, [x21, #32]
	add	w8, w8, #1
	str	w8, [x21, #32]
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_14
; %bb.18:
	ldr	w0, [x21, #16]
	blr	x8
	b	LBB0_14
LBB0_19:
Lloh21:
	adrp	x8, _VMCI_ERROR_QUEUEPAIR_NOTATTACHED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VMCI_ERROR_QUEUEPAIR_NOTATTACHED@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.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
l_.str.1:                               ; @.str.1
	.asciz	"Context (ID=0x%x) reports being attached to queue pair (handle=0x%x:0x%x) that isn't present in broker\n"

	.comm	_VMCI_ERROR_QUEUEPAIR_NOTATTACHED,4,2 ; @VMCI_ERROR_QUEUEPAIR_NOTATTACHED
	.comm	_VMCI_SUCCESS,4,2               ; @VMCI_SUCCESS
	.comm	_VMCI_HOST_CONTEXT_ID,8,3       ; @VMCI_HOST_CONTEXT_ID
.subsections_via_symbols
