	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_hsmmc_set_clock
_omap_hsmmc_set_clock:                  ## @omap_hsmmc_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_mmc_dev
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_vdbg
	movq	%r12, %rdi
	callq	_omap_hsmmc_stop_clock
	movl	(%r12), %edi
	movq	_SYSCTL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_OMAP_HSMMC_READ
	movq	_CLKD_MASK@GOTPCREL(%rip), %rcx
	movq	_DTO_MASK@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rbx
	orq	(%rcx), %rbx
	notq	%rbx
	andq	%rax, %rbx
	movq	%r12, %rdi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	callq	_calc_divisor
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	shlq	$6, %rax
	movq	_DTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$16, %ecx
	movslq	%ecx, %rdx
	orq	%rax, %rdx
	orq	%rbx, %rdx
	movl	(%r12), %edi
	movl	(%r14), %esi
	callq	_OMAP_HSMMC_WRITE
	movl	(%r12), %ebx
	movl	(%r14), %r13d
	movl	%ebx, %edi
	movl	%r13d, %esi
	callq	_OMAP_HSMMC_READ
	movq	_ICE@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	movl	%ebx, %edi
	movl	%r13d, %esi
	movq	%rax, %rdx
	callq	_OMAP_HSMMC_WRITE
	movq	_jiffies@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_MMC_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	movl	(%r12), %edi
	movl	(%r14), %esi
	callq	_OMAP_HSMMC_READ
	movq	_ICS@GOTPCREL(%rip), %r15
	notq	%rax
	testq	%rax, (%r15)
	je	LBB0_4
## %bb.1:
	addq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movl	(%r12), %edi
	movl	(%r14), %esi
	callq	_OMAP_HSMMC_READ
	notq	%rax
	testq	%rax, (%r15)
	jne	LBB0_2
LBB0_4:
	movq	%r12, %rdi
	callq	_mmc_pdata
	movq	_HSMMC_HAS_HSPE_SUPPORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_16
## %bb.5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_MMC_TIMING_MMC_DDR52@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.6:
	movq	_MMC_TIMING_UHS_DDR50@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.7:
	movl	(%r12), %edi
	movq	_CAPA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_OMAP_HSMMC_READ
	movq	_HSS@GOTPCREL(%rip), %rcx
	notq	%rax
	testq	%rax, (%rcx)
	jne	LBB0_16
## %bb.8:
	movl	(%r12), %edi
	movq	_HCTL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_OMAP_HSMMC_READ
	movq	%rax, %r15
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.9:
	movl	4(%r12), %edi
	callq	_clk_get_rate
	movq	%rax, %rcx
	orq	%rbx, %rcx
	shrq	$32, %rcx
	je	LBB0_10
## %bb.11:
	xorl	%edx, %edx
	divq	%rbx
	cmpq	$25000001, %rax                 ## imm = 0x17D7841
	jb	LBB0_14
LBB0_13:
	movq	_HSPE@GOTPCREL(%rip), %rax
	orq	(%rax), %r15
	jmp	LBB0_15
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
	cmpq	$25000001, %rax                 ## imm = 0x17D7841
	jae	LBB0_13
LBB0_14:
	movq	_HSPE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	andq	%rax, %r15
LBB0_15:
	movl	(%r12), %edi
	movl	(%r14), %esi
	movq	%r15, %rdx
	callq	_OMAP_HSMMC_WRITE
LBB0_16:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_omap_hsmmc_start_clock         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set clock to %uHz\n"

	.comm	_SYSCTL,4,2                     ## @SYSCTL
	.comm	_CLKD_MASK,8,3                  ## @CLKD_MASK
	.comm	_DTO_MASK,8,3                   ## @DTO_MASK
	.comm	_DTO,4,2                        ## @DTO
	.comm	_ICE,8,3                        ## @ICE
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_MMC_TIMEOUT_MS,4,2             ## @MMC_TIMEOUT_MS
	.comm	_ICS,8,3                        ## @ICS
	.comm	_HSMMC_HAS_HSPE_SUPPORT,4,2     ## @HSMMC_HAS_HSPE_SUPPORT
	.comm	_MMC_TIMING_MMC_DDR52,8,3       ## @MMC_TIMING_MMC_DDR52
	.comm	_MMC_TIMING_UHS_DDR50,8,3       ## @MMC_TIMING_UHS_DDR50
	.comm	_CAPA,4,2                       ## @CAPA
	.comm	_HSS,8,3                        ## @HSS
	.comm	_HCTL,4,2                       ## @HCTL
	.comm	_HSPE,8,3                       ## @HSPE
	.no_dead_strip	_omap_hsmmc_set_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_hsmmc_set_clock
_omap_hsmmc_set_clock:                  ; @omap_hsmmc_set_clock
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x21, [x0, #8]
	mov	x0, x21
	bl	_mmc_dev
	ldr	w2, [x21, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_vdbg
	mov	x0, x19
	bl	_omap_hsmmc_stop_clock
	ldr	w0, [x19]
Lloh2:
	adrp	x24, _SYSCTL@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SYSCTL@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_OMAP_HSMMC_READ
Lloh4:
	adrp	x8, _CLKD_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CLKD_MASK@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _DTO_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DTO_MASK@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	orr	x8, x9, x8
	bic	x22, x0, x8
	mov	x0, x19
	mov	x1, x21
	bl	_calc_divisor
	mov	x20, x0
	orr	x8, x22, x0, lsl #6
Lloh10:
	adrp	x9, _DTO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DTO@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	lsl	w9, w9, #16
	sxtw	x9, w9
	orr	x2, x8, x9
	ldr	w0, [x19]
	ldr	w1, [x24]
	bl	_OMAP_HSMMC_WRITE
	ldr	w22, [x19]
	ldr	w23, [x24]
	mov	x0, x22
	mov	x1, x23
	bl	_OMAP_HSMMC_READ
Lloh13:
	adrp	x8, _ICE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ICE@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	orr	x2, x8, x0
	mov	x0, x22
	mov	x1, x23
	bl	_OMAP_HSMMC_WRITE
Lloh16:
	adrp	x23, _jiffies@GOTPAGE
Lloh17:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x26, [x23]
Lloh18:
	adrp	x8, _MMC_TIMEOUT_MS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MMC_TIMEOUT_MS@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x22, x0
	ldr	w0, [x19]
	ldr	w1, [x24]
	bl	_OMAP_HSMMC_READ
Lloh21:
	adrp	x25, _ICS@GOTPAGE
Lloh22:
	ldr	x25, [x25, _ICS@GOTPAGEOFF]
	ldr	x8, [x25]
	bics	xzr, x8, x0
	b.eq	LBB0_4
; %bb.1:
	add	x22, x22, x26
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	mov	x1, x22
	bl	_time_before
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_cpu_relax
	ldr	w0, [x19]
	ldr	w1, [x24]
	bl	_OMAP_HSMMC_READ
	ldr	x8, [x25]
	bics	xzr, x8, x0
	b.ne	LBB0_2
LBB0_4:
	mov	x0, x19
	bl	_mmc_pdata
	ldr	w8, [x0]
Lloh23:
	adrp	x9, _HSMMC_HAS_HSPE_SUPPORT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _HSMMC_HAS_HSPE_SUPPORT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.5:
	ldr	x8, [x21]
Lloh26:
	adrp	x9, _MMC_TIMING_MMC_DDR52@GOTPAGE
Lloh27:
	ldr	x9, [x9, _MMC_TIMING_MMC_DDR52@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.6:
Lloh29:
	adrp	x9, _MMC_TIMING_UHS_DDR50@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MMC_TIMING_UHS_DDR50@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.7:
	ldr	w0, [x19]
Lloh32:
	adrp	x8, _CAPA@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CAPA@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	bl	_OMAP_HSMMC_READ
Lloh35:
	adrp	x8, _HSS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _HSS@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	bics	xzr, x8, x0
	b.ne	LBB0_13
; %bb.8:
	ldr	w0, [x19]
Lloh38:
	adrp	x22, _HCTL@GOTPAGE
Lloh39:
	ldr	x22, [x22, _HCTL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_OMAP_HSMMC_READ
	mov	x21, x0
	cbz	x20, LBB0_11
; %bb.9:
	ldr	w0, [x19, #4]
	bl	_clk_get_rate
	udiv	x8, x0, x20
	mov	w9, #30785
	movk	w9, #381, lsl #16
	cmp	x8, x9
	b.lo	LBB0_11
; %bb.10:
Lloh40:
	adrp	x8, _HSPE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _HSPE@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	orr	x2, x8, x21
	b	LBB0_12
LBB0_11:
Lloh43:
	adrp	x8, _HSPE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _HSPE@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	bic	x2, x21, x8
LBB0_12:
	ldr	w0, [x19]
	ldr	w1, [x22]
	bl	_OMAP_HSMMC_WRITE
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_omap_hsmmc_start_clock
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set clock to %uHz\n"

	.comm	_SYSCTL,4,2                     ; @SYSCTL
	.comm	_CLKD_MASK,8,3                  ; @CLKD_MASK
	.comm	_DTO_MASK,8,3                   ; @DTO_MASK
	.comm	_DTO,4,2                        ; @DTO
	.comm	_ICE,8,3                        ; @ICE
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_MMC_TIMEOUT_MS,4,2             ; @MMC_TIMEOUT_MS
	.comm	_ICS,8,3                        ; @ICS
	.comm	_HSMMC_HAS_HSPE_SUPPORT,4,2     ; @HSMMC_HAS_HSPE_SUPPORT
	.comm	_MMC_TIMING_MMC_DDR52,8,3       ; @MMC_TIMING_MMC_DDR52
	.comm	_MMC_TIMING_UHS_DDR50,8,3       ; @MMC_TIMING_UHS_DDR50
	.comm	_CAPA,4,2                       ; @CAPA
	.comm	_HSS,8,3                        ; @HSS
	.comm	_HCTL,4,2                       ; @HCTL
	.comm	_HSPE,8,3                       ; @HSPE
	.no_dead_strip	_omap_hsmmc_set_clock
.subsections_via_symbols
