	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_samplers
_write_samplers:                        ## @write_samplers
	.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	%rsi, %r14
	movq	%rdi, %r13
	movq	_D3DSIO_DCL@GOTPCREL(%rip), %rax
	movq	_D3DSI_INSTLENGTH_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$2, %ebx
	shll	%cl, %ebx
	orl	(%rax), %ebx
	movq	_D3DSPR_SAMPLER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_d3dsp_register
                                        ## kill: def $eax killed $eax def $rax
	cmpq	$0, (%r13)
	je	LBB0_3
## %bb.1:
	movslq	%ebx, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	_D3DSP_WRITEMASK_ALL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	$2147483648, %ecx               ## imm = 0x80000000
	orq	%rcx, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_put_dword
	movq	8(%r13), %rax
	movl	12(%rax,%r12), %edi
	callq	_d3d9_sampler
	movq	_D3DSP_TEXTURETYPE_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	movl	$2147483648, %ecx               ## imm = 0x80000000
	orq	%rcx, %rax
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_put_dword
	movq	8(%r13), %rax
	movq	_D3DSP_REGNUM_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	andq	(%rax,%r12), %rbx
	orq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	movl	8(%rax,%r12), %edi
	callq	_d3d9_dstmod
	orq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_put_dword
	incq	%r15
	addq	$16, %r12
	cmpq	(%r13), %r15
	jb	LBB0_2
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DSIO_DCL,4,2                 ## @D3DSIO_DCL
	.comm	_D3DSI_INSTLENGTH_SHIFT,4,2     ## @D3DSI_INSTLENGTH_SHIFT
	.comm	_D3DSPR_SAMPLER,4,2             ## @D3DSPR_SAMPLER
	.comm	_D3DSP_WRITEMASK_ALL,4,2        ## @D3DSP_WRITEMASK_ALL
	.comm	_D3DSP_TEXTURETYPE_MASK,8,3     ## @D3DSP_TEXTURETYPE_MASK
	.comm	_D3DSP_REGNUM_MASK,8,3          ## @D3DSP_REGNUM_MASK
	.no_dead_strip	_write_samplers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_samplers
_write_samplers:                        ; @write_samplers
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _D3DSIO_DCL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D3DSIO_DCL@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _D3DSI_INSTLENGTH_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D3DSI_INSTLENGTH_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
Lloh6:
	adrp	x8, _D3DSPR_SAMPLER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D3DSPR_SAMPLER@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_d3dsp_register
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x22, #0
	mov	x23, #0
	mov	w8, #2
	lsl	w8, w8, w24
	orr	w8, w8, w21
	sxtw	x21, w8
Lloh9:
	adrp	x8, _D3DSP_WRITEMASK_ALL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _D3DSP_WRITEMASK_ALL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w8, w0, w8
	orr	x24, x8, #0x80000000
Lloh12:
	adrp	x25, _D3DSP_TEXTURETYPE_MASK@GOTPAGE
Lloh13:
	ldr	x25, [x25, _D3DSP_TEXTURETYPE_MASK@GOTPAGEOFF]
Lloh14:
	adrp	x26, _D3DSP_REGNUM_MASK@GOTPAGE
Lloh15:
	ldr	x26, [x26, _D3DSP_REGNUM_MASK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_put_dword
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	ldr	w0, [x8, #12]
	bl	_d3d9_sampler
	ldr	x8, [x25]
	and	x8, x8, x0
	orr	x1, x8, #0x80000000
	mov	x0, x19
	bl	_put_dword
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	ldr	x9, [x8]
	ldr	x10, [x26]
	and	x9, x10, x9
	orr	x27, x9, x24
	ldr	w0, [x8, #8]
	bl	_d3d9_dstmod
	orr	x1, x27, x0
	mov	x0, x19
	bl	_put_dword
	add	x23, x23, #1
	ldr	x8, [x20]
	add	x22, x22, #16
	cmp	x23, x8
	b.lo	LBB0_2
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DSIO_DCL,4,2                 ; @D3DSIO_DCL
	.comm	_D3DSI_INSTLENGTH_SHIFT,4,2     ; @D3DSI_INSTLENGTH_SHIFT
	.comm	_D3DSPR_SAMPLER,4,2             ; @D3DSPR_SAMPLER
	.comm	_D3DSP_WRITEMASK_ALL,4,2        ; @D3DSP_WRITEMASK_ALL
	.comm	_D3DSP_TEXTURETYPE_MASK,8,3     ; @D3DSP_TEXTURETYPE_MASK
	.comm	_D3DSP_REGNUM_MASK,8,3          ; @D3DSP_REGNUM_MASK
	.no_dead_strip	_write_samplers
.subsections_via_symbols
