	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function toshsd_powerdown
_toshsd_powerdown:                      ## @toshsd_powerdown
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_SD_INTMASKCARD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rdi), %rsi
	movl	$-1, %edi
	callq	_iowrite32
	movq	_SDIO_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movq	_SDIO_CLOCKNWAITCTRL@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	xorl	%edi, %edi
	callq	_iowrite16
	movq	_SD_CARDCLOCKCTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	xorl	%edi, %edi
	callq	_iowrite16
	movl	(%rbx), %edi
	movq	_SD_PCICFG_POWER1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SD_PCICFG_PWR1_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_pci_write_config_byte
	movl	(%rbx), %edi
	movq	_SD_PCICFG_CLKSTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_pci_write_config_byte          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_INTMASKCARD,8,3             ## @SD_INTMASKCARD
	.comm	_SDIO_BASE,8,3                  ## @SDIO_BASE
	.comm	_SDIO_CLOCKNWAITCTRL,8,3        ## @SDIO_CLOCKNWAITCTRL
	.comm	_SD_CARDCLOCKCTRL,8,3           ## @SD_CARDCLOCKCTRL
	.comm	_SD_PCICFG_POWER1,4,2           ## @SD_PCICFG_POWER1
	.comm	_SD_PCICFG_PWR1_OFF,4,2         ## @SD_PCICFG_PWR1_OFF
	.comm	_SD_PCICFG_CLKSTOP,4,2          ## @SD_PCICFG_CLKSTOP
	.no_dead_strip	_toshsd_powerdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function toshsd_powerdown
_toshsd_powerdown:                      ; @toshsd_powerdown
	.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	x8, [x0, #8]
Lloh0:
	adrp	x9, _SD_INTMASKCARD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SD_INTMASKCARD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #-1
	bl	_iowrite32
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _SDIO_BASE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SDIO_BASE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _SDIO_CLOCKNWAITCTRL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SDIO_CLOCKNWAITCTRL@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	add	x8, x9, x8
	add	x1, x8, x10
	mov	w0, #0
	bl	_iowrite16
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _SD_CARDCLOCKCTRL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SD_CARDCLOCKCTRL@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite16
	ldr	w0, [x19]
Lloh12:
	adrp	x8, _SD_PCICFG_POWER1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SD_PCICFG_POWER1@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _SD_PCICFG_PWR1_OFF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SD_PCICFG_PWR1_OFF@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	bl	_pci_write_config_byte
	ldr	w0, [x19]
Lloh18:
	adrp	x8, _SD_PCICFG_CLKSTOP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SD_PCICFG_CLKSTOP@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w2, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pci_write_config_byte
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_INTMASKCARD,8,3             ; @SD_INTMASKCARD
	.comm	_SDIO_BASE,8,3                  ; @SDIO_BASE
	.comm	_SDIO_CLOCKNWAITCTRL,8,3        ; @SDIO_CLOCKNWAITCTRL
	.comm	_SD_CARDCLOCKCTRL,8,3           ; @SD_CARDCLOCKCTRL
	.comm	_SD_PCICFG_POWER1,4,2           ; @SD_PCICFG_POWER1
	.comm	_SD_PCICFG_PWR1_OFF,4,2         ; @SD_PCICFG_PWR1_OFF
	.comm	_SD_PCICFG_CLKSTOP,4,2          ; @SD_PCICFG_CLKSTOP
	.no_dead_strip	_toshsd_powerdown
.subsections_via_symbols
