	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xpc_setup_ch_structures
_xpc_setup_ch_structures:               ## @xpc_setup_ch_structures
	.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	%rdi, %r15
	callq	_XPC_PARTID
	movl	%eax, %r14d
	xorl	%edi, %edi
	cmpq	$0, 8(%r15)
	setne	%dil
	callq	_DBUG_ON
	movq	_XPC_MAX_NCHANNELS@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$52, %esi
	callq	_kcalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_XPC_OPENCLOSE_ARGS_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	leaq	24(%r15), %rdx
	callq	_xpc_kzalloc_cacheline_aligned
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	$0, 56(%r15)
	leaq	52(%r15), %rdi
	callq	_spin_lock_init
	leaq	48(%r15), %rdi
	movl	$1, %esi
	callq	_atomic_set
	leaq	44(%r15), %rdi
	callq	_init_waitqueue_head
	movl	(%r12), %eax
	movl	%eax, (%r15)
	leaq	40(%r15), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	36(%r15), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %r12
	movw	%r14w, (%r12,%rbx)
	movl	%r13d, 4(%r12,%rbx)
	movq	_XPC_C_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r12,%rbx)
	leaq	(%r12,%rbx), %rdi
	addq	$44, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	(%r12,%rbx), %rdi
	addq	$40, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	(%r12,%rbx), %rdi
	addq	$36, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	(%r12,%rbx), %rdi
	addq	$32, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	(%r12,%rbx), %rdi
	addq	$28, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	(%r12,%rbx), %rdi
	addq	$24, %rdi
	callq	_spin_lock_init
	leaq	(%r12,%rbx), %rdi
	addq	$20, %rdi
	callq	_init_completion
	leaq	(%r12,%rbx), %rdi
	addq	$16, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	(%r12,%rbx), %rdi
	addq	$12, %rdi
	callq	_init_waitqueue_head
	leaq	(%r12,%rbx), %rdi
	addq	$8, %rdi
	callq	_init_waitqueue_head
	incq	%r13
	movslq	(%r15), %rax
	addq	$52, %rbx
	cmpq	%rax, %r13
	jl	LBB0_6
LBB0_7:
	movq	_xpc_arch_ops@GOTPCREL(%rip), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movl	%eax, %r14d
	movq	_xpSuccess@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_9
## %bb.8:
	movq	_XPC_P_SS_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	jmp	LBB0_11
LBB0_1:
	movq	_xpc_chan@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_xpNoMemory@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
LBB0_3:
	movq	_xpc_chan@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_xpNoMemory@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_10
LBB0_9:
	movq	24(%r15), %rdi
	callq	_kfree
	movq	$0, 16(%r15)
LBB0_10:
	movq	8(%r15), %rdi
	callq	_kfree
	movq	$0, 8(%r15)
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XPC_MAX_NCHANNELS,4,2          ## @XPC_MAX_NCHANNELS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_xpc_chan,4,2                   ## @xpc_chan
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't get memory for channels\n"

	.comm	_xpNoMemory,4,2                 ## @xpNoMemory
	.comm	_XPC_OPENCLOSE_ARGS_SIZE,4,2    ## @XPC_OPENCLOSE_ARGS_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"can't get memory for remote connect args\n"

	.comm	_XPC_C_DISCONNECTED,4,2         ## @XPC_C_DISCONNECTED
	.comm	_xpc_arch_ops,8,3               ## @xpc_arch_ops
	.comm	_xpSuccess,4,2                  ## @xpSuccess
	.comm	_XPC_P_SS_SETUP,4,2             ## @XPC_P_SS_SETUP
	.no_dead_strip	_xpc_setup_ch_structures
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xpc_setup_ch_structures
_xpc_setup_ch_structures:               ; @xpc_setup_ch_structures
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_XPC_PARTID
	mov	x20, x0
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_DBUG_ON
Lloh0:
	adrp	x21, _XPC_MAX_NCHANNELS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _XPC_MAX_NCHANNELS@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #52
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.1:
Lloh4:
	adrp	x8, _XPC_OPENCLOSE_ARGS_SIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _XPC_OPENCLOSE_ARGS_SIZE@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	w1, [x22]
	add	x2, x19, #24
	bl	_xpc_kzalloc_cacheline_aligned
	str	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.2:
	str	xzr, [x19, #56]
	add	x0, x19, #52
	bl	_spin_lock_init
	add	x0, x19, #48
	mov	w1, #1
	bl	_atomic_set
	add	x0, x19, #44
	bl	_init_waitqueue_head
	ldr	w8, [x21]
	str	w8, [x19]
	add	x0, x19, #40
	mov	w1, #0
	bl	_atomic_set
	add	x0, x19, #36
	mov	w1, #0
	bl	_atomic_set
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x21, #0
	mov	w22, #48
Lloh7:
	adrp	x23, _XPC_C_DISCONNECTED@GOTPAGE
Lloh8:
	ldr	x23, [x23, _XPC_C_DISCONNECTED@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x24, x8, x22
	sturh	w20, [x24, #-48]
	stur	w21, [x24, #-44]
	ldr	w8, [x23]
	str	w8, [x24]
	sub	x0, x24, #4
	mov	w1, #0
	bl	_atomic_set
	sub	x0, x24, #8
	mov	w1, #0
	bl	_atomic_set
	sub	x0, x24, #12
	mov	w1, #0
	bl	_atomic_set
	sub	x0, x24, #16
	mov	w1, #0
	bl	_atomic_set
	sub	x0, x24, #20
	mov	w1, #0
	bl	_atomic_set
	sub	x0, x24, #24
	bl	_spin_lock_init
	sub	x0, x24, #28
	bl	_init_completion
	sub	x0, x24, #32
	mov	w1, #0
	bl	_atomic_set
	sub	x0, x24, #36
	bl	_init_waitqueue_head
	sub	x0, x24, #40
	bl	_init_waitqueue_head
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x22, x22, #52
	cmp	x21, x8
	b.lt	LBB0_4
LBB0_5:
Lloh9:
	adrp	x8, _xpc_arch_ops@GOTPAGE
Lloh10:
	ldr	x8, [x8, _xpc_arch_ops@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x20, x0
Lloh12:
	adrp	x8, _xpSuccess@GOTPAGE
Lloh13:
	ldr	x8, [x8, _xpSuccess@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.6:
Lloh15:
	adrp	x8, _XPC_P_SS_SETUP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _XPC_P_SS_SETUP@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	b	LBB0_11
LBB0_7:
Lloh18:
	adrp	x8, _xpc_chan@GOTPAGE
Lloh19:
	ldr	x8, [x8, _xpc_chan@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh23:
	adrp	x8, _xpNoMemory@GOTPAGE
Lloh24:
	ldr	x8, [x8, _xpNoMemory@GOTPAGEOFF]
Lloh25:
	ldr	w20, [x8]
	b	LBB0_11
LBB0_8:
Lloh26:
	adrp	x8, _xpc_chan@GOTPAGE
Lloh27:
	ldr	x8, [x8, _xpc_chan@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh31:
	adrp	x8, _xpNoMemory@GOTPAGE
Lloh32:
	ldr	x8, [x8, _xpNoMemory@GOTPAGEOFF]
Lloh33:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_9:
	ldr	x0, [x19, #24]
	bl	_kfree
	str	xzr, [x19, #16]
LBB0_10:
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_11:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_XPC_MAX_NCHANNELS,4,2          ; @XPC_MAX_NCHANNELS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_xpc_chan,4,2                   ; @xpc_chan
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't get memory for channels\n"

	.comm	_xpNoMemory,4,2                 ; @xpNoMemory
	.comm	_XPC_OPENCLOSE_ARGS_SIZE,4,2    ; @XPC_OPENCLOSE_ARGS_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"can't get memory for remote connect args\n"

	.comm	_XPC_C_DISCONNECTED,4,2         ; @XPC_C_DISCONNECTED
	.comm	_xpc_arch_ops,8,3               ; @xpc_arch_ops
	.comm	_xpSuccess,4,2                  ; @xpSuccess
	.comm	_XPC_P_SS_SETUP,4,2             ; @XPC_P_SS_SETUP
	.no_dead_strip	_xpc_setup_ch_structures
.subsections_via_symbols
