	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alcor_send_cmd
_alcor_send_cmd:                        ## @alcor_send_cmd
	.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
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	16(%rdi), %r14
	movq	%rsi, 8(%rdi)
	callq	_alcor_prepare_data
	movl	(%r15), %edi
	movl	(%rbx), %edx
	movq	8(%rbx), %rcx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movl	(%rbx), %esi
	orl	$64, %esi
	movq	_AU6601_REG_CMD_OPCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_alcor_write8
	movq	8(%rbx), %rsi
	movq	_AU6601_REG_CMD_ARG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_alcor_write32be
	movq	%rbx, %rdi
	callq	_mmc_resp_type
                                        ## kill: def $eax killed $eax def $rax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_3
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movq	_AU6601_CMD_6_BYTE_WO_CRC@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movl	(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_mmc_from_priv
	movl	%eax, %edi
	callq	_mmc_hostname
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_mmc_resp_type
	leaq	L_.str.1(%rip), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_dev_err
	xorl	%r13d, %r13d
	testl	%r12d, %r12d
	jne	LBB0_8
	jmp	LBB0_13
LBB0_4:
	movq	_AU6601_CMD_17_BYTE_CRC@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_AU6601_CMD_6_BYTE_CRC@GOTPCREL(%rip), %rax
	movq	_AU6601_CMD_STOP_WAIT_RDY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	testl	%r12d, %r12d
	jne	LBB0_8
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_6:
	movq	_AU6601_CMD_6_BYTE_CRC@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_12:
	movq	_AU6601_CMD_NO_RESP@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %r13d
	testl	%r12d, %r12d
	je	LBB0_13
LBB0_8:
	cmpl	$0, 24(%rbx)
	jne	LBB0_10
## %bb.9:
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_11
LBB0_10:
	movl	$10000, %ebx                    ## imm = 0x2710
LBB0_11:
	leaq	4(%r15), %r12
	movq	%rbx, %rdi
	callq	_msecs_to_jiffies
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_schedule_delayed_work
LBB0_14:
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r13d, %edx
	movq	%rbx, %rcx
	callq	_dev_dbg
	movq	_AU6601_CMD_START_XFER@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	_AU6601_CMD_XFER_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_alcor_write8                   ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"send CMD. opcode: 0x%02x, arg; 0x%08x\n"

	.comm	_AU6601_REG_CMD_OPCODE,4,2      ## @AU6601_REG_CMD_OPCODE
	.comm	_AU6601_REG_CMD_ARG,4,2         ## @AU6601_REG_CMD_ARG
	.comm	_AU6601_CMD_NO_RESP,4,2         ## @AU6601_CMD_NO_RESP
	.comm	_AU6601_CMD_6_BYTE_CRC,4,2      ## @AU6601_CMD_6_BYTE_CRC
	.comm	_AU6601_CMD_STOP_WAIT_RDY,4,2   ## @AU6601_CMD_STOP_WAIT_RDY
	.comm	_AU6601_CMD_17_BYTE_CRC,4,2     ## @AU6601_CMD_17_BYTE_CRC
	.comm	_AU6601_CMD_6_BYTE_WO_CRC,4,2   ## @AU6601_CMD_6_BYTE_WO_CRC
L_.str.1:                               ## @.str.1
	.asciz	"%s: cmd->flag (0x%02x) is not valid\n"

L_.str.2:                               ## @.str.2
	.asciz	"xfer ctrl: 0x%02x; timeout: %lu\n"

	.comm	_AU6601_CMD_START_XFER,4,2      ## @AU6601_CMD_START_XFER
	.comm	_AU6601_CMD_XFER_CTRL,4,2       ## @AU6601_CMD_XFER_CTRL
	.no_dead_strip	_alcor_send_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alcor_send_cmd
_alcor_send_cmd:                        ; @alcor_send_cmd
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #16]
	str	x1, [x0, #8]
	bl	_alcor_prepare_data
	ldr	w0, [x20]
	ldr	w2, [x21]
	ldr	x3, [x21, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x21]
	orr	w1, w8, #0x40
Lloh2:
	adrp	x8, _AU6601_REG_CMD_OPCODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AU6601_REG_CMD_OPCODE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_alcor_write8
	ldr	x1, [x21, #8]
Lloh5:
	adrp	x8, _AU6601_REG_CMD_ARG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AU6601_REG_CMD_ARG@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_alcor_write32be
	mov	x0, x21
	bl	_mmc_resp_type
	sub	w8, w0, #128
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.1:
Lloh8:
	adrp	x9, lJTI0_0@PAGE
Lloh9:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh10:
	adrp	x8, _AU6601_CMD_6_BYTE_WO_CRC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AU6601_CMD_6_BYTE_WO_CRC@GOTPAGEOFF]
Lloh12:
	ldr	w23, [x8]
	cbnz	w22, LBB0_7
	b	LBB0_12
LBB0_3:
	ldr	w23, [x20]
	mov	x0, x20
	bl	_mmc_from_priv
	bl	_mmc_hostname
	mov	x24, x0
	mov	x0, x21
	bl	_mmc_resp_type
	mov	x3, x0
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	x2, x24
	bl	_dev_err
	mov	w23, #0
	cbnz	w22, LBB0_7
	b	LBB0_12
LBB0_4:
Lloh15:
	adrp	x8, _AU6601_CMD_17_BYTE_CRC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AU6601_CMD_17_BYTE_CRC@GOTPAGEOFF]
Lloh17:
	ldr	w23, [x8]
	cbnz	w22, LBB0_7
	b	LBB0_12
LBB0_5:
Lloh18:
	adrp	x8, _AU6601_CMD_6_BYTE_CRC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AU6601_CMD_6_BYTE_CRC@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _AU6601_CMD_STOP_WAIT_RDY@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AU6601_CMD_STOP_WAIT_RDY@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w23, w9, w8
	cbnz	w22, LBB0_7
	b	LBB0_12
LBB0_6:
Lloh24:
	adrp	x8, _AU6601_CMD_6_BYTE_CRC@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AU6601_CMD_6_BYTE_CRC@GOTPAGEOFF]
Lloh26:
	ldr	w23, [x8]
	cbz	w22, LBB0_12
LBB0_7:
	ldr	w8, [x21, #24]
	cbnz	w8, LBB0_9
; %bb.8:
	ldr	x21, [x21, #16]
	cbnz	x21, LBB0_10
LBB0_9:
	mov	w21, #10000
LBB0_10:
	add	x22, x20, #4
	mov	x0, x21
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x22
	bl	_schedule_delayed_work
	b	LBB0_13
LBB0_11:
Lloh27:
	adrp	x8, _AU6601_CMD_NO_RESP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AU6601_CMD_NO_RESP@GOTPAGEOFF]
Lloh29:
	ldr	w23, [x8]
	cbnz	w22, LBB0_7
LBB0_12:
	mov	x21, #0
LBB0_13:
	ldr	w0, [x20]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	mov	x3, x21
	bl	_dev_dbg
Lloh32:
	adrp	x8, _AU6601_CMD_START_XFER@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AU6601_CMD_START_XFER@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	orr	w1, w8, w23
Lloh35:
	adrp	x8, _AU6601_CMD_XFER_CTRL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AU6601_CMD_XFER_CTRL@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	mov	x0, x19
	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	_alcor_write8
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"send CMD. opcode: 0x%02x, arg; 0x%08x\n"

	.comm	_AU6601_REG_CMD_OPCODE,4,2      ; @AU6601_REG_CMD_OPCODE
	.comm	_AU6601_REG_CMD_ARG,4,2         ; @AU6601_REG_CMD_ARG
	.comm	_AU6601_CMD_NO_RESP,4,2         ; @AU6601_CMD_NO_RESP
	.comm	_AU6601_CMD_6_BYTE_CRC,4,2      ; @AU6601_CMD_6_BYTE_CRC
	.comm	_AU6601_CMD_STOP_WAIT_RDY,4,2   ; @AU6601_CMD_STOP_WAIT_RDY
	.comm	_AU6601_CMD_17_BYTE_CRC,4,2     ; @AU6601_CMD_17_BYTE_CRC
	.comm	_AU6601_CMD_6_BYTE_WO_CRC,4,2   ; @AU6601_CMD_6_BYTE_WO_CRC
l_.str.1:                               ; @.str.1
	.asciz	"%s: cmd->flag (0x%02x) is not valid\n"

l_.str.2:                               ; @.str.2
	.asciz	"xfer ctrl: 0x%02x; timeout: %lu\n"

	.comm	_AU6601_CMD_START_XFER,4,2      ; @AU6601_CMD_START_XFER
	.comm	_AU6601_CMD_XFER_CTRL,4,2       ; @AU6601_CMD_XFER_CTRL
	.no_dead_strip	_alcor_send_cmd
.subsections_via_symbols
