	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SetFailure                     ## -- Begin function SetFailure
	.p2align	4, 0x90
_SetFailure:                            ## @SetFailure
	.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, %r14d
	movq	%rdi, %rbx
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	$0, -64(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, -48(%rbp)
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	movl	$8, %esi
	callq	_ZeroMemory
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rcx
	callq	_ParseFailureArguments
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	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_3
## %bb.5:
	movq	-64(%rbp), %rsi
	movq	_SERVICE_CHANGE_CONFIG@GOTPCREL(%rip), %rax
	movq	_SERVICE_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_OpenService
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	_SE_SHUTDOWN_PRIVILEGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_FALSE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	leaq	-48(%rbp), %rcx
	callq	_RtlAdjustPrivilege
	movq	_SERVICE_CONFIG_FAILURE_ACTIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ChangeServiceConfig2
	testl	%eax, %eax
	je	LBB0_8
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	callq	__T
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	__tprintf
	movq	(%rbx), %rdx
	jmp	LBB0_11
LBB0_1:
	xorl	%eax, %eax
	callq	_SetFailureUsage
	movq	(%r13), %r12
	jmp	LBB0_19
LBB0_3:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
LBB0_4:
	callq	__T
	movl	%eax, %ebx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	__tprintf
	movq	_FALSE@GOTPCREL(%rip), %rbx
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	callq	__T
	movl	%eax, %r12d
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%r12d, %edi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	__tprintf
LBB0_9:
	movq	(%rbx), %rdx
	movq	%rdx, %r12
LBB0_11:
	movq	_SE_SHUTDOWN_PRIVILEGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi
	leaq	-48(%rbp), %rcx
	callq	_RtlAdjustPrivilege
	cmpq	(%rbx), %r12
	jne	LBB0_13
## %bb.12:
	xorl	%eax, %eax
	callq	_ReportLastError
LBB0_13:
	cmpq	$0, -56(%rbp)
	je	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	-56(%rbp), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
LBB0_15:
	testq	%r15, %r15
	je	LBB0_17
## %bb.16:
	movq	%r15, %rdi
	callq	_CloseServiceHandle
LBB0_17:
	testq	%r14, %r14
	je	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	_CloseServiceHandle
LBB0_19:
	movq	%r12, %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	_FALSE,8,3                      ## @FALSE
	.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	_SERVICE_CHANGE_CONFIG,4,2      ## @SERVICE_CHANGE_CONFIG
	.comm	_SERVICE_START,4,2              ## @SERVICE_START
L_.str.1:                               ## @.str.1
	.asciz	"[SC] OpenService FAILED %lu:\n\n"

	.comm	_SE_SHUTDOWN_PRIVILEGE,4,2      ## @SE_SHUTDOWN_PRIVILEGE
	.comm	_SERVICE_CONFIG_FAILURE_ACTIONS,4,2 ## @SERVICE_CONFIG_FAILURE_ACTIONS
L_.str.2:                               ## @.str.2
	.asciz	"[SC] ChangeServiceConfig2 FAILED %lu:\n\n"

L_.str.3:                               ## @.str.3
	.asciz	"[SC] ChangeServiceConfig2 SUCCESS\n\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SetFailure                     ; -- Begin function SetFailure
	.p2align	2
_SetFailure:                            ; @SetFailure
	.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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x24, _TRUE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TRUE@GOTPAGEOFF]
	ldr	x20, [x24]
	str	xzr, [sp, #16]
Lloh2:
	adrp	x22, _FALSE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _FALSE@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [sp, #8]
	add	x0, sp, #24
	mov	w1, #8
	bl	_ZeroMemory
	add	x2, sp, #16
	add	x3, sp, #24
	mov	x0, x21
	mov	x1, x19
	bl	_ParseFailureArguments
	cbz	w0, LBB0_5
; %bb.1:
Lloh4:
	adrp	x8, _SC_MANAGER_CONNECT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SC_MANAGER_CONNECT@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, #0
	mov	x1, #0
	bl	_OpenSCManager
	mov	x19, x0
Lloh7:
	adrp	x23, _SE_SHUTDOWN_PRIVILEGE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _SE_SHUTDOWN_PRIVILEGE@GOTPAGEOFF]
	cbz	x0, LBB0_6
; %bb.2:
Lloh9:
	adrp	x8, _SERVICE_CHANGE_CONFIG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SERVICE_CHANGE_CONFIG@GOTPAGEOFF]
	ldr	x1, [sp, #16]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _SERVICE_START@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SERVICE_START@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_OpenService
	mov	x21, x0
	cbz	x0, LBB0_7
; %bb.3:
	ldr	w0, [x23]
	ldr	x1, [x24]
	ldr	x2, [x22]
	add	x3, sp, #8
	bl	_RtlAdjustPrivilege
Lloh15:
	adrp	x8, _SERVICE_CONFIG_FAILURE_ACTIONS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SERVICE_CONFIG_FAILURE_ACTIONS@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x21
	bl	_ChangeServiceConfig2
	cbz	w0, LBB0_8
; %bb.4:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__T
	bl	__tprintf
	ldr	x2, [x22]
	b	LBB0_11
LBB0_5:
	bl	_SetFailureUsage
	ldr	x20, [x22]
	b	LBB0_19
LBB0_6:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	__T
	mov	x20, x0
	bl	_GetLastError
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x20
	bl	__tprintf
	mov	x21, #0
	b	LBB0_10
LBB0_7:
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_9:
	bl	__T
	mov	x20, x0
	bl	_GetLastError
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x20
	bl	__tprintf
LBB0_10:
	ldr	x2, [x22]
	mov	x20, x2
LBB0_11:
	ldr	w0, [x23]
	ldr	x1, [sp, #8]
	add	x3, sp, #8
	bl	_RtlAdjustPrivilege
	ldr	x8, [x22]
	cmp	x20, x8
	b.ne	LBB0_13
; %bb.12:
	bl	_ReportLastError
LBB0_13:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_15
; %bb.14:
	bl	_GetProcessHeap
	ldr	x2, [sp, #24]
	mov	w1, #0
	bl	_HeapFree
LBB0_15:
	cbz	x21, LBB0_17
; %bb.16:
	mov	x0, x21
	bl	_CloseServiceHandle
LBB0_17:
	cbz	x19, LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_CloseServiceHandle
LBB0_19:
	mov	x0, x20
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_FALSE,8,3                      ; @FALSE
	.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	_SERVICE_CHANGE_CONFIG,4,2      ; @SERVICE_CHANGE_CONFIG
	.comm	_SERVICE_START,4,2              ; @SERVICE_START
l_.str.1:                               ; @.str.1
	.asciz	"[SC] OpenService FAILED %lu:\n\n"

	.comm	_SE_SHUTDOWN_PRIVILEGE,4,2      ; @SE_SHUTDOWN_PRIVILEGE
	.comm	_SERVICE_CONFIG_FAILURE_ACTIONS,4,2 ; @SERVICE_CONFIG_FAILURE_ACTIONS
l_.str.2:                               ; @.str.2
	.asciz	"[SC] ChangeServiceConfig2 FAILED %lu:\n\n"

l_.str.3:                               ; @.str.3
	.asciz	"[SC] ChangeServiceConfig2 SUCCESS\n\n"

.subsections_via_symbols
