	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t1_sched_update_parms          ## -- Begin function t1_sched_update_parms
	.p2align	4, 0x90
_t1_sched_update_parms:                 ## @t1_sched_update_parms
	.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
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r12
	movl	%esi, %eax
	leaq	(%rax,%rax,2), %r13
	leaq	(%r12,%r13,4), %r14
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	movl	%ecx, %edx
	xorl	%eax, %eax
	callq	_pr_debug
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movl	%ebx, (%r14)
LBB0_2:
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:
	movl	%r15d, 4(%r12,%r13,4)
LBB0_4:
	orl	%r15d, %ebx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_7
## %bb.5:
	movl	(%r14), %eax
	movl	4(%r12,%r13,4), %ecx
	leal	-40(%rcx), %ebx
	imulq	%rax, %rbx
	shlq	$10, %rbx
	imull	$1000, %ecx, %esi               ## imm = 0x3E8
	addl	$50000, %esi                    ## imm = 0xC350
	movq	%rbx, %rdi
	callq	_do_div
	movl	%ebx, 8(%r12,%r13,4)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$999, (%rax)                    ## imm = 0x3E7
	ja	LBB0_7
## %bb.6:
	leaq	(%r12,%r13,4), %rax
	addq	$8, %rax
	imull	$90, %ebx, %ecx
	imulq	$1374389535, %rcx, %rcx         ## imm = 0x51EB851F
	shrq	$37, %rcx
	movl	%ecx, (%rax)
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_board_info
	movq	(%rax), %rax
	movq	_CHBT_BOARD_CHT204@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_9
## %bb.8:
	addl	$-16, 8(%r12,%r13,4)
	leaq	(%r12,%r13,4), %r14
	addq	$4, %r14
	movl	4(%r12,%r13,4), %esi
	addl	$34, %esi
	movl	$4096, %ebx                     ## imm = 0x1000
	movl	$4096, %edi                     ## imm = 0x1000
	callq	_max
	movl	%eax, (%r15)
	jmp	LBB0_10
LBB0_9:
	movl	$16384, (%r15)                  ## imm = 0x4000
	leaq	(%r12,%r13,4), %r14
	addq	$4, %r14
	movl	$9000, %ebx                     ## imm = 0x2328
LBB0_10:
	movl	(%r14), %ecx
	addl	$-40, %ecx
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	$1, %edi
	movl	%eax, %esi
	callq	_max
	movq	%rax, %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movl	(%r15), %ecx
	movl	4(%r12,%r13,4), %esi
	movl	8(%r12,%r13,4), %r9d
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_pr_debug
	movl	4(%r12,%r13,4), %eax
	addl	$-40, %eax
	imull	%ebx, %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	"t1_sched_update_params mtu=%d speed=%d\n"

	.comm	_CHBT_BOARD_CHT204,8,3          ## @CHBT_BOARD_CHT204
L_.str.1:                               ## @.str.1
	.asciz	"t1_sched_update_parms: mtu %u speed %u max_avail %u max_avail_segs %u drain_bits_per_1024ns %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t1_sched_update_parms          ; -- Begin function t1_sched_update_parms
	.p2align	2
_t1_sched_update_parms:                 ; @t1_sched_update_parms
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldr	x23, [x22, #8]
	mov	w24, w1
	mov	w8, #12
	umaddl	x25, w1, w8, x23
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	mov	x2, x3
	bl	_pr_debug
	cbz	w20, LBB0_2
; %bb.1:
	str	w20, [x25]
LBB0_2:
	cbz	w21, LBB0_4
; %bb.3:
	mov	w8, #12
	madd	x8, x24, x8, x23
	str	w21, [x8, #4]
LBB0_4:
	orr	w8, w20, w21
	cbz	w8, LBB0_7
; %bb.5:
	ldr	w8, [x25]
	mov	w9, #12
	madd	x21, x24, x9, x23
	ldr	w9, [x21, #4]
	sub	w10, w9, #40
	mul	x8, x8, x10
	lsl	x20, x8, #10
	mov	w8, #1000
	mov	w10, #50000
	madd	w1, w9, w8, w10
	mov	x0, x20
	bl	_do_div
	str	w20, [x21, #8]!
	ldr	w8, [x25]
	cmp	w8, #999
	b.hi	LBB0_7
; %bb.6:
	mov	w8, #90
	mul	w8, w20, w8
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #37
	str	w8, [x21]
LBB0_7:
	ldr	w0, [x19]
	bl	_board_info
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _CHBT_BOARD_CHT204@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CHBT_BOARD_CHT204@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	mov	w8, #12
	madd	x19, x24, x8, x23
	ldp	w8, w9, [x19, #4]!
	sub	w9, w9, #16
	str	w9, [x19, #4]
	add	w1, w8, #34
	mov	w20, #4096
	mov	w0, #4096
	bl	_max
	str	w0, [x22]
	b	LBB0_10
LBB0_9:
	mov	w8, #16384
	str	w8, [x22]
	mov	w8, #12
	madd	x8, x24, x8, x23
	add	x19, x8, #4
	mov	w20, #9000
LBB0_10:
	ldr	w8, [x19]
	sub	w8, w8, #40
	udiv	w1, w20, w8
	mov	w0, #1
	bl	_max
	mov	x19, x0
	mov	w8, #12
	madd	x20, x24, x8, x23
	ldr	w2, [x25]
	ldp	w1, w8, [x20, #4]
	ldr	w9, [x22]
	stp	x0, x8, [sp, #8]
	str	x9, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	ldr	w8, [x20, #4]
	sub	w8, w8, #40
	mul	w0, w8, w19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"t1_sched_update_params mtu=%d speed=%d\n"

	.comm	_CHBT_BOARD_CHT204,8,3          ; @CHBT_BOARD_CHT204
l_.str.1:                               ; @.str.1
	.asciz	"t1_sched_update_parms: mtu %u speed %u max_avail %u max_avail_segs %u drain_bits_per_1024ns %u\n"

.subsections_via_symbols
