	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function validate_resource_view
_validate_resource_view:                ## @validate_resource_view
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	24(%rsi), %rax
	movq	(%rax), %r15
	movq	(%rdi), %rsi
	movl	16(%rbx), %edx
	movq	%r15, %rdi
	callq	_wined3d_get_format
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	_WINED3D_RTYPE_BUFFER@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_4
## %bb.1:
	movq	_WINED3D_VIEW_BUFFER_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_4
## %bb.2:
	movq	(%r12), %rdi
	movq	_WINED3DFMT_R32_TYPELESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_15
## %bb.3:
	movq	_WINED3DFMT_R32_UINT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	16(%rbx), %edx
	movq	%r15, %rdi
	callq	_wined3d_get_format
	movq	%rax, %r12
LBB0_4:
	movq	%r12, %rdi
	callq	_wined3d_format_is_typeless
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	(%r12), %rdi
	callq	_debug_d3dformat
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_34
LBB0_6:
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_10
## %bb.7:
	movq	%rbx, %rdi
	callq	_buffer_from_resource
	movq	%rax, %r13
	cmpl	$0, 4(%rax)
	je	LBB0_24
## %bb.8:
	movq	(%r14), %rdi
	movq	_WINED3DFMT_UNKNOWN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_29
## %bb.9:
	leaq	4(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_WINED3DFMT_R32_UINT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	16(%rbx), %edx
	movq	%r15, %rdi
	callq	_wined3d_get_format
	movq	%rax, %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_10:
	movq	%rbx, %rdi
	callq	_texture_from_resource
	movq	%rax, %r15
	movq	8(%rbx), %rdi
	movq	(%rdi), %rax
	cmpq	(%r12), %rax
	je	LBB0_12
## %bb.11:
	callq	_wined3d_format_is_typeless
	testq	%rax, %rax
	je	LBB0_31
LBB0_12:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_16
## %bb.13:
	movq	(%rbx), %rax
	movq	_WINED3D_RTYPE_TEXTURE_3D@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.14:
	movq	16(%r14), %rsi
	movq	%r15, %rdi
	callq	_wined3d_texture_get_level_depth
	jmp	LBB0_17
LBB0_15:
	callq	_debug_d3dformat
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_34
LBB0_16:
	movl	(%r15), %eax
LBB0_17:
	movslq	24(%r14), %rdx
	xorl	%ecx, %ecx
	cmpq	$1, %rdx
	sete	%cl
	xorl	%esi, %esi
	testq	%rdx, %rdx
	setne	%sil
	testq	%r13, %r13
	cmovel	%esi, %ecx
	cmpb	$1, %cl
	jne	LBB0_35
## %bb.18:
	movq	8(%r15), %rsi
	xorl	%ecx, %ecx
	subq	16(%r14), %rsi
	jle	LBB0_36
## %bb.19:
	cmpq	%rdx, %rsi
	jl	LBB0_36
## %bb.20:
	movl	28(%r14), %edx
	xorl	%ecx, %ecx
	testl	%edx, %edx
	je	LBB0_36
## %bb.21:
	subl	32(%r14), %eax
	jbe	LBB0_36
## %bb.22:
	cmpl	%eax, %edx
	jbe	LBB0_37
	jmp	LBB0_36
LBB0_24:
	leaq	8(%r12), %rax
LBB0_25:
	movl	(%rax), %esi
	testl	%esi, %esi
	je	LBB0_35
## %bb.26:
	movl	(%r13), %eax
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	divl	%esi
	subl	40(%r14), %eax
	jbe	LBB0_36
## %bb.27:
	cmpl	%eax, 44(%r14)
	ja	LBB0_35
LBB0_37:
	movq	%r12, %rcx
	jmp	LBB0_36
LBB0_29:
	callq	_debug_d3dformat
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_34
LBB0_31:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_33
## %bb.32:
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	movq	(%r12), %rsi
	callq	_wined3d_formats_are_srgb_variants
	testl	%eax, %eax
	jne	LBB0_12
LBB0_33:
	movq	(%r12), %rdi
	callq	_debug_d3dformat
	leaq	L_.str.3(%rip), %rdi
LBB0_34:
	movl	%eax, %esi
	callq	_WARN
LBB0_35:
	xorl	%ecx, %ecx
LBB0_36:
	movq	%rcx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_RTYPE_BUFFER,8,3       ## @WINED3D_RTYPE_BUFFER
	.comm	_WINED3D_VIEW_BUFFER_RAW,4,2    ## @WINED3D_VIEW_BUFFER_RAW
	.comm	_WINED3DFMT_R32_TYPELESS,8,3    ## @WINED3DFMT_R32_TYPELESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid format %s for raw buffer view.\n"

	.comm	_WINED3DFMT_R32_UINT,8,3        ## @WINED3DFMT_R32_UINT
L_.str.1:                               ## @.str.1
	.asciz	"Trying to create view for typeless format %s.\n"

	.comm	_WINED3DFMT_UNKNOWN,8,3         ## @WINED3DFMT_UNKNOWN
L_.str.2:                               ## @.str.2
	.asciz	"Invalid format %s for structured buffer view.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Trying to create incompatible view for non typeless format %s.\n"

	.comm	_WINED3D_RTYPE_TEXTURE_3D,8,3   ## @WINED3D_RTYPE_TEXTURE_3D
	.no_dead_strip	_validate_resource_view
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function validate_resource_view
_validate_resource_view:                ; @validate_resource_view
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x8, [x1, #24]
	ldr	x24, [x8]
	ldr	x1, [x0]
	ldr	w2, [x22, #16]
	mov	x0, x24
	bl	_wined3d_get_format
	mov	x20, x0
	ldr	x8, [x22]
Lloh0:
	adrp	x25, _WINED3D_RTYPE_BUFFER@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WINED3D_RTYPE_BUFFER@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x19, #8]
Lloh2:
	adrp	x9, _WINED3D_VIEW_BUFFER_RAW@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WINED3D_VIEW_BUFFER_RAW@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	x0, [x20]
Lloh5:
	adrp	x8, _WINED3DFMT_R32_TYPELESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WINED3DFMT_R32_TYPELESS@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.3:
Lloh8:
	adrp	x8, _WINED3DFMT_R32_UINT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WINED3DFMT_R32_UINT@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x8]
	ldr	w2, [x22, #16]
	mov	x0, x24
	bl	_wined3d_get_format
	mov	x20, x0
LBB0_4:
	mov	x0, x20
	bl	_wined3d_format_is_typeless
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x0, [x20]
	bl	_debug_d3dformat
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_31
LBB0_6:
	ldr	x8, [x22]
	ldr	x9, [x25]
	mov	x0, x22
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
	bl	_buffer_from_resource
	mov	x21, x0
	mov	x23, x0
	ldr	w8, [x23, #4]!
	cbz	w8, LBB0_23
; %bb.8:
	ldr	x0, [x19]
Lloh13:
	adrp	x8, _WINED3DFMT_UNKNOWN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WINED3DFMT_UNKNOWN@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.9:
Lloh16:
	adrp	x8, _WINED3DFMT_R32_UINT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WINED3DFMT_R32_UINT@GOTPAGEOFF]
Lloh18:
	ldr	x1, [x8]
	ldr	w2, [x22, #16]
	mov	x0, x24
	bl	_wined3d_get_format
	mov	x20, x0
	ldr	w8, [x23]
	cbnz	w8, LBB0_24
	b	LBB0_32
LBB0_10:
	bl	_texture_from_resource
	mov	x24, x0
	ldr	x0, [x22, #8]
	ldr	x8, [x0]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.11:
	bl	_wined3d_format_is_typeless
	cbz	x0, LBB0_28
LBB0_12:
	cbz	x21, LBB0_16
; %bb.13:
	ldr	x8, [x22]
Lloh19:
	adrp	x9, _WINED3D_RTYPE_TEXTURE_3D@GOTPAGE
Lloh20:
	ldr	x9, [x9, _WINED3D_RTYPE_TEXTURE_3D@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.14:
	ldr	x1, [x19, #16]
	mov	x0, x24
	bl	_wined3d_texture_get_level_depth
	mov	x8, x0
	b	LBB0_17
LBB0_15:
	bl	_debug_d3dformat
	mov	x1, x0
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_31
LBB0_16:
	ldr	w8, [x24]
LBB0_17:
	ldrsw	x9, [x19, #24]
	cmp	x9, #1
	cset	w10, eq
	cmp	x9, #0
	cset	w11, ne
	cmp	x21, #0
	csel	w10, w11, w10, eq
	cmp	w10, #1
	b.ne	LBB0_32
; %bb.18:
	mov	x0, #0
	ldr	x10, [x19, #16]
	ldr	x11, [x24, #8]
	subs	x10, x11, x10
	b.le	LBB0_33
; %bb.19:
	cmp	x10, x9
	b.lt	LBB0_33
; %bb.20:
	ldr	w9, [x19, #28]
	cbz	w9, LBB0_32
; %bb.21:
	mov	x0, #0
	ldr	w10, [x19, #32]
	subs	w8, w8, w10
	b.ls	LBB0_33
; %bb.22:
	cmp	w9, w8
	b.ls	LBB0_26
	b	LBB0_33
LBB0_23:
	add	x23, x20, #8
	ldr	w8, [x23]
	cbz	w8, LBB0_32
LBB0_24:
	ldr	w9, [x21]
	udiv	w8, w9, w8
	ldr	w9, [x19, #40]
	subs	w8, w8, w9
	b.ls	LBB0_32
; %bb.25:
	ldr	w9, [x19, #44]
	cmp	w9, w8
	b.hi	LBB0_32
LBB0_26:
	mov	x0, x20
	b	LBB0_33
LBB0_27:
	bl	_debug_d3dformat
	mov	x1, x0
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_31
LBB0_28:
	cbz	x23, LBB0_30
; %bb.29:
	ldr	x8, [x22, #8]
	ldr	x0, [x8]
	ldr	x1, [x20]
	bl	_wined3d_formats_are_srgb_variants
	cbnz	w0, LBB0_12
LBB0_30:
	ldr	x0, [x20]
	bl	_debug_d3dformat
	mov	x1, x0
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_31:
	bl	_WARN
LBB0_32:
	mov	x0, #0
LBB0_33:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_RTYPE_BUFFER,8,3       ; @WINED3D_RTYPE_BUFFER
	.comm	_WINED3D_VIEW_BUFFER_RAW,4,2    ; @WINED3D_VIEW_BUFFER_RAW
	.comm	_WINED3DFMT_R32_TYPELESS,8,3    ; @WINED3DFMT_R32_TYPELESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid format %s for raw buffer view.\n"

	.comm	_WINED3DFMT_R32_UINT,8,3        ; @WINED3DFMT_R32_UINT
l_.str.1:                               ; @.str.1
	.asciz	"Trying to create view for typeless format %s.\n"

	.comm	_WINED3DFMT_UNKNOWN,8,3         ; @WINED3DFMT_UNKNOWN
l_.str.2:                               ; @.str.2
	.asciz	"Invalid format %s for structured buffer view.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Trying to create incompatible view for non typeless format %s.\n"

	.comm	_WINED3D_RTYPE_TEXTURE_3D,8,3   ; @WINED3D_RTYPE_TEXTURE_3D
	.no_dead_strip	_validate_resource_view
.subsections_via_symbols
