	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function periph_set_freq
_periph_set_freq:                       ## @periph_set_freq
	.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	%r8, %r14
	movl	%ecx, %r13d
	movq	%rdx, %r15
	movl	%esi, %r12d
	callq	_clknode_get_softc
	movq	%rax, %rbx
	movq	_DCF_HAVE_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.2:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movb	4(%rbx), %cl
	shll	%cl, %r12d
	movl	(%r15), %esi
	movl	%r12d, %eax
	cltd
	idivl	%esi
	cmpl	$1, %edx
	sbbl	$-1, %eax
	movl	$1, %r14d
	movl	$1, %edx
	shll	%cl, %edx
	decb	%cl
	shll	%cl, %r14d
	cmpl	%edx, %eax
	cmovgel	%eax, %r14d
	movq	_CLK_SET_DRYRUN@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_6
## %bb.3:
	movq	_CLK_SET_ROUND_UP@GOTPCREL(%rip), %rax
	movq	_CLK_SET_ROUND_DOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r13d, %ecx
	jne	LBB0_7
## %bb.4:
	movl	%r12d, %eax
	cltd
	idivl	%r14d
	cmpl	%eax, %esi
	je	LBB0_7
## %bb.5:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_1:
	movl	$0, (%r14)
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, %rdi
	callq	_DEVICE_LOCK
	movl	16(%rbx), %esi
	movl	12(%rbx), %edx
	movb	4(%rbx), %cl
	movl	$-1, %eax
	shll	%cl, %eax
	addl	%r14d, %eax
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_MD4
	movq	%rbx, %rdi
	callq	_DEVICE_UNLOCK
	movl	%r14d, 8(%rbx)
LBB0_7:
	movl	%r12d, %eax
	cltd
	idivl	%r14d
	movl	%eax, (%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DCF_HAVE_DIV,4,2               ## @DCF_HAVE_DIV
	.comm	_CLK_SET_DRYRUN,4,2             ## @CLK_SET_DRYRUN
	.comm	_CLK_SET_ROUND_UP,4,2           ## @CLK_SET_ROUND_UP
	.comm	_CLK_SET_ROUND_DOWN,4,2         ## @CLK_SET_ROUND_DOWN
	.comm	_ERANGE,4,2                     ## @ERANGE
	.no_dead_strip	_periph_set_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function periph_set_freq
_periph_set_freq:                       ; @periph_set_freq
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x4
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	bl	_clknode_get_softc
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _DCF_HAVE_DIV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DCF_HAVE_DIV@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	mov	x21, x0
	ldr	w9, [x0, #4]
	lsl	w10, w23, w9
	ldr	w8, [x20]
	sdiv	w11, w10, w8
	msub	w12, w11, w8, w10
	cmp	w12, #0
	cinc	w11, w11, ne
	mov	w12, #1
	lsl	w13, w12, w9
	sub	w9, w9, #1
	lsl	w9, w12, w9
	cmp	w11, w13
	csel	w24, w9, w11, lt
Lloh3:
	adrp	x9, _CLK_SET_DRYRUN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CLK_SET_DRYRUN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sdiv	w23, w10, w24
	tst	w9, w22
	b.eq	LBB0_6
; %bb.2:
Lloh6:
	adrp	x9, _CLK_SET_ROUND_UP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CLK_SET_ROUND_UP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _CLK_SET_ROUND_DOWN@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CLK_SET_ROUND_DOWN@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w22
	b.ne	LBB0_7
; %bb.3:
	cmp	w8, w23
	b.eq	LBB0_7
; %bb.4:
Lloh12:
	adrp	x8, _ERANGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_5:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_8
LBB0_6:
	mov	x0, x21
	bl	_DEVICE_LOCK
	ldp	w2, w1, [x21, #12]
	ldr	w8, [x21, #4]
	mov	w9, #-1
	lsl	w8, w9, w8
	add	w3, w8, w24
	mov	x0, x21
	bl	_MD4
	mov	x0, x21
	bl	_DEVICE_UNLOCK
	str	w24, [x21, #8]
LBB0_7:
	mov	w0, #0
	str	w23, [x20]
	mov	w8, #1
	str	w8, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DCF_HAVE_DIV,4,2               ; @DCF_HAVE_DIV
	.comm	_CLK_SET_DRYRUN,4,2             ; @CLK_SET_DRYRUN
	.comm	_CLK_SET_ROUND_UP,4,2           ; @CLK_SET_ROUND_UP
	.comm	_CLK_SET_ROUND_DOWN,4,2         ; @CLK_SET_ROUND_DOWN
	.comm	_ERANGE,4,2                     ; @ERANGE
	.no_dead_strip	_periph_set_freq
.subsections_via_symbols
