	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pl111_clk_div_choose_div
_pl111_clk_div_choose_div:              ## @pl111_clk_div_choose_div
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	callq	_clk_hw_get_parent
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_TIM2_PCD_LO_BITS@GOTPCREL(%rip), %rax
	movq	_TIM2_PCD_HI_BITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	(%rax), %ecx
	movl	$-1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	cmpl	$-3, %eax
	jg	LBB0_1
## %bb.2:
	notl	%eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	$-1, %r15
	movl	$1, %ecx
	movl	$1, %r14d
	xorl	%r12d, %r12d
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rbx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_DIV_ROUND_UP_ULL
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, %rcx
	subq	%rax, %rcx
	movq	%rcx, %rax
	negq	%rax
	cmovsq	%rcx, %rax
	cmpq	%r15, %rax
	cmovbq	%rax, %r15
	cmovbq	%rbx, %r12
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmovbl	%r14d, %ecx
	incq	%r14
	addq	%rdx, %r13
	cmpq	%r14, -72(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_clk_hw_round_rate
	movq	%rax, %rbx
	jmp	LBB0_6
LBB0_1:
	movl	$1, %ecx
	xorl	%r12d, %r12d
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax)
	movl	%ecx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TIM2_PCD_LO_BITS,4,2           ## @TIM2_PCD_LO_BITS
	.comm	_TIM2_PCD_HI_BITS,4,2           ## @TIM2_PCD_HI_BITS
	.no_dead_strip	_pl111_clk_div_choose_div
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pl111_clk_div_choose_div
_pl111_clk_div_choose_div:              ; @pl111_clk_div_choose_div
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	mov	x21, x1
	bl	_clk_hw_get_parent
Lloh0:
	adrp	x8, _TIM2_PCD_LO_BITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TIM2_PCD_LO_BITS@GOTPAGEOFF]
Lloh2:
	adrp	x9, _TIM2_PCD_HI_BITS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TIM2_PCD_HI_BITS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	add	w8, w9, w8
	mov	w9, #-1
	lsl	w8, w9, w8
	cmn	w8, #3
	b.gt	LBB0_6
; %bb.1:
	mov	x22, x0
	mov	x27, #0
	mvn	w28, w8
	mov	x19, #-1
	mov	w24, #1
	mov	x25, x21
	mov	w23, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x26, [x8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x26
	mov	x1, x24
	bl	_DIV_ROUND_UP_ULL
	subs	x8, x21, x0
	cneg	x8, x8, mi
	cmp	x8, x19
	csel	x19, x8, x19, lo
	csel	x27, x26, x27, lo
	csel	w23, w24, w23, lo
	add	x24, x24, #1
	add	x25, x25, x21
	cmp	x28, x24
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w20, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x25
	bl	_clk_hw_round_rate
	mov	x26, x0
	b	LBB0_3
LBB0_6:
	mov	x27, #0
	mov	w23, #1
LBB0_7:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x27, [x8]
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_TIM2_PCD_LO_BITS,4,2           ; @TIM2_PCD_LO_BITS
	.comm	_TIM2_PCD_HI_BITS,4,2           ; @TIM2_PCD_HI_BITS
	.no_dead_strip	_pl111_clk_div_choose_div
.subsections_via_symbols
