	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d_level_from_caps
_d3d_level_from_caps:                   ## @d3d_level_from_caps
	.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
	movl	(%rdi), %eax
	movq	_WINED3D_D3D_LEVEL_11@GOTPCREL(%rip), %r14
	cmpl	$4, %eax
	jle	LBB0_2
## %bb.1:
	movq	%r14, %rcx
LBB0_15:
	movl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	decl	%eax
	cmpl	$3, %eax
	ja	LBB0_10
## %bb.3:
	movq	%rdx, %rbx
	movq	_WINED3D_D3D_LEVEL_10@GOTPCREL(%rip), %rcx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	jmpq	*%rax
LBB0_9:
	movq	_WINED3D_D3D_LEVEL_8@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_10:
	movq	_WINED3DTEXOPCAPS_DOTPRODUCT3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_12
## %bb.11:
	movq	_WINED3D_D3D_LEVEL_7@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_8:
	movq	_WINED3D_D3D_LEVEL_9_SM2@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_4:
	movl	$4, %edi
	movl	$30, %esi
	callq	_MAKEDWORD_VERSION
	movq	%r14, %rcx
	cmpq	%rbx, %rax
	jle	LBB0_15
## %bb.5:
	movl	$1, %edi
	movl	$30, %esi
	callq	_MAKEDWORD_VERSION
	cmpq	%rbx, %rax
	jle	LBB0_6
## %bb.7:
	movq	_WINED3D_D3D_LEVEL_9_SM3@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_12:
	cmpl	$2, 4(%rsi)
	jl	LBB0_13
## %bb.14:
	movq	_WINED3D_D3D_LEVEL_6@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_6:
	movq	_WINED3D_D3D_LEVEL_10@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_13:
	movq	_WINED3D_D3D_LEVEL_5@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_4
	.long	L0_0_set_15
	.end_data_region
                                        ## -- End function
	.comm	_WINED3D_D3D_LEVEL_11,4,2       ## @WINED3D_D3D_LEVEL_11
	.comm	_WINED3D_D3D_LEVEL_10,4,2       ## @WINED3D_D3D_LEVEL_10
	.comm	_WINED3D_D3D_LEVEL_9_SM3,4,2    ## @WINED3D_D3D_LEVEL_9_SM3
	.comm	_WINED3D_D3D_LEVEL_9_SM2,4,2    ## @WINED3D_D3D_LEVEL_9_SM2
	.comm	_WINED3D_D3D_LEVEL_8,4,2        ## @WINED3D_D3D_LEVEL_8
	.comm	_WINED3DTEXOPCAPS_DOTPRODUCT3,4,2 ## @WINED3DTEXOPCAPS_DOTPRODUCT3
	.comm	_WINED3D_D3D_LEVEL_7,4,2        ## @WINED3D_D3D_LEVEL_7
	.comm	_WINED3D_D3D_LEVEL_6,4,2        ## @WINED3D_D3D_LEVEL_6
	.comm	_WINED3D_D3D_LEVEL_5,4,2        ## @WINED3D_D3D_LEVEL_5
	.no_dead_strip	_d3d_level_from_caps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d_level_from_caps
_d3d_level_from_caps:                   ; @d3d_level_from_caps
	.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
	ldr	w8, [x0]
	cmp	w8, #4
	b.le	LBB0_3
LBB0_1:
Lloh0:
	adrp	x20, _WINED3D_D3D_LEVEL_11@GOTPAGE
Lloh1:
	ldr	x20, [x20, _WINED3D_D3D_LEVEL_11@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	sub	w8, w8, #1
	cmp	w8, #3
	b.hi	LBB0_6
; %bb.4:
Lloh2:
	adrp	x20, _WINED3D_D3D_LEVEL_10@GOTPAGE
Lloh3:
	ldr	x20, [x20, _WINED3D_D3D_LEVEL_10@GOTPAGEOFF]
Lloh4:
	adrp	x9, lJTI0_0@PAGE
Lloh5:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
Lloh6:
	adrp	x20, _WINED3D_D3D_LEVEL_8@GOTPAGE
Lloh7:
	ldr	x20, [x20, _WINED3D_D3D_LEVEL_8@GOTPAGEOFF]
	b	LBB0_2
LBB0_6:
	ldr	w8, [x1]
Lloh8:
	adrp	x9, _WINED3DTEXOPCAPS_DOTPRODUCT3@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WINED3DTEXOPCAPS_DOTPRODUCT3@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.7:
Lloh11:
	adrp	x20, _WINED3D_D3D_LEVEL_7@GOTPAGE
Lloh12:
	ldr	x20, [x20, _WINED3D_D3D_LEVEL_7@GOTPAGEOFF]
	b	LBB0_2
LBB0_8:
Lloh13:
	adrp	x20, _WINED3D_D3D_LEVEL_9_SM2@GOTPAGE
Lloh14:
	ldr	x20, [x20, _WINED3D_D3D_LEVEL_9_SM2@GOTPAGEOFF]
	b	LBB0_2
LBB0_9:
	mov	x19, x2
	mov	w0, #4
	mov	w1, #30
	bl	_MAKEDWORD_VERSION
	cmp	x0, x19
	b.le	LBB0_1
; %bb.10:
	mov	w0, #1
	mov	w1, #30
	bl	_MAKEDWORD_VERSION
Lloh15:
	adrp	x8, _WINED3D_D3D_LEVEL_9_SM3@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WINED3D_D3D_LEVEL_9_SM3@GOTPAGEOFF]
	cmp	x0, x19
	csel	x20, x8, x20, gt
	b	LBB0_2
LBB0_11:
	ldr	w8, [x1, #4]
Lloh17:
	adrp	x9, _WINED3D_D3D_LEVEL_5@GOTPAGE
Lloh18:
	ldr	x9, [x9, _WINED3D_D3D_LEVEL_5@GOTPAGEOFF]
Lloh19:
	adrp	x10, _WINED3D_D3D_LEVEL_6@GOTPAGE
Lloh20:
	ldr	x10, [x10, _WINED3D_D3D_LEVEL_6@GOTPAGEOFF]
	cmp	w8, #1
	csel	x20, x10, x9, gt
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_WINED3D_D3D_LEVEL_11,4,2       ; @WINED3D_D3D_LEVEL_11
	.comm	_WINED3D_D3D_LEVEL_10,4,2       ; @WINED3D_D3D_LEVEL_10
	.comm	_WINED3D_D3D_LEVEL_9_SM3,4,2    ; @WINED3D_D3D_LEVEL_9_SM3
	.comm	_WINED3D_D3D_LEVEL_9_SM2,4,2    ; @WINED3D_D3D_LEVEL_9_SM2
	.comm	_WINED3D_D3D_LEVEL_8,4,2        ; @WINED3D_D3D_LEVEL_8
	.comm	_WINED3DTEXOPCAPS_DOTPRODUCT3,4,2 ; @WINED3DTEXOPCAPS_DOTPRODUCT3
	.comm	_WINED3D_D3D_LEVEL_7,4,2        ; @WINED3D_D3D_LEVEL_7
	.comm	_WINED3D_D3D_LEVEL_6,4,2        ; @WINED3D_D3D_LEVEL_6
	.comm	_WINED3D_D3D_LEVEL_5,4,2        ; @WINED3D_D3D_LEVEL_5
	.no_dead_strip	_d3d_level_from_caps
.subsections_via_symbols
