	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_sm4_read_dcl_resource
_shader_sm4_read_dcl_resource:          ## @shader_sm4_read_dcl_resource
	.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	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	%rcx, -56(%rbp)
	movq	_WINED3D_SM4_RESOURCE_TYPE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	andq	%rdx, %r12
	movq	_WINED3D_SM4_RESOURCE_TYPE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %r12
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.1:
	movq	_resource_type_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	cmpl	%r12d, %eax
	jbe	LBB0_2
## %bb.3:
	movl	%r12d, %eax
	shlq	$3, %rax
	movq	_resource_type_table@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_FIXME
	movq	_WINED3D_SHADER_RESOURCE_NONE@GOTPCREL(%rip), %rax
LBB0_4:
	movq	(%rax), %rax
	movq	%rax, 24(%r15)
	movq	_WINED3D_SM4_OP_DCL_RESOURCE@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_5
## %bb.6:
	movq	_WINED3D_DATA_RESOURCE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_WINED3D_DATA_UAV@GOTPCREL(%rip), %rax
LBB0_7:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	(%rax), %r13d
	movl	%ecx, %eax
	leaq	(%rbx,%rax,8), %rdx
	leaq	16(%r15), %r8
	leaq	-56(%rbp), %rsi
	movl	%r13d, %ecx
	callq	_shader_sm4_read_dst_param
	movq	-56(%rbp), %rax
	leaq	8(%rax), %rcx
	movq	%rcx, -56(%rbp)
	movq	(%rax), %rsi
	movl	%esi, %eax
	andl	$65520, %eax                    ## imm = 0xFFF0
	movl	%esi, %ebx
	andl	$15, %ebx
	imulq	$4368, %rbx, %rcx               ## imm = 0x1110
	cmpq	%rcx, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_FIXME
LBB0_9:
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.10:
	movq	_data_type_table@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%ebx, %eax
	jbe	LBB0_11
## %bb.12:
	shlq	$3, %rbx
	addq	(%r12), %rbx
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	callq	_FIXME
	movq	_WINED3D_DATA_FLOAT@GOTPCREL(%rip), %rbx
LBB0_13:
	movq	(%rbx), %rax
	movq	%rax, 8(%r15)
	movq	_WINED3D_DATA_UAV@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_15
## %bb.14:
	movq	_WINED3D_SM5_UAV_FLAGS_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %r14
	movq	_WINED3D_SM5_UAV_FLAGS_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %r14
	movq	%r14, (%r15)
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_SM4_RESOURCE_TYPE_MASK,8,3 ## @WINED3D_SM4_RESOURCE_TYPE_MASK
	.comm	_WINED3D_SM4_RESOURCE_TYPE_SHIFT,8,3 ## @WINED3D_SM4_RESOURCE_TYPE_SHIFT
	.comm	_resource_type_table,8,3        ## @resource_type_table
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unhandled resource type %#x.\n"

	.comm	_WINED3D_SHADER_RESOURCE_NONE,8,3 ## @WINED3D_SHADER_RESOURCE_NONE
	.comm	_WINED3D_SM4_OP_DCL_RESOURCE,8,3 ## @WINED3D_SM4_OP_DCL_RESOURCE
	.comm	_WINED3D_DATA_RESOURCE,4,2      ## @WINED3D_DATA_RESOURCE
	.comm	_WINED3D_DATA_UAV,4,2           ## @WINED3D_DATA_UAV
L_.str.1:                               ## @.str.1
	.asciz	"Components (%#x) have different data types.\n"

	.comm	_data_type_table,8,3            ## @data_type_table
L_.str.2:                               ## @.str.2
	.asciz	"Unhandled data type %#x.\n"

	.comm	_WINED3D_DATA_FLOAT,8,3         ## @WINED3D_DATA_FLOAT
	.comm	_WINED3D_SM5_UAV_FLAGS_MASK,8,3 ## @WINED3D_SM5_UAV_FLAGS_MASK
	.comm	_WINED3D_SM5_UAV_FLAGS_SHIFT,8,3 ## @WINED3D_SM5_UAV_FLAGS_SHIFT
	.no_dead_strip	_shader_sm4_read_dcl_resource
.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_dcl_resource
_shader_sm4_read_dcl_resource:          ; @shader_sm4_read_dcl_resource
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	x3, [sp, #8]
Lloh0:
	adrp	x8, _WINED3D_SM4_RESOURCE_TYPE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_SM4_RESOURCE_TYPE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	and	x8, x8, x2
Lloh3:
	adrp	x9, _WINED3D_SM4_RESOURCE_TYPE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WINED3D_SM4_RESOURCE_TYPE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	asr	x25, x8, x9
	cbz	w25, LBB0_3
; %bb.1:
Lloh6:
	adrp	x26, _resource_type_table@GOTPAGE
Lloh7:
	ldr	x26, [x26, _resource_type_table@GOTPAGEOFF]
	ldr	x0, [x26]
	bl	_ARRAY_SIZE
	cmp	w0, w25
	b.ls	LBB0_3
; %bb.2:
	ldr	x8, [x26]
	add	x8, x8, w25, uxtw #3
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x25
	bl	_FIXME
Lloh10:
	adrp	x8, _WINED3D_SHADER_RESOURCE_NONE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WINED3D_SHADER_RESOURCE_NONE@GOTPAGEOFF]
LBB0_4:
	ldr	x8, [x8]
	str	x8, [x19, #24]
Lloh12:
	adrp	x8, _WINED3D_SM4_OP_DCL_RESOURCE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WINED3D_SM4_OP_DCL_RESOURCE@GOTPAGEOFF]
Lloh14:
	adrp	x9, _WINED3D_DATA_RESOURCE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WINED3D_DATA_RESOURCE@GOTPAGEOFF]
Lloh16:
	adrp	x25, _WINED3D_DATA_UAV@GOTPAGE
Lloh17:
	ldr	x25, [x25, _WINED3D_DATA_UAV@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x8, x21
	csel	x8, x9, x25, eq
	ldr	w21, [x8]
	add	x2, x24, w23, uxtw #3
	add	x4, x19, #16
	add	x1, sp, #8
	mov	x0, x22
	mov	x3, x21
	bl	_shader_sm4_read_dst_param
	ldr	x8, [sp, #8]
	ldr	x1, [x8], #8
	str	x8, [sp, #8]
	and	x8, x1, #0xfff0
	and	x22, x1, #0xf
	mov	w9, #4368
	mul	x9, x22, x9
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_FIXME
LBB0_6:
	cbz	w22, LBB0_9
; %bb.7:
Lloh21:
	adrp	x23, _data_type_table@GOTPAGE
Lloh22:
	ldr	x23, [x23, _data_type_table@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, w22
	b.ls	LBB0_9
; %bb.8:
	ldr	x8, [x23]
	add	x8, x8, x22, lsl #3
	b	LBB0_10
LBB0_9:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
	bl	_FIXME
Lloh25:
	adrp	x8, _WINED3D_DATA_FLOAT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _WINED3D_DATA_FLOAT@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	ldr	w8, [x25]
	cmp	w21, w8
	b.ne	LBB0_12
; %bb.11:
Lloh27:
	adrp	x8, _WINED3D_SM5_UAV_FLAGS_MASK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WINED3D_SM5_UAV_FLAGS_MASK@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	and	x8, x8, x20
Lloh30:
	adrp	x9, _WINED3D_SM5_UAV_FLAGS_SHIFT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _WINED3D_SM5_UAV_FLAGS_SHIFT@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	asr	x8, x8, x9
	str	x8, [x19]
LBB0_12:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_SM4_RESOURCE_TYPE_MASK,8,3 ; @WINED3D_SM4_RESOURCE_TYPE_MASK
	.comm	_WINED3D_SM4_RESOURCE_TYPE_SHIFT,8,3 ; @WINED3D_SM4_RESOURCE_TYPE_SHIFT
	.comm	_resource_type_table,8,3        ; @resource_type_table
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unhandled resource type %#x.\n"

	.comm	_WINED3D_SHADER_RESOURCE_NONE,8,3 ; @WINED3D_SHADER_RESOURCE_NONE
	.comm	_WINED3D_SM4_OP_DCL_RESOURCE,8,3 ; @WINED3D_SM4_OP_DCL_RESOURCE
	.comm	_WINED3D_DATA_RESOURCE,4,2      ; @WINED3D_DATA_RESOURCE
	.comm	_WINED3D_DATA_UAV,4,2           ; @WINED3D_DATA_UAV
l_.str.1:                               ; @.str.1
	.asciz	"Components (%#x) have different data types.\n"

	.comm	_data_type_table,8,3            ; @data_type_table
l_.str.2:                               ; @.str.2
	.asciz	"Unhandled data type %#x.\n"

	.comm	_WINED3D_DATA_FLOAT,8,3         ; @WINED3D_DATA_FLOAT
	.comm	_WINED3D_SM5_UAV_FLAGS_MASK,8,3 ; @WINED3D_SM5_UAV_FLAGS_MASK
	.comm	_WINED3D_SM5_UAV_FLAGS_SHIFT,8,3 ; @WINED3D_SM5_UAV_FLAGS_SHIFT
	.no_dead_strip	_shader_sm4_read_dcl_resource
.subsections_via_symbols
