	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function GetSystemDrive
_GetSystemDrive:                        ## @GetSystemDrive
	.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	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_MAX_PATH@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	shll	$2, %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movl	(%r15), %edx
	leaq	l_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_GetEnvironmentVariableW
	movl	%eax, %ebx
	cmpl	(%r15), %eax
	jle	LBB0_5
## %bb.2:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	(%r14), %rdx
	leal	(,%rbx,4), %ecx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapReAlloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, (%r14)
	leaq	l_.str(%rip), %rdi
	movq	%rax, %rsi
	movl	%ebx, %edx
	callq	_GetEnvironmentVariableW
	cmpl	%ebx, %eax
	jg	LBB0_6
## %bb.4:
	testl	%eax, %eax
	jne	LBB0_7
	jmp	LBB0_6
LBB0_5:
	testl	%ebx, %ebx
	jne	LBB0_7
LBB0_6:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	(%r14), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
	movq	$0, (%r14)
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PATH,4,2                   ## @MAX_PATH
	.section	__TEXT,__const
	.p2align	2                               ## @.str
l_.str:
	.long	83                              ## 0x53
	.long	121                             ## 0x79
	.long	115                             ## 0x73
	.long	116                             ## 0x74
	.long	101                             ## 0x65
	.long	109                             ## 0x6d
	.long	68                              ## 0x44
	.long	114                             ## 0x72
	.long	105                             ## 0x69
	.long	118                             ## 0x76
	.long	101                             ## 0x65
	.long	0                               ## 0x0

	.no_dead_strip	_GetSystemDrive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GetSystemDrive
_GetSystemDrive:                        ; @GetSystemDrive
	.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
	mov	x19, x0
	bl	_GetProcessHeap
Lloh0:
	adrp	x21, _MAX_PATH@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_PATH@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_HeapAlloc
	str	x0, [x19]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x1, x0
	ldr	w2, [x21]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_GetEnvironmentVariableW
	mov	x20, x0
	ldr	w8, [x21]
	cmp	w0, w8
	b.le	LBB0_5
; %bb.2:
	bl	_GetProcessHeap
	ldr	x2, [x19]
	lsl	w3, w20, #2
	mov	w1, #0
	bl	_HeapReAlloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x1, x0
	str	x0, [x19]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_GetEnvironmentVariableW
	cmp	w0, w20
	ccmp	w0, #0, #4, le
	b.eq	LBB0_6
	b	LBB0_7
LBB0_4:
	mov	w20, #0
	b	LBB0_7
LBB0_5:
	cbnz	w20, LBB0_7
LBB0_6:
	bl	_GetProcessHeap
	ldr	x2, [x19]
	mov	w1, #0
	bl	_HeapFree
	mov	w20, #0
	str	xzr, [x19]
LBB0_7:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PATH,4,2                   ; @MAX_PATH
	.section	__TEXT,__const
	.p2align	2                               ; @.str
l_.str:
	.long	83                              ; 0x53
	.long	121                             ; 0x79
	.long	115                             ; 0x73
	.long	116                             ; 0x74
	.long	101                             ; 0x65
	.long	109                             ; 0x6d
	.long	68                              ; 0x44
	.long	114                             ; 0x72
	.long	105                             ; 0x69
	.long	118                             ; 0x76
	.long	101                             ; 0x65
	.long	0                               ; 0x0

	.no_dead_strip	_GetSystemDrive
.subsections_via_symbols
