	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qp_broker_alloc
_qp_broker_alloc:                       ## @qp_broker_alloc
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r13
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	32(%rbp), %rdi
	callq	_vmci_ctx_get_id
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_VMCI_QPFLAG_LOCAL@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_vmci_handle_is_invalid
	testq	%rax, %rax
	je	LBB0_4
LBB0_1:
	movq	_VMCI_ERROR_INVALID_ARGS@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_VMCI_QP_ALL_FLAGS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	testq	%rbx, %rax
	jne	LBB0_1
## %bb.5:
	andl	%ebx, %r12d
	jne	LBB0_1
## %bb.6:
	movq	16(%rbp), %rax
	orq	%r13, %rax
	je	LBB0_1
## %bb.7:
	cmpq	$0, 32(%rbp)
	je	LBB0_1
## %bb.8:
	movq	_VMCI_INVALID_ID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, -48(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_1
## %bb.9:
	cmpq	%r15, %rax
	je	LBB0_1
## %bb.10:
	movq	24(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:
	callq	_VMCI_QP_PAGESTORE_IS_WELLFORMED
	testl	%eax, %eax
	je	LBB0_1
LBB0_12:
	movq	_qp_broker_list@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	32(%rbp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_vmci_ctx_qp_exists
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	leaq	L_.str(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_pr_devel
	movq	_qp_broker_list@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_VMCI_ERROR_ALREADY_EXISTS@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_14:
	movq	48(%rbp), %r11
	movl	40(%rbp), %r10d
	movq	_VMCI_INVALID_ID@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	je	LBB0_17
## %bb.15:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_qp_broker_handle_to_entry
	movq	48(%rbp), %r11
	movl	40(%rbp), %r10d
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	subq	$8, %rsp
	movq	%rax, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, %r8
	movq	16(%rbp), %r9
	pushq	56(%rbp)
	pushq	%r11
	pushq	%r10
	pushq	%r12
	pushq	24(%rbp)
	callq	_qp_broker_attach
	jmp	LBB0_18
LBB0_17:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	%r13, %r9
	pushq	56(%rbp)
	pushq	%r11
	pushq	%r10
	pushq	%r12
	pushq	24(%rbp)
	pushq	16(%rbp)
	callq	_qp_broker_create
LBB0_18:
	addq	$48, %rsp
	movl	%eax, %ebx
	movq	_qp_broker_list@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	64(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.19:
	movq	_VMCI_HOST_CONTEXT_ID@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmpq	(%rax), %rdx
	sete	%cl
	movl	%ecx, (%rsi)
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_QPFLAG_LOCAL,8,3          ## @VMCI_QPFLAG_LOCAL
	.comm	_VMCI_QP_ALL_FLAGS,8,3          ## @VMCI_QP_ALL_FLAGS
	.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) already attached to queue pair (handle=0x%x:0x%x)\n"

	.comm	_VMCI_ERROR_ALREADY_EXISTS,4,2  ## @VMCI_ERROR_ALREADY_EXISTS
	.comm	_VMCI_HOST_CONTEXT_ID,8,3       ## @VMCI_HOST_CONTEXT_ID
	.no_dead_strip	_qp_broker_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qp_broker_alloc
_qp_broker_alloc:                       ; @qp_broker_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x20, x7
	mov	x21, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x27, x1
	mov	x28, x0
	ldr	x26, [x29, #16]
	mov	x0, x26
	bl	_vmci_ctx_get_id
	str	x0, [sp, #56]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _VMCI_QPFLAG_LOCAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMCI_QPFLAG_LOCAL@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	mov	x0, x28
	mov	x1, x27
	bl	_vmci_handle_is_invalid
	cbnz	x0, LBB0_2
; %bb.1:
	and	w8, w19, w24
Lloh3:
	adrp	x9, _VMCI_QP_ALL_FLAGS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VMCI_QP_ALL_FLAGS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	bic	x9, x24, x9
	cmp	x9, #0
	ccmp	w8, #0, #0, eq
	orr	x8, x21, x22
	ccmp	x8, #0, #4, eq
	ccmp	x26, #0, #4, ne
	b.ne	LBB0_5
LBB0_2:
Lloh6:
	adrp	x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGEOFF]
LBB0_3:
	ldr	w20, [x8]
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_5:
Lloh8:
	adrp	x19, _VMCI_INVALID_ID@GOTPAGE
Lloh9:
	ldr	x19, [x19, _VMCI_INVALID_ID@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x9, [sp, #56]                   ; 8-byte Folded Reload
	cmp	x9, x8
	ccmp	x28, x8, #4, ne
	b.eq	LBB0_2
; %bb.6:
	cbz	x20, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_VMCI_QP_PAGESTORE_IS_WELLFORMED
	cbz	w0, LBB0_2
LBB0_8:
Lloh10:
	adrp	x0, _qp_broker_list@GOTPAGE
Lloh11:
	ldr	x0, [x0, _qp_broker_list@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x26
	mov	x1, x28
	mov	x2, x27
	bl	_vmci_ctx_qp_exists
	cbz	x0, LBB0_10
; %bb.9:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	ldr	x1, [sp, #56]                   ; 8-byte Folded Reload
	mov	x2, x28
	mov	x3, x27
	bl	_pr_devel
Lloh14:
	adrp	x0, _qp_broker_list@GOTPAGE
Lloh15:
	ldr	x0, [x0, _qp_broker_list@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh16:
	adrp	x8, _VMCI_ERROR_ALREADY_EXISTS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VMCI_ERROR_ALREADY_EXISTS@GOTPAGEOFF]
	b	LBB0_3
LBB0_10:
	mov	x8, x19
	ldp	x11, x19, [x29, #40]
	ldr	x10, [x29, #32]
	ldr	w9, [x29, #24]
	ldr	x8, [x8]
	cmp	x27, x8
	b.eq	LBB0_13
; %bb.11:
	mov	x0, x28
	mov	x1, x27
	str	x19, [sp, #48]                  ; 8-byte Folded Spill
	str	w9, [sp, #44]                   ; 4-byte Folded Spill
	mov	x19, x10
	str	x11, [sp, #32]                  ; 8-byte Folded Spill
	bl	_qp_broker_handle_to_entry
	ldr	x11, [sp, #32]                  ; 8-byte Folded Reload
	mov	x10, x19
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	ldr	x19, [sp, #48]                  ; 8-byte Folded Reload
	cbz	x0, LBB0_13
; %bb.12:
	stp	x10, x11, [sp, #8]
	str	w9, [sp]
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	mov	x6, x20
	mov	x7, x26
	bl	_qp_broker_attach
	b	LBB0_14
LBB0_13:
	stp	x10, x11, [sp, #16]
	str	w9, [sp, #8]
	str	x26, [sp]
	mov	x0, x28
	mov	x1, x27
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	mov	x5, x22
	mov	x6, x21
	mov	x7, x20
	bl	_qp_broker_create
LBB0_14:
	mov	x20, x0
Lloh18:
	adrp	x0, _qp_broker_list@GOTPAGE
Lloh19:
	ldr	x0, [x0, _qp_broker_list@GOTPAGEOFF]
	bl	_mutex_unlock
	cbz	x19, LBB0_4
; %bb.15:
Lloh20:
	adrp	x8, _VMCI_HOST_CONTEXT_ID@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VMCI_HOST_CONTEXT_ID@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldr	x9, [sp, #56]                   ; 8-byte Folded Reload
	cmp	x9, x8
	cset	w8, eq
	str	w8, [x19]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_QPFLAG_LOCAL,8,3          ; @VMCI_QPFLAG_LOCAL
	.comm	_VMCI_QP_ALL_FLAGS,8,3          ; @VMCI_QP_ALL_FLAGS
	.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) already attached to queue pair (handle=0x%x:0x%x)\n"

	.comm	_VMCI_ERROR_ALREADY_EXISTS,4,2  ; @VMCI_ERROR_ALREADY_EXISTS
	.comm	_VMCI_HOST_CONTEXT_ID,8,3       ; @VMCI_HOST_CONTEXT_ID
	.no_dead_strip	_qp_broker_alloc
.subsections_via_symbols
