	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cypress_get_mclk_frequency_ratio ## -- Begin function cypress_get_mclk_frequency_ratio
	.p2align	4, 0x90
_cypress_get_mclk_frequency_ratio:      ## @cypress_get_mclk_frequency_ratio
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	movq	(%rdi), %rax
	movq	_CHIP_BARTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_5
## %bb.1:
	xorl	%eax, %eax
	testl	%edx, %edx
	jne	LBB0_6
## %bb.2:
	cmpl	$40000, %esi                    ## imm = 0x9C40
	jl	LBB0_13
## %bb.3:
	movl	$15, %eax
	cmpl	$115000, %esi                   ## imm = 0x1C138
	ja	LBB0_13
## %bb.4:
	addl	$-40000, %esi                   ## imm = 0xFFFF63C0
	jmp	LBB0_12
LBB0_5:
	xorl	%eax, %eax
	testl	%edx, %edx
	je	LBB0_9
LBB0_6:
	cmpl	$10000, %esi                    ## imm = 0x2710
	jl	LBB0_13
## %bb.7:
	movl	$15, %eax
	cmpl	$47500, %esi                    ## imm = 0xB98C
	ja	LBB0_13
## %bb.8:
	addl	$-10000, %esi                   ## imm = 0xD8F0
	movzwl	%si, %eax
	shrl	$2, %eax
	imull	$6711, %eax, %eax               ## imm = 0x1A37
	shrl	$22, %eax
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_9:
	cmpl	$65000, %esi                    ## imm = 0xFDE8
	jl	LBB0_13
## %bb.10:
	movl	$15, %eax
	cmpl	$135000, %esi                   ## imm = 0x20F58
	ja	LBB0_13
## %bb.11:
	addl	$-60000, %esi                   ## imm = 0xFFFF15A0
LBB0_12:
	movl	$3518437209, %eax               ## imm = 0xD1B71759
	imulq	%rsi, %rax
	shrq	$44, %rax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_BARTS,8,3                 ## @CHIP_BARTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cypress_get_mclk_frequency_ratio ; -- Begin function cypress_get_mclk_frequency_ratio
	.p2align	2
_cypress_get_mclk_frequency_ratio:      ; @cypress_get_mclk_frequency_ratio
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CHIP_BARTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_BARTS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.1:
	cbz	w2, LBB0_7
; %bb.2:
	mov	w8, #10000
	cmp	w1, w8
	b.ge	LBB0_11
; %bb.3:
	mov	w0, #0
	ret
LBB0_4:
	cbz	w2, LBB0_9
; %bb.5:
	mov	w8, #10000
	cmp	w1, w8
	b.ge	LBB0_13
; %bb.6:
	mov	w0, #0
	ret
LBB0_7:
	mov	w8, #40000
	cmp	w1, w8
	b.ge	LBB0_16
; %bb.8:
	mov	w0, #0
	ret
LBB0_9:
	mov	w8, #65000
	cmp	w1, w8
	b.ge	LBB0_17
; %bb.10:
	mov	w0, #0
	ret
LBB0_11:
	mov	w8, #47500
	cmp	w1, w8
	b.ls	LBB0_15
; %bb.12:
	mov	w0, #15
	ret
LBB0_13:
	mov	w8, #47500
	cmp	w1, w8
	b.ls	LBB0_15
; %bb.14:
	mov	w0, #15
	ret
LBB0_15:
	mov	w8, #-10000
	add	w8, w1, w8
	ubfx	w8, w8, #2, #14
	mov	w9, #6711
	mul	w8, w8, w9
	lsr	w0, w8, #22
	ret
LBB0_16:
	mov	w8, #15
	mov	w9, #49464
	movk	w9, #1, lsl #16
	mov	w10, #-40000
	b	LBB0_18
LBB0_17:
	mov	w8, #15
	mov	w9, #3928
	movk	w9, #2, lsl #16
	mov	w10, #-60000
LBB0_18:
	add	w10, w1, w10
	mov	w11, #5977
	movk	w11, #53687, lsl #16
	umull	x10, w10, w11
	lsr	x10, x10, #44
	cmp	w1, w9
	csel	w0, w8, w10, hi
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_BARTS,8,3                 ; @CHIP_BARTS
.subsections_via_symbols
