	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScmReadString                  ## -- Begin function ScmReadString
	.p2align	4, 0x90
_ScmReadString:                         ## @ScmReadString
	.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
	movq	%rdx, %r15
	movl	%esi, %r12d
	movl	%edi, %r13d
	movq	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, (%rdx)
	leaq	-56(%rbp), %rcx
	leaq	-48(%rbp), %r9
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_RegQueryValueExW
	movq	%rax, %rbx
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_14
## %bb.1:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-48(%rbp), %rdx
	movl	%eax, %edi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r14
	leaq	-56(%rbp), %rcx
	leaq	-48(%rbp), %r9
	movl	%r13d, %edi
	movl	%r12d, %esi
	xorl	%edx, %edx
	movq	%rax, %r8
	callq	_RegQueryValueExW
	movq	%rax, %rbx
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_4
## %bb.5:
	movq	-56(%rbp), %rax
	movq	_REG_EXPAND_SZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.6:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ExpandEnvironmentStringsW
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	jle	LBB0_12
## %bb.7:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-48(%rbp), %rdx
	shlq	$2, %rdx
	movl	%eax, %edi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%rax, %r12
	movq	-48(%rbp), %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	callq	_ExpandEnvironmentStringsW
	cmpq	%rax, %rbx
	jne	LBB0_10
## %bb.9:
	movq	%r12, (%r15)
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_4
LBB0_2:
	movq	_ERROR_NOT_ENOUGH_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_14
LBB0_13:
	movq	%r14, (%r15)
	jmp	LBB0_14
LBB0_12:
	xorl	%eax, %eax
	callq	_GetLastError
	movq	%rax, %rbx
	jmp	LBB0_4
LBB0_11:
	movq	_ERROR_NOT_ENOUGH_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_4
LBB0_10:
	xorl	%eax, %eax
	callq	_GetLastError
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	_HeapFree
LBB0_4:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_HeapFree
LBB0_14:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR_SUCCESS,8,3              ## @ERROR_SUCCESS
	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.comm	_ERROR_NOT_ENOUGH_MEMORY,8,3    ## @ERROR_NOT_ENOUGH_MEMORY
	.comm	_REG_EXPAND_SZ,8,3              ## @REG_EXPAND_SZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScmReadString                  ; -- Begin function ScmReadString
	.p2align	2
_ScmReadString:                         ; @ScmReadString
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	stp	xzr, xzr, [sp]
	str	xzr, [x2]
	mov	x3, sp
	add	x5, sp, #8
	mov	w2, #0
	mov	x4, #0
	bl	_RegQueryValueExW
	mov	x21, x0
Lloh0:
	adrp	x24, _ERROR_SUCCESS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ERROR_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.1:
	bl	_GetProcessHeap
Lloh2:
	adrp	x25, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh3:
	ldr	x25, [x25, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
	ldr	w1, [x25]
	ldr	x2, [sp, #8]
	bl	_HeapAlloc
	cbz	x0, LBB0_8
; %bb.2:
	mov	x19, x0
	mov	x3, sp
	add	x5, sp, #8
	mov	x0, x23
	mov	x1, x22
	mov	w2, #0
	mov	x4, x19
	bl	_RegQueryValueExW
	mov	x21, x0
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.3:
	ldr	x8, [sp]
Lloh4:
	adrp	x9, _REG_EXPAND_SZ@GOTPAGE
Lloh5:
	ldr	x9, [x9, _REG_EXPAND_SZ@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.4:
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	bl	_ExpandEnvironmentStringsW
	str	x0, [sp, #8]
	cmp	x0, #1
	b.lt	LBB0_10
; %bb.5:
	bl	_GetProcessHeap
	ldr	w1, [x25]
	ldr	x8, [sp, #8]
	lsl	x2, x8, #2
	bl	_HeapAlloc
	cbz	x0, LBB0_11
; %bb.6:
	mov	x22, x0
	ldr	x21, [sp, #8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_ExpandEnvironmentStringsW
	cmp	x21, x0
	b.ne	LBB0_12
; %bb.7:
	str	x22, [x20]
	ldr	x21, [x24]
	b	LBB0_13
LBB0_8:
Lloh7:
	adrp	x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGEOFF]
Lloh9:
	ldr	x21, [x8]
	b	LBB0_14
LBB0_9:
	str	x19, [x20]
	b	LBB0_14
LBB0_10:
	bl	_GetLastError
	mov	x21, x0
	b	LBB0_13
LBB0_11:
Lloh10:
	adrp	x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGEOFF]
Lloh12:
	ldr	x21, [x8]
	b	LBB0_13
LBB0_12:
	bl	_GetLastError
	mov	x21, x0
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x22
	bl	_HeapFree
LBB0_13:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x19
	bl	_HeapFree
LBB0_14:
	mov	x0, x21
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR_SUCCESS,8,3              ; @ERROR_SUCCESS
	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.comm	_ERROR_NOT_ENOUGH_MEMORY,8,3    ; @ERROR_NOT_ENOUGH_MEMORY
	.comm	_REG_EXPAND_SZ,8,3              ; @REG_EXPAND_SZ
.subsections_via_symbols
