	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wbsd_set_ios
_wbsd_set_ios:                          ## @wbsd_set_ios
	.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	%rsi, %r14
	callq	_mmc_priv
	movq	%rax, %r13
	leaq	16(%rax), %r15
	movq	%r15, %rdi
	callq	_spin_lock_bh
	movq	(%r14), %rax
	movq	_MMC_POWER_OFF@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_wbsd_init_device
LBB0_2:
	movl	8(%r14), %eax
	cmpl	$23999999, %eax                 ## imm = 0x16E35FF
	jle	LBB0_4
## %bb.3:
	movq	_WBSD_CLK_24M@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	cmpl	$15999999, %eax                 ## imm = 0xF423FF
	jle	LBB0_6
## %bb.5:
	movq	_WBSD_CLK_16M@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	cmpl	$12000000, %eax                 ## imm = 0xB71B00
	jl	LBB0_7
## %bb.8:
	movq	_WBSD_CLK_12M@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_WBSD_CLK_375K@GOTPCREL(%rip), %rax
LBB0_9:
	movq	(%rax), %rbx
	cmpq	(%r13), %rbx
	je	LBB0_11
## %bb.10:
	movq	_WBSD_IDX_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_wbsd_write_index
	movq	%rbx, (%r13)
LBB0_11:
	movq	(%r14), %rax
	cmpq	(%r12), %rax
	je	LBB0_13
## %bb.12:
	movq	_WBSD_CSR@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	32(%r13), %rdi
	callq	_inb
	movq	_WBSD_POWER_N@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	notq	%rdi
	andq	%rax, %rdi
	movq	(%rbx), %rsi
	addq	32(%r13), %rsi
	callq	_outb
LBB0_13:
	movq	_WBSD_IDX_SETUP@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_wbsd_read_index
	movq	%rax, %r12
	movq	16(%r14), %rax
	movq	_MMC_CS_HIGH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.14:
	movq	24(%r14), %rax
	movq	_MMC_BUS_WIDTH_1@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_BUG_ON
	movq	_WBSD_DAT3_H@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orq	%rax, %r12
	movq	_WBSD_FIGNORE_DETECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%r13)
	jmp	LBB0_17
LBB0_15:
	movq	_WBSD_DAT3_H@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%r12, %rax
	je	LBB0_17
## %bb.16:
	notq	%rax
	andq	%rax, %r12
	movq	%r13, %rdi
	addq	$20, %rdi
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	$1374389535, %rcx, %rcx         ## imm = 0x51EB851F
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	movslq	%ecx, %rsi
	addq	(%rax), %rsi
	callq	_mod_timer
LBB0_17:
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_wbsd_write_index
	movq	24(%r14), %rax
	movq	%rax, 8(%r13)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_bh                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_POWER_OFF,8,3              ## @MMC_POWER_OFF
	.comm	_WBSD_CLK_24M,8,3               ## @WBSD_CLK_24M
	.comm	_WBSD_CLK_16M,8,3               ## @WBSD_CLK_16M
	.comm	_WBSD_CLK_12M,8,3               ## @WBSD_CLK_12M
	.comm	_WBSD_CLK_375K,8,3              ## @WBSD_CLK_375K
	.comm	_WBSD_IDX_CLK,4,2               ## @WBSD_IDX_CLK
	.comm	_WBSD_CSR,8,3                   ## @WBSD_CSR
	.comm	_WBSD_POWER_N,8,3               ## @WBSD_POWER_N
	.comm	_WBSD_IDX_SETUP,4,2             ## @WBSD_IDX_SETUP
	.comm	_MMC_CS_HIGH,8,3                ## @MMC_CS_HIGH
	.comm	_MMC_BUS_WIDTH_1,8,3            ## @MMC_BUS_WIDTH_1
	.comm	_WBSD_DAT3_H,8,3                ## @WBSD_DAT3_H
	.comm	_WBSD_FIGNORE_DETECT,4,2        ## @WBSD_FIGNORE_DETECT
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_wbsd_set_ios
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wbsd_set_ios
_wbsd_set_ios:                          ; @wbsd_set_ios
	.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, x1
	bl	_mmc_priv
	mov	x20, x0
	add	x21, x0, #16
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	x8, [x19]
Lloh0:
	adrp	x23, _MMC_POWER_OFF@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MMC_POWER_OFF@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_wbsd_init_device
LBB0_2:
	ldr	w8, [x19, #8]
Lloh2:
	adrp	x9, _WBSD_CLK_24M@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WBSD_CLK_24M@GOTPAGEOFF]
	mov	w10, #13823
	movk	w10, #366, lsl #16
Lloh4:
	adrp	x11, _WBSD_CLK_16M@GOTPAGE
Lloh5:
	ldr	x11, [x11, _WBSD_CLK_16M@GOTPAGEOFF]
	mov	w12, #9215
	movk	w12, #244, lsl #16
Lloh6:
	adrp	x13, _WBSD_CLK_375K@GOTPAGE
Lloh7:
	ldr	x13, [x13, _WBSD_CLK_375K@GOTPAGEOFF]
Lloh8:
	adrp	x14, _WBSD_CLK_12M@GOTPAGE
Lloh9:
	ldr	x14, [x14, _WBSD_CLK_12M@GOTPAGEOFF]
	mov	w15, #6911
	movk	w15, #183, lsl #16
	cmp	w8, w15
	csel	x13, x14, x13, gt
	cmp	w8, w12
	csel	x11, x11, x13, gt
	cmp	w8, w10
	csel	x8, x9, x11, gt
	ldr	x22, [x8]
	ldr	x8, [x20]
	cmp	x22, x8
	b.eq	LBB0_4
; %bb.3:
Lloh10:
	adrp	x8, _WBSD_IDX_CLK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WBSD_IDX_CLK@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_wbsd_write_index
	str	x22, [x20]
LBB0_4:
	ldr	x8, [x19]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x20, #32]
Lloh13:
	adrp	x22, _WBSD_CSR@GOTPAGE
Lloh14:
	ldr	x22, [x22, _WBSD_CSR@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_inb
Lloh15:
	adrp	x8, _WBSD_POWER_N@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WBSD_POWER_N@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	bic	x0, x0, x8
	ldr	x8, [x20, #32]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_outb
LBB0_6:
Lloh18:
	adrp	x23, _WBSD_IDX_SETUP@GOTPAGE
Lloh19:
	ldr	x23, [x23, _WBSD_IDX_SETUP@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_wbsd_read_index
	mov	x22, x0
	ldr	x8, [x19, #16]
Lloh20:
	adrp	x9, _MMC_CS_HIGH@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MMC_CS_HIGH@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x19, #24]
Lloh23:
	adrp	x9, _MMC_BUS_WIDTH_1@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MMC_BUS_WIDTH_1@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_BUG_ON
Lloh26:
	adrp	x8, _WBSD_DAT3_H@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WBSD_DAT3_H@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	orr	x22, x8, x22
Lloh29:
	adrp	x8, _WBSD_FIGNORE_DETECT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WBSD_FIGNORE_DETECT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	w9, [x20, #24]
	orr	w8, w9, w8
	str	w8, [x20, #24]
	b	LBB0_10
LBB0_8:
Lloh32:
	adrp	x8, _WBSD_DAT3_H@GOTPAGE
Lloh33:
	ldr	x8, [x8, _WBSD_DAT3_H@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	tst	x8, x22
	b.eq	LBB0_10
; %bb.9:
	bic	x22, x22, x8
	add	x0, x20, #20
Lloh35:
	adrp	x8, _jiffies@GOTPAGE
Lloh36:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
Lloh38:
	adrp	x9, _HZ@GOTPAGE
Lloh39:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh40:
	ldrsw	x9, [x9]
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w10
	add	x1, x8, w9, sxtw
	bl	_mod_timer
LBB0_10:
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x22
	bl	_wbsd_write_index
	ldr	x8, [x19, #24]
	str	x8, [x20, #8]
	mov	x0, x21
	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
	b	_spin_unlock_bh
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_POWER_OFF,8,3              ; @MMC_POWER_OFF
	.comm	_WBSD_CLK_24M,8,3               ; @WBSD_CLK_24M
	.comm	_WBSD_CLK_16M,8,3               ; @WBSD_CLK_16M
	.comm	_WBSD_CLK_12M,8,3               ; @WBSD_CLK_12M
	.comm	_WBSD_CLK_375K,8,3              ; @WBSD_CLK_375K
	.comm	_WBSD_IDX_CLK,4,2               ; @WBSD_IDX_CLK
	.comm	_WBSD_CSR,8,3                   ; @WBSD_CSR
	.comm	_WBSD_POWER_N,8,3               ; @WBSD_POWER_N
	.comm	_WBSD_IDX_SETUP,4,2             ; @WBSD_IDX_SETUP
	.comm	_MMC_CS_HIGH,8,3                ; @MMC_CS_HIGH
	.comm	_MMC_BUS_WIDTH_1,8,3            ; @MMC_BUS_WIDTH_1
	.comm	_WBSD_DAT3_H,8,3                ; @WBSD_DAT3_H
	.comm	_WBSD_FIGNORE_DETECT,4,2        ; @WBSD_FIGNORE_DETECT
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_wbsd_set_ios
.subsections_via_symbols
