	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_service_register               ## -- Begin function service_register
	.p2align	4, 0x90
_service_register:                      ## @service_register
	.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
	xorl	%r13d, %r13d
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.1:
	movq	%rdx, %r15
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.2:
	movq	%rdi, %rbx
	cmpb	$0, (%rdi)
	je	LBB0_11
## %bb.3:
	movl	%ecx, %r14d
	movq	%rsi, %r12
	movq	%rbx, %rdi
	callq	_service_find
	testq	%rax, %rax
	je	LBB0_6
LBB0_11:
	xorl	%r13d, %r13d
LBB0_12:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	$8, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	%rax, %r13
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_service_alloc
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	_cs_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_casper_services@GOTPCREL(%rip), %rdi
	movq	%r13, %rsi
	callq	_TAILQ_INSERT_TAIL
	jmp	LBB0_12
LBB0_10:
	movq	%r13, %rdi
	callq	_free
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_casper_services,4,2            ## @casper_services
	.comm	_cs_next,4,2                    ## @cs_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_service_register               ; -- Begin function service_register
	.p2align	2
_service_register:                      ; @service_register
	.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, #0
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x2
	cbz	x2, LBB0_5
; %bb.2:
	mov	x23, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_4
; %bb.3:
	mov	x20, x3
	mov	x22, x1
	mov	x0, x23
	bl	_service_find
	cbz	x0, LBB0_6
LBB0_4:
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	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
LBB0_6:
	mov	w0, #8
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.7:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_service_alloc
	str	x0, [x19]
	cbz	x0, LBB0_9
; %bb.8:
Lloh0:
	adrp	x8, _cs_next@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cs_next@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x0, _casper_services@GOTPAGE
Lloh4:
	ldr	x0, [x0, _casper_services@GOTPAGEOFF]
	mov	x1, x19
	bl	_TAILQ_INSERT_TAIL
	b	LBB0_5
LBB0_9:
	mov	x0, x19
	bl	_free
	b	LBB0_4
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_casper_services,4,2            ; @casper_services
	.comm	_cs_next,4,2                    ; @cs_next
.subsections_via_symbols
