	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wrap_texture_buf
_wrap_texture_buf:                      ## @wrap_texture_buf
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	$16, %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, 8(%rax)
	movl	%r15d, (%rax)
	movq	_free_texture@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$8, %esi
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	_av_buffer_create
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_ID3D11Texture2D_Release
	movq	%rbx, %rdi
	callq	_av_free
	jmp	LBB0_4
LBB0_1:
	movq	%r14, %rdi
	callq	_ID3D11Texture2D_Release
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_free_texture,4,2               ## @free_texture
	.no_dead_strip	_wrap_texture_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wrap_texture_buf
_wrap_texture_buf:                      ; @wrap_texture_buf
	.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	x21, x1
	mov	x19, x0
	mov	w0, #16
	bl	_av_mallocz
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #8]
	str	w21, [x0]
Lloh0:
	adrp	x8, _free_texture@GOTPAGE
Lloh1:
	ldr	x8, [x8, _free_texture@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #8
	mov	x3, x19
	mov	w4, #0
	bl	_av_buffer_create
	cbnz	x0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_ID3D11Texture2D_Release
	mov	x0, x20
	bl	_av_free
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_ID3D11Texture2D_Release
LBB0_4:
	mov	x0, #0
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_free_texture,4,2               ; @free_texture
	.no_dead_strip	_wrap_texture_buf
.subsections_via_symbols
