	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function EnumServices
_EnumServices:                          ## @EnumServices
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r9d killed $r9d def $r9
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r15d
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r14
	movl	$0, -48(%rbp)
	movl	%r8d, -56(%rbp)
	movl	$0, -44(%rbp)
	movq	_SC_MANAGER_ENUMERATE_SERVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_OpenSCManager
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	testl	%r15d, %r15d
	jne	LBB0_6
## %bb.3:
	movq	_SC_ENUM_PROCESS_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %r8d
	leaq	-56(%rbp), %rax
	leaq	-44(%rbp), %r10
	leaq	-48(%rbp), %r11
	movq	%rbx, %rdi
	movl	%r13d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	xorl	%r9d, %r9d
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	%rax
	pushq	%r10
	pushq	%r11
	callq	_EnumServicesStatusEx
	addq	$32, %rsp
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_GetLastError
	movq	_ERROR_MORE_DATA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
LBB0_5:
	movl	-48(%rbp), %r15d
LBB0_6:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_HeapAlloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_SC_ENUM_PROCESS_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-56(%rbp), %r10
	leaq	-44(%rbp), %r11
	leaq	-48(%rbp), %r12
	movq	%rbx, %rdi
	movl	%r13d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r8d
	movl	%r15d, %r9d
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	%r10
	pushq	%r11
	pushq	%r12
	callq	_EnumServicesStatusEx
	addq	$32, %rsp
	testq	%rax, %rax
	jne	LBB0_10
LBB0_8:
	xorl	%eax, %eax
	callq	_ReportLastError
	cmpq	$0, (%r14)
	je	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	(%r14), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
LBB0_10:
	movq	%rbx, %rdi
	callq	_CloseServiceHandle
	movl	-44(%rbp), %r12d
	jmp	LBB0_11
LBB0_1:
	xorl	%eax, %eax
	callq	_ReportLastError
LBB0_11:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SC_MANAGER_ENUMERATE_SERVICE,4,2 ## @SC_MANAGER_ENUMERATE_SERVICE
	.comm	_SC_ENUM_PROCESS_INFO,4,2       ## @SC_ENUM_PROCESS_INFO
	.comm	_ERROR_MORE_DATA,8,3            ## @ERROR_MORE_DATA
	.no_dead_strip	_EnumServices
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function EnumServices
_EnumServices:                          ; @EnumServices
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x23, x5
	mov	x24, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	stp	w4, wzr, [sp, #24]
	str	wzr, [sp, #20]
Lloh0:
	adrp	x8, _SC_MANAGER_ENUMERATE_SERVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SC_MANAGER_ENUMERATE_SERVICE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, #0
	mov	x1, #0
	bl	_OpenSCManager
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	cbnz	w24, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _SC_ENUM_PROCESS_INFO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SC_ENUM_PROCESS_INFO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w4, [x19]
	str	w23, [sp, #8]
	add	x8, sp, #24
	str	x8, [sp]
	add	x6, sp, #28
	add	x7, sp, #20
	mov	x0, x20
	mov	x2, x22
	mov	x3, x21
	mov	w5, #0
	bl	_EnumServicesStatusEx
	cbnz	x0, LBB0_4
; %bb.3:
	bl	_GetLastError
Lloh6:
	adrp	x8, _ERROR_MORE_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERROR_MORE_DATA@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
LBB0_4:
	ldr	w24, [sp, #28]
LBB0_5:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x24
	bl	_HeapAlloc
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.6:
	mov	x4, x0
Lloh9:
	adrp	x8, _SC_ENUM_PROCESS_INFO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SC_ENUM_PROCESS_INFO@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	str	w23, [sp, #8]
	add	x8, sp, #24
	str	x8, [sp]
	add	x6, sp, #28
	add	x7, sp, #20
	mov	x0, x20
	mov	x2, x22
	mov	x3, x21
                                        ; kill: def $w4 killed $w4 killed $x4
	mov	x5, x24
	bl	_EnumServicesStatusEx
	cbnz	x0, LBB0_9
LBB0_7:
	bl	_ReportLastError
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.8:
	bl	_GetProcessHeap
	ldr	x2, [x19]
	mov	w1, #0
	bl	_HeapFree
LBB0_9:
	mov	x0, x20
	bl	_CloseServiceHandle
	ldr	w0, [sp, #20]
	b	LBB0_11
LBB0_10:
	bl	_ReportLastError
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SC_MANAGER_ENUMERATE_SERVICE,4,2 ; @SC_MANAGER_ENUMERATE_SERVICE
	.comm	_SC_ENUM_PROCESS_INFO,4,2       ; @SC_ENUM_PROCESS_INFO
	.comm	_ERROR_MORE_DATA,8,3            ; @ERROR_MORE_DATA
	.no_dead_strip	_EnumServices
.subsections_via_symbols
