	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sched_update_avail
_sched_update_avail:                    ## @sched_update_avail
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r13
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %ebx
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_ns
	movq	%rax, %r12
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_pr_debug
	cmpq	$15000, %r12                    ## imm = 0x3A98
	jl	LBB0_5
## %bb.1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_MAX_NPORTS@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_4
## %bb.2:
	movl	$8, %ebx
	xorl	%r14d, %r14d
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %r15
	movq	-8(%r15,%rbx), %rax
	imulq	%r12, %rax
	shrq	$13, %rax
	movl	%eax, %edi
	addq	(%r15,%rbx), %rdi
	movl	4(%r13), %esi
	movq	%r12, %r13
	movq	%rcx, %r12
	callq	_min
	movq	%r12, %rcx
	movq	%r13, %r12
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%rax, (%r15,%rbx)
	incq	%r14
	movl	(%rcx), %eax
	addq	$16, %rbx
	cmpq	%rax, %r14
	jb	LBB0_3
LBB0_4:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
	movl	$1, %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sched_update_avail delta=%lld\n"

	.comm	_MAX_NPORTS,4,2                 ## @MAX_NPORTS
	.no_dead_strip	_sched_update_avail
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sched_update_avail
_sched_update_avail:                    ; @sched_update_avail
	.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
	ldr	x21, [x0]
	bl	_ktime_get
	mov	x19, x0
	ldr	w1, [x21]
	bl	_ktime_sub
	bl	_ktime_to_ns
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
	mov	w8, #15000
	cmp	x20, x8
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
Lloh2:
	adrp	x22, _MAX_NPORTS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MAX_NPORTS@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x23, #0
	mov	x24, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	add	x25, x8, x23
	ldp	x8, x9, [x25]
	mul	x8, x8, x20
	lsr	x8, x8, #13
	add	x0, x9, w8, uxtw
	ldr	w1, [x21, #4]
	bl	_min
	str	x0, [x25, #8]
	add	x24, x24, #1
	ldr	w8, [x22]
	add	x23, x23, #16
	cmp	x24, x8
	b.lo	LBB0_4
LBB0_5:
	str	w19, [x21]
	mov	w0, #1
LBB0_6:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sched_update_avail delta=%lld\n"

	.comm	_MAX_NPORTS,4,2                 ; @MAX_NPORTS
	.no_dead_strip	_sched_update_avail
.subsections_via_symbols
