	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fetch_swrun_entry
_fetch_swrun_entry:                     ## @fetch_swrun_entry
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_assert
	movq	(%rbx), %rdi
	movq	_NO_PID@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	cmpq	%rax, %rdi
	jle	LBB0_4
## %bb.1:
	movl	$4, -24(%rbp)
	notq	%rax
	addq	%rax, %rdi
	leaq	-24(%rbp), %rsi
	callq	_kldstat
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.3:
	leaq	-24(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_kld_file_stat_to_swrun
	jmp	LBB0_9
LBB0_4:
	movq	_hr_kd@GOTPCREL(%rip), %r14
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	setne	%dil
	callq	_assert
	movq	(%r14), %rdi
	movq	_KERN_PROC_PID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	decq	%rdx
	leaq	-28(%rbp), %rcx
	callq	_kvm_getprocs
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	cmpl	$1, -28(%rbp)
	jne	LBB0_6
## %bb.8:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_kinfo_proc_to_swrun_entry
	jmp	LBB0_9
LBB0_6:
	movq	(%rbx), %rsi
	decq	%rsi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_7
LBB0_2:
	movq	(%r14), %rsi
	notq	%rsi
	addq	(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
LBB0_7:
	callq	_HRDBG
	movq	_SRS_INVALID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NO_PID,8,3                     ## @NO_PID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing item with kid=%d"

	.comm	_SRS_INVALID,8,3                ## @SRS_INVALID
	.comm	_hr_kd,8,3                      ## @hr_kd
	.comm	_KERN_PROC_PID,4,2              ## @KERN_PROC_PID
L_.str.1:                               ## @.str.1
	.asciz	"missing item with PID=%d"

	.no_dead_strip	_fetch_swrun_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fetch_swrun_entry
_fetch_swrun_entry:                     ; @fetch_swrun_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19]
Lloh0:
	adrp	x20, _NO_PID@GOTPAGE
Lloh1:
	ldr	x20, [x20, _NO_PID@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	b.le	LBB0_3
; %bb.1:
	mov	w10, #4
	str	w10, [sp, #8]
	mvn	x9, x9
	add	x0, x8, x9
	add	x1, sp, #8
	bl	_kldstat
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.2:
	add	x0, sp, #8
	mov	x1, x19
	bl	_kld_file_stat_to_swrun
	b	LBB0_8
LBB0_3:
Lloh2:
	adrp	x20, _hr_kd@GOTPAGE
Lloh3:
	ldr	x20, [x20, _hr_kd@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x0, [x20]
Lloh4:
	adrp	x8, _KERN_PROC_PID@GOTPAGE
Lloh5:
	ldr	x8, [x8, _KERN_PROC_PID@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	x8, [x19]
	sub	x2, x8, #1
	add	x3, sp, #12
	bl	_kvm_getprocs
	ldr	w8, [sp, #12]
	cmp	x0, #0
	ccmp	w8, #1, #0, ne
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x19]
	sub	x1, x8, #1
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
	mov	x1, x19
	bl	_kinfo_proc_to_swrun_entry
	b	LBB0_8
LBB0_6:
	ldr	x8, [x19]
	ldr	x9, [x20]
	mvn	x9, x9
	add	x1, x8, x9
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	bl	_HRDBG
Lloh11:
	adrp	x8, _SRS_INVALID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SRS_INVALID@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_NO_PID,8,3                     ; @NO_PID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing item with kid=%d"

	.comm	_SRS_INVALID,8,3                ; @SRS_INVALID
	.comm	_hr_kd,8,3                      ; @hr_kd
	.comm	_KERN_PROC_PID,4,2              ; @KERN_PROC_PID
l_.str.1:                               ; @.str.1
	.asciz	"missing item with PID=%d"

	.no_dead_strip	_fetch_swrun_entry
.subsections_via_symbols
