	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getfiles
_getfiles:                              ## @getfiles
	.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	$4, -48(%rbp)
	movl	$4, %edi
	callq	_malloc
	movq	_xfiles@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
	movq	(%r14), %rax
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	leaq	-48(%rbp), %rdx
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sysctlbyname
	cmpl	$-1, %eax
	je	LBB0_3
LBB0_10:
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	(%r14), %rcx
	cmpl	$4, (%rcx)
	je	LBB0_14
## %bb.13:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_errx
	movq	-48(%rbp), %rax
	jmp	LBB0_14
LBB0_3:
	movl	$4, %ebx
	movq	_ENOMEM@GOTPCREL(%rip), %r13
	leaq	L_.str.1(%rip), %r15
	leaq	-48(%rbp), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	%rax, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sysctlbyname
	cmpl	$-1, %eax
	jne	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r13), %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rbx, -48(%rbp)
	je	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_err
	movq	-48(%rbp), %rbx
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	%rbx, %rbx
	movq	%rbx, -48(%rbp)
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	callq	_realloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_err
	movq	(%r14), %rax
	jmp	LBB0_9
LBB0_11:
	xorl	%eax, %eax
LBB0_14:
	shrq	$2, %rax
	movq	_nxfiles@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_xfiles,8,3                     ## @xfiles
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc()"

L_.str.1:                               ## @.str.1
	.asciz	"kern.file"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOMEM,8,3                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"sysctlbyname()"

L_.str.3:                               ## @.str.3
	.asciz	"realloc()"

L_.str.4:                               ## @.str.4
	.asciz	"struct xfile size mismatch"

	.comm	_nxfiles,8,3                    ## @nxfiles
	.no_dead_strip	_getfiles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getfiles
_getfiles:                              ; @getfiles
	.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	w8, #4
	str	x8, [sp, #8]
	mov	w0, #4
	bl	_malloc
	mov	x1, x0
Lloh0:
	adrp	x23, _xfiles@GOTPAGE
Lloh1:
	ldr	x23, [x23, _xfiles@GOTPAGEOFF]
	str	x0, [x23]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
	ldr	x1, [x23]
LBB0_2:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	w3, #0
	mov	w4, #0
	bl	_sysctlbyname
	cmn	w0, #1
	b.eq	LBB0_7
LBB0_3:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x9, [x23]
	ldr	w9, [x9]
	cmp	w9, #4
	b.eq	LBB0_6
; %bb.5:
Lloh6:
	adrp	x1, l_.str.4@PAGE
Lloh7:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_errx
	ldr	x8, [sp, #8]
LBB0_6:
	lsr	x8, x8, #2
Lloh8:
	adrp	x9, _nxfiles@GOTPAGE
Lloh9:
	ldr	x9, [x9, _nxfiles@GOTPAGEOFF]
Lloh10:
	str	x8, [x9]
	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
LBB0_7:
	mov	w21, #4
Lloh11:
	adrp	x24, _errno@GOTPAGE
Lloh12:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
Lloh13:
	adrp	x25, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x25, [x25, _ENOMEM@GOTPAGEOFF]
Lloh15:
	adrp	x19, l_.str.2@PAGE
Lloh16:
	add	x19, x19, l_.str.2@PAGEOFF
Lloh17:
	adrp	x20, l_.str.3@PAGE
Lloh18:
	add	x20, x20, l_.str.3@PAGEOFF
Lloh19:
	adrp	x22, l_.str.1@PAGE
Lloh20:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x2, sp, #8
	mov	x0, x22
	mov	w3, #0
	mov	w4, #0
	bl	_sysctlbyname
	cmn	w0, #1
	b.ne	LBB0_3
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x9, [x25]
	ldr	x10, [sp, #8]
	cmp	x8, x9
	ccmp	x10, x21, #0, eq
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w0, #1
	mov	x1, x19
	bl	_err
	ldr	x21, [sp, #8]
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	lsl	x21, x21, #1
	str	x21, [sp, #8]
	ldr	x0, [x23]
	mov	x1, x21
	bl	_realloc
	mov	x1, x0
	str	x0, [x23]
	cbnz	x0, LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w0, #1
	mov	x1, x20
	bl	_err
	ldr	x1, [x23]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_xfiles,8,3                     ; @xfiles
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc()"

l_.str.1:                               ; @.str.1
	.asciz	"kern.file"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOMEM,8,3                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"sysctlbyname()"

l_.str.3:                               ; @.str.3
	.asciz	"realloc()"

l_.str.4:                               ; @.str.4
	.asciz	"struct xfile size mismatch"

	.comm	_nxfiles,8,3                    ; @nxfiles
	.no_dead_strip	_getfiles
.subsections_via_symbols
