	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_format_calculate_size  ## -- Begin function wined3d_format_calculate_size
	.p2align	4, 0x90
_wined3d_format_calculate_size:         ## @wined3d_format_calculate_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%r8d, %r14d
	movq	(%rdi), %rbx
	movq	_WINED3DFMT_UNKNOWN@GOTPCREL(%rip), %r8
	xorl	%eax, %eax
	cmpq	(%r8), %rbx
	je	LBB0_4
## %bb.1:
	movq	8(%rdi), %r8
	movq	_WINED3D_GL_RES_TYPE_TEX_2D@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	movq	_WINED3DFMT_FLAG_BROKEN_PITCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r8,%rbx,4)
	je	LBB0_3
## %bb.2:
	imull	%edx, %ecx
	imull	%r14d, %ecx
	imull	16(%rdi), %ecx
	movl	%ecx, %eax
	jmp	LBB0_4
LBB0_3:
	leaq	-24(%rbp), %r8
	leaq	-20(%rbp), %r9
	callq	_wined3d_format_calculate_pitch
	imull	-20(%rbp), %r14d
	movl	%r14d, %eax
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3DFMT_UNKNOWN,8,3         ## @WINED3DFMT_UNKNOWN
	.comm	_WINED3D_GL_RES_TYPE_TEX_2D,8,3 ## @WINED3D_GL_RES_TYPE_TEX_2D
	.comm	_WINED3DFMT_FLAG_BROKEN_PITCH,4,2 ## @WINED3DFMT_FLAG_BROKEN_PITCH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_format_calculate_size  ; -- Begin function wined3d_format_calculate_size
	.p2align	2
_wined3d_format_calculate_size:         ; @wined3d_format_calculate_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _WINED3DFMT_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3DFMT_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_5
LBB0_2:
	mov	x19, x4
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x9, _WINED3D_GL_RES_TYPE_TEX_2D@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WINED3D_GL_RES_TYPE_TEX_2D@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
Lloh6:
	adrp	x9, _WINED3DFMT_FLAG_BROKEN_PITCH@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WINED3DFMT_FLAG_BROKEN_PITCH@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mul	w8, w3, w2
	mul	w8, w8, w19
	ldr	w9, [x0, #16]
	mul	w0, w8, w9
	b	LBB0_5
LBB0_4:
	add	x4, sp, #12
	add	x5, sp, #8
	bl	_wined3d_format_calculate_pitch
	ldr	w8, [sp, #8]
	mul	w0, w8, w19
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3DFMT_UNKNOWN,8,3         ; @WINED3DFMT_UNKNOWN
	.comm	_WINED3D_GL_RES_TYPE_TEX_2D,8,3 ; @WINED3D_GL_RES_TYPE_TEX_2D
	.comm	_WINED3DFMT_FLAG_BROKEN_PITCH,4,2 ; @WINED3DFMT_FLAG_BROKEN_PITCH
.subsections_via_symbols
