	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DoRegServer
_DoRegServer:                           ## @DoRegServer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_MAX_PATH@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	addl	$12, %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_SERVICES_ACTIVE_DATABASEW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SC_MANAGER_CREATE_SERVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	callq	_OpenSCManagerW
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_GetSystemDirectoryW
	movslq	%eax, %rdi
	addq	%rbx, %rdi
	leaq	_DoRegServer.msiexecW(%rip), %rsi
	callq	_lstrcpyW
	movq	_GENERIC_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SERVICE_WIN32_SHARE_PROCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_SERVICE_DEMAND_START@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_SERVICE_ERROR_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$64, %rsp
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rsp)
	movups	%xmm0, 16(%rsp)
	movq	%rbx, 8(%rsp)
	movl	%eax, (%rsp)
	movq	$0, 48(%rsp)
	leaq	_DoRegServer.msiserverW(%rip), %rdx
	movl	%r14d, %edi
	movq	%rdx, %rsi
	callq	_CreateServiceW
	addq	$64, %rsp
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %edi
	callq	_CloseServiceHandle
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	$1, %ebx
	jmp	LBB0_7
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	movq	_ERROR_SERVICE_EXISTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf
	movl	$1, %ebx
LBB0_6:
	movl	%r14d, %edi
	callq	_CloseServiceHandle
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
_DoRegServer.msiserverW:                ## @DoRegServer.msiserverW
	.asciz	"MSIServer"

_DoRegServer.msiexecW:                  ## @DoRegServer.msiexecW
	.asciz	"\\msiexec /V"

	.comm	_MAX_PATH,4,2                   ## @MAX_PATH
	.comm	_SERVICES_ACTIVE_DATABASEW,4,2  ## @SERVICES_ACTIVE_DATABASEW
	.comm	_SC_MANAGER_CREATE_SERVICE,4,2  ## @SC_MANAGER_CREATE_SERVICE
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to open the service control manager.\n"

	.comm	_GENERIC_ALL,4,2                ## @GENERIC_ALL
	.comm	_SERVICE_WIN32_SHARE_PROCESS,4,2 ## @SERVICE_WIN32_SHARE_PROCESS
	.comm	_SERVICE_DEMAND_START,4,2       ## @SERVICE_DEMAND_START
	.comm	_SERVICE_ERROR_NORMAL,4,2       ## @SERVICE_ERROR_NORMAL
	.comm	_ERROR_SERVICE_EXISTS,8,3       ## @ERROR_SERVICE_EXISTS
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create MSI service\n"

	.no_dead_strip	_DoRegServer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DoRegServer
_DoRegServer:                           ; @DoRegServer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x21, _MAX_PATH@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MAX_PATH@GOTPAGEOFF]
	ldr	w8, [x21]
	add	w8, w8, #12
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh7:
	adrp	x8, _SERVICES_ACTIVE_DATABASEW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SERVICES_ACTIVE_DATABASEW@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _SC_MANAGER_CREATE_SERVICE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SC_MANAGER_CREATE_SERVICE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, #0
	bl	_OpenSCManagerW
	cbz	w0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w1, [x21]
	mov	x0, x20
	bl	_GetSystemDirectoryW
	add	x0, x20, w0, sxtw
Lloh13:
	adrp	x1, _DoRegServer.msiexecW@PAGE
Lloh14:
	add	x1, x1, _DoRegServer.msiexecW@PAGEOFF
	bl	_lstrcpyW
Lloh15:
	adrp	x8, _GENERIC_ALL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GENERIC_ALL@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
Lloh18:
	adrp	x8, _SERVICE_WIN32_SHARE_PROCESS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SERVICE_WIN32_SHARE_PROCESS@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
Lloh21:
	adrp	x8, _SERVICE_DEMAND_START@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SERVICE_DEMAND_START@GOTPAGEOFF]
Lloh23:
	ldr	w5, [x8]
Lloh24:
	adrp	x8, _SERVICE_ERROR_NORMAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SERVICE_ERROR_NORMAL@GOTPAGEOFF]
Lloh26:
	ldr	w6, [x8]
	sub	sp, sp, #48
	str	xzr, [sp, #32]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
Lloh27:
	adrp	x1, _DoRegServer.msiserverW@PAGE
Lloh28:
	add	x1, x1, _DoRegServer.msiserverW@PAGEOFF
	mov	x0, x19
	mov	x2, x1
	mov	x7, x20
	bl	_CreateServiceW
	add	sp, sp, #48
	cbz	w0, LBB0_4
; %bb.2:
	bl	_CloseServiceHandle
	mov	w20, #0
	b	LBB0_7
LBB0_3:
Lloh29:
	adrp	x8, _stderr@GOTPAGE
Lloh30:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w20, #1
	b	LBB0_8
LBB0_4:
	bl	_GetLastError
Lloh34:
	adrp	x8, _ERROR_SERVICE_EXISTS@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ERROR_SERVICE_EXISTS@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.5:
	mov	w20, #0
	b	LBB0_7
LBB0_6:
Lloh37:
	adrp	x8, _stderr@GOTPAGE
Lloh38:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
Lloh40:
	adrp	x1, l_.str.1@PAGE
Lloh41:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	w20, #1
LBB0_7:
	mov	x0, x19
	bl	_CloseServiceHandle
LBB0_8:
	ldur	x8, [x29, #-40]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x20
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_DoRegServer.msiserverW:                ; @DoRegServer.msiserverW
	.asciz	"MSIServer"

_DoRegServer.msiexecW:                  ; @DoRegServer.msiexecW
	.asciz	"\\msiexec /V"

	.comm	_MAX_PATH,4,2                   ; @MAX_PATH
	.comm	_SERVICES_ACTIVE_DATABASEW,4,2  ; @SERVICES_ACTIVE_DATABASEW
	.comm	_SC_MANAGER_CREATE_SERVICE,4,2  ; @SC_MANAGER_CREATE_SERVICE
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to open the service control manager.\n"

	.comm	_GENERIC_ALL,4,2                ; @GENERIC_ALL
	.comm	_SERVICE_WIN32_SHARE_PROCESS,4,2 ; @SERVICE_WIN32_SHARE_PROCESS
	.comm	_SERVICE_DEMAND_START,4,2       ; @SERVICE_DEMAND_START
	.comm	_SERVICE_ERROR_NORMAL,4,2       ; @SERVICE_ERROR_NORMAL
	.comm	_ERROR_SERVICE_EXISTS,8,3       ; @ERROR_SERVICE_EXISTS
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create MSI service\n"

	.no_dead_strip	_DoRegServer
.subsections_via_symbols
