	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function texture_resource_sub_resource_map_info
_texture_resource_sub_resource_map_info: ## @texture_resource_sub_resource_map_info
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	8(%rdi), %r15
	movl	(%rdi), %r13d
	callq	_texture_from_resource
	movq	%rax, %r12
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_wined3d_texture_get_sub_resource
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%r12)
	movl	%edx, %r15d
	movq	_WINED3DFMT_FLAG_BROKEN_PITCH@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_wined3d_texture_get_level_width
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	imull	(%rcx), %eax
	movl	%eax, (%r14)
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_wined3d_texture_get_level_height
	movl	%eax, %ebx
	imull	(%r14), %ebx
	movl	%ebx, 4(%r14)
	jmp	LBB0_5
LBB0_1:
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	leaq	4(%r14), %rcx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_wined3d_texture_get_pitch
	movl	4(%r14), %ebx
LBB0_5:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_wined3d_texture_get_level_depth
	imull	%ebx, %eax
	movl	%eax, 8(%r14)
	movq	_WINED3D_OK@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E_INVALIDARG,4,2               ## @E_INVALIDARG
	.comm	_WINED3DFMT_FLAG_BROKEN_PITCH,4,2 ## @WINED3DFMT_FLAG_BROKEN_PITCH
	.comm	_WINED3D_OK,4,2                 ## @WINED3D_OK
	.no_dead_strip	_texture_resource_sub_resource_map_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function texture_resource_sub_resource_map_info
_texture_resource_sub_resource_map_info: ; @texture_resource_sub_resource_map_info
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x21, x1
	ldr	x22, [x0, #8]
	ldr	w23, [x0]
	bl	_texture_from_resource
	mov	x20, x0
	mov	x1, x21
	bl	_wined3d_texture_get_sub_resource
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x20]
	udiv	w9, w21, w8
	msub	w21, w9, w8, w21
Lloh0:
	adrp	x8, _WINED3DFMT_FLAG_BROKEN_PITCH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3DFMT_FLAG_BROKEN_PITCH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_wined3d_texture_get_level_width
	ldr	w8, [x22]
	mul	w8, w8, w0
	str	w8, [x19]
	mov	x0, x20
	mov	x1, x21
	bl	_wined3d_texture_get_level_height
	ldr	w8, [x19]
	mul	w22, w8, w0
	str	w22, [x19, #4]
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _E_INVALIDARG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _E_INVALIDARG@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	add	x3, x19, #4
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_wined3d_texture_get_pitch
	ldr	w22, [x19, #4]
LBB0_5:
	mov	x0, x20
	mov	x1, x21
	bl	_wined3d_texture_get_level_depth
	mul	w8, w0, w22
	str	w8, [x19, #8]
Lloh5:
	adrp	x8, _WINED3D_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WINED3D_OK@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_E_INVALIDARG,4,2               ; @E_INVALIDARG
	.comm	_WINED3DFMT_FLAG_BROKEN_PITCH,4,2 ; @WINED3DFMT_FLAG_BROKEN_PITCH
	.comm	_WINED3D_OK,4,2                 ; @WINED3D_OK
	.no_dead_strip	_texture_resource_sub_resource_map_info
.subsections_via_symbols
