	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reg_save
_reg_save:                              ## @reg_save
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %ebx
	leal	-6(%rbx), %eax
	cmpl	$-2, %eax
	jae	LBB0_1
## %bb.12:
	movq	_STRING_INVALID_SYNTAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%eax, %eax
	callq	_output_message
	movq	_STRING_FUNC_HELP@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	8(%r15), %rdi
	callq	_struprW
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_output_message
	jmp	LBB0_13
LBB0_1:
	movq	16(%r15), %rdi
	leaq	-32(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_parse_registry_key
	movl	$1, %r14d
	testl	%eax, %eax
	je	LBB0_14
## %bb.2:
	movq	24(%r15), %rdi
	callq	_GetFileAttributes
	movq	_INVALID_FILE_ATTRIBUTES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.3:
	cmpl	$5, %ebx
	jne	LBB0_5
## %bb.4:
	movq	32(%r15), %rdi
	leaq	l_.str(%rip), %rsi
	callq	_strcmpiW
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	movq	_STRING_OVERWRITE_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r15), %rsi
	callq	_ask_confirm
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movq	24(%r15), %rdi
	callq	_DeleteFile
LBB0_7:
	movl	-32(%rbp), %edi
	movq	-40(%rbp), %rsi
	movq	_KEY_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-28(%rbp), %r8
	xorl	%edx, %edx
	callq	_RegOpenKeyExW
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_STRING_INVALID_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%eax, %eax
	callq	_output_message
LBB0_13:
	movl	$1, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_SE_BACKUP_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_set_privilege
	testl	%eax, %eax
	je	LBB0_14
## %bb.10:
	movl	-28(%rbp), %edi
	movq	24(%r15), %rsi
	movq	_REG_LATEST_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_RegSaveKeyExW
	movq	%rax, %rbx
	movl	-28(%rbp), %edi
	callq	_RegCloseKey
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_14
## %bb.11:
	movq	%rbx, %rdi
	callq	_output_error
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_FILE_ATTRIBUTES,8,3    ## @INVALID_FILE_ATTRIBUTES
	.section	__TEXT,__const
	.p2align	2                               ## @.str
l_.str:
	.long	47                              ## 0x2f
	.long	121                             ## 0x79
	.long	0                               ## 0x0

	.comm	_STRING_OVERWRITE_FILE,4,2      ## @STRING_OVERWRITE_FILE
	.comm	_KEY_READ,4,2                   ## @KEY_READ
	.comm	_STRING_INVALID_KEY,4,2         ## @STRING_INVALID_KEY
	.comm	_SE_BACKUP_NAME,4,2             ## @SE_BACKUP_NAME
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_REG_LATEST_FORMAT,4,2          ## @REG_LATEST_FORMAT
	.comm	_ERROR_SUCCESS,8,3              ## @ERROR_SUCCESS
	.comm	_STRING_INVALID_SYNTAX,4,2      ## @STRING_INVALID_SYNTAX
	.comm	_STRING_FUNC_HELP,4,2           ## @STRING_FUNC_HELP
	.no_dead_strip	_reg_save
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reg_save
_reg_save:                              ; @reg_save
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x1
	sub	w8, w0, #6
	cmn	w8, #2
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _STRING_INVALID_SYNTAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRING_INVALID_SYNTAX@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_output_message
Lloh3:
	adrp	x8, _STRING_FUNC_HELP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STRING_FUNC_HELP@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	ldr	x0, [x19, #8]
	bl	_struprW
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x20
	b	LBB0_10
LBB0_2:
	mov	x20, x0
	ldr	x0, [x19, #16]
	sub	x1, x29, #20
	add	x2, sp, #16
	add	x3, sp, #8
	bl	_parse_registry_key
	cbz	w0, LBB0_11
; %bb.3:
	ldr	x0, [x19, #24]
	bl	_GetFileAttributes
Lloh6:
	adrp	x8, _INVALID_FILE_ATTRIBUTES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INVALID_FILE_ATTRIBUTES@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.4:
	cmp	w20, #5
	b.ne	LBB0_6
; %bb.5:
	ldr	x0, [x19, #32]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmpiW
	cbz	w0, LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _STRING_OVERWRITE_FILE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STRING_OVERWRITE_FILE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	x1, [x19, #24]
	bl	_ask_confirm
	cbz	x0, LBB0_8
LBB0_7:
	ldr	x0, [x19, #24]
	bl	_DeleteFile
LBB0_8:
	ldur	w0, [x29, #-20]
	ldr	x1, [sp, #16]
Lloh14:
	adrp	x8, _KEY_READ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KEY_READ@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	add	x4, sp, #24
	mov	w2, #0
	bl	_RegOpenKeyExW
	cbz	x0, LBB0_13
; %bb.9:
Lloh17:
	adrp	x8, _STRING_INVALID_KEY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STRING_INVALID_KEY@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
LBB0_10:
	bl	_output_message
LBB0_11:
	mov	w0, #1
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_13:
Lloh20:
	adrp	x8, _SE_BACKUP_NAME@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SE_BACKUP_NAME@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _TRUE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_set_privilege
	cbz	w0, LBB0_11
; %bb.14:
	ldr	w0, [sp, #24]
	ldr	x1, [x19, #24]
Lloh26:
	adrp	x8, _REG_LATEST_FORMAT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _REG_LATEST_FORMAT@GOTPAGEOFF]
Lloh28:
	ldr	w3, [x8]
	mov	x2, #0
	bl	_RegSaveKeyExW
	mov	x19, x0
	ldr	w0, [sp, #24]
	bl	_RegCloseKey
Lloh29:
	adrp	x8, _ERROR_SUCCESS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ERROR_SUCCESS@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cmp	x19, x8
	b.ne	LBB0_16
; %bb.15:
	mov	w0, #0
	b	LBB0_12
LBB0_16:
	mov	x0, x19
	bl	_output_error
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_FILE_ATTRIBUTES,8,3    ; @INVALID_FILE_ATTRIBUTES
	.section	__TEXT,__const
	.p2align	2                               ; @.str
l_.str:
	.long	47                              ; 0x2f
	.long	121                             ; 0x79
	.long	0                               ; 0x0

	.comm	_STRING_OVERWRITE_FILE,4,2      ; @STRING_OVERWRITE_FILE
	.comm	_KEY_READ,4,2                   ; @KEY_READ
	.comm	_STRING_INVALID_KEY,4,2         ; @STRING_INVALID_KEY
	.comm	_SE_BACKUP_NAME,4,2             ; @SE_BACKUP_NAME
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_REG_LATEST_FORMAT,4,2          ; @REG_LATEST_FORMAT
	.comm	_ERROR_SUCCESS,8,3              ; @ERROR_SUCCESS
	.comm	_STRING_INVALID_SYNTAX,4,2      ; @STRING_INVALID_SYNTAX
	.comm	_STRING_FUNC_HELP,4,2           ; @STRING_FUNC_HELP
	.no_dead_strip	_reg_save
.subsections_via_symbols
