	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wined3d_cs_st_require_space
_wined3d_cs_st_require_space:           ## @wined3d_cs_st_require_space
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movslq	(%rdi), %rsi
	movq	8(%rdi), %rdx
	movq	%rsi, %rax
	subq	%rdx, %rax
	cmpq	%r14, %rax
	jae	LBB0_1
## %bb.2:
	addl	%esi, %esi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_max
	movq	%rax, %r15
	cmpq	$0, 8(%rbx)
	je	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	callq	_heap_alloc
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	movl	%r15d, (%rbx)
	movq	$0, 16(%rbx)
	movq	%rax, 24(%rbx)
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	LBB0_8
LBB0_1:
	movq	16(%rbx), %rcx
	movq	24(%rbx), %rax
LBB0_8:
	addq	%rax, %rcx
	addq	%r14, %rdx
	movq	%rdx, 8(%rbx)
	jmp	LBB0_9
LBB0_3:
	movq	24(%rbx), %rdi
	movq	%r15, %rsi
	callq	_heap_realloc
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	xorl	%ecx, %ecx
LBB0_9:
	movq	%rcx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_wined3d_cs_st_require_space
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wined3d_cs_st_require_space
_wined3d_cs_st_require_space:           ; @wined3d_cs_st_require_space
	.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	x20, x1
	mov	x19, x0
	ldrsw	x9, [x0]
	ldr	x8, [x0, #8]
	sub	x10, x9, x8
	cmp	x10, x1
	b.hs	LBB0_3
; %bb.1:
	lsl	w1, w9, #1
	mov	x0, x20
	bl	_max
	mov	x21, x0
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x21
	bl	_heap_alloc
	cbnz	x0, LBB0_5
	b	LBB0_7
LBB0_3:
	ldp	x9, x0, [x19, #16]
	b	LBB0_6
LBB0_4:
	ldr	x0, [x19, #24]
	mov	x1, x21
	bl	_heap_realloc
	cbz	x0, LBB0_7
LBB0_5:
	mov	x9, #0
	mov	x8, #0
	str	w21, [x19]
	stp	xzr, x0, [x19, #16]
LBB0_6:
	add	x8, x8, x20
	str	x8, [x19, #8]
	add	x0, x0, x9
LBB0_7:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_wined3d_cs_st_require_space
.subsections_via_symbols
