	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ScmDeleteTree
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ScmDeleteTree
	.p2align	4, 0x90
_ScmDeleteTree:                         ## @ScmDeleteTree
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	movq	_KEY_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %r8
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_RegOpenKeyExW
	movq	%rax, %rbx
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_24
## %bb.2:
	movq	-48(%rbp), %rdi
	jmp	LBB0_4
LBB0_3:
	movq	%r15, -48(%rbp)
	movq	%r15, %rdi
LBB0_4:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rsp)
	leaq	-64(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	%xmm0, (%rsp)
	movq	$0, 40(%rsp)
	leaq	-72(%rbp), %r9
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_RegQueryInfoKeyW
	movq	%rax, %rbx
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_22
## %bb.5:
	movq	-72(%rbp), %rdi
	incq	%rdi
	movq	%rdi, -72(%rbp)
	movq	-64(%rbp), %rsi
	incq	%rsi
	movq	%rsi, -64(%rbp)
	callq	_max
	movq	%rax, %r13
	xorl	%eax, %eax
	callq	_GetProcessHeap
	leaq	(,%r13,4), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%rax, %r12
	movq	_TRUE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.7:
	movq	%r13, -56(%rbp)
	movq	-48(%rbp), %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	leaq	-56(%rbp), %rcx
	xorl	%esi, %esi
	movq	%r12, %rdx
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_RegEnumKeyExW
	testq	%rax, %rax
	jne	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rdi
	movq	%r12, %rsi
	callq	_ScmDeleteTree
	movq	%rax, %rbx
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_21
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_TRUE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r13, -56(%rbp)
	movq	-48(%rbp), %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	xorl	%esi, %esi
	movq	%r12, %rdx
	leaq	-56(%rbp), %rcx
	jmp	LBB0_8
LBB0_9:
	testq	%r14, %r14
	je	LBB0_15
## %bb.10:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_RegDeleteKeyW
	movq	%rax, %rbx
LBB0_21:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	_HeapFree
LBB0_22:
	testq	%r14, %r14
	je	LBB0_24
LBB0_23:
	movq	-48(%rbp), %rdi
	callq	_RegCloseKey
LBB0_24:
	movq	%rbx, %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_ERROR_NOT_ENOUGH_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%r14, %r14
	jne	LBB0_23
	jmp	LBB0_24
LBB0_15:
	movq	_TRUE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_21
## %bb.16:
	movq	%r13, -56(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	leaq	-56(%rbp), %rcx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_RegEnumValueW
	testq	%rax, %rax
	jne	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_RegDeleteValueW
	movq	%rax, %rbx
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	_TRUE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, -56(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	leaq	-56(%rbp), %rcx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_READ,4,2                   ## @KEY_READ
	.comm	_ERROR_SUCCESS,8,3              ## @ERROR_SUCCESS
	.comm	_ERROR_NOT_ENOUGH_MEMORY,8,3    ## @ERROR_NOT_ENOUGH_MEMORY
	.comm	_TRUE,8,3                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScmDeleteTree                  ; -- Begin function ScmDeleteTree
	.p2align	2
_ScmDeleteTree:                         ; @ScmDeleteTree
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	str	xzr, [sp, #32]
Lloh0:
	adrp	x24, _ERROR_SUCCESS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ERROR_SUCCESS@GOTPAGEOFF]
	cbz	x1, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _KEY_READ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KEY_READ@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	add	x4, sp, #32
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_RegOpenKeyExW
	mov	x21, x0
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.2:
	ldr	x0, [sp, #32]
	b	LBB0_4
LBB0_3:
	str	x20, [sp, #32]
	mov	x0, x20
LBB0_4:
	stp	xzr, xzr, [sp, #16]
	add	x8, sp, #48
	stp	x8, xzr, [sp]
	add	x5, sp, #56
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	mov	x6, #0
	mov	x7, #0
	bl	_RegQueryInfoKeyW
	mov	x21, x0
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.5:
	ldr	x8, [sp, #56]
	add	x0, x8, #1
	ldr	x8, [sp, #48]
	add	x1, x8, #1
	stp	x1, x0, [sp, #48]
	bl	_max
	mov	x23, x0
	bl	_GetProcessHeap
	lsl	x2, x23, #2
	mov	w1, #0
	bl	_HeapAlloc
	cbz	x0, LBB0_12
; %bb.6:
	mov	x22, x0
Lloh5:
	adrp	x25, _TRUE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _TRUE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	cbz	x8, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x23, [sp, #40]
	ldr	x0, [sp, #32]
	add	x3, sp, #40
	mov	w1, #0
	mov	x2, x22
	mov	x4, #0
	mov	x5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_RegEnumKeyExW
	cbnz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [sp, #32]
	mov	x1, x22
	bl	_ScmDeleteTree
	mov	x21, x0
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_7
	b	LBB0_16
LBB0_10:
	cbz	x19, LBB0_13
; %bb.11:
	mov	x0, x20
	mov	x1, x19
	bl	_RegDeleteKeyW
	mov	x21, x0
	b	LBB0_16
LBB0_12:
Lloh7:
	adrp	x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGEOFF]
Lloh9:
	ldr	x21, [x8]
	b	LBB0_17
LBB0_13:
	ldr	x8, [x25]
	cbz	x8, LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	str	x23, [sp, #40]
	add	x3, sp, #40
	mov	x0, x20
	mov	w1, #0
	mov	x2, x22
	mov	x4, #0
	mov	x5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_RegEnumValueW
	cbnz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_RegDeleteValueW
	mov	x21, x0
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x0, x8
	ccmp	x9, #0, #4, eq
	b.ne	LBB0_14
LBB0_16:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x22
	bl	_HeapFree
LBB0_17:
	cbz	x19, LBB0_19
; %bb.18:
	ldr	x0, [sp, #32]
	bl	_RegCloseKey
LBB0_19:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_READ,4,2                   ; @KEY_READ
	.comm	_ERROR_SUCCESS,8,3              ; @ERROR_SUCCESS
	.comm	_ERROR_NOT_ENOUGH_MEMORY,8,3    ; @ERROR_NOT_ENOUGH_MEMORY
	.comm	_TRUE,8,3                       ; @TRUE
.subsections_via_symbols
