	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_sm4_read_dcl_input_primitive
_shader_sm4_read_dcl_input_primitive:   ## @shader_sm4_read_dcl_input_primitive
	.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
	movl	%edx, %ebx
	movq	_WINED3D_SM4_PRIMITIVE_TYPE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_WINED3D_SM4_PRIMITIVE_TYPE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	%rdi, %r14
	movq	_WINED3D_SM5_INPUT_PT_PATCH1@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	subl	(%rax), %ecx
	jb	LBB0_3
## %bb.1:
	movq	_WINED3D_SM5_INPUT_PT_PATCH32@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	ja	LBB0_3
## %bb.2:
	movq	_WINED3D_PT_PATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	incl	%ecx
	movl	%ecx, (%r14)
	jmp	LBB0_7
LBB0_3:
	movq	_input_primitive_type_table@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jae	LBB0_4
## %bb.5:
	movq	(%r15), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %eax
	jmp	LBB0_6
LBB0_4:
	movq	_WINED3D_PT_UNDEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	movl	%eax, 4(%r14)
LBB0_7:
	movq	_WINED3D_PT_UNDEFINED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.9:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FIXME                          ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_SM4_PRIMITIVE_TYPE_MASK,4,2 ## @WINED3D_SM4_PRIMITIVE_TYPE_MASK
	.comm	_WINED3D_SM4_PRIMITIVE_TYPE_SHIFT,4,2 ## @WINED3D_SM4_PRIMITIVE_TYPE_SHIFT
	.comm	_WINED3D_SM5_INPUT_PT_PATCH1,4,2 ## @WINED3D_SM5_INPUT_PT_PATCH1
	.comm	_WINED3D_SM5_INPUT_PT_PATCH32,4,2 ## @WINED3D_SM5_INPUT_PT_PATCH32
	.comm	_WINED3D_PT_PATCH,4,2           ## @WINED3D_PT_PATCH
	.comm	_input_primitive_type_table,8,3 ## @input_primitive_type_table
	.comm	_WINED3D_PT_UNDEFINED,4,2       ## @WINED3D_PT_UNDEFINED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unhandled input primitive type %#x.\n"

	.no_dead_strip	_shader_sm4_read_dcl_input_primitive
.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_input_primitive
_shader_sm4_read_dcl_input_primitive:   ; @shader_sm4_read_dcl_input_primitive
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _WINED3D_SM4_PRIMITIVE_TYPE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_SM4_PRIMITIVE_TYPE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w2
Lloh3:
	adrp	x9, _WINED3D_SM4_PRIMITIVE_TYPE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WINED3D_SM4_PRIMITIVE_TYPE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	asr	w19, w8, w9
Lloh6:
	adrp	x8, _WINED3D_SM5_INPUT_PT_PATCH1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WINED3D_SM5_INPUT_PT_PATCH1@GOTPAGEOFF]
Lloh8:
	adrp	x9, _WINED3D_SM5_INPUT_PT_PATCH32@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WINED3D_SM5_INPUT_PT_PATCH32@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	ldr	w10, [x9]
	subs	w9, w19, w8
	ccmp	w19, w10, #2, hs
Lloh12:
	adrp	x21, _WINED3D_PT_UNDEFINED@GOTPAGE
Lloh13:
	ldr	x21, [x21, _WINED3D_PT_UNDEFINED@GOTPAGEOFF]
	b.ls	LBB0_3
; %bb.1:
Lloh14:
	adrp	x22, _input_primitive_type_table@GOTPAGE
Lloh15:
	ldr	x22, [x22, _input_primitive_type_table@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w19, w0
	b.hs	LBB0_4
; %bb.2:
	ldr	x8, [x22]
	ldr	w8, [x8, w19, uxtw #2]
	b	LBB0_5
LBB0_3:
Lloh16:
	adrp	x8, _WINED3D_PT_PATCH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WINED3D_PT_PATCH@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	add	w9, w9, #1
	stp	w9, w8, [x20]
	b	LBB0_6
LBB0_4:
	ldr	w8, [x21]
LBB0_5:
	str	w8, [x20, #4]
LBB0_6:
	ldr	w9, [x21]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.7:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	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
	b	_FIXME
LBB0_8:
	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 AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_SM4_PRIMITIVE_TYPE_MASK,4,2 ; @WINED3D_SM4_PRIMITIVE_TYPE_MASK
	.comm	_WINED3D_SM4_PRIMITIVE_TYPE_SHIFT,4,2 ; @WINED3D_SM4_PRIMITIVE_TYPE_SHIFT
	.comm	_WINED3D_SM5_INPUT_PT_PATCH1,4,2 ; @WINED3D_SM5_INPUT_PT_PATCH1
	.comm	_WINED3D_SM5_INPUT_PT_PATCH32,4,2 ; @WINED3D_SM5_INPUT_PT_PATCH32
	.comm	_WINED3D_PT_PATCH,4,2           ; @WINED3D_PT_PATCH
	.comm	_input_primitive_type_table,8,3 ; @input_primitive_type_table
	.comm	_WINED3D_PT_UNDEFINED,4,2       ; @WINED3D_PT_UNDEFINED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unhandled input primitive type %#x.\n"

	.no_dead_strip	_shader_sm4_read_dcl_input_primitive
.subsections_via_symbols
