	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d12_update_texture           ## -- Begin function d3d12_update_texture
	.p2align	4, 0x90
_d3d12_update_texture:                  ## @d3d12_update_texture
	.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	$0, -56(%rbp)
	testq	%r9, %r9
	je	LBB0_3
## %bb.1:
	movq	%r9, %rbx
	movl	%edi, %r14d
	movl	4(%r9), %edi
	testl	%edi, %edi
	je	LBB0_3
## %bb.2:
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movl	%esi, %r13d
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	xorl	%esi, %esi
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	callq	_D3D12Map
	movl	12(%rbx), %r10d
	movl	16(%rbx), %r9d
	movslq	8(%rbx), %rax
	shlq	$2, %rax
	addq	-64(%rbp), %rax
	movl	%r14d, %edi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	pushq	%rax
	pushq	%r10
	callq	_dxgi_copy
	addq	$16, %rsp
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_D3D12Unmap
	movl	$1, (%rbx)
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d12_update_texture           ; -- Begin function d3d12_update_texture
	.p2align	2
_d3d12_update_texture:                  ; @d3d12_update_texture
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	str	xzr, [sp]
	cbz	x5, LBB0_3
; %bb.1:
	mov	x19, x5
	mov	x24, x0
	ldr	w0, [x5, #4]
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x4
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x2, sp
	add	x3, sp, #8
	mov	w1, #0
	bl	_D3D12Map
	ldp	w6, w5, [x19, #12]
	ldr	x8, [sp, #8]
	ldrsw	x9, [x19, #8]
	add	x7, x8, x9, lsl #2
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_dxgi_copy
	ldr	w0, [x19, #4]
	mov	w1, #0
	mov	x2, #0
	bl	_D3D12Unmap
	mov	w8, #1
	str	w8, [x19]
LBB0_3:
	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
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
