	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m88rs2000_set_carrieroffset
_m88rs2000_set_carrieroffset:           ## @m88rs2000_set_carrieroffset
	.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
	movl	%esi, %ebx
	movq	(%rdi), %r14
	callq	_m88rs2000_get_mclk
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rcx
	shll	$12, %ebx
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	addl	%ebx, %eax
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	leal	4096(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	movl	%ebx, %edx
	sarl	$4, %edx
	movq	%r14, %rdi
	movl	$156, %esi
	callq	_m88rs2000_writereg
	movl	%eax, %r15d
	movq	%r14, %rdi
	movl	$157, %esi
	callq	_m88rs2000_readreg
	andl	$15, %eax
	shll	$4, %ebx
	movzbl	%bl, %edx
	orl	%eax, %edx
	movq	%r14, %rdi
	movl	$157, %esi
	callq	_m88rs2000_writereg
	orl	%r15d, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_m88rs2000_set_carrieroffset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m88rs2000_set_carrieroffset
_m88rs2000_set_carrieroffset:           ; @m88rs2000_set_carrieroffset
	.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	x20, x1
	ldr	x19, [x0]
	bl	_m88rs2000_get_mclk
	cbz	x0, LBB0_2
; %bb.1:
	cmp	w0, #0
	cinc	w8, w0, lt
	asr	w8, w8, #1
	add	w8, w8, w20, lsl #12
	sdiv	w8, w8, w0
	add	w9, w8, #1, lsl #12             ; =4096
	cmp	w8, #0
	csel	w21, w9, w8, lt
	asr	w2, w21, #4
	mov	x0, x19
	mov	w1, #156
	bl	_m88rs2000_writereg
	mov	x20, x0
	mov	x0, x19
	mov	w1, #157
	bl	_m88rs2000_readreg
	and	w2, w0, #0xf
	bfi	w2, w21, #4, #4
	mov	x0, x19
	mov	w1, #157
	bl	_m88rs2000_writereg
	orr	w0, w0, w20
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_m88rs2000_set_carrieroffset
.subsections_via_symbols
