	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_set_clock
_bcm2835_set_clock:                     ## @bcm2835_set_clock
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_mmc_from_priv
	cmpl	$99999, %r15d                   ## imm = 0x1869F
	ja	LBB0_2
## %bb.1:
	movq	_SDCDIV_MAX_CDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, (%rbx)
	addq	$16, %rbx
	movq	_SDCDIV@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	%rax, %r14
	movl	4(%rbx), %ecx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r15d
	cmpl	$3, %eax
	movl	$2, %edi
	cmovgel	%eax, %edi
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%edi
	cmpl	%eax, %r15d
	adcl	$-2, %edi
	movq	_SDCDIV_MAX_CDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edi
	cmovgel	%eax, %edi
	leal	2(%rdi), %esi
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %ecx
	movl	%eax, (%r14)
	movl	$1000000000, %eax               ## imm = 0x3B9ACA00
	xorl	%edx, %edx
	divl	%ecx
	movq	_MMC_CAP_4_BIT_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	4(%r14), %ecx
	movl	$32, %ecx
	movl	$8, %edx
	cmovel	%ecx, %edx
	imull	%eax, %edx
	movl	%edx, 8(%rbx)
	movl	%edi, (%rbx)
	movq	_SDCDIV@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	addq	$16, %rbx
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_writel
	movl	(%r14), %edi
	shrl	%edi
	movq	_SDTOUT@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDCDIV_MAX_CDIV,4,2            ## @SDCDIV_MAX_CDIV
	.comm	_SDCDIV,8,3                     ## @SDCDIV
	.comm	_MMC_CAP_4_BIT_DATA,4,2         ## @MMC_CAP_4_BIT_DATA
	.comm	_SDTOUT,8,3                     ## @SDTOUT
	.no_dead_strip	_bcm2835_set_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm2835_set_clock
_bcm2835_set_clock:                     ; @bcm2835_set_clock
	.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	x21, x1
	mov	x19, x0
	bl	_mmc_from_priv
	lsr	w8, w21, #5
	cmp	w8, #3124
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _SDCDIV_MAX_CDIV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDCDIV_MAX_CDIV@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	str	w0, [x19], #16
Lloh3:
	adrp	x8, _SDCDIV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDCDIV@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	mov	x20, x0
	ldr	w8, [x19, #4]
	udiv	w9, w8, w21
	mov	w10, #2
	cmp	w9, #2
	csel	w9, w9, w10, gt
	udiv	w10, w8, w9
	cmp	w10, w21
	cinc	w9, w9, hi
	sub	w9, w9, #2
Lloh5:
	adrp	x10, _SDCDIV_MAX_CDIV@GOTPAGE
Lloh6:
	ldr	x10, [x10, _SDCDIV_MAX_CDIV@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w9, w10
	csel	w0, w9, w10, lt
	add	w9, w0, #2
	udiv	w8, w8, w9
	str	w8, [x20]
	mov	w9, #51712
	movk	w9, #15258, lsl #16
	udiv	w8, w9, w8
	ldr	w9, [x20, #4]
Lloh8:
	adrp	x10, _MMC_CAP_4_BIT_DATA@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MMC_CAP_4_BIT_DATA@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w9
	mov	w9, #8
	mov	w10, #32
	csel	w9, w10, w9, eq
	mul	w8, w9, w8
	str	w8, [x19, #8]
	str	w0, [x19]
	ldr	x8, [x19, #16]!
Lloh11:
	adrp	x9, _SDCDIV@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SDCDIV@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [x20]
	lsr	w0, w8, #1
Lloh14:
	adrp	x8, _SDTOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SDTOUT@GOTPAGEOFF]
LBB0_3:
	ldr	x9, [x19]
	ldr	x8, [x8]
	add	x1, x8, x9
	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	_writel
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SDCDIV_MAX_CDIV,4,2            ; @SDCDIV_MAX_CDIV
	.comm	_SDCDIV,8,3                     ; @SDCDIV
	.comm	_MMC_CAP_4_BIT_DATA,4,2         ; @MMC_CAP_4_BIT_DATA
	.comm	_SDTOUT,8,3                     ; @SDTOUT
	.no_dead_strip	_bcm2835_set_clock
.subsections_via_symbols
