	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wavefront_get_patch_status
_wavefront_get_patch_status:            ## @wavefront_get_patch_status
	.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
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_WF_PATCH_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	_WF_MAX_PATCH@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	$0, (%rax)
	movl	$0, %esi
	movl	$0, %edx
	jle	LBB0_13
## %bb.1:
	xorl	%ebx, %ebx
	movq	_WFC_UPLOAD_PATCH@GOTPCREL(%rip), %r14
	leaq	-50(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	movl	$0, (%rax,%rbx,4)
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	_WF_MAX_PATCH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	andb	$127, %al
	movb	%al, -50(%rbp)
	movq	%rbx, %rax
	shrq	$7, %rax
	movb	%al, -49(%rbp)
	movl	(%r14), %esi
	movq	%r15, %rdi
	movq	%r13, %rdx
	movq	%r12, %rcx
	callq	_snd_wavefront_cmd
	cmpl	$3, %eax
	je	LBB0_17
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	jne	LBB0_16
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_WF_SLOT_FILLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	orl	%eax, (%rcx,%rbx,4)
	movq	_WF_SLOT_USED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r15), %rcx
	movl	4(%r13), %edx
	shll	$7, %edx
	orl	(%r13), %edx
	movslq	%edx, %rdx
	orl	%eax, (%rcx,%rdx,4)
	jmp	LBB0_18
LBB0_5:
	movl	%eax, %r10d
	testl	%r10d, %r10d
	jle	LBB0_6
## %bb.7:
	movq	(%r15), %rcx
	movq	_WF_SLOT_FILLED@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_WF_SLOT_USED@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	cmpl	$8, %r10d
	movl	$0, %r14d
	jae	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_12
LBB0_16:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_snd_printk
	movq	(%r15), %rax
	movl	$0, (%rax,%rbx,4)
	movl	$1, %r14d
	jmp	LBB0_14
LBB0_6:
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_9:
	movl	%r10d, %eax
	andl	$-8, %eax
	movd	%r9d, %xmm0
	pshufd	$0, %xmm0, %xmm8                ## xmm8 = xmm0[0,0,0,0]
	movd	%r8d, %xmm0
	pshufd	$0, %xmm0, %xmm9                ## xmm9 = xmm0[0,0,0,0]
	leaq	(,%r10,4), %rdx
	andq	$-32, %rdx
	pxor	%xmm10, %xmm10
	xorl	%esi, %esi
	pcmpeqd	%xmm11, %xmm11
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	pxor	%xmm7, %xmm7
	pxor	%xmm5, %xmm5
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rsi), %xmm2
	movdqu	16(%rcx,%rsi), %xmm3
	movdqa	%xmm8, %xmm4
	pand	%xmm2, %xmm4
	movdqa	%xmm8, %xmm6
	pand	%xmm3, %xmm6
	pcmpeqd	%xmm10, %xmm4
	paddd	%xmm4, %xmm7
	pcmpeqd	%xmm10, %xmm6
	paddd	%xmm6, %xmm5
	psubd	%xmm11, %xmm7
	psubd	%xmm11, %xmm5
	pand	%xmm9, %xmm2
	pand	%xmm9, %xmm3
	pcmpeqd	%xmm10, %xmm2
	paddd	%xmm2, %xmm1
	pcmpeqd	%xmm10, %xmm3
	paddd	%xmm3, %xmm0
	psubd	%xmm11, %xmm1
	psubd	%xmm11, %xmm0
	addq	$32, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_10
## %bb.11:
	paddd	%xmm7, %xmm5
	pshufd	$238, %xmm5, %xmm2              ## xmm2 = xmm5[2,3,2,3]
	paddd	%xmm5, %xmm2
	pshufd	$85, %xmm2, %xmm3               ## xmm3 = xmm2[1,1,1,1]
	paddd	%xmm2, %xmm3
	movd	%xmm3, %esi
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpq	%r10, %rax
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rax,4), %edi
	movl	%r9d, %ebx
	andl	%edi, %ebx
	cmpl	$1, %ebx
	sbbl	$-1, %esi
	andl	%r8d, %edi
	cmpl	$1, %edi
	sbbl	$-1, %edx
	incq	%rax
	cmpq	%rax, %r10
	jne	LBB0_12
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_snd_printk
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.19:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WF_PATCH_BYTES,4,2             ## @WF_PATCH_BYTES
	.comm	_WF_MAX_PATCH,4,2               ## @WF_MAX_PATCH
	.comm	_WFC_UPLOAD_PATCH,4,2           ## @WFC_UPLOAD_PATCH
	.comm	_WF_SLOT_FILLED,4,2             ## @WF_SLOT_FILLED
	.comm	_WF_SLOT_USED,4,2               ## @WF_SLOT_USED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"upload patch error 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"%d patch slots filled, %d in use\n"

	.no_dead_strip	_wavefront_get_patch_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wavefront_get_patch_status
_wavefront_get_patch_status:            ; @wavefront_get_patch_status
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _WF_PATCH_BYTES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WF_PATCH_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh8:
	adrp	x22, _WF_MAX_PATCH@GOTPAGE
Lloh9:
	ldr	x22, [x22, _WF_MAX_PATCH@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x21, #0
Lloh10:
	adrp	x25, _WFC_UPLOAD_PATCH@GOTPAGE
Lloh11:
	ldr	x25, [x25, _WFC_UPLOAD_PATCH@GOTPAGEOFF]
Lloh12:
	adrp	x23, _WF_SLOT_FILLED@GOTPAGE
Lloh13:
	ldr	x23, [x23, _WF_SLOT_FILLED@GOTPAGEOFF]
Lloh14:
	adrp	x24, _WF_SLOT_USED@GOTPAGE
Lloh15:
	ldr	x24, [x24, _WF_SLOT_USED@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19]
	str	wzr, [x8, x21, lsl #2]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x22]
	cmp	x21, x8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	and	w8, w21, #0x7f
	sturb	w8, [x29, #-74]
	lsr	x8, x21, #7
	sturb	w8, [x29, #-73]
	ldr	w1, [x25]
	sub	x3, x29, #74
	mov	x0, x19
	mov	x2, x20
	bl	_snd_wavefront_cmd
	cmp	w0, #3
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x0
	cbnz	w0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x23]
	lsl	x9, x21, #2
	ldp	x10, x11, [x19]
	ldr	w12, [x10, x9]
	orr	w8, w12, w8
	str	w8, [x10, x9]
	ldr	w8, [x24]
	ldp	w9, w10, [x20]
	orr	w9, w9, w10, lsl #7
	sbfiz	x9, x9, #2, #32
	ldr	w10, [x11, x9]
	orr	w8, w10, w8
	str	w8, [x11, x9]
	b	LBB0_3
LBB0_7:
	and	x10, x8, #0xffffffff
	cmp	w10, #1
	b.lt	LBB0_10
; %bb.8:
	ldr	x11, [x19]
	ldr	w8, [x23]
	ldr	w9, [x24]
	cmp	w10, #16
	b.hs	LBB0_12
; %bb.9:
	mov	x12, #0
	mov	w13, #0
	mov	w1, #0
	b	LBB0_15
LBB0_10:
	mov	w1, #0
	mov	w13, #0
	b	LBB0_17
LBB0_11:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printk
	ldr	x8, [x19]
	str	wzr, [x8, x21, lsl #2]
	mov	w0, #1
	b	LBB0_18
LBB0_12:
	dup.4s	v1, w8
	dup.4s	v5, w9
	movi.2d	v0, #0000000000000000
	and	x12, x10, #0xfffffff0
	movi.2d	v2, #0000000000000000
	add	x13, x11, #32
	mov	x14, x12
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
	movi.2d	v6, #0000000000000000
	movi.2d	v7, #0000000000000000
	movi.2d	v16, #0000000000000000
	movi.2d	v17, #0000000000000000
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldp	q18, q19, [x13, #-32]
	cmtst.4s	v20, v1, v18
	cmtst.4s	v21, v1, v19
	ldp	q22, q23, [x13], #64
	cmtst.4s	v24, v1, v22
	cmtst.4s	v25, v1, v23
	sub.4s	v6, v6, v20
	sub.4s	v7, v7, v21
	sub.4s	v16, v16, v24
	sub.4s	v17, v17, v25
	cmtst.4s	v18, v5, v18
	cmtst.4s	v19, v5, v19
	cmtst.4s	v20, v5, v22
	cmtst.4s	v21, v5, v23
	sub.4s	v0, v0, v18
	sub.4s	v2, v2, v19
	sub.4s	v3, v3, v20
	sub.4s	v4, v4, v21
	subs	x14, x14, #16
	b.ne	LBB0_13
; %bb.14:
	add.4s	v1, v7, v6
	add.4s	v1, v16, v1
	add.4s	v1, v17, v1
	addv.4s	s1, v1
	fmov	w1, s1
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	add.4s	v0, v4, v0
	addv.4s	s0, v0
	fmov	w13, s0
	cmp	x12, x10
	b.eq	LBB0_17
LBB0_15:
	add	x11, x11, x12, lsl #2
	sub	x10, x10, x12
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11], #4
	tst	w8, w12
	cinc	w1, w1, ne
	tst	w9, w12
	cinc	w13, w13, ne
	subs	x10, x10, #1
	b.ne	LBB0_16
LBB0_17:
	str	x13, [sp, #-16]!
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_snd_printk
	add	sp, sp, #16
	mov	w0, #0
LBB0_18:
	ldur	x8, [x29, #-72]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_WF_PATCH_BYTES,4,2             ; @WF_PATCH_BYTES
	.comm	_WF_MAX_PATCH,4,2               ; @WF_MAX_PATCH
	.comm	_WFC_UPLOAD_PATCH,4,2           ; @WFC_UPLOAD_PATCH
	.comm	_WF_SLOT_FILLED,4,2             ; @WF_SLOT_FILLED
	.comm	_WF_SLOT_USED,4,2               ; @WF_SLOT_USED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"upload patch error 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"%d patch slots filled, %d in use\n"

	.no_dead_strip	_wavefront_get_patch_status
.subsections_via_symbols
