	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_CCR
_calc_CCR:                              ## @calc_CCR
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_clk_get
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.27:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	(%r15), %r14
	movq	%r15, %rdi
	callq	_clk_put
	movl	$4, %r9d
	movl	$3, %r10d
	xorl	%edi, %edi
	movq	%r12, %rcx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	-1(%r10), %rax
	decq	%r9
	testq	%r10, %r10
	movq	%rax, %r10
	jle	LBB0_23
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	leaq	1(%r10), %rsi
	movq	%r14, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %r13
	cmpq	$19999999, %r13                 ## imm = 0x1312CFF
	ja	LBB0_22
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %r13d
	cmpq	$19999999, %r13                 ## imm = 0x1312CFF
	ja	LBB0_22
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rax
	orq	%r12, %rax
	shrq	$32, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%r12
	movq	%rax, %r8
	jmp	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%r12d
	movl	%eax, %r8d
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movabsq	$34359738348, %rax              ## imm = 0x7FFFFFFEC
	addq	%rax, %r8
	shrq	$3, %r8
	cmpl	$62, %r8d
	jg	LBB0_22
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rax
	orq	%r9, %rax
	shrq	$32, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%r9
	jmp	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%r9d
                                        ## kill: def $eax killed $eax def $rax
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdx
	orq	%r12, %rdx
	shrq	$32, %rdx
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	divq	%r12
	movq	%rax, %rsi
	jmp	LBB0_16
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r12d
	movl	%eax, %esi
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	shlq	$29, %rsi
	movabsq	$-10737418240, %rax             ## imm = 0xFFFFFFFD80000000
	addq	%rax, %rsi
	sarq	$32, %rsi
	movslq	%r8d, %r8
	leal	20(,%rsi,8), %r15d
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	%r15d, %r11
	movq	%r13, %rax
	orq	%r11, %rax
	shrq	$32, %rax
	je	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%r11
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_17 Depth=2
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $eax killed $eax def $rax
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	%r12, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rax
	negq	%rax
	cmovsq	%rdx, %rax
	cmpq	%rcx, %rax
	cmovbq	%rax, %rcx
	movzbl	%r10b, %eax
	movzbl	%dil, %edi
	cmovbl	%eax, %edi
	cmovbl	%esi, %ebx
	cmpq	$61, %rsi
	jg	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=2
	leaq	1(%rsi), %rax
	addl	$8, %r15d
	cmpq	%r8, %rsi
	movq	%rax, %rsi
	jle	LBB0_17
	jmp	LBB0_22
LBB0_23:
	shrq	$2, %r12
	cmpq	%r12, %rcx
	jbe	LBB0_25
## %bb.24:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_26
LBB0_25:
	shll	$2, %ebx
	movsbl	%dil, %eax
	orl	%ebx, %eax
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"peripheral_clk"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_calc_CCR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_CCR
_calc_CCR:                              ; @calc_CCR
	.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
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, #0
	bl	_clk_get
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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	_PTR_ERR
LBB0_2:
	ldr	x21, [x20]
	mov	x0, x20
	bl	_clk_put
	mov	w8, #0
	mov	w9, #0
	mov	w10, #4
	mov	w11, #3
	mov	w12, #11519
	movk	w12, #305, lsl #16
	mov	x13, #34359672832
	movk	x13, #65516
	mov	x14, #-2147483648
	movk	x14, #65533, lsl #32
	mov	x15, x19
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x16, x11, #1
	sub	x10, x10, #1
	cmp	x11, #0
	mov	x11, x16
	b.le	LBB0_9
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	add	x16, x11, #1
	udiv	x16, x21, x16
	cmp	x16, x12
	b.hi	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	udiv	x17, x16, x19
	add	x17, x17, x13
	lsr	x17, x17, #3
	cmp	w17, #62
	b.gt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	udiv	x0, x21, x10
	udiv	x0, x0, x19
	add	x0, x14, x0, lsl #29
	asr	x0, x0, #32
	sxtw	x17, w17
	lsl	w1, w0, #3
	add	w1, w1, #20
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sxtw	x2, w1
	udiv	x2, x16, x2
	subs	x2, x19, x2
	cneg	x2, x2, mi
	cmp	x2, x15
	csel	x15, x2, x15, lo
	csel	w9, w11, w9, lo
	csel	w8, w0, w8, lo
	cmp	x0, #61
	b.gt	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	add	x2, x0, #1
	add	w1, w1, #8
	cmp	x0, x17
	mov	x0, x2
	b.le	LBB0_7
	b	LBB0_3
LBB0_9:
	cmp	x15, x19, lsr #2
	b.ls	LBB0_11
; %bb.10:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	sxtb	w9, w9
	orr	w0, w9, w8, lsl #2
LBB0_12:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"peripheral_clk"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_calc_CCR
.subsections_via_symbols
