	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function waveartist_cmd
_waveartist_cmd:                        ## @waveartist_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r12
	movl	(%rdi), %r14d
	movq	_debug_flg@GOTPCREL(%rip), %rcx
	movq	_DEBUG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	testl	%eax, (%rcx)
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	je	LBB0_5
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx,4), %esi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_printk
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_3
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
LBB0_5:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	_STATR@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	%r14, %rdi
	callq	_inb
	movq	_CMD_RF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.6:
	movq	_CMDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r14, %rdi
	callq	_inw
	movq	_DEBUG_CMD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_debug_flg@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printk
LBB0_8:
	movl	$10, %edi
	callq	_udelay
LBB0_9:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	movq	_CMD_WE@GOTPCREL(%rip), %r12
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	$-5000, %r13d                   ## imm = 0xEC78
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r15), %rdi
	addq	%r14, %rdi
	callq	_inb
	testl	%eax, (%r12)
	jne	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_15 Depth=2
	incl	%r13d
	jne	LBB0_15
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rax,%rbx,4), %edi
	movq	_CMDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r14, %rsi
	callq	_outw
	incq	%rbx
	cmpq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	jb	LBB0_11
LBB0_12:
	movb	$1, %bl
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	testl	%r13d, %r13d
	je	LBB0_13
## %bb.17:
	movl	%r13d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	_CMDR@GOTPCREL(%rip), %rbx
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	movl	$-5000, %r13d                   ## imm = 0xEC78
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r15), %rdi
	addq	%r14, %rdi
	callq	_inb
	movq	_CMD_RF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=2
	incl	%r13d
	jne	LBB0_19
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	callq	_inw
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r12,4)
	incq	%r12
	cmpq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	jb	LBB0_18
## %bb.23:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movb	$1, %bl
	jmp	LBB0_24
LBB0_27:
	movq	_DEBUG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	movq	_debug_flg@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_34
## %bb.28:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_33
LBB0_21:
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_24
LBB0_13:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_24:
	movq	_DEBUG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_debug_flg@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_34
## %bb.25:
	testb	%bl, %bl
	je	LBB0_26
## %bb.29:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	leaq	L_.str.2(%rip), %rdi
	testl	%r13d, %r13d
	je	LBB0_33
## %bb.30:
	movl	%ebx, %r15d
	movl	%r13d, %r13d
	leaq	L_.str.1(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx,4), %esi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printk
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_31
## %bb.32:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %ebx
	jmp	LBB0_33
LBB0_26:
	leaq	L_.str.5(%rip), %rdi
	xorl	%ebx, %ebx
LBB0_33:
	xorl	%eax, %eax
	callq	_printk
LBB0_34:
	xorb	$1, %bl
	movzbl	%bl, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug_flg,4,2                  ## @debug_flg
	.comm	_DEBUG_CMD,4,2                  ## @DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waveartist_cmd: cmd="

L_.str.1:                               ## @.str.1
	.asciz	"%04X "

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

	.comm	_STATR,8,3                      ## @STATR
	.comm	_CMD_RF,4,2                     ## @CMD_RF
	.comm	_CMDR,8,3                       ## @CMDR
L_.str.3:                               ## @.str.3
	.asciz	"flushed %04X..."

	.comm	_CMD_WE,4,2                     ## @CMD_WE
L_.str.4:                               ## @.str.4
	.asciz	"waveartist_cmd: resp="

L_.str.5:                               ## @.str.5
	.asciz	"waveartist_cmd: timed out\n"

	.no_dead_strip	_waveartist_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function waveartist_cmd
_waveartist_cmd:                        ; @waveartist_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x28, x3
	mov	x21, x2
	mov	x22, x1
	ldr	w26, [x0]
Lloh0:
	adrp	x25, _debug_flg@GOTPAGE
Lloh1:
	ldr	x25, [x25, _debug_flg@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh2:
	adrp	x9, _DEBUG_CMD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DEBUG_CMD@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	cbz	w22, LBB0_4
; %bb.2:
	mov	w20, w22
	mov	x24, x21
Lloh7:
	adrp	x23, l_.str.1@PAGE
Lloh8:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24], #4
	str	x8, [sp]
	mov	x0, x23
	bl	_printk
	subs	x20, x20, #1
	b.ne	LBB0_3
LBB0_4:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printk
LBB0_5:
Lloh11:
	adrp	x23, _STATR@GOTPAGE
Lloh12:
	ldr	x23, [x23, _STATR@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x0, x8, x26
	bl	_inb
Lloh13:
	adrp	x27, _CMD_RF@GOTPAGE
Lloh14:
	ldr	x27, [x27, _CMD_RF@GOTPAGEOFF]
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.6:
Lloh15:
	adrp	x8, _CMDR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CMDR@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	add	x0, x8, x26
	bl	_inw
	ldr	w8, [x25]
Lloh18:
	adrp	x9, _DEBUG_CMD@GOTPAGE
Lloh19:
	ldr	x9, [x9, _DEBUG_CMD@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	str	x0, [sp]
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printk
LBB0_8:
	mov	w0, #10
	bl	_udelay
LBB0_9:
	cbz	w22, LBB0_15
; %bb.10:
	mov	x20, #0
	mov	w22, w22
Lloh23:
	adrp	x24, _CMD_WE@GOTPAGE
Lloh24:
	ldr	x24, [x24, _CMD_WE@GOTPAGEOFF]
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	mov	w25, #-5000
LBB0_12:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x23]
	add	x0, x8, x26
	bl	_inb
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	adds	w25, w25, #1
	b.lo	LBB0_12
	b	LBB0_22
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x21, x20, lsl #2]
Lloh25:
	adrp	x8, _CMDR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CMDR@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	add	x1, x8, x26
	bl	_outw
	add	x20, x20, #1
	cmp	x20, x22
	b.lo	LBB0_11
LBB0_15:
	cbz	w28, LBB0_24
; %bb.16:
	mov	x20, #0
	mov	w21, w28
Lloh28:
	adrp	x24, _debug_flg@GOTPAGE
Lloh29:
	ldr	x24, [x24, _debug_flg@GOTPAGEOFF]
LBB0_17:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	mov	w22, #-5000
LBB0_18:                                ;   Parent Loop BB0_17 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x23]
	add	x0, x8, x26
	bl	_inb
	ldr	w8, [x27]
	tst	w8, w0
	b.ne	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	adds	w22, w22, #1
	b.lo	LBB0_18
	b	LBB0_23
LBB0_20:                                ;   in Loop: Header=BB0_17 Depth=1
Lloh30:
	adrp	x8, _CMDR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CMDR@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	add	x0, x8, x26
	bl	_inw
	str	w0, [x19, x20, lsl #2]
	add	x20, x20, #1
	cmp	x20, x21
	b.lo	LBB0_17
; %bb.21:
	mov	w22, #1
	b	LBB0_25
LBB0_22:
	mov	w22, #0
Lloh33:
	adrp	x8, _debug_flg@GOTPAGE
Lloh34:
	ldr	x8, [x8, _debug_flg@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _DEBUG_CMD@GOTPAGE
Lloh37:
	ldr	x9, [x9, _DEBUG_CMD@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_30
	b	LBB0_32
LBB0_23:
	mov	w22, #0
	b	LBB0_25
LBB0_24:
	mov	w22, #1
Lloh39:
	adrp	x24, _debug_flg@GOTPAGE
Lloh40:
	ldr	x24, [x24, _debug_flg@GOTPAGEOFF]
LBB0_25:
	ldr	w8, [x24]
Lloh41:
	adrp	x9, _DEBUG_CMD@GOTPAGE
Lloh42:
	ldr	x9, [x9, _DEBUG_CMD@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_32
; %bb.26:
	cbz	w22, LBB0_30
; %bb.27:
Lloh44:
	adrp	x0, l_.str.4@PAGE
Lloh45:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printk
	cbz	w28, LBB0_33
; %bb.28:
	mov	w23, w28
Lloh46:
	adrp	x21, l_.str.1@PAGE
Lloh47:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh48:
	adrp	x20, l_.str.2@PAGE
Lloh49:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19], #4
	str	x8, [sp]
	mov	x0, x21
	bl	_printk
	subs	x23, x23, #1
	b.ne	LBB0_29
	b	LBB0_31
LBB0_30:
Lloh50:
	adrp	x20, l_.str.5@PAGE
Lloh51:
	add	x20, x20, l_.str.5@PAGEOFF
LBB0_31:
	mov	x0, x20
	bl	_printk
LBB0_32:
	eor	w0, w22, #0x1
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_33:
Lloh52:
	adrp	x20, l_.str.2@PAGE
Lloh53:
	add	x20, x20, l_.str.2@PAGEOFF
	b	LBB0_31
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_debug_flg,4,2                  ; @debug_flg
	.comm	_DEBUG_CMD,4,2                  ; @DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waveartist_cmd: cmd="

l_.str.1:                               ; @.str.1
	.asciz	"%04X "

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

	.comm	_STATR,8,3                      ; @STATR
	.comm	_CMD_RF,4,2                     ; @CMD_RF
	.comm	_CMDR,8,3                       ; @CMDR
l_.str.3:                               ; @.str.3
	.asciz	"flushed %04X..."

	.comm	_CMD_WE,4,2                     ; @CMD_WE
l_.str.4:                               ; @.str.4
	.asciz	"waveartist_cmd: resp="

l_.str.5:                               ; @.str.5
	.asciz	"waveartist_cmd: timed out\n"

	.no_dead_strip	_waveartist_cmd
.subsections_via_symbols
