	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function wavefront_get_program_status
LCPI0_0:
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_wavefront_get_program_status:          ## @wavefront_get_program_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, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_WF_PROGRAM_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_WF_MAX_PROGRAM@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_16
## %bb.1:
	xorl	%r13d, %r13d
	movq	_WF_SLOT_USED@GOTPCREL(%rip), %r12
	movq	_WF_NUM_LAYERS@GOTPCREL(%rip), %r15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_snd_printk
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rax
	movl	$0, (%rax,%r13,4)
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	movq	_WF_MAX_PROGRAM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r13
	jge	LBB0_12
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movb	%r13b, -49(%rbp)
	movq	_WFC_UPLOAD_PROGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	leaq	-49(%rbp), %rcx
	callq	_snd_wavefront_cmd
	cmpl	$1, %eax
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testl	%eax, %eax
	jne	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %eax
	movq	(%rbx), %rcx
	orl	%eax, (%rcx,%r13,4)
	movq	_WF_PROGRAM_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	leaq	-64(%rbp), %rsi
	callq	_demunge_buf
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rax
	addq	$8, %rax
	xorl	%edx, %edx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=2
	incq	%rdx
	movslq	%ecx, %rsi
	addq	$16, %rax
	cmpq	%rsi, %rdx
	jge	LBB0_4
LBB0_10:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	(%r12), %ecx
	movq	8(%rbx), %rsi
	movq	-8(%rax), %rdi
	orl	%ecx, (%rsi,%rdi,4)
	movl	(%r15), %ecx
	jmp	LBB0_9
LBB0_12:
	movl	%eax, %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.13:
	movq	(%rbx), %rcx
	cmpl	$8, %eax
	jae	LBB0_17
## %bb.14:
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_23
LBB0_16:
	xorl	%esi, %esi
	jmp	LBB0_24
LBB0_17:
	movl	%eax, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rsi
	movq	%rsi, %rbx
	shrq	$3, %rbx
	incq	%rbx
	testq	%rsi, %rsi
	je	LBB0_26
## %bb.18:
	movq	%rbx, %rsi
	andq	$-2, %rsi
	pxor	%xmm2, %xmm2
	xorl	%edi, %edi
	movdqa	LCPI0_0(%rip), %xmm3            ## xmm3 = [2,2,2,2]
	pxor	%xmm5, %xmm5
	pxor	%xmm4, %xmm4
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rdi,4), %xmm6
	movdqu	16(%rcx,%rdi,4), %xmm7
	movdqu	32(%rcx,%rdi,4), %xmm0
	movdqu	48(%rcx,%rdi,4), %xmm1
	pcmpeqd	%xmm2, %xmm6
	paddd	%xmm5, %xmm6
	pcmpeqd	%xmm2, %xmm7
	paddd	%xmm4, %xmm7
	pcmpeqd	%xmm2, %xmm0
	pcmpeqd	%xmm2, %xmm1
	paddd	%xmm3, %xmm0
	paddd	%xmm6, %xmm0
	paddd	%xmm3, %xmm1
	paddd	%xmm7, %xmm1
	addq	$16, %rdi
	movdqa	%xmm0, %xmm5
	movdqa	%xmm1, %xmm4
	addq	$-2, %rsi
	jne	LBB0_19
## %bb.20:
	testb	$1, %bl
	je	LBB0_22
LBB0_21:
	movdqu	(%rcx,%rdi,4), %xmm2
	movdqu	16(%rcx,%rdi,4), %xmm3
	pxor	%xmm4, %xmm4
	pcmpeqd	%xmm4, %xmm2
	paddd	%xmm2, %xmm0
	pcmpeqd	%xmm4, %xmm3
	paddd	%xmm3, %xmm1
	pcmpeqd	%xmm2, %xmm2
	psubd	%xmm2, %xmm0
	psubd	%xmm2, %xmm1
LBB0_22:
	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, %esi
	cmpq	%rax, %rdx
	je	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$1, (%rcx,%rdx,4)
	sbbl	$-1, %esi
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_23
LBB0_24:
	leaq	L_.str.1(%rip), %rdi
	callq	_snd_printk
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.25:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	testb	$1, %bl
	jne	LBB0_21
	jmp	LBB0_22
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WF_PROGRAM_BYTES,4,2           ## @WF_PROGRAM_BYTES
	.comm	_WF_MAX_PROGRAM,4,2             ## @WF_MAX_PROGRAM
	.comm	_WFC_UPLOAD_PROGRAM,4,2         ## @WFC_UPLOAD_PROGRAM
	.comm	_WF_SLOT_USED,4,2               ## @WF_SLOT_USED
	.comm	_WF_NUM_LAYERS,4,2              ## @WF_NUM_LAYERS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"upload program error 0x%x\n"

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

	.no_dead_strip	_wavefront_get_program_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_program_status
_wavefront_get_program_status:          ; @wavefront_get_program_status
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	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, #-88]
Lloh3:
	adrp	x22, _WF_PROGRAM_BYTES@GOTPAGE
Lloh4:
	ldr	x22, [x22, _WF_PROGRAM_BYTES@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	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
Lloh7:
	adrp	x23, _WF_MAX_PROGRAM@GOTPAGE
Lloh8:
	ldr	x23, [x23, _WF_MAX_PROGRAM@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x24, #0
Lloh9:
	adrp	x25, _WFC_UPLOAD_PROGRAM@GOTPAGE
Lloh10:
	ldr	x25, [x25, _WFC_UPLOAD_PROGRAM@GOTPAGEOFF]
Lloh11:
	adrp	x26, _WF_SLOT_USED@GOTPAGE
Lloh12:
	ldr	x26, [x26, _WF_SLOT_USED@GOTPAGEOFF]
Lloh13:
	adrp	x27, _WF_NUM_LAYERS@GOTPAGE
Lloh14:
	ldr	x27, [x27, _WF_NUM_LAYERS@GOTPAGEOFF]
Lloh15:
	adrp	x21, l_.str@PAGE
Lloh16:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_snd_printk
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	str	wzr, [x8, x24, lsl #2]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.ge	LBB0_12
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	sturb	w24, [x29, #-97]
	ldr	w1, [x25]
	sub	x3, x29, #97
	mov	x0, x19
	mov	x2, x20
	bl	_snd_wavefront_cmd
	cmp	w0, #1
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x0
	cbnz	w0, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x26]
	ldr	x9, [x19]
	lsl	x10, x24, #2
	ldr	w11, [x9, x10]
	orr	w8, w11, w8
	str	w8, [x9, x10]
	ldr	w2, [x22]
	sub	x1, x29, #96
	mov	x0, x20
	bl	_demunge_buf
	ldr	w10, [x27]
	cmp	w10, #1
	b.lt	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, #0
	ldur	x9, [x29, #-96]
	add	x9, x9, #8
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	x8, x8, #1
	add	x9, x9, #16
	cmp	x8, w10, sxtw
	b.ge	LBB0_4
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x11, [x9]
	cbz	x11, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w10, [x26]
	ldr	x11, [x19, #8]
	ldur	x12, [x9, #-8]
	lsl	x12, x12, #2
	ldr	w13, [x11, x12]
	orr	w10, w13, w10
	str	w10, [x11, x12]
	ldr	w10, [x27]
	b	LBB0_9
LBB0_12:
	and	x8, x8, #0xffffffff
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.13:
	ldr	x9, [x19]
	cmp	w8, #16
	b.hs	LBB0_16
; %bb.14:
	mov	x10, #0
	mov	w1, #0
	b	LBB0_19
LBB0_15:
	mov	w1, #0
	b	LBB0_21
LBB0_16:
	and	x10, x8, #0xfffffff0
	add	x11, x9, #32
	movi.2d	v0, #0000000000000000
	mov	x12, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	cmtst.4s	v4, v4, v4
	cmtst.4s	v5, v5, v5
	cmtst.4s	v6, v6, v6
	cmtst.4s	v7, v7, v7
	sub.4s	v0, v0, v4
	sub.4s	v1, v1, v5
	sub.4s	v2, v2, v6
	sub.4s	v3, v3, v7
	subs	x12, x12, #16
	b.ne	LBB0_17
; %bb.18:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w1, s0
	cmp	x10, x8
	b.eq	LBB0_21
LBB0_19:
	add	x9, x9, x10, lsl #2
	sub	x8, x8, x10
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9], #4
	cmp	w10, #0
	cinc	w1, w1, ne
	subs	x8, x8, #1
	b.ne	LBB0_20
LBB0_21:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_snd_printk
	ldur	x8, [x29, #-88]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
	mov	w0, #0
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_WF_PROGRAM_BYTES,4,2           ; @WF_PROGRAM_BYTES
	.comm	_WF_MAX_PROGRAM,4,2             ; @WF_MAX_PROGRAM
	.comm	_WFC_UPLOAD_PROGRAM,4,2         ; @WFC_UPLOAD_PROGRAM
	.comm	_WF_SLOT_USED,4,2               ; @WF_SLOT_USED
	.comm	_WF_NUM_LAYERS,4,2              ; @WF_NUM_LAYERS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"upload program error 0x%x\n"

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

	.no_dead_strip	_wavefront_get_program_status
.subsections_via_symbols
