	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function toshsd_init
_toshsd_init:                           ## @toshsd_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	movq	_SD_PCICFG_CLKSTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SD_PCICFG_CLKSTOP_ENABLE_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_pci_write_config_byte
	movl	8(%rbx), %edi
	movq	_SD_PCICFG_CARDDETECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edx
	callq	_pci_write_config_byte
	movq	_SD_SOFTWARERESET@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_iowrite16
	movl	$2, %edi
	callq	_mdelay
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	movl	$1, %edi
	callq	_iowrite16
	movl	$2, %edi
	callq	_mdelay
	movq	_SD_CARDCLOCKCTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_iowrite16
	movq	_SD_CARDSTATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_iowrite32
	movq	_SD_ERRORSTATUS0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_iowrite32
	movq	_SD_STOPINTERNAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_iowrite16
	movq	_SDIO_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movq	_SDIO_CLOCKNWAITCTRL@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movl	$256, %edi                      ## imm = 0x100
	callq	_iowrite16
	movl	8(%rbx), %edi
	movq	_SD_PCICFG_SDLED_ENABLE1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SD_PCICFG_LED_ENABLE1_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_pci_write_config_byte
	movl	8(%rbx), %edi
	movq	_SD_PCICFG_SDLED_ENABLE2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SD_PCICFG_LED_ENABLE2_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_pci_write_config_byte
	movq	_SD_CARD_RESP_END@GOTPCREL(%rip), %rax
	movq	_SD_CARD_RW_END@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_SD_CARD_CARD_REMOVED_0@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_SD_CARD_CARD_INSERTED_0@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_SD_BUF_READ_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_SD_BUF_WRITE_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_SD_BUF_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	notl	%edi
	movq	_SD_INTMASKCARD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_iowrite32
	movq	_SD_TRANSACTIONCTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	$4096, %edi                     ## imm = 0x1000
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_iowrite16                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_PCICFG_CLKSTOP,4,2          ## @SD_PCICFG_CLKSTOP
	.comm	_SD_PCICFG_CLKSTOP_ENABLE_ALL,4,2 ## @SD_PCICFG_CLKSTOP_ENABLE_ALL
	.comm	_SD_PCICFG_CARDDETECT,4,2       ## @SD_PCICFG_CARDDETECT
	.comm	_SD_SOFTWARERESET,8,3           ## @SD_SOFTWARERESET
	.comm	_SD_CARDCLOCKCTRL,8,3           ## @SD_CARDCLOCKCTRL
	.comm	_SD_CARDSTATUS,8,3              ## @SD_CARDSTATUS
	.comm	_SD_ERRORSTATUS0,8,3            ## @SD_ERRORSTATUS0
	.comm	_SD_STOPINTERNAL,8,3            ## @SD_STOPINTERNAL
	.comm	_SDIO_BASE,8,3                  ## @SDIO_BASE
	.comm	_SDIO_CLOCKNWAITCTRL,8,3        ## @SDIO_CLOCKNWAITCTRL
	.comm	_SD_PCICFG_SDLED_ENABLE1,4,2    ## @SD_PCICFG_SDLED_ENABLE1
	.comm	_SD_PCICFG_LED_ENABLE1_START,4,2 ## @SD_PCICFG_LED_ENABLE1_START
	.comm	_SD_PCICFG_SDLED_ENABLE2,4,2    ## @SD_PCICFG_SDLED_ENABLE2
	.comm	_SD_PCICFG_LED_ENABLE2_START,4,2 ## @SD_PCICFG_LED_ENABLE2_START
	.comm	_SD_CARD_RESP_END,4,2           ## @SD_CARD_RESP_END
	.comm	_SD_CARD_RW_END,4,2             ## @SD_CARD_RW_END
	.comm	_SD_CARD_CARD_REMOVED_0,4,2     ## @SD_CARD_CARD_REMOVED_0
	.comm	_SD_CARD_CARD_INSERTED_0,4,2    ## @SD_CARD_CARD_INSERTED_0
	.comm	_SD_BUF_READ_ENABLE,4,2         ## @SD_BUF_READ_ENABLE
	.comm	_SD_BUF_WRITE_ENABLE,4,2        ## @SD_BUF_WRITE_ENABLE
	.comm	_SD_BUF_CMD_TIMEOUT,4,2         ## @SD_BUF_CMD_TIMEOUT
	.comm	_SD_INTMASKCARD,8,3             ## @SD_INTMASKCARD
	.comm	_SD_TRANSACTIONCTRL,8,3         ## @SD_TRANSACTIONCTRL
	.no_dead_strip	_toshsd_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function toshsd_init
_toshsd_init:                           ; @toshsd_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _SD_PCICFG_CLKSTOP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SD_PCICFG_CLKSTOP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _SD_PCICFG_CLKSTOP_ENABLE_ALL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SD_PCICFG_CLKSTOP_ENABLE_ALL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_pci_write_config_byte
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x8, _SD_PCICFG_CARDDETECT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SD_PCICFG_CARDDETECT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w2, #2
	bl	_pci_write_config_byte
	ldr	x8, [x19]
Lloh9:
	adrp	x20, _SD_SOFTWARERESET@GOTPAGE
Lloh10:
	ldr	x20, [x20, _SD_SOFTWARERESET@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite16
	mov	w0, #2
	bl	_mdelay
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #1
	bl	_iowrite16
	mov	w0, #2
	bl	_mdelay
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _SD_CARDCLOCKCTRL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SD_CARDCLOCKCTRL@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite16
	ldr	x8, [x19]
Lloh14:
	adrp	x9, _SD_CARDSTATUS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SD_CARDSTATUS@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
	ldr	x8, [x19]
Lloh17:
	adrp	x9, _SD_ERRORSTATUS0@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SD_ERRORSTATUS0@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _SD_STOPINTERNAL@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SD_STOPINTERNAL@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite16
	ldr	x8, [x19]
Lloh23:
	adrp	x9, _SDIO_BASE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SDIO_BASE@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
Lloh26:
	adrp	x10, _SDIO_CLOCKNWAITCTRL@GOTPAGE
Lloh27:
	ldr	x10, [x10, _SDIO_CLOCKNWAITCTRL@GOTPAGEOFF]
Lloh28:
	ldr	x10, [x10]
	add	x8, x9, x8
	add	x1, x8, x10
	mov	w0, #256
	bl	_iowrite16
	ldr	w0, [x19, #8]
Lloh29:
	adrp	x8, _SD_PCICFG_SDLED_ENABLE1@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SD_PCICFG_SDLED_ENABLE1@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _SD_PCICFG_LED_ENABLE1_START@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SD_PCICFG_LED_ENABLE1_START@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	bl	_pci_write_config_byte
	ldr	w0, [x19, #8]
Lloh35:
	adrp	x8, _SD_PCICFG_SDLED_ENABLE2@GOTPAGE
Lloh36:
	ldr	x8, [x8, _SD_PCICFG_SDLED_ENABLE2@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x8, _SD_PCICFG_LED_ENABLE2_START@GOTPAGE
Lloh39:
	ldr	x8, [x8, _SD_PCICFG_LED_ENABLE2_START@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	bl	_pci_write_config_byte
Lloh41:
	adrp	x8, _SD_CARD_RESP_END@GOTPAGE
Lloh42:
	ldr	x8, [x8, _SD_CARD_RESP_END@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	adrp	x9, _SD_CARD_RW_END@GOTPAGE
Lloh45:
	ldr	x9, [x9, _SD_CARD_RW_END@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh47:
	adrp	x9, _SD_CARD_CARD_REMOVED_0@GOTPAGE
Lloh48:
	ldr	x9, [x9, _SD_CARD_CARD_REMOVED_0@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh50:
	adrp	x9, _SD_CARD_CARD_INSERTED_0@GOTPAGE
Lloh51:
	ldr	x9, [x9, _SD_CARD_CARD_INSERTED_0@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh53:
	adrp	x9, _SD_BUF_READ_ENABLE@GOTPAGE
Lloh54:
	ldr	x9, [x9, _SD_BUF_READ_ENABLE@GOTPAGEOFF]
Lloh55:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh56:
	adrp	x9, _SD_BUF_WRITE_ENABLE@GOTPAGE
Lloh57:
	ldr	x9, [x9, _SD_BUF_WRITE_ENABLE@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh59:
	adrp	x9, _SD_BUF_CMD_TIMEOUT@GOTPAGE
Lloh60:
	ldr	x9, [x9, _SD_BUF_CMD_TIMEOUT@GOTPAGEOFF]
Lloh61:
	ldr	w9, [x9]
	orr	w8, w8, w9
	mvn	w0, w8
	ldr	x8, [x19]
Lloh62:
	adrp	x9, _SD_INTMASKCARD@GOTPAGE
Lloh63:
	ldr	x9, [x9, _SD_INTMASKCARD@GOTPAGEOFF]
Lloh64:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	ldr	x8, [x19]
Lloh65:
	adrp	x9, _SD_TRANSACTIONCTRL@GOTPAGE
Lloh66:
	ldr	x9, [x9, _SD_TRANSACTIONCTRL@GOTPAGEOFF]
Lloh67:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #4096
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_iowrite16
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_PCICFG_CLKSTOP,4,2          ; @SD_PCICFG_CLKSTOP
	.comm	_SD_PCICFG_CLKSTOP_ENABLE_ALL,4,2 ; @SD_PCICFG_CLKSTOP_ENABLE_ALL
	.comm	_SD_PCICFG_CARDDETECT,4,2       ; @SD_PCICFG_CARDDETECT
	.comm	_SD_SOFTWARERESET,8,3           ; @SD_SOFTWARERESET
	.comm	_SD_CARDCLOCKCTRL,8,3           ; @SD_CARDCLOCKCTRL
	.comm	_SD_CARDSTATUS,8,3              ; @SD_CARDSTATUS
	.comm	_SD_ERRORSTATUS0,8,3            ; @SD_ERRORSTATUS0
	.comm	_SD_STOPINTERNAL,8,3            ; @SD_STOPINTERNAL
	.comm	_SDIO_BASE,8,3                  ; @SDIO_BASE
	.comm	_SDIO_CLOCKNWAITCTRL,8,3        ; @SDIO_CLOCKNWAITCTRL
	.comm	_SD_PCICFG_SDLED_ENABLE1,4,2    ; @SD_PCICFG_SDLED_ENABLE1
	.comm	_SD_PCICFG_LED_ENABLE1_START,4,2 ; @SD_PCICFG_LED_ENABLE1_START
	.comm	_SD_PCICFG_SDLED_ENABLE2,4,2    ; @SD_PCICFG_SDLED_ENABLE2
	.comm	_SD_PCICFG_LED_ENABLE2_START,4,2 ; @SD_PCICFG_LED_ENABLE2_START
	.comm	_SD_CARD_RESP_END,4,2           ; @SD_CARD_RESP_END
	.comm	_SD_CARD_RW_END,4,2             ; @SD_CARD_RW_END
	.comm	_SD_CARD_CARD_REMOVED_0,4,2     ; @SD_CARD_CARD_REMOVED_0
	.comm	_SD_CARD_CARD_INSERTED_0,4,2    ; @SD_CARD_CARD_INSERTED_0
	.comm	_SD_BUF_READ_ENABLE,4,2         ; @SD_BUF_READ_ENABLE
	.comm	_SD_BUF_WRITE_ENABLE,4,2        ; @SD_BUF_WRITE_ENABLE
	.comm	_SD_BUF_CMD_TIMEOUT,4,2         ; @SD_BUF_CMD_TIMEOUT
	.comm	_SD_INTMASKCARD,8,3             ; @SD_INTMASKCARD
	.comm	_SD_TRANSACTIONCTRL,8,3         ; @SD_TRANSACTIONCTRL
	.no_dead_strip	_toshsd_init
.subsections_via_symbols
