	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getpath
_getpath:                               ## @getpath
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_modpath@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free
	movq	$0, (%r15)
LBB0_2:
	movq	_miblen@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	testq	%rsi, %rsi
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_getmib
	movq	(%r12), %rsi
LBB0_4:
	movq	_mib@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	-48(%rbp), %rcx
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_sysctl
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	movq	_pathctl@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_6:
	movq	-48(%rbp), %rbx
	incq	%rbx
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%rbx, %rdx
	callq	_err
LBB0_8:
	movl	(%r13), %edi
	movq	(%r12), %rsi
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_sysctl
	cmpl	$-1, %eax
	jne	LBB0_10
## %bb.9:
	movq	_pathctl@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_10:
	movq	%r14, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_modpath,8,3                    ## @modpath
	.comm	_miblen,8,3                     ## @miblen
	.comm	_mib,4,2                        ## @mib
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getting path: sysctl(%s) - size only"

	.comm	_pathctl,8,3                    ## @pathctl
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"allocating %lu bytes for the path"

L_.str.2:                               ## @.str.2
	.asciz	"getting path: sysctl(%s)"

	.no_dead_strip	_getpath
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getpath
_getpath:                               ; @getpath
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x21, _modpath@GOTPAGE
Lloh1:
	ldr	x21, [x21, _modpath@GOTPAGEOFF]
	ldr	x0, [x21]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
	str	xzr, [x21]
LBB0_2:
Lloh2:
	adrp	x22, _miblen@GOTPAGE
Lloh3:
	ldr	x22, [x22, _miblen@GOTPAGEOFF]
	ldr	x1, [x22]
	cbnz	x1, LBB0_4
; %bb.3:
	bl	_getmib
	ldr	x1, [x22]
LBB0_4:
Lloh4:
	adrp	x23, _mib@GOTPAGE
Lloh5:
	ldr	x23, [x23, _mib@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x3, sp, #8
	mov	x2, #0
	mov	x4, #0
	mov	w5, #0
	bl	_sysctl
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _pathctl@GOTPAGE
Lloh7:
	ldr	x8, [x8, _pathctl@GOTPAGEOFF]
Lloh8:
	ldr	x2, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
	ldr	x8, [sp, #8]
	add	x20, x8, #1
	mov	x0, x20
	bl	_malloc
	mov	x19, x0
	cbnz	x0, LBB0_8
; %bb.7:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _errno@GOTPAGE
Lloh15:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh16:
	str	w8, [x9]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_err
LBB0_8:
	ldr	w0, [x23]
	ldr	x1, [x22]
	add	x3, sp, #8
	mov	x2, x19
	mov	x4, #0
	mov	w5, #0
	bl	_sysctl
	cmn	w0, #1
	b.ne	LBB0_10
; %bb.9:
Lloh19:
	adrp	x8, _pathctl@GOTPAGE
Lloh20:
	ldr	x8, [x8, _pathctl@GOTPAGEOFF]
Lloh21:
	ldr	x2, [x8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_10:
	str	x19, [x21]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_modpath,8,3                    ; @modpath
	.comm	_miblen,8,3                     ; @miblen
	.comm	_mib,4,2                        ; @mib
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getting path: sysctl(%s) - size only"

	.comm	_pathctl,8,3                    ; @pathctl
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"allocating %lu bytes for the path"

l_.str.2:                               ; @.str.2
	.asciz	"getting path: sysctl(%s)"

	.no_dead_strip	_getpath
.subsections_via_symbols
