	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xpc_allocate_remote_msgqueue_sn2
_xpc_allocate_remote_msgqueue_sn2:      ## @xpc_allocate_remote_msgqueue_sn2
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%edi, %edi
	cmpl	$0, (%r14)
	setle	%dil
	callq	_DBUG_ON
	movl	(%r14), %ebx
	testl	%ebx, %ebx
	jle	LBB0_7
## %bb.1:
	leaq	32(%r14), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	4(%r14), %rax
	movslq	%ebx, %rdi
	imulq	%rax, %rdi
	movl	(%r12), %esi
	movq	%r15, %rdx
	callq	_xpc_kzalloc_cacheline_aligned
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	jne	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%rbx), %eax
	cmpl	$1, %ebx
	movl	%eax, %ebx
	jg	LBB0_2
LBB0_7:
	movq	_xpc_chan@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %ecx
	movl	12(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_xpNoMemory@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_3:
	leaq	16(%r14), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	(%r14), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_5
## %bb.4:
	movq	_xpc_chan@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %r9d
	movl	12(%r14), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%ebx, (%r14)
LBB0_5:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	_xpSuccess@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_xpc_chan,4,2                   ## @xpc_chan
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nentries=%d remote_nentries=%d, partid=%d, channel=%d\n"

	.comm	_xpSuccess,4,2                  ## @xpSuccess
L_.str.1:                               ## @.str.1
	.asciz	"can't get memory for cached remote message queue, partid=%d, channel=%d\n"

	.comm	_xpNoMemory,4,2                 ## @xpNoMemory
	.no_dead_strip	_xpc_allocate_remote_msgqueue_sn2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xpc_allocate_remote_msgqueue_sn2
_xpc_allocate_remote_msgqueue_sn2:      ; @xpc_allocate_remote_msgqueue_sn2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	cset	w0, lt
	bl	_DBUG_ON
	ldr	w20, [x19]
	cmp	w20, #1
	b.lt	LBB0_4
; %bb.1:
	add	x21, x19, #32
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x19, #4]
	sxtw	x9, w20
	mul	x0, x8, x9
	ldr	w1, [x22]
	mov	x2, x21
	bl	_xpc_kzalloc_cacheline_aligned
	str	x0, [x19, #24]
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	w20, w20, #1
	b.gt	LBB0_2
LBB0_4:
Lloh2:
	adrp	x8, _xpc_chan@GOTPAGE
Lloh3:
	ldr	x8, [x8, _xpc_chan@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	w3, w2, [x19, #8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
Lloh7:
	adrp	x8, _xpNoMemory@GOTPAGE
Lloh8:
	ldr	x8, [x8, _xpNoMemory@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w3, [x19]
	cmp	w20, w3
	b.ge	LBB0_7
; %bb.6:
Lloh9:
	adrp	x8, _xpc_chan@GOTPAGE
Lloh10:
	ldr	x8, [x8, _xpc_chan@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldp	w9, w8, [x19, #8]
	stp	x8, x9, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	str	w20, [x19]
LBB0_7:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
Lloh14:
	adrp	x8, _xpSuccess@GOTPAGE
Lloh15:
	ldr	x8, [x8, _xpSuccess@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_xpc_chan,4,2                   ; @xpc_chan
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nentries=%d remote_nentries=%d, partid=%d, channel=%d\n"

	.comm	_xpSuccess,4,2                  ; @xpSuccess
l_.str.1:                               ; @.str.1
	.asciz	"can't get memory for cached remote message queue, partid=%d, channel=%d\n"

	.comm	_xpNoMemory,4,2                 ; @xpNoMemory
	.no_dead_strip	_xpc_allocate_remote_msgqueue_sn2
.subsections_via_symbols
