	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SdSet                          ## -- Begin function SdSet
	.p2align	4, 0x90
_SdSet:                                 ## @SdSet
	.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
	movl	%esi, %r13d
	movl	%edi, %ebx
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	$0, -52(%rbp)
	movq	$0, -48(%rbp)
	movq	_SC_MANAGER_CONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_OpenSCManager
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	_WRITE_DAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_OpenService
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movq	_SDDL_REVISION_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	movl	%r13d, %edi
	callq	_ConvertStringSecurityDescriptorToSecurityDescriptor
	testl	%eax, %eax
	je	LBB0_6
## %bb.9:
	movq	_DACL_SECURITY_INFORMATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_SetServiceObjectSecurity
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	_FALSE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_12
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	__T
	movl	%eax, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_7
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
LBB0_7:
	callq	__T
	movl	%eax, %ebx
LBB0_8:
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	__tprintf
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_12:
	xorl	%eax, %eax
	callq	_ReportLastError
LBB0_13:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_LocalFree
LBB0_15:
	testq	%r12, %r12
	je	LBB0_17
## %bb.16:
	movq	%r12, %rdi
	callq	_CloseServiceHandle
LBB0_17:
	testq	%r14, %r14
	je	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	_CloseServiceHandle
LBB0_19:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_SC_MANAGER_CONNECT,4,2         ## @SC_MANAGER_CONNECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[SC] OpenSCManager FAILED %lu:\n\n"

	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_WRITE_DAC,4,2                  ## @WRITE_DAC
L_.str.1:                               ## @.str.1
	.asciz	"[SC] OpenService FAILED %lu:\n\n"

	.comm	_SDDL_REVISION_1,4,2            ## @SDDL_REVISION_1
L_.str.2:                               ## @.str.2
	.asciz	"[SC] ConvertStringSecurityDescriptorToSecurityDescriptor FAILED %lu:\n\n"

	.comm	_DACL_SECURITY_INFORMATION,4,2  ## @DACL_SECURITY_INFORMATION
L_.str.3:                               ## @.str.3
	.asciz	"[SC] SetServiceObjectSecurity FAILED %lu:\n\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SdSet                          ; -- Begin function SdSet
	.p2align	2
_SdSet:                                 ; @SdSet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	str	wzr, [sp, #12]
	str	xzr, [sp]
Lloh3:
	adrp	x8, _SC_MANAGER_CONNECT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SC_MANAGER_CONNECT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, #0
	mov	x1, #0
	bl	_OpenSCManager
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.1:
Lloh6:
	adrp	x8, _WRITE_DAC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WRITE_DAC@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_OpenService
	mov	x21, x0
	cbz	x0, LBB0_6
; %bb.2:
Lloh9:
	adrp	x8, _SDDL_REVISION_1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDDL_REVISION_1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, sp
	add	x3, sp, #12
	mov	x0, x22
	bl	_ConvertStringSecurityDescriptorToSecurityDescriptor
	cbz	w0, LBB0_7
; %bb.3:
Lloh12:
	adrp	x8, _DACL_SECURITY_INFORMATION@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DACL_SECURITY_INFORMATION@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	x2, [sp]
	mov	x0, x21
	bl	_SetServiceObjectSecurity
	cbz	w0, LBB0_8
; %bb.4:
Lloh15:
	adrp	x8, _FALSE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x20, x8
	b.eq	LBB0_11
	b	LBB0_12
LBB0_5:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	__T
	mov	x20, x0
	bl	_GetLastError
	mov	x1, x0
	mov	x0, x20
	bl	__tprintf
	mov	x21, #0
	b	LBB0_10
LBB0_6:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_7:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
	bl	__T
	mov	x20, x0
	bl	_GetLastError
	mov	x1, x0
	mov	x0, x20
	bl	__tprintf
LBB0_10:
Lloh26:
	adrp	x8, _FALSE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh28:
	ldr	x20, [x8]
LBB0_11:
	bl	_ReportLastError
LBB0_12:
	ldr	x0, [sp]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_LocalFree
LBB0_14:
	cbz	x21, LBB0_16
; %bb.15:
	mov	x0, x21
	bl	_CloseServiceHandle
LBB0_16:
	cbz	x19, LBB0_18
; %bb.17:
	mov	x0, x19
	bl	_CloseServiceHandle
LBB0_18:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_SC_MANAGER_CONNECT,4,2         ; @SC_MANAGER_CONNECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[SC] OpenSCManager FAILED %lu:\n\n"

	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_WRITE_DAC,4,2                  ; @WRITE_DAC
l_.str.1:                               ; @.str.1
	.asciz	"[SC] OpenService FAILED %lu:\n\n"

	.comm	_SDDL_REVISION_1,4,2            ; @SDDL_REVISION_1
l_.str.2:                               ; @.str.2
	.asciz	"[SC] ConvertStringSecurityDescriptorToSecurityDescriptor FAILED %lu:\n\n"

	.comm	_DACL_SECURITY_INFORMATION,4,2  ; @DACL_SECURITY_INFORMATION
l_.str.3:                               ; @.str.3
	.asciz	"[SC] SetServiceObjectSecurity FAILED %lu:\n\n"

.subsections_via_symbols
