	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function procstat_getrlimit_kvm
_procstat_getrlimit_kvm:                ## @procstat_getrlimit_kvm
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	testl	%ebx, %ebx
	setns	%al
	movq	_RLIM_NLIMITS@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	setg	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	(%r15), %rsi
	leaq	-40(%rbp), %rdx
	movq	%r12, %rdi
	movl	$8, %ecx
	callq	_kvm_read_all
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	-40(%rbp), %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.3:
	movslq	%ebx, %rax
	leaq	(%rcx,%rax,8), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movl	$8, %ecx
	callq	_kvm_read_all
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_6
## %bb.4:
	movl	8(%r15), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	jmp	LBB0_5
LBB0_1:
	movq	(%r15), %rsi
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rdi
LBB0_5:
	callq	_warnx
	movl	$-1, %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RLIM_NLIMITS,4,2               ## @RLIM_NLIMITS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't read proc struct at %p for pid %d"

L_.str.1:                               ## @.str.1
	.asciz	"can't read rlimit struct at %p for pid %d"

	.no_dead_strip	_procstat_getrlimit_kvm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function procstat_getrlimit_kvm
_procstat_getrlimit_kvm:                ; @procstat_getrlimit_kvm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x3
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	x19, #0
	cset	w0, ne
	bl	_assert
	cmp	w22, #0
Lloh0:
	adrp	x8, _RLIM_NLIMITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RLIM_NLIMITS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w22, #4, ge
	cset	w0, gt
	bl	_assert
	ldr	x1, [x19]
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #8
	bl	_kvm_read_all
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_7
; %bb.2:
	add	x22, x8, w22, sxtw #3
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	w3, #8
	bl	_kvm_read_all
	cbz	w0, LBB0_5
; %bb.3:
	mov	w0, #0
	b	LBB0_8
LBB0_4:
	ldr	x1, [x19]
	ldr	w2, [x19, #8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
	ldr	w2, [x19, #8]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
LBB0_6:
	bl	_warnx
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_RLIM_NLIMITS,4,2               ; @RLIM_NLIMITS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't read proc struct at %p for pid %d"

l_.str.1:                               ; @.str.1
	.asciz	"can't read rlimit struct at %p for pid %d"

	.no_dead_strip	_procstat_getrlimit_kvm
.subsections_via_symbols
