	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alcor_set_power_mode
_alcor_set_power_mode:                  ## @alcor_set_power_mode
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_mmc_priv
	movq	%rax, %rbx
	movl	(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.1:
	movq	8(%rbx), %r14
	cmpl	$129, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_5
## %bb.3:
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_alcor_set_clock
	movq	_AU6601_OUTPUT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_alcor_write8
	movq	_AU6601_POWER_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_alcor_write8                   ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_AU6601_SD_CARD@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_AU6601_ACTIVE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_alcor_write8
	movq	_AU6601_OPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_alcor_write8
	movq	_AU6601_CLK_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$32, %esi
	callq	_alcor_write8
	movq	_AU6601_REG_BUS_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_alcor_write8
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_alcor_set_clock
	movl	(%r12), %esi
	movq	_AU6601_POWER_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_alcor_write8
	movl	$20, %edi
	callq	_mdelay
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_alcor_set_clock
	movl	(%r12), %esi
	movq	_AU6601_OUTPUT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_alcor_write8
	movq	_AU6601_DATA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AU6601_DATA_XFER_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_alcor_write8
	movq	_AU6601_TIME_OUT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$125, %esi
	callq	_alcor_write8
	movl	$100, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mdelay                         ## TAILCALL
LBB0_5:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AU6601_OUTPUT_ENABLE,4,2       ## @AU6601_OUTPUT_ENABLE
	.comm	_AU6601_POWER_CONTROL,4,2       ## @AU6601_POWER_CONTROL
	.comm	_AU6601_SD_CARD,4,2             ## @AU6601_SD_CARD
	.comm	_AU6601_ACTIVE_CTRL,4,2         ## @AU6601_ACTIVE_CTRL
	.comm	_AU6601_OPT,4,2                 ## @AU6601_OPT
	.comm	_AU6601_CLK_DELAY,4,2           ## @AU6601_CLK_DELAY
	.comm	_AU6601_REG_BUS_CTRL,4,2        ## @AU6601_REG_BUS_CTRL
	.comm	_AU6601_DATA_WRITE,4,2          ## @AU6601_DATA_WRITE
	.comm	_AU6601_DATA_XFER_CTRL,4,2      ## @AU6601_DATA_XFER_CTRL
	.comm	_AU6601_TIME_OUT_CTRL,4,2       ## @AU6601_TIME_OUT_CTRL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown power parameter\n"

	.no_dead_strip	_alcor_set_power_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alcor_set_power_mode
_alcor_set_power_mode:                  ; @alcor_set_power_mode
	.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	x20, x1
	bl	_mmc_priv
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	x19, [x0, #8]
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_6
; %bb.3:
	ldr	w1, [x20, #4]
	mov	x0, x21
	bl	_alcor_set_clock
Lloh0:
	adrp	x8, _AU6601_OUTPUT_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AU6601_OUTPUT_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_alcor_write8
Lloh3:
	adrp	x8, _AU6601_POWER_CONTROL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AU6601_POWER_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	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	_alcor_write8
LBB0_4:
	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
	ret
LBB0_5:
Lloh6:
	adrp	x22, _AU6601_SD_CARD@GOTPAGE
Lloh7:
	ldr	x22, [x22, _AU6601_SD_CARD@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _AU6601_ACTIVE_CTRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AU6601_ACTIVE_CTRL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_alcor_write8
Lloh11:
	adrp	x8, _AU6601_OPT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AU6601_OPT@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_alcor_write8
Lloh14:
	adrp	x8, _AU6601_CLK_DELAY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AU6601_CLK_DELAY@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #32
	bl	_alcor_write8
Lloh17:
	adrp	x8, _AU6601_REG_BUS_CTRL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AU6601_REG_BUS_CTRL@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_alcor_write8
	ldr	w1, [x20, #4]
	mov	x0, x21
	bl	_alcor_set_clock
	ldr	w1, [x22]
Lloh20:
	adrp	x8, _AU6601_POWER_CONTROL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AU6601_POWER_CONTROL@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_alcor_write8
	mov	w0, #20
	bl	_mdelay
	ldr	w1, [x20, #4]
	mov	x0, x21
	bl	_alcor_set_clock
	ldr	w1, [x22]
Lloh23:
	adrp	x8, _AU6601_OUTPUT_ENABLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AU6601_OUTPUT_ENABLE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_alcor_write8
Lloh26:
	adrp	x8, _AU6601_DATA_WRITE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AU6601_DATA_WRITE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _AU6601_DATA_XFER_CTRL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AU6601_DATA_XFER_CTRL@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_alcor_write8
Lloh32:
	adrp	x8, _AU6601_TIME_OUT_CTRL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AU6601_TIME_OUT_CTRL@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #125
	bl	_alcor_write8
	mov	w0, #100
	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	_mdelay
LBB0_6:
	ldr	w0, [x21]
Lloh35:
	adrp	x1, l_.str@PAGE
Lloh36:
	add	x1, x1, l_.str@PAGEOFF
	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	_dev_err
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_AU6601_OUTPUT_ENABLE,4,2       ; @AU6601_OUTPUT_ENABLE
	.comm	_AU6601_POWER_CONTROL,4,2       ; @AU6601_POWER_CONTROL
	.comm	_AU6601_SD_CARD,4,2             ; @AU6601_SD_CARD
	.comm	_AU6601_ACTIVE_CTRL,4,2         ; @AU6601_ACTIVE_CTRL
	.comm	_AU6601_OPT,4,2                 ; @AU6601_OPT
	.comm	_AU6601_CLK_DELAY,4,2           ; @AU6601_CLK_DELAY
	.comm	_AU6601_REG_BUS_CTRL,4,2        ; @AU6601_REG_BUS_CTRL
	.comm	_AU6601_DATA_WRITE,4,2          ; @AU6601_DATA_WRITE
	.comm	_AU6601_DATA_XFER_CTRL,4,2      ; @AU6601_DATA_XFER_CTRL
	.comm	_AU6601_TIME_OUT_CTRL,4,2       ; @AU6601_TIME_OUT_CTRL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown power parameter\n"

	.no_dead_strip	_alcor_set_power_mode
.subsections_via_symbols
