	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wavefront_fx_memset
_wavefront_fx_memset:                   ## @wavefront_fx_memset
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$8, %esi
	jb	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	movl	%edx, %r15d
	cmpl	$128, %edx
	jb	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_snd_printk
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_15:
	subl	(%rax), %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r8, %r12
	movl	%esi, %r13d
	movq	%rdi, %rbx
	cmpl	$1, %ecx
	jne	LBB0_7
## %bb.6:
	movq	_FX_LSB_TRANSFER@GOTPCREL(%rip), %rax
	movzwl	(%rax), %edi
	movl	16(%rbx), %esi
	callq	_outb
	movl	12(%rbx), %esi
	movzwl	%r13w, %edi
	callq	_outb
	movl	8(%rbx), %esi
	movzwl	%r15w, %edi
	callq	_outb
	movzbl	1(%r12), %edi
	movl	4(%rbx), %esi
	callq	_outb
	movzbl	(%r12), %edi
	movl	(%rbx), %esi
	callq	_outb
	movzwl	(%r12), %ecx
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r13d, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_snd_printk
	jmp	LBB0_16
LBB0_7:
	movq	_FX_AUTO_INCR@GOTPCREL(%rip), %rax
	movq	_FX_LSB_TRANSFER@GOTPCREL(%rip), %rdx
	movzwl	(%rdx), %edx
	orw	(%rax), %dx
	movl	16(%rbx), %esi
	movzwl	%dx, %edi
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_outb
	movl	12(%rbx), %esi
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movzwl	%r13w, %edi
	callq	_outb
	movl	8(%rbx), %esi
	movzwl	%r15w, %edi
	callq	_outb
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	xorl	%r14d, %r14d
	movl	$0, %r13d
	testl	%r8d, %r8d
	jle	LBB0_13
## %bb.8:
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	%r8d, %r15d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	1(%r12,%r13,2), %edi
	movl	4(%rbx), %esi
	callq	_outb
	movzbl	(%r12,%r13,2), %edi
	movl	(%rbx), %esi
	callq	_outb
	movq	%rbx, %rdi
	callq	_wavefront_fx_idle
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	cmpq	%r13, %r15
	jne	LBB0_9
## %bb.11:
	xorl	%r14d, %r14d
	jmp	LBB0_16
LBB0_12:
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
LBB0_13:
	cmpl	%r8d, %r13d
	je	LBB0_16
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
	xorl	%r14d, %r14d
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%r15d, %edx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_snd_printk
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FX memset: page must be >= 0 and <= 7\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"FX memset: addr must be >= 0 and <= 7f\n"

	.comm	_FX_LSB_TRANSFER,2,1            ## @FX_LSB_TRANSFER
L_.str.2:                               ## @.str.2
	.asciz	"FX: addr %d:%x set to 0x%x\n"

	.comm	_FX_AUTO_INCR,2,1               ## @FX_AUTO_INCR
L_.str.3:                               ## @.str.3
	.asciz	"FX memset (0x%x, 0x%x, 0x%lx, %d) incomplete\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wavefront_fx_memset
_wavefront_fx_memset:                   ; @wavefront_fx_memset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	cmp	w1, #8
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x20, x2
	cmp	w2, #128
	b.lo	LBB0_7
; %bb.3:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_snd_printk
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	add	sp, sp, #112
	ret
LBB0_7:
	mov	x21, x4
	mov	x23, x3
	mov	x19, x1
	mov	x22, x0
	cmp	w3, #1
	b.ne	LBB0_9
; %bb.8:
Lloh6:
	adrp	x8, _FX_LSB_TRANSFER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FX_LSB_TRANSFER@GOTPAGEOFF]
	ldrh	w0, [x8]
	ldr	w1, [x22, #16]
	bl	_outb
	ldr	w1, [x22, #12]
	and	w0, w19, #0xffff
	bl	_outb
	ldr	w1, [x22, #8]
	and	w0, w20, #0xffff
	bl	_outb
	ldrb	w0, [x21, #1]
	ldr	w1, [x22, #4]
	bl	_outb
	ldrb	w0, [x21]
	ldr	w1, [x22]
	bl	_outb
	ldrh	w8, [x21]
	stp	x20, x8, [sp, #8]
	str	x19, [sp]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_snd_printk
	mov	w0, #0
	b	LBB0_6
LBB0_9:
Lloh10:
	adrp	x8, _FX_AUTO_INCR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FX_AUTO_INCR@GOTPAGEOFF]
	ldrh	w8, [x8]
Lloh12:
	adrp	x9, _FX_LSB_TRANSFER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _FX_LSB_TRANSFER@GOTPAGEOFF]
	ldrh	w9, [x9]
	orr	w0, w9, w8
	ldr	w1, [x22, #16]
	bl	_outb
	ldr	w1, [x22, #12]
	and	w0, w19, #0xffff
	bl	_outb
	ldr	w1, [x22, #8]
	and	w0, w20, #0xffff
	bl	_outb
	cmp	w23, #1
	b.lt	LBB0_13
; %bb.10:
	mov	x24, #0
	mov	w25, w23
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x26, x21, x24, lsl #1
	ldrb	w0, [x26, #1]
	ldr	w1, [x22, #4]
	bl	_outb
	ldrb	w0, [x26]
	ldr	w1, [x22]
	bl	_outb
	mov	x0, x22
	bl	_wavefront_fx_idle
	cbz	w0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x24, x24, #1
	cmp	x25, x24
	b.ne	LBB0_11
	b	LBB0_15
LBB0_13:
	mov	w24, #0
LBB0_14:
	cmp	w24, w23
	b.ne	LBB0_16
LBB0_15:
	mov	w0, #0
	b	LBB0_6
LBB0_16:
	stp	x21, x23, [sp, #16]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	stp	x19, x20, [sp]
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_snd_printk
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FX memset: page must be >= 0 and <= 7\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"FX memset: addr must be >= 0 and <= 7f\n"

	.comm	_FX_LSB_TRANSFER,2,1            ; @FX_LSB_TRANSFER
l_.str.2:                               ; @.str.2
	.asciz	"FX: addr %d:%x set to 0x%x\n"

	.comm	_FX_AUTO_INCR,2,1               ; @FX_AUTO_INCR
l_.str.3:                               ; @.str.3
	.asciz	"FX memset (0x%x, 0x%x, 0x%lx, %d) incomplete\n"

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