	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d12_gfx_load_texture
_d3d12_gfx_load_texture:                ## @d3d12_gfx_load_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movl	%ecx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	$1, %edi
	movl	$40, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %rbx
	addl	$-128, %r12d
	cmpl	$3, %r12d
	ja	LBB0_10
## %bb.3:
	movq	_RARCH_FILTER_LINEAR@GOTPCREL(%rip), %rax
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%r12,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_4:
	movq	_UINT16_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
LBB0_5:
	movq	_RARCH_FILTER_NEAREST@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movq	_UINT16_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 24(%rbx)
LBB0_9:
	movq	8(%r15), %rcx
	movq	(%rax), %rax
	movq	(%rcx,%rax,8), %rax
	movq	_RARCH_WRAP_EDGE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 32(%rbx)
LBB0_10:
	movl	8(%r14), %eax
	movl	%eax, 16(%rbx)
	movl	4(%r14), %eax
	movl	%eax, 12(%rbx)
	movq	_DXGI_FORMAT_B8G8R8A8_UNORM@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, 8(%rbx)
	leaq	4(%r15), %rax
	movq	%rax, (%rbx)
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_d3d12_init_texture
	movl	8(%r14), %edi
	movl	(%r14), %r8d
	movl	4(%r14), %esi
	movl	(%r12), %ecx
	xorl	%edx, %edx
	movq	%rbx, %r9
	callq	_d3d12_update_texture
LBB0_11:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_4
	.long	L0_0_set_8
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_UINT16_MAX,8,3                 ## @UINT16_MAX
	.comm	_RARCH_FILTER_LINEAR,8,3        ## @RARCH_FILTER_LINEAR
	.comm	_RARCH_WRAP_EDGE,8,3            ## @RARCH_WRAP_EDGE
	.comm	_RARCH_FILTER_NEAREST,8,3       ## @RARCH_FILTER_NEAREST
	.comm	_DXGI_FORMAT_B8G8R8A8_UNORM,4,2 ## @DXGI_FORMAT_B8G8R8A8_UNORM
	.no_dead_strip	_d3d12_gfx_load_texture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d12_gfx_load_texture
_d3d12_gfx_load_texture:                ; @d3d12_gfx_load_texture
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x22, x3
	mov	x20, x1
	mov	x21, x0
	mov	w0, #1
	mov	w1, #40
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.2:
	sub	w9, w22, #128
	cmp	w9, #3
	b.hi	LBB0_9
; %bb.3:
Lloh0:
	adrp	x8, _RARCH_FILTER_LINEAR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RARCH_FILTER_LINEAR@GOTPAGEOFF]
Lloh2:
	adrp	x10, lJTI0_0@PAGE
Lloh3:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_4
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_4:
Lloh4:
	adrp	x8, _UINT16_MAX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _UINT16_MAX@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	str	x8, [x19, #24]
LBB0_5:
Lloh7:
	adrp	x8, _RARCH_FILTER_NEAREST@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RARCH_FILTER_NEAREST@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	mov	x19, #0
	b	LBB0_10
LBB0_7:
Lloh9:
	adrp	x8, _UINT16_MAX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _UINT16_MAX@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	x8, [x19, #24]
Lloh12:
	adrp	x8, _RARCH_FILTER_LINEAR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RARCH_FILTER_LINEAR@GOTPAGEOFF]
LBB0_8:
	ldr	x9, [x21, #8]
	ldr	x8, [x8]
	ldr	x8, [x9, x8, lsl #3]
Lloh14:
	adrp	x9, _RARCH_WRAP_EDGE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _RARCH_WRAP_EDGE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x19, #32]
LBB0_9:
	ldur	d0, [x20, #4]
Lloh17:
	adrp	x22, _DXGI_FORMAT_B8G8R8A8_UNORM@GOTPAGE
Lloh18:
	ldr	x22, [x22, _DXGI_FORMAT_B8G8R8A8_UNORM@GOTPAGEOFF]
	stur	d0, [x19, #12]
	ldr	w8, [x22]
	str	w8, [x19, #8]
	ldr	w0, [x21], #4
	str	x21, [x19]
	mov	x1, x19
	bl	_d3d12_init_texture
	ldp	w1, w0, [x20, #4]
	ldr	w3, [x22]
	ldr	w4, [x20]
	mov	w2, #0
	mov	x5, x19
	bl	_d3d12_update_texture
LBB0_10:
	mov	x0, x19
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
                                        ; -- End function
	.comm	_UINT16_MAX,8,3                 ; @UINT16_MAX
	.comm	_RARCH_FILTER_LINEAR,8,3        ; @RARCH_FILTER_LINEAR
	.comm	_RARCH_WRAP_EDGE,8,3            ; @RARCH_WRAP_EDGE
	.comm	_RARCH_FILTER_NEAREST,8,3       ; @RARCH_FILTER_NEAREST
	.comm	_DXGI_FORMAT_B8G8R8A8_UNORM,4,2 ; @DXGI_FORMAT_B8G8R8A8_UNORM
	.no_dead_strip	_d3d12_gfx_load_texture
.subsections_via_symbols
