	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_flexible_vertex_size       ## -- Begin function get_flexible_vertex_size
	.p2align	4, 0x90
_get_flexible_vertex_size:              ## @get_flexible_vertex_size
	.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	%edi, %r14d
	movq	_D3DFVF_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edi, %eax
	movl	$12, %ecx
	cmovel	%eax, %ecx
	movq	_D3DFVF_DIFFUSE@GOTPCREL(%rip), %rax
	leal	4(%rcx), %edx
	testl	%edi, (%rax)
	cmovel	%ecx, %edx
	movq	_D3DFVF_SPECULAR@GOTPCREL(%rip), %rax
	leal	4(%rdx), %ecx
	testl	%edi, (%rax)
	cmovel	%edx, %ecx
	movq	_D3DFVF_RESERVED1@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	leal	4(%rcx), %r15d
	cmovel	%ecx, %r15d
	movq	_D3DFVF_POSITION_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edi, %eax
	addl	$-128, %eax
	cmpl	$6, %eax
	ja	LBB0_8
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	addl	$16, %r15d
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	jmp	LBB0_9
LBB0_7:
	addl	$32, %r15d
	jmp	LBB0_9
LBB0_6:
	addl	$28, %r15d
	jmp	LBB0_9
LBB0_5:
	addl	$24, %r15d
	jmp	LBB0_9
LBB0_4:
	addl	$20, %r15d
	jmp	LBB0_9
LBB0_2:
	addl	$12, %r15d
LBB0_9:
	movl	%r14d, %edi
	callq	_GET_TEXCOUNT_FROM_FVF
	testl	%eax, %eax
	jle	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_GET_TEXCOORD_SIZE_FROM_FVF
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r15,%rax,4), %r15d
	incl	%ebx
	movl	%r14d, %edi
	callq	_GET_TEXCOUNT_FROM_FVF
	cmpl	%eax, %ebx
	jl	LBB0_11
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_6
	.long	L0_0_set_5
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_D3DFVF_NORMAL,4,2              ## @D3DFVF_NORMAL
	.comm	_D3DFVF_DIFFUSE,4,2             ## @D3DFVF_DIFFUSE
	.comm	_D3DFVF_SPECULAR,4,2            ## @D3DFVF_SPECULAR
	.comm	_D3DFVF_RESERVED1,4,2           ## @D3DFVF_RESERVED1
	.comm	_D3DFVF_POSITION_MASK,4,2       ## @D3DFVF_POSITION_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unexpected position mask\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_flexible_vertex_size       ; -- Begin function get_flexible_vertex_size
	.p2align	2
_get_flexible_vertex_size:              ; @get_flexible_vertex_size
	.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	x19, x0
Lloh0:
	adrp	x8, _D3DFVF_NORMAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D3DFVF_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	mov	w8, #12
	csel	w8, wzr, w8, eq
Lloh3:
	adrp	x9, _D3DFVF_DIFFUSE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _D3DFVF_DIFFUSE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	w10, w8, #4
	tst	w9, w0
	csel	w8, w8, w10, eq
Lloh6:
	adrp	x9, _D3DFVF_SPECULAR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _D3DFVF_SPECULAR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w10, w8, #4
	tst	w9, w0
	csel	w8, w8, w10, eq
Lloh9:
	adrp	x9, _D3DFVF_RESERVED1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _D3DFVF_RESERVED1@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	add	w10, w8, #4
	tst	w9, w0
	csel	w20, w8, w10, eq
Lloh12:
	adrp	x8, _D3DFVF_POSITION_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _D3DFVF_POSITION_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_3
; %bb.1:
Lloh15:
	adrp	x9, lJTI0_0@PAGE
Lloh16:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	add	w20, w20, #16
	b	LBB0_9
LBB0_3:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	b	LBB0_9
LBB0_4:
	add	w20, w20, #32
	b	LBB0_9
LBB0_5:
	add	w20, w20, #28
	b	LBB0_9
LBB0_6:
	add	w20, w20, #24
	b	LBB0_9
LBB0_7:
	add	w20, w20, #20
	b	LBB0_9
LBB0_8:
	add	w20, w20, #12
LBB0_9:
	mov	x0, x19
	bl	_GET_TEXCOUNT_FROM_FVF
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.10:
	mov	w21, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_GET_TEXCOORD_SIZE_FROM_FVF
	add	w20, w20, w0, lsl #2
	add	w21, w21, #1
	mov	x0, x19
	bl	_GET_TEXCOUNT_FROM_FVF
	cmp	w21, w0
	b.lt	LBB0_11
LBB0_12:
	mov	x0, x20
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.comm	_D3DFVF_NORMAL,4,2              ; @D3DFVF_NORMAL
	.comm	_D3DFVF_DIFFUSE,4,2             ; @D3DFVF_DIFFUSE
	.comm	_D3DFVF_SPECULAR,4,2            ; @D3DFVF_SPECULAR
	.comm	_D3DFVF_RESERVED1,4,2           ; @D3DFVF_RESERVED1
	.comm	_D3DFVF_POSITION_MASK,4,2       ; @D3DFVF_POSITION_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unexpected position mask\n"

.subsections_via_symbols
