	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dst_command
_dst_command:                           ## @dst_command
	.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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_dst_comm_init
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_write_dst
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movq	%rbx, %rdi
	callq	_dst_error_recovery
	testq	%rax, %rax
	jns	LBB0_6
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
LBB0_15:
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_6
LBB0_7:
	movq	%rbx, %rdi
	callq	_dst_pio_disable
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	movq	_DST_TYPE_HAS_FW_1@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, (%rbx)
	je	LBB0_11
## %bb.10:
	movl	$3, %edi
	callq	_mdelay
LBB0_11:
	movq	_GET_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_read_dst
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movq	%rbx, %rdi
	callq	_dst_error_recovery
	testq	%rax, %rax
	jns	LBB0_6
## %bb.13:
	leaq	L_.str.2(%rip), %rsi
LBB0_14:
	movl	$2, %edi
	jmp	LBB0_15
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
LBB0_5:
	callq	_pr_err
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_31:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	-48(%rbp), %rdx
	movq	_ACK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_17
## %bb.18:
	cmpq	$2, %r12
	jl	LBB0_21
## %bb.19:
	cmpq	$0, (%r15)
	je	LBB0_20
LBB0_21:
	movl	(%r13), %eax
	testl	%eax, (%rbx)
	je	LBB0_23
## %bb.22:
	movl	$3, %edi
	callq	_mdelay
	jmp	LBB0_24
LBB0_17:
	leaq	L_.str.4(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_6
LBB0_23:
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_udelay
LBB0_24:
	movq	_NO_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dst_wait_dst_ready
	testl	%eax, %eax
	je	LBB0_6
## %bb.25:
	movq	8(%rbx), %rsi
	movq	_FIXED_COMM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_read_dst
	testq	%rax, %rax
	je	LBB0_28
## %bb.26:
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movq	%rbx, %rdi
	callq	_dst_error_recovery
	testq	%rax, %rax
	jns	LBB0_6
## %bb.27:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_14
LBB0_28:
	movq	8(%rbx), %rdi
	movq	56(%rdi), %rbx
	movl	$7, %esi
	callq	_dst_check_sum
	cmpq	%rax, %rbx
	jne	LBB0_29
## %bb.30:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_31
LBB0_20:
	movq	8(%r15), %rax
	orq	$2, %rax
	cmpq	$3, %rax
	je	LBB0_6
	jmp	LBB0_21
LBB0_29:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DST Communication Initialization Failed.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Trying to recover..\n"

L_.str.2:                               ## @.str.2
	.asciz	"Recovery Failed.\n"

L_.str.3:                               ## @.str.3
	.asciz	"PIO Disable Failed.\n"

	.comm	_DST_TYPE_HAS_FW_1,4,2          ## @DST_TYPE_HAS_FW_1
	.comm	_GET_ACK,4,2                    ## @GET_ACK
	.comm	_ACK,8,3                        ## @ACK
L_.str.4:                               ## @.str.4
	.asciz	"write not acknowledged 0x%02x\n"

	.comm	_NO_DELAY,4,2                   ## @NO_DELAY
	.comm	_FIXED_COMM,4,2                 ## @FIXED_COMM
L_.str.5:                               ## @.str.5
	.asciz	"Recovery failed.\n"

L_.str.6:                               ## @.str.6
	.asciz	"checksum failure\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_dst_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dst_command
_dst_command:                           ; @dst_command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	add	x19, x0, #16
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	bl	_dst_comm_init
	tbnz	x0, #63, LBB0_4
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_write_dst
	cbz	x0, LBB0_6
; %bb.2:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_dprintk
	mov	x0, x20
	bl	_dst_error_recovery
	tbz	x0, #63, LBB0_14
; %bb.3:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_4:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
LBB0_5:
	bl	_dprintk
	b	LBB0_14
LBB0_6:
	mov	x0, x20
	bl	_dst_pio_disable
	tbnz	x0, #63, LBB0_12
; %bb.7:
	ldr	w8, [x20]
Lloh6:
	adrp	x23, _DST_TYPE_HAS_FW_1@GOTPAGE
Lloh7:
	ldr	x23, [x23, _DST_TYPE_HAS_FW_1@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	mov	w0, #3
	bl	_mdelay
LBB0_9:
Lloh8:
	adrp	x8, _GET_ACK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GET_ACK@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x20
	bl	_read_dst
	cbz	x0, LBB0_16
; %bb.10:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	bl	_dprintk
	mov	x0, x20
	bl	_dst_error_recovery
	tbz	x0, #63, LBB0_14
; %bb.11:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_22
LBB0_12:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_13:
	bl	_pr_err
LBB0_14:
	mov	x0, x19
	bl	_mutex_unlock
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_16:
	ldr	x8, [sp, #8]
Lloh20:
	adrp	x9, _ACK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ACK@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.17:
	cmp	x22, #2
	b.lt	LBB0_19
; %bb.18:
	ldr	x8, [x21]
	cbz	x8, LBB0_30
LBB0_19:
	ldr	w8, [x20]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_23
; %bb.20:
	mov	w0, #3
	bl	_mdelay
	b	LBB0_24
LBB0_21:
	str	x8, [sp]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_22:
	mov	w0, #2
	b	LBB0_5
LBB0_23:
	mov	w0, #2000
	bl	_udelay
LBB0_24:
Lloh25:
	adrp	x8, _NO_DELAY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _NO_DELAY@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_dst_wait_dst_ready
	cbz	w0, LBB0_14
; %bb.25:
	ldr	x1, [x20, #8]
Lloh28:
	adrp	x8, _FIXED_COMM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _FIXED_COMM@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_read_dst
	cbz	x0, LBB0_28
; %bb.26:
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	bl	_dprintk
	mov	x0, x20
	bl	_dst_error_recovery
	tbz	x0, #63, LBB0_14
; %bb.27:
Lloh33:
	adrp	x1, l_.str.5@PAGE
Lloh34:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_22
LBB0_28:
	ldr	x0, [x20, #8]
	ldr	x20, [x0, #56]
	mov	w1, #7
	bl	_dst_check_sum
	cmp	x20, x0
	b.ne	LBB0_31
; %bb.29:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_15
LBB0_30:
	ldr	x8, [x21, #8]
	orr	x8, x8, #0x2
	cmp	x8, #3
	b.eq	LBB0_14
	b	LBB0_19
LBB0_31:
Lloh35:
	adrp	x1, l_.str.6@PAGE
Lloh36:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_22
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DST Communication Initialization Failed.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Trying to recover..\n"

l_.str.2:                               ; @.str.2
	.asciz	"Recovery Failed.\n"

l_.str.3:                               ; @.str.3
	.asciz	"PIO Disable Failed.\n"

	.comm	_DST_TYPE_HAS_FW_1,4,2          ; @DST_TYPE_HAS_FW_1
	.comm	_GET_ACK,4,2                    ; @GET_ACK
	.comm	_ACK,8,3                        ; @ACK
l_.str.4:                               ; @.str.4
	.asciz	"write not acknowledged 0x%02x\n"

	.comm	_NO_DELAY,4,2                   ; @NO_DELAY
	.comm	_FIXED_COMM,4,2                 ; @FIXED_COMM
l_.str.5:                               ; @.str.5
	.asciz	"Recovery failed.\n"

l_.str.6:                               ; @.str.6
	.asciz	"checksum failure\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_dst_command
.subsections_via_symbols
