	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_rate
_set_rate:                              ## @set_rate
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_6
## %bb.1:
	movl	$14745600, %eax                 ## imm = 0xE10000
	xorl	%edx, %edx
	idivl	%esi
	testl	%eax, %eax
	movl	$1, %ebx
	cmovnel	%eax, %ebx
	leal	-3(%rbx), %eax
	cmpl	$-2, %eax
	setb	%cl
	sarl	%cl, %ebx
	cmpl	$257, %ebx                      ## imm = 0x101
	jl	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	shrl	%ebx
	leal	1(%rcx), %r12d
	cmpl	$514, %eax                      ## imm = 0x202
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$9, %cl
	movl	%r12d, %ecx
	jb	LBB0_3
	jmp	LBB0_5
LBB0_6:
	movq	_TXS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_write_reg
	movq	_RXS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_write_reg
	movq	_TMC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	jmp	LBB0_7
LBB0_2:
	movl	%ecx, %r12d
LBB0_5:
	movq	_TXS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_read_reg
	andb	$-16, %al
	orb	%r12b, %al
	movzbl	%al, %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_write_reg
	movq	_RXS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_read_reg
	andb	$-16, %al
	orb	%r12b, %al
	movzbl	%al, %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_write_reg
	movq	_TMC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	movq	%r14, %rdi
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_write_reg                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TXS,4,2                        ## @TXS
	.comm	_RXS,4,2                        ## @RXS
	.comm	_TMC,4,2                        ## @TMC
	.no_dead_strip	_set_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_rate
_set_rate:                              ; @set_rate
	.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, x0
	cbz	w1, LBB0_4
; %bb.1:
	mov	w8, #14745600
	sdiv	w8, w8, w1
	cmp	w8, #0
	csinc	w9, w8, wzr, ne
	sub	w8, w9, #3
	cmn	w8, #2
	cset	w8, lo
	asr	w21, w9, w8
	cmp	w21, #257
	b.lt	LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x21
	lsr	w21, w21, #1
	add	w22, w8, #1
	cmp	w9, #514
	b.lo	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	and	w9, w8, #0xff
	mov	x8, x22
	cmp	w9, #9
	b.lo	LBB0_2
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _TXS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TXS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_write_reg
Lloh3:
	adrp	x8, _RXS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RXS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_write_reg
Lloh6:
	adrp	x8, _TMC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TMC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	b	LBB0_7
LBB0_5:
	mov	x22, x8
LBB0_6:
Lloh9:
	adrp	x8, _TXS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TXS@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_read_reg
	and	w8, w0, #0xf0
	orr	w8, w8, w22
	and	w2, w8, #0xff
	mov	x0, x19
	mov	x1, x20
	bl	_write_reg
Lloh12:
	adrp	x8, _RXS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RXS@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_read_reg
	and	w8, w0, #0xf0
	orr	w8, w8, w22
	and	w2, w8, #0xff
	mov	x0, x19
	mov	x1, x20
	bl	_write_reg
Lloh15:
	adrp	x8, _TMC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TMC@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	and	w2, w21, #0xff
	mov	x0, x19
LBB0_7:
	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
	b	_write_reg
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TXS,4,2                        ; @TXS
	.comm	_RXS,4,2                        ; @RXS
	.comm	_TMC,4,2                        ; @TMC
	.no_dead_strip	_set_rate
.subsections_via_symbols
