	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d8_vertex_shader_init        ## -- Begin function d3d8_vertex_shader_init
	.p2align	4, 0x90
_d3d8_vertex_shader_init:               ## @d3d8_vertex_shader_init
	.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	$104, %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
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_D3DVSD_END
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rdx
	cmpq	%rdx, %rax
	jne	LBB0_1
LBB0_9:
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	leaq	4(%r12), %r14
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_d3d8_vertexshader_create_vertexdeclaration
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_WARN
	jmp	LBB0_18
LBB0_1:
	movq	_D3DVSD_TOKENTYPESHIFT@GOTPCREL(%rip), %r13
	movq	_D3DVSD_TOKEN_STREAMDATA@GOTPCREL(%rip), %r12
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_parse_token
	movslq	%eax, %r15
	leaq	(%rbx,%r15,8), %r14
	xorl	%eax, %eax
	callq	_D3DVSD_END
	movq	(%rbx,%r15,8), %rdx
	movq	%r14, %rbx
	cmpq	%rdx, %rax
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_D3DVSD_TOKENTYPEMASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	%rdx, %rax
	movzbl	(%r13), %ecx
	sarq	%cl, %rax
	cmpl	%eax, (%r12)
	jne	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	andl	$268435456, %eax                ## imm = 0x10000000
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_D3DVSD_VERTEXREGMASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	%rdx, %rax
	movq	_D3DVSD_VERTEXREGSHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	sarq	%cl, %rax
	movq	_D3DVSDE_NORMAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_D3DVSD_DATATYPEMASK@GOTPCREL(%rip), %rax
	andq	(%rax), %rdx
	movq	_D3DVSD_DATATYPESHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	sarq	%cl, %rdx
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_D3DVSDT_FLOAT3@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_WARN
	movq	_D3DERR_INVALIDCALL@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_11:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_16
## %bb.12:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.13:
	leaq	L_.str.2(%rip), %rdi
	callq	_FIXME
LBB0_14:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -144(%rbp)
	movq	$-1, -136(%rbp)
	movq	_WINED3D_SHADER_BYTE_CODE_FORMAT_SM1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -120(%rbp)
	movq	$0, -104(%rbp)
	movl	$1, -128(%rbp)
	xorl	%eax, %eax
	callq	_wined3d_mutex_lock
	movl	(%r13), %edi
	movq	_d3d8_vertexshader_wined3d_parent_ops@GOTPCREL(%rip), %rcx
	leaq	-144(%rbp), %rsi
	movq	%r12, %rdx
	movq	%r12, %r8
	callq	_wined3d_shader_create_vs
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_wined3d_mutex_unlock
	movl	%ebx, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_15
## %bb.19:
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_WARN
	movl	(%r14), %edi
	callq	_d3d8_vertex_declaration_destroy
	jmp	LBB0_18
LBB0_15:
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_load_local_constants
LBB0_16:
	movq	_D3D_OK@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DVSD_TOKENTYPEMASK,8,3       ## @D3DVSD_TOKENTYPEMASK
	.comm	_D3DVSD_TOKENTYPESHIFT,8,3      ## @D3DVSD_TOKENTYPESHIFT
	.comm	_D3DVSD_TOKEN_STREAMDATA,4,2    ## @D3DVSD_TOKEN_STREAMDATA
	.comm	_D3DVSD_DATATYPEMASK,8,3        ## @D3DVSD_DATATYPEMASK
	.comm	_D3DVSD_DATATYPESHIFT,8,3       ## @D3DVSD_DATATYPESHIFT
	.comm	_D3DVSD_VERTEXREGMASK,8,3       ## @D3DVSD_VERTEXREGMASK
	.comm	_D3DVSD_VERTEXREGSHIFT,8,3      ## @D3DVSD_VERTEXREGSHIFT
	.comm	_D3DVSDE_NORMAL,8,3             ## @D3DVSDE_NORMAL
	.comm	_D3DVSDT_FLOAT3,8,3             ## @D3DVSDT_FLOAT3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempt to use a non-FLOAT3 normal with the fixed-function function\n"

	.comm	_D3DERR_INVALIDCALL,4,2         ## @D3DERR_INVALIDCALL
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create vertex declaration, hr %#x.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Usage %#x not implemented.\n"

	.comm	_WINED3D_SHADER_BYTE_CODE_FORMAT_SM1,4,2 ## @WINED3D_SHADER_BYTE_CODE_FORMAT_SM1
	.comm	_d3d8_vertexshader_wined3d_parent_ops,4,2 ## @d3d8_vertexshader_wined3d_parent_ops
L_.str.3:                               ## @.str.3
	.asciz	"Failed to create wined3d vertex shader, hr %#x.\n"

	.comm	_D3D_OK,4,2                     ## @D3D_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d8_vertex_shader_init        ; -- Begin function d3d8_vertex_shader_init
	.p2align	2
_d3d8_vertex_shader_init:               ; @d3d8_vertex_shader_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	stp	x5, x4, [sp, #16]               ; 16-byte Folded Spill
	mov	x22, x3
	mov	x19, x2
	str	x1, [sp, #32]                   ; 8-byte Folded Spill
	mov	x24, x0
	bl	_D3DVSD_END
	ldr	x8, [x19]
	cmp	x0, x8
	b.ne	LBB0_3
LBB0_1:
	mov	x20, x24
	add	x25, x24, #4
	ldp	x2, x21, [sp, #24]              ; 16-byte Folded Reload
	mov	x0, x21
	mov	x1, x19
	mov	x3, x25
	bl	_d3d8_vertexshader_create_vertexdeclaration
	mov	x24, x0
	bl	_FAILED
	cbz	x0, LBB0_10
; %bb.2:
	str	x24, [sp]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WARN
	b	LBB0_18
LBB0_3:
Lloh2:
	adrp	x26, _D3DVSD_TOKENTYPEMASK@GOTPAGE
Lloh3:
	ldr	x26, [x26, _D3DVSD_TOKENTYPEMASK@GOTPAGEOFF]
Lloh4:
	adrp	x27, _D3DVSD_TOKENTYPESHIFT@GOTPAGE
Lloh5:
	ldr	x27, [x27, _D3DVSD_TOKENTYPESHIFT@GOTPAGEOFF]
Lloh6:
	adrp	x28, _D3DVSD_TOKEN_STREAMDATA@GOTPAGE
Lloh7:
	ldr	x28, [x28, _D3DVSD_TOKEN_STREAMDATA@GOTPAGEOFF]
Lloh8:
	adrp	x23, _D3DVSD_VERTEXREGMASK@GOTPAGE
Lloh9:
	ldr	x23, [x23, _D3DVSD_VERTEXREGMASK@GOTPAGEOFF]
Lloh10:
	adrp	x20, _D3DVSD_VERTEXREGSHIFT@GOTPAGE
Lloh11:
	ldr	x20, [x20, _D3DVSD_VERTEXREGSHIFT@GOTPAGEOFF]
Lloh12:
	adrp	x21, _D3DVSDE_NORMAL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _D3DVSDE_NORMAL@GOTPAGEOFF]
	mov	x25, x19
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	bl	_parse_token
	add	x25, x25, w0, sxtw #3
	bl	_D3DVSD_END
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x26]
	and	x9, x9, x8
	ldr	x10, [x27]
	asr	x9, x9, x10
	ldr	w10, [x28]
	and	w11, w9, #0x10000000
	cmp	w10, w9
	ccmp	w11, #0, #0, eq
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x23]
	and	x9, x9, x8
	ldr	x10, [x20]
	asr	x9, x9, x10
	ldr	x10, [x21]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cbnz	x22, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh14:
	adrp	x9, _D3DVSD_DATATYPEMASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _D3DVSD_DATATYPEMASK@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	and	x8, x9, x8
Lloh17:
	adrp	x9, _D3DVSD_DATATYPESHIFT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _D3DVSD_DATATYPESHIFT@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	asr	x8, x8, x9
Lloh20:
	adrp	x9, _D3DVSDT_FLOAT3@GOTPAGE
Lloh21:
	ldr	x9, [x9, _D3DVSDT_FLOAT3@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.9:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WARN
Lloh25:
	adrp	x8, _D3DERR_INVALIDCALL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _D3DERR_INVALIDCALL@GOTPAGEOFF]
	b	LBB0_17
LBB0_10:
	cbz	x22, LBB0_16
; %bb.11:
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	cbz	x1, LBB0_13
; %bb.12:
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_FIXME
LBB0_13:
	mov	x8, #-1
	stp	x22, x8, [sp, #40]
Lloh29:
	adrp	x8, _WINED3D_SHADER_BYTE_CODE_FORMAT_SM1@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WINED3D_SHADER_BYTE_CODE_FORMAT_SM1@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [sp, #88]
	stp	xzr, xzr, [sp, #72]
	str	xzr, [sp, #64]
	mov	w8, #1
	str	w8, [sp, #56]
	bl	_wined3d_mutex_lock
	ldr	w0, [x21]
Lloh32:
	adrp	x3, _d3d8_vertexshader_wined3d_parent_ops@GOTPAGE
Lloh33:
	ldr	x3, [x3, _d3d8_vertexshader_wined3d_parent_ops@GOTPAGEOFF]
	add	x1, sp, #40
	mov	x2, x20
	mov	x4, x20
	bl	_wined3d_shader_create_vs
	mov	x24, x0
	bl	_wined3d_mutex_unlock
	mov	x0, x24
	bl	_FAILED
	cbz	x0, LBB0_15
; %bb.14:
	str	x24, [sp]
Lloh34:
	adrp	x0, l_.str.3@PAGE
Lloh35:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_WARN
	ldr	w0, [x25]
	bl	_d3d8_vertex_declaration_destroy
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	b	LBB0_18
LBB0_15:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_load_local_constants
LBB0_16:
Lloh36:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
LBB0_17:
	ldr	w24, [x8]
LBB0_18:
	mov	x0, x24
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DVSD_TOKENTYPEMASK,8,3       ; @D3DVSD_TOKENTYPEMASK
	.comm	_D3DVSD_TOKENTYPESHIFT,8,3      ; @D3DVSD_TOKENTYPESHIFT
	.comm	_D3DVSD_TOKEN_STREAMDATA,4,2    ; @D3DVSD_TOKEN_STREAMDATA
	.comm	_D3DVSD_DATATYPEMASK,8,3        ; @D3DVSD_DATATYPEMASK
	.comm	_D3DVSD_DATATYPESHIFT,8,3       ; @D3DVSD_DATATYPESHIFT
	.comm	_D3DVSD_VERTEXREGMASK,8,3       ; @D3DVSD_VERTEXREGMASK
	.comm	_D3DVSD_VERTEXREGSHIFT,8,3      ; @D3DVSD_VERTEXREGSHIFT
	.comm	_D3DVSDE_NORMAL,8,3             ; @D3DVSDE_NORMAL
	.comm	_D3DVSDT_FLOAT3,8,3             ; @D3DVSDT_FLOAT3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempt to use a non-FLOAT3 normal with the fixed-function function\n"

	.comm	_D3DERR_INVALIDCALL,4,2         ; @D3DERR_INVALIDCALL
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create vertex declaration, hr %#x.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Usage %#x not implemented.\n"

	.comm	_WINED3D_SHADER_BYTE_CODE_FORMAT_SM1,4,2 ; @WINED3D_SHADER_BYTE_CODE_FORMAT_SM1
	.comm	_d3d8_vertexshader_wined3d_parent_ops,4,2 ; @d3d8_vertexshader_wined3d_parent_ops
l_.str.3:                               ; @.str.3
	.asciz	"Failed to create wined3d vertex shader, hr %#x.\n"

	.comm	_D3D_OK,4,2                     ; @D3D_OK
.subsections_via_symbols
