	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwm_freq_from_reg
_pwm_freq_from_reg:                     ## @pwm_freq_from_reg
	.cfi_startproc
## %bb.0:
                                        ## kill: def $edi killed $edi def $rdi
	testb	$-128, %dil
	jne	LBB0_1
## %bb.4:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_pwm_freq_cksel0@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andl	$15, %edi
	movl	(%rax,%rdi,4), %eax
	popq	%rbp
                                        ## kill: def $eax killed $eax killed $rax
	retq
LBB0_1:
	imull	$1000, %esi, %eax               ## imm = 0x3E8
	xorl	%ecx, %ecx
	cmpl	$48000, %esi                    ## imm = 0xBB80
	sete	%cl
	orl	$2, %ecx
	shll	$7, %ecx
	cltd
	idivl	%ecx
	movslq	%eax, %rcx
	andl	$127, %edi
	incl	%edi
	movq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_2
## %bb.3:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rdi
                                        ## kill: def $eax killed $eax killed $rax
	retq
LBB0_2:
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
                                        ## kill: def $eax killed $eax killed $rax
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pwm_freq_cksel0,8,3            ## @pwm_freq_cksel0
	.no_dead_strip	_pwm_freq_from_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwm_freq_from_reg
_pwm_freq_from_reg:                     ; @pwm_freq_from_reg
	.cfi_startproc
; %bb.0:
	tbnz	w0, #7, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _pwm_freq_cksel0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pwm_freq_cksel0@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	and	w9, w0, #0xf
	ldr	w0, [x8, w9, uxtw #2]
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
LBB0_2:
	mov	w8, #1000
	mul	w8, w1, w8
	mov	w9, #48000
	mov	w10, #256
	mov	w11, #384
	cmp	w1, w9
	csel	w9, w11, w10, eq
	sdiv	w8, w8, w9
	sxtw	x8, w8
	and	w9, w0, #0x7f
	add	w9, w9, #1
	udiv	x0, x8, x9
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_pwm_freq_cksel0,8,3            ; @pwm_freq_cksel0
	.no_dead_strip	_pwm_freq_from_reg
.subsections_via_symbols
