	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScmDeleteServiceRecord         ## -- Begin function ScmDeleteServiceRecord
	.p2align	4, 0x90
_ScmDeleteServiceRecord:                ## @ScmDeleteServiceRecord
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DPRINT
	movq	32(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpq	(%rbx), %rax
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	32(%rbx), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
LBB0_3:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.4:
	decq	(%rdi)
	jne	LBB0_6
## %bb.5:
	callq	_ScmRemoveServiceImage
	movq	$0, 24(%rbx)
LBB0_6:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ScmSetServiceGroup
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	16(%rbx), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
LBB0_8:
	leaq	8(%rbx), %rdi
	callq	_RemoveEntryList
	movq	(%rbx), %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DPRINT
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_HeapFree
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_DPRINT                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Deleting Service %S\n"

L_.str.1:                               ## @.str.1
	.asciz	"Deleted Service %S\n"

L_.str.2:                               ## @.str.2
	.asciz	"Done\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScmDeleteServiceRecord         ; -- Begin function ScmDeleteServiceRecord
	.p2align	2
_ScmDeleteServiceRecord:                ; @ScmDeleteServiceRecord
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINT
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x9, [x19]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
	bl	_GetProcessHeap
	ldr	x2, [x19, #32]
	mov	w1, #0
	bl	_HeapFree
LBB0_3:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x0]
	subs	x8, x8, #1
	str	x8, [x0]
	b.ne	LBB0_6
; %bb.5:
	bl	_ScmRemoveServiceImage
	str	xzr, [x19, #24]
LBB0_6:
	mov	x0, x19
	mov	x1, #0
	bl	_ScmSetServiceGroup
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.7:
	bl	_GetProcessHeap
	ldr	x2, [x19, #16]
	mov	w1, #0
	bl	_HeapFree
LBB0_8:
	add	x0, x19, #8
	bl	_RemoveEntryList
	ldr	x8, [x19]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINT
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x19
	bl	_HeapFree
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_DPRINT
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Deleting Service %S\n"

l_.str.1:                               ; @.str.1
	.asciz	"Deleted Service %S\n"

l_.str.2:                               ; @.str.2
	.asciz	"Done\n"

.subsections_via_symbols
