	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_encoder_write_words
_pvr2_encoder_write_words:              ## @pvr2_encoder_write_words
	.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, -48(%rbp)                 ## 8-byte Spill
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.1:
	movq	%rdx, %r15
	movl	%esi, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	cmpl	$8, %ecx
	movl	$8, %r12d
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	cmovbl	%ecx, %r12d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_FX2CMD_MEM_WRITE_DWORD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r14), %rdi
	movl	%eax, (%rdi)
	movl	%ebx, %ebx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	leaq	-1(%r12), %r14
	movl	$7, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	(%rbx,%r12), %eax
	movzbl	%al, %ecx
	movl	%ecx, (%rdi,%r13,4)
	movzbl	%ah, %ecx
	movl	%ecx, -4(%rdi,%r13,4)
	shrl	$16, %eax
	movzbl	%al, %eax
	movl	%eax, -8(%rdi,%r13,4)
	movl	(%r15,%r12,4), %edx
	leal	-6(%r13), %esi
	callq	_PVR2_DECOMPOSE_LE
	cmpq	%r12, %r14
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	addq	$7, %r13
	incq	%r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rsi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	leal	(,%r14,8), %edx
	subl	%r14d, %edx
	incl	%edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_pvr2_send_request
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r15,%r14,4), %r15
	addl	%r14d, %ebx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	subl	%r14d, %ecx
	jne	LBB0_2
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FX2CMD_MEM_WRITE_DWORD,4,2     ## @FX2CMD_MEM_WRITE_DWORD
	.no_dead_strip	_pvr2_encoder_write_words
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function pvr2_encoder_write_words
lCPI0_0:
	.long	4294967280                      ; 0xfffffff0
	.long	4294967288                      ; 0xfffffff8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_pvr2_encoder_write_words:              ; @pvr2_encoder_write_words
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	cbz	w3, LBB0_7
; %bb.1:
	mov	x19, x3
	mov	x24, x2
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
	movi	d9, #0x0000ff000000ff
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	cmp	w19, #8
	mov	w8, #8
	csel	w25, w19, w8, lo
	ldr	x0, [x22]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh2:
	adrp	x8, _FX2CMD_MEM_WRITE_DWORD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FX2CMD_MEM_WRITE_DWORD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	sub	x26, x25, #1
	ldr	x0, [x22]
	str	w8, [x0]
	mov	w27, #20
	mov	w28, #7
	mov	x21, x23
	mov	x20, x24
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w8, w21, #0xff
	str	w8, [x0, x28, lsl #2]
	dup.2s	v0, w21
	ushl.2s	v0, v0, v8
	and.8b	v0, v0, v9
	str	d0, [x0, x27]
	ldr	w2, [x20]
	sub	w1, w28, #6
	bl	_PVR2_DECOMPOSE_LE
	cbz	x26, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	add	x20, x20, #4
	ldr	x0, [x22]
	add	w21, w21, #1
	sub	x26, x26, #1
	add	x28, x28, #7
	add	x27, x27, #28
	b	LBB0_3
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x1, [x22]
	lsl	w8, w25, #3
	sub	w8, w8, w25
	add	w2, w8, #1
	mov	x0, x22
	mov	x3, #0
	mov	w4, #0
	bl	_pvr2_send_request
	cbnz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, x25, lsl #2
	add	w23, w23, w25
	subs	w19, w19, w25
	b.ne	LBB0_2
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FX2CMD_MEM_WRITE_DWORD,4,2     ; @FX2CMD_MEM_WRITE_DWORD
	.no_dead_strip	_pvr2_encoder_write_words
.subsections_via_symbols
