	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_sm4_read_shader_data
_shader_sm4_read_shader_data:           ## @shader_sm4_read_shader_data
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %rsi
	movq	_WINED3D_SM4_SHADER_DATA_TYPE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	_WINED3D_SM4_SHADER_DATA_TYPE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edx
	movq	%rdi, %r14
	movq	_WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_1
## %bb.3:
	decl	%r8d
	testb	$3, %r8b
	jne	LBB0_5
## %bb.4:
	movq	_MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r8d
	ja	LBB0_5
## %bb.6:
	movq	%r9, %rbx
	addq	$4, %rsi
	movl	%r8d, %eax
	shrl	$2, %eax
	movl	%eax, (%r9)
	movl	4(%r9), %edi
	shll	$2, %r8d
	movl	%r8d, %edx
	callq	_memcpy
	movq	%rbx, (%r14)
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	callq	_FIXME
	movq	_WINED3DSIH_NOP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movl	%r8d, %esi
	callq	_FIXME
	movq	_WINED3DSIH_TABLE_SIZE@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_SM4_SHADER_DATA_TYPE_MASK,4,2 ## @WINED3D_SM4_SHADER_DATA_TYPE_MASK
	.comm	_WINED3D_SM4_SHADER_DATA_TYPE_SHIFT,4,2 ## @WINED3D_SM4_SHADER_DATA_TYPE_SHIFT
	.comm	_WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER,4,2 ## @WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ignoring shader data type %#x.\n"

	.comm	_WINED3DSIH_NOP,4,2             ## @WINED3DSIH_NOP
	.comm	_MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE,4,2 ## @MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"Unexpected immediate constant buffer size %u.\n"

	.comm	_WINED3DSIH_TABLE_SIZE,4,2      ## @WINED3DSIH_TABLE_SIZE
	.no_dead_strip	_shader_sm4_read_shader_data
.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_shader_data
_shader_sm4_read_shader_data:           ; @shader_sm4_read_shader_data
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _WINED3D_SM4_SHADER_DATA_TYPE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_SM4_SHADER_DATA_TYPE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w2
Lloh3:
	adrp	x9, _WINED3D_SM4_SHADER_DATA_TYPE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WINED3D_SM4_SHADER_DATA_TYPE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	asr	w1, w8, w9
Lloh6:
	adrp	x8, _WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w1, w8
	b.ne	LBB0_4
; %bb.1:
	sub	w1, w4, #1
	tst	w1, #0x3
	b.ne	LBB0_5
; %bb.2:
Lloh9:
	adrp	x8, _MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w1, w8
	b.hi	LBB0_5
; %bb.3:
	mov	x20, x5
	add	x8, x3, #4
	lsr	w9, w1, #2
	str	w9, [x5]
	ldr	w0, [x5, #4]
	lsl	w2, w1, #2
	mov	x1, x8
	bl	_memcpy
	str	x20, [x19]
	b	LBB0_7
LBB0_4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
Lloh14:
	adrp	x8, _WINED3DSIH_NOP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WINED3DSIH_NOP@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
Lloh18:
	adrp	x8, _WINED3DSIH_TABLE_SIZE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WINED3DSIH_TABLE_SIZE@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	str	w8, [x19, #8]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_SM4_SHADER_DATA_TYPE_MASK,4,2 ; @WINED3D_SM4_SHADER_DATA_TYPE_MASK
	.comm	_WINED3D_SM4_SHADER_DATA_TYPE_SHIFT,4,2 ; @WINED3D_SM4_SHADER_DATA_TYPE_SHIFT
	.comm	_WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER,4,2 ; @WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ignoring shader data type %#x.\n"

	.comm	_WINED3DSIH_NOP,4,2             ; @WINED3DSIH_NOP
	.comm	_MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE,4,2 ; @MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"Unexpected immediate constant buffer size %u.\n"

	.comm	_WINED3DSIH_TABLE_SIZE,4,2      ; @WINED3DSIH_TABLE_SIZE
	.no_dead_strip	_shader_sm4_read_shader_data
.subsections_via_symbols
