	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openfiles                      ## -- Begin function openfiles
	.p2align	4, 0x90
_openfiles:                             ## @openfiles
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	%rsp, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	__POSIX2_LINE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_kflag@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.1:
	movq	_Bflag@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_bflag@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	movq	_pflag@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_rflag@GOTPCREL(%rip), %rdx
	orq	(%rdx), %rcx
	movq	_hflag@GOTPCREL(%rip), %rdx
	orq	(%rdx), %rcx
	orq	%rax, %rcx
	je	LBB0_14
## %bb.2:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_3:
	movq	_CTL_KERN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_KERN_PROF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_GPROF_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	$4, -72(%rbp)
	leaq	-60(%rbp), %rdi
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	movl	$3, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_sysctl
	testq	%rax, %rax
	jns	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movl	$20, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_5:
	movq	_Bflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_12
## %bb.6:
	movq	_bflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_12
## %bb.7:
	movq	_hflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_12
## %bb.8:
	movq	_rflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_12
## %bb.9:
	movq	_pflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_25
## %bb.10:
	movl	-64(%rbp), %eax
	movq	_GMON_PROF_HIRES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.11:
	movq	_GMON_PROF_ON@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_25
LBB0_12:
	xorl	%edi, %edi
	callq	_seteuid
	movq	-72(%rbp), %r9
	leaq	-60(%rbp), %rdi
	leaq	-64(%rbp), %r8
	movl	$3, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_sysctl
	testq	%rax, %rax
	js	LBB0_24
## %bb.13:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_14:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %ebx
	movq	%r14, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movq	%r12, %r8
	callq	_kvm_openfiles
	movq	%rax, (%r15)
	testq	%rax, %rax
	jne	LBB0_20
## %bb.16:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_18
## %bb.17:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movq	%r12, %r8
	callq	_kvm_openfiles
	movq	%rax, (%r15)
	testq	%rax, %rax
	jne	LBB0_19
LBB0_18:
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_19:
	movq	_GMON_PROF_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_kern_readonly
	movq	(%r15), %rax
LBB0_20:
	movq	_nl@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	%rax, %rdi
	callq	_kvm_nlist
	testq	%rax, %rax
	jns	LBB0_22
## %bb.21:
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_22:
	movq	(%r15), %rax
	movq	_N_GMONPARAM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, (%rax,%rcx,4)
	jne	LBB0_27
## %bb.23:
	leaq	L_.str(%rip), %rsi
	movl	$20, %edi
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_27
LBB0_24:
	xorl	%eax, %eax
	callq	_getuid
	movl	%eax, %edi
	callq	_seteuid
	movl	-64(%rbp), %edi
	callq	_kern_readonly
LBB0_25:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
LBB0_26:
	movl	(%rax), %ebx
LBB0_27:
	movq	-80(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.28:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	__POSIX2_LINE_MAX,4,2           ## @_POSIX2_LINE_MAX
	.comm	_kflag,4,2                      ## @kflag
	.comm	_CTL_KERN,4,2                   ## @CTL_KERN
	.comm	_KERN_PROF,4,2                  ## @KERN_PROF
	.comm	_GPROF_STATE,4,2                ## @GPROF_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"profiling not defined in kernel"

	.comm	_Bflag,8,3                      ## @Bflag
	.comm	_bflag,8,3                      ## @bflag
	.comm	_hflag,8,3                      ## @hflag
	.comm	_rflag,8,3                      ## @rflag
	.comm	_pflag,8,3                      ## @pflag
	.comm	_GMON_PROF_HIRES,4,2            ## @GMON_PROF_HIRES
	.comm	_GMON_PROF_ON,4,2               ## @GMON_PROF_ON
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.1:                               ## @.str.1
	.asciz	"kvm_openfiles: %s"

	.comm	_nl,8,3                         ## @nl
L_.str.2:                               ## @.str.2
	.asciz	"%s: no namelist"

	.comm	_N_GMONPARAM,8,3                ## @N_GMONPARAM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openfiles                      ; -- Begin function openfiles
	.p2align	2
_openfiles:                             ; @openfiles
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #48
	mov	x21, x2
	mov	x23, x1
	mov	x20, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, __POSIX2_LINE_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, __POSIX2_LINE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh8:
	adrp	x8, _kflag@GOTPAGE
Lloh9:
	ldr	x8, [x8, _kflag@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.1:
Lloh11:
	adrp	x8, _Bflag@GOTPAGE
Lloh12:
	ldr	x8, [x8, _Bflag@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _bflag@GOTPAGE
Lloh15:
	ldr	x9, [x9, _bflag@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
Lloh17:
	adrp	x10, _hflag@GOTPAGE
Lloh18:
	ldr	x10, [x10, _hflag@GOTPAGEOFF]
	orr	x8, x8, x9
Lloh19:
	ldr	x9, [x10]
	orr	x8, x8, x9
Lloh20:
	adrp	x9, _pflag@GOTPAGE
Lloh21:
	ldr	x9, [x9, _pflag@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	orr	x8, x8, x9
Lloh23:
	adrp	x9, _rflag@GOTPAGE
Lloh24:
	ldr	x9, [x9, _rflag@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
Lloh26:
	adrp	x26, _O_RDWR@GOTPAGE
Lloh27:
	ldr	x26, [x26, _O_RDWR@GOTPAGEOFF]
	orr	x8, x8, x9
Lloh28:
	adrp	x25, _O_RDONLY@GOTPAGE
Lloh29:
	ldr	x25, [x25, _O_RDONLY@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x26, x25, ne
	ldr	w19, [x8]
	mov	x0, x20
	mov	x1, x23
	mov	x2, #0
	mov	x3, x19
	mov	x4, x22
	bl	_kvm_openfiles
	str	x0, [x21]
	cbnz	x0, LBB0_6
; %bb.2:
	ldr	w8, [x26]
	cmp	w19, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	w19, [x25]
	mov	x0, x20
	mov	x1, x23
	mov	x2, #0
	mov	x3, x19
	mov	x4, x22
	bl	_kvm_openfiles
	str	x0, [x21]
	cbnz	x0, LBB0_5
LBB0_4:
	str	x22, [sp, #-16]!
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_errx
	add	sp, sp, #16
LBB0_5:
Lloh32:
	adrp	x8, _GMON_PROF_ON@GOTPAGE
Lloh33:
	ldr	x8, [x8, _GMON_PROF_ON@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_kern_readonly
	ldr	x0, [x21]
LBB0_6:
Lloh35:
	adrp	x21, _nl@GOTPAGE
Lloh36:
	ldr	x21, [x21, _nl@GOTPAGEOFF]
	ldr	x1, [x21]
	bl	_kvm_nlist
	tbz	x0, #63, LBB0_8
; %bb.7:
	str	x20, [sp, #-16]!
Lloh37:
	adrp	x1, l_.str.2@PAGE
Lloh38:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	bl	_errx
	add	sp, sp, #16
LBB0_8:
	ldr	x8, [x21]
Lloh39:
	adrp	x9, _N_GMONPARAM@GOTPAGE
Lloh40:
	ldr	x9, [x9, _N_GMONPARAM@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	cbnz	w8, LBB0_24
; %bb.9:
Lloh42:
	adrp	x1, l_.str@PAGE
Lloh43:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #20
	bl	_errx
	b	LBB0_24
LBB0_10:
Lloh44:
	adrp	x8, _CTL_KERN@GOTPAGE
Lloh45:
	ldr	x8, [x8, _CTL_KERN@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
Lloh47:
	adrp	x9, _KERN_PROF@GOTPAGE
Lloh48:
	ldr	x9, [x9, _KERN_PROF@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	stp	w8, w9, [x29, #-84]
Lloh50:
	adrp	x8, _GPROF_STATE@GOTPAGE
Lloh51:
	ldr	x8, [x8, _GPROF_STATE@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
	stur	w8, [x29, #-76]
	mov	w8, #4
	stur	x8, [x29, #-96]
	sub	x0, x29, #84
	sub	x2, x29, #100
	sub	x3, x29, #96
	mov	w1, #3
	mov	x4, #0
	mov	x5, #0
	bl	_sysctl
	tbz	x0, #63, LBB0_12
; %bb.11:
Lloh53:
	adrp	x1, l_.str@PAGE
Lloh54:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #20
	bl	_errx
LBB0_12:
Lloh55:
	adrp	x8, _Bflag@GOTPAGE
Lloh56:
	ldr	x8, [x8, _Bflag@GOTPAGEOFF]
Lloh57:
	ldr	x8, [x8]
	cbnz	x8, LBB0_19
; %bb.13:
Lloh58:
	adrp	x8, _bflag@GOTPAGE
Lloh59:
	ldr	x8, [x8, _bflag@GOTPAGEOFF]
Lloh60:
	ldr	x8, [x8]
	cbnz	x8, LBB0_19
; %bb.14:
Lloh61:
	adrp	x8, _hflag@GOTPAGE
Lloh62:
	ldr	x8, [x8, _hflag@GOTPAGEOFF]
Lloh63:
	ldr	x8, [x8]
	cbnz	x8, LBB0_19
; %bb.15:
Lloh64:
	adrp	x8, _rflag@GOTPAGE
Lloh65:
	ldr	x8, [x8, _rflag@GOTPAGEOFF]
Lloh66:
	ldr	x8, [x8]
	cbnz	x8, LBB0_19
; %bb.16:
Lloh67:
	adrp	x8, _pflag@GOTPAGE
Lloh68:
	ldr	x8, [x8, _pflag@GOTPAGEOFF]
Lloh69:
	ldr	x8, [x8]
	cbz	x8, LBB0_22
; %bb.17:
	ldur	w8, [x29, #-100]
Lloh70:
	adrp	x9, _GMON_PROF_HIRES@GOTPAGE
Lloh71:
	ldr	x9, [x9, _GMON_PROF_HIRES@GOTPAGEOFF]
Lloh72:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_19
; %bb.18:
Lloh73:
	adrp	x9, _GMON_PROF_ON@GOTPAGE
Lloh74:
	ldr	x9, [x9, _GMON_PROF_ON@GOTPAGEOFF]
Lloh75:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_22
LBB0_19:
	mov	w0, #0
	bl	_seteuid
	ldur	x5, [x29, #-96]
	sub	x0, x29, #84
	sub	x4, x29, #100
	mov	w1, #3
	mov	x2, #0
	mov	x3, #0
	bl	_sysctl
	tbnz	x0, #63, LBB0_21
; %bb.20:
Lloh76:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh77:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
	b	LBB0_23
LBB0_21:
	bl	_getuid
	bl	_seteuid
	ldur	w0, [x29, #-100]
	bl	_kern_readonly
LBB0_22:
Lloh78:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh79:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
LBB0_23:
	ldr	w19, [x8]
LBB0_24:
	mov	sp, x24
	ldur	x8, [x29, #-72]
Lloh80:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh81:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh82:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	mov	x0, x19
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh76, Lloh77
	.loh AdrpLdrGot	Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.cfi_endproc
                                        ; -- End function
	.comm	__POSIX2_LINE_MAX,4,2           ; @_POSIX2_LINE_MAX
	.comm	_kflag,4,2                      ; @kflag
	.comm	_CTL_KERN,4,2                   ; @CTL_KERN
	.comm	_KERN_PROF,4,2                  ; @KERN_PROF
	.comm	_GPROF_STATE,4,2                ; @GPROF_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"profiling not defined in kernel"

	.comm	_Bflag,8,3                      ; @Bflag
	.comm	_bflag,8,3                      ; @bflag
	.comm	_hflag,8,3                      ; @hflag
	.comm	_rflag,8,3                      ; @rflag
	.comm	_pflag,8,3                      ; @pflag
	.comm	_GMON_PROF_HIRES,4,2            ; @GMON_PROF_HIRES
	.comm	_GMON_PROF_ON,4,2               ; @GMON_PROF_ON
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.1:                               ; @.str.1
	.asciz	"kvm_openfiles: %s"

	.comm	_nl,8,3                         ; @nl
l_.str.2:                               ; @.str.2
	.asciz	"%s: no namelist"

	.comm	_N_GMONPARAM,8,3                ; @N_GMONPARAM
.subsections_via_symbols
