	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kld_file_stat_to_swrun
_kld_file_stat_to_swrun:                ## @kld_file_stat_to_swrun
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	movl	4(%r14), %edi
	callq	_strlen
	incl	%eax
	movslq	%eax, %rbx
	movq	_SWR_NAME_MLEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rbx, %rax
	cmovbq	%rax, %rbx
	movq	64(%r15), %rdi
	movq	%rbx, %rsi
	callq	_reallocf
	movq	%rax, 64(%r15)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	4(%r14), %esi
	movq	%rax, %rdi
	movq	%rbx, %rdx
	callq	_strlcpy
LBB0_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%r15)
	movq	_oid_zeroDotZero@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r15)
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_SRT_DEVICE_DRIVER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_SRT_OPERATING_SYSTEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	32(%r15), %ecx
	movq	_SWOSIndex@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
LBB0_5:
	movq	%rax, 24(%r15)
	movq	_SRS_RUNNING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r15)
	movq	$0, 8(%r15)
	movl	(%r14), %eax
	leal	1023(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$10, %ecx
	movl	%ecx, (%r15)
	xorl	%eax, %eax
	callq	_get_ticks
	movl	%eax, 4(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SWR_NAME_MLEN,8,3              ## @SWR_NAME_MLEN
	.comm	_oid_zeroDotZero,4,2            ## @oid_zeroDotZero
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kernel"

	.comm	_SRT_OPERATING_SYSTEM,8,3       ## @SRT_OPERATING_SYSTEM
	.comm	_SWOSIndex,4,2                  ## @SWOSIndex
	.comm	_SRT_DEVICE_DRIVER,8,3          ## @SRT_DEVICE_DRIVER
	.comm	_SRS_RUNNING,8,3                ## @SRS_RUNNING
	.no_dead_strip	_kld_file_stat_to_swrun
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kld_file_stat_to_swrun
_kld_file_stat_to_swrun:                ; @kld_file_stat_to_swrun
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	x19, #0
	cset	w0, ne
	bl	_assert
	ldr	w0, [x20, #4]
	bl	_strlen
	add	w8, w0, #1
	sxtw	x8, w8
Lloh0:
	adrp	x9, _SWR_NAME_MLEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SWR_NAME_MLEN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x9, x8
	csel	x21, x9, x8, lo
	ldr	x0, [x19, #64]
	mov	x1, x21
	bl	_reallocf
	str	x0, [x19, #64]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x20, #4]
	mov	x2, x21
	bl	_strlcpy
LBB0_2:
	str	xzr, [x19, #56]
Lloh3:
	adrp	x8, _oid_zeroDotZero@GOTPAGE
Lloh4:
	ldr	x8, [x8, _oid_zeroDotZero@GOTPAGEOFF]
	stp	x8, xzr, [x19, #40]
	ldr	w0, [x20, #4]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.3:
Lloh7:
	adrp	x8, _SRT_DEVICE_DRIVER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SRT_DEVICE_DRIVER@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _SRT_OPERATING_SYSTEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SRT_OPERATING_SYSTEM@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	w9, [x19, #32]
Lloh13:
	adrp	x10, _SWOSIndex@GOTPAGE
Lloh14:
	ldr	x10, [x10, _SWOSIndex@GOTPAGEOFF]
Lloh15:
	str	w9, [x10]
LBB0_5:
	str	x8, [x19, #24]
Lloh16:
	adrp	x8, _SRS_RUNNING@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SRS_RUNNING@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	stp	xzr, x8, [x19, #8]
	ldr	w8, [x20]
	add	w9, w8, #1023
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #10
	str	w8, [x19]
	bl	_get_ticks
	str	w0, [x19, #4]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SWR_NAME_MLEN,8,3              ; @SWR_NAME_MLEN
	.comm	_oid_zeroDotZero,4,2            ; @oid_zeroDotZero
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kernel"

	.comm	_SRT_OPERATING_SYSTEM,8,3       ; @SRT_OPERATING_SYSTEM
	.comm	_SWOSIndex,4,2                  ; @SWOSIndex
	.comm	_SRT_DEVICE_DRIVER,8,3          ; @SRT_DEVICE_DRIVER
	.comm	_SRS_RUNNING,8,3                ; @SRS_RUNNING
	.no_dead_strip	_kld_file_stat_to_swrun
.subsections_via_symbols
