	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_sm4_read_src_param
_shader_sm4_read_src_param:             ## @shader_sm4_read_src_param
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rax
	cmpq	%rdx, %rax
	jae	LBB0_6
## %bb.1:
	movq	%r8, %r14
	movl	(%rax), %r15d
	leaq	8(%r8), %rbx
	leaq	16(%r8), %r9
	movq	%rbx, %r8
	callq	_shader_sm4_read_param
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	movq	(%rbx), %rax
	movq	_WINED3DSPR_IMMCONST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_3:
	movq	_WINED3DSP_NOSWIZZLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	movl	%eax, (%r14)
LBB0_5:
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_WARN
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
LBB0_8:
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_WINED3D_SM4_SWIZZLE_TYPE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	%r15d, %esi
	movq	_WINED3D_SM4_SWIZZLE_TYPE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %esi
	cmpl	$128, %esi
	je	LBB0_14
## %bb.11:
	cmpl	$129, %esi
	je	LBB0_15
## %bb.12:
	cmpl	$130, %esi
	je	LBB0_3
## %bb.13:
	leaq	L_.str.2(%rip), %rdi
	callq	_FIXME
	jmp	LBB0_5
LBB0_14:
	movq	_WINED3D_SM4_SWIZZLE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	_WINED3D_SM4_SWIZZLE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r15d
	movl	%r15d, (%r14)
	jmp	LBB0_5
LBB0_15:
	movq	_WINED3D_SM4_SWIZZLE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	_WINED3D_SM4_SWIZZLE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r15d
	andl	$3, %r15d
	imull	$85, %r15d, %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid ptr %p >= end %p.\n"

	.comm	_FALSE,4,2                      ## @FALSE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to read parameter.\n"

	.comm	_WINED3DSPR_IMMCONST,8,3        ## @WINED3DSPR_IMMCONST
	.comm	_WINED3DSP_NOSWIZZLE,8,3        ## @WINED3DSP_NOSWIZZLE
	.comm	_WINED3D_SM4_SWIZZLE_TYPE_MASK,4,2 ## @WINED3D_SM4_SWIZZLE_TYPE_MASK
	.comm	_WINED3D_SM4_SWIZZLE_TYPE_SHIFT,4,2 ## @WINED3D_SM4_SWIZZLE_TYPE_SHIFT
	.comm	_WINED3D_SM4_SWIZZLE_MASK,4,2   ## @WINED3D_SM4_SWIZZLE_MASK
	.comm	_WINED3D_SM4_SWIZZLE_SHIFT,4,2  ## @WINED3D_SM4_SWIZZLE_SHIFT
L_.str.2:                               ## @.str.2
	.asciz	"Unhandled swizzle type %#x.\n"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_shader_sm4_read_src_param
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_sm4_read_src_param
_shader_sm4_read_src_param:             ; @shader_sm4_read_src_param
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x1]
	cmp	x8, x2
	b.hs	LBB0_4
; %bb.1:
	mov	x19, x4
	ldr	w21, [x8]
	add	x20, x4, #8
	add	x5, x4, #16
	mov	x4, x20
	bl	_shader_sm4_read_param
	cbz	w0, LBB0_5
; %bb.2:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _WINED3DSPR_IMMCONST@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3DSPR_IMMCONST@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
LBB0_3:
Lloh3:
	adrp	x8, _WINED3DSP_NOSWIZZLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WINED3DSP_NOSWIZZLE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	w8, [x19]
	b	LBB0_14
LBB0_4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x8
	bl	_WARN
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
LBB0_6:
Lloh10:
	adrp	x8, _FALSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_15
LBB0_7:
Lloh12:
	adrp	x8, _WINED3D_SM4_SWIZZLE_TYPE_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WINED3D_SM4_SWIZZLE_TYPE_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh15:
	adrp	x9, _WINED3D_SM4_SWIZZLE_TYPE_SHIFT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _WINED3D_SM4_SWIZZLE_TYPE_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	asr	w1, w8, w9
	cmp	w1, #128
	b.eq	LBB0_11
; %bb.8:
	cmp	w1, #129
	b.eq	LBB0_12
; %bb.9:
	cmp	w1, #130
	b.eq	LBB0_3
; %bb.10:
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_FIXME
	b	LBB0_14
LBB0_11:
Lloh20:
	adrp	x8, _WINED3D_SM4_SWIZZLE_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WINED3D_SM4_SWIZZLE_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _WINED3D_SM4_SWIZZLE_SHIFT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _WINED3D_SM4_SWIZZLE_SHIFT@GOTPAGEOFF]
	and	w8, w8, w21
Lloh25:
	ldr	w9, [x9]
	asr	w8, w8, w9
	b	LBB0_13
LBB0_12:
Lloh26:
	adrp	x8, _WINED3D_SM4_SWIZZLE_MASK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WINED3D_SM4_SWIZZLE_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh29:
	adrp	x9, _WINED3D_SM4_SWIZZLE_SHIFT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _WINED3D_SM4_SWIZZLE_SHIFT@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	asr	w8, w8, w9
	and	w8, w8, #0x3
	mov	w9, #85
	mul	w8, w8, w9
LBB0_13:
	str	w8, [x19]
LBB0_14:
Lloh32:
	adrp	x8, _TRUE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid ptr %p >= end %p.\n"

	.comm	_FALSE,4,2                      ; @FALSE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to read parameter.\n"

	.comm	_WINED3DSPR_IMMCONST,8,3        ; @WINED3DSPR_IMMCONST
	.comm	_WINED3DSP_NOSWIZZLE,8,3        ; @WINED3DSP_NOSWIZZLE
	.comm	_WINED3D_SM4_SWIZZLE_TYPE_MASK,4,2 ; @WINED3D_SM4_SWIZZLE_TYPE_MASK
	.comm	_WINED3D_SM4_SWIZZLE_TYPE_SHIFT,4,2 ; @WINED3D_SM4_SWIZZLE_TYPE_SHIFT
	.comm	_WINED3D_SM4_SWIZZLE_MASK,4,2   ; @WINED3D_SM4_SWIZZLE_MASK
	.comm	_WINED3D_SM4_SWIZZLE_SHIFT,4,2  ; @WINED3D_SM4_SWIZZLE_SHIFT
l_.str.2:                               ; @.str.2
	.asciz	"Unhandled swizzle type %#x.\n"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_shader_sm4_read_src_param
.subsections_via_symbols
