	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyy_baud_calc
_cyy_baud_calc:                         ## @cyy_baud_calc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	_CD1400_REV_J@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$25000000, %eax                 ## imm = 0x17D7840
	movl	$60000000, %ecx                 ## imm = 0x3938700
	cmovll	%eax, %ecx
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	movl	%ecx, %eax
	shrl	$11, %eax
	xorl	%edx, %edx
	idivl	%esi
	cmpl	$63, %eax
	jle	LBB0_4
## %bb.2:
	movl	$4, %r8d
	movl	$2048, %r9d                     ## imm = 0x800
	jmp	LBB0_9
LBB0_3:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rdi)
	popq	%rbp
	retq
LBB0_4:
	movl	%ecx, %eax
	shrl	$9, %eax
	xorl	%edx, %edx
	idivl	%esi
	cmpl	$63, %eax
	jle	LBB0_6
## %bb.5:
	movl	$3, %r8d
	movl	$512, %r9d                      ## imm = 0x200
	jmp	LBB0_9
LBB0_6:
	movl	%ecx, %eax
	shrl	$7, %eax
	xorl	%edx, %edx
	idivl	%esi
	cmpl	$63, %eax
	jle	LBB0_8
## %bb.7:
	movl	$2, %r8d
	movl	$128, %r9d
	jmp	LBB0_9
LBB0_8:
	movl	%ecx, %eax
	shrl	$5, %eax
	xorl	%edx, %edx
	idivl	%esi
	xorl	%r8d, %r8d
	cmpl	$64, %eax
	setge	%r8b
	movl	$32, %eax
	movl	$8, %r9d
	cmovgel	%eax, %r9d
LBB0_9:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r9d
	addl	%eax, %eax
	cltd
	idivl	%esi
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, %ecx
	incl	%ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	incl	%eax
	sarl	%eax
	cmpl	$255, %eax
	movl	$255, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, 16(%rdi)
	movl	%ecx, 8(%rdi)
	movl	%r8d, 20(%rdi)
	movl	%r8d, 12(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CD1400_REV_J,8,3               ## @CD1400_REV_J
	.no_dead_strip	_cyy_baud_calc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyy_baud_calc
_cyy_baud_calc:                         ; @cyy_baud_calc
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _CD1400_REV_J@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CD1400_REV_J@GOTPAGEOFF]
	ldr	x9, [x0]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	mov	w8, #34560
	movk	w8, #915, lsl #16
	mov	w9, #30784
	movk	w9, #381, lsl #16
	csel	w8, w9, w8, lt
	cbz	w1, LBB0_3
; %bb.1:
	lsr	w9, w8, #11
	sdiv	w9, w9, w1
	cmp	w9, #63
	b.le	LBB0_4
; %bb.2:
	mov	w9, #4
	mov	w10, #2048
	b	LBB0_9
LBB0_3:
	stp	xzr, xzr, [x0, #8]
	ret
LBB0_4:
	lsr	w9, w8, #9
	sdiv	w9, w9, w1
	cmp	w9, #63
	b.le	LBB0_6
; %bb.5:
	mov	w9, #3
	mov	w10, #512
	b	LBB0_9
LBB0_6:
	lsr	w9, w8, #7
	sdiv	w9, w9, w1
	cmp	w9, #63
	b.le	LBB0_8
; %bb.7:
	mov	w9, #2
	mov	w10, #128
	b	LBB0_9
LBB0_8:
	lsr	w9, w8, #5
	sdiv	w9, w9, w1
	mov	w10, #8
	mov	w11, #32
	cmp	w9, #63
	csel	w10, w11, w10, gt
	cset	w9, gt
LBB0_9:
	udiv	w8, w8, w10
	lsl	w8, w8, #1
	sdiv	w8, w8, w1
	add	w10, w8, #1
	add	w11, w8, #2
	cmp	w10, #0
	csinc	w8, w11, w8, lt
	asr	w8, w8, #1
	mov	w10, #255
	cmp	w8, #255
	csel	w8, w8, w10, lt
	stp	w8, w9, [x0, #16]
	stp	w8, w9, [x0, #8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CD1400_REV_J,8,3               ; @CD1400_REV_J
	.no_dead_strip	_cyy_baud_calc
.subsections_via_symbols
