	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_service_connection_add         ## -- Begin function service_connection_add
	.p2align	4, 0x90
_service_connection_add:                ## @service_connection_add
	.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	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_SERVICE_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movl	$24, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_service_get_channel_flags
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_cap_wrap
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	testq	%r15, %r15
	je	LBB0_6
## %bb.9:
	movq	%r15, %rdi
	callq	_nvlist_clone
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	jne	LBB0_7
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movq	8(%rbx), %rdi
	xorl	%esi, %esi
	callq	_cap_unwrap
	jmp	LBB0_4
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
LBB0_4:
	movq	%rbx, %rdi
	callq	_free
	movl	%r15d, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_6:
	movq	$0, 16(%rbx)
LBB0_7:
	movq	_SERVICE_CONNECTION_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	addq	$8, %r14
	movq	_sc_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SERVICE_MAGIC,8,3              ## @SERVICE_MAGIC
	.comm	_errno,4,2                      ## @errno
	.comm	_SERVICE_CONNECTION_MAGIC,4,2   ## @SERVICE_CONNECTION_MAGIC
	.comm	_sc_next,4,2                    ## @sc_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_service_connection_add         ; -- Begin function service_connection_add
	.p2align	2
_service_connection_add:                ; @service_connection_add
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SERVICE_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SERVICE_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	mov	w0, #24
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_9
; %bb.1:
	mov	x0, x20
	bl	_service_get_channel_flags
	mov	x1, x0
	mov	x0, x22
	bl	_cap_wrap
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.2:
	cbz	x21, LBB0_7
; %bb.3:
	mov	x0, x21
	bl	_nvlist_clone
	str	x0, [x19, #16]
	cbnz	x0, LBB0_8
; %bb.4:
Lloh3:
	adrp	x20, _errno@GOTPAGE
Lloh4:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w21, [x20]
	ldr	x0, [x19, #8]
	mov	x1, #0
	bl	_cap_unwrap
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x20, _errno@GOTPAGE
Lloh6:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w21, [x20]
LBB0_6:
	mov	x0, x19
	bl	_free
	mov	x19, #0
	str	w21, [x20]
	b	LBB0_9
LBB0_7:
	str	xzr, [x19, #16]
LBB0_8:
Lloh7:
	adrp	x8, _SERVICE_CONNECTION_MAGIC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SERVICE_CONNECTION_MAGIC@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19]
	add	x0, x20, #8
Lloh10:
	adrp	x8, _sc_next@GOTPAGE
Lloh11:
	ldr	x8, [x8, _sc_next@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_TAILQ_INSERT_TAIL
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SERVICE_MAGIC,8,3              ; @SERVICE_MAGIC
	.comm	_errno,4,2                      ; @errno
	.comm	_SERVICE_CONNECTION_MAGIC,4,2   ; @SERVICE_CONNECTION_MAGIC
	.comm	_sc_next,4,2                    ; @sc_next
.subsections_via_symbols
