	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d12_set_menu_texture_frame
_d3d12_set_menu_texture_frame:          ## @d3d12_set_menu_texture_frame
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movl	%edx, %r14d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	jne	LBB0_1
## %bb.2:
	movq	_DXGI_FORMAT_EX_A4R4G4B4_UNORM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_DXGI_FORMAT_B8G8R8A8_UNORM@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r15d
	leaq	16(%rbx), %r14
	cmpl	%r13d, 32(%rbx)
	jne	LBB0_5
## %bb.4:
	cmpl	%r12d, 36(%rbx)
	je	LBB0_6
LBB0_5:
	movl	%r13d, 32(%rbx)
	movl	%r12d, 36(%rbx)
	movl	%r15d, 40(%rbx)
	leaq	60(%rbx), %rax
	movq	%rax, 24(%rbx)
	movl	56(%rbx), %edi
	movq	%r14, %rsi
	callq	_d3d12_init_texture
LBB0_6:
	leal	(,%r13,4), %edx
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%r15d, %ecx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	%r14, %r9
	callq	_d3d12_update_texture
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 8(%rbx)
	movq	$0, -80(%rbp)
	movq	$0, -56(%rbp)
	movl	48(%rbx), %edi
	leaq	-80(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	xorl	%esi, %esi
	callq	_D3D12Map
	movq	-56(%rbp), %rax
	movq	(%rax), %rcx
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 12(%rcx)
	movq	8(%rax), %rcx
	movss	%xmm0, 12(%rcx)
	movq	16(%rax), %rcx
	movss	%xmm0, 12(%rcx)
	movq	24(%rax), %rax
	movss	%xmm0, 12(%rax)
	movl	48(%rbx), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_D3D12Unmap
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	movq	(%rbx), %rax
	jne	LBB0_7
## %bb.8:
	movq	_RARCH_FILTER_NEAREST@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_7:
	movq	_RARCH_FILTER_LINEAR@GOTPCREL(%rip), %rcx
LBB0_9:
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_RARCH_WRAP_DEFAULT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 16(%rbx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DXGI_FORMAT_B8G8R8A8_UNORM,4,2 ## @DXGI_FORMAT_B8G8R8A8_UNORM
	.comm	_DXGI_FORMAT_EX_A4R4G4B4_UNORM,8,3 ## @DXGI_FORMAT_EX_A4R4G4B4_UNORM
	.comm	_RARCH_FILTER_LINEAR,8,3        ## @RARCH_FILTER_LINEAR
	.comm	_RARCH_WRAP_DEFAULT,8,3         ## @RARCH_WRAP_DEFAULT
	.comm	_RARCH_FILTER_NEAREST,8,3       ## @RARCH_FILTER_NEAREST
	.no_dead_strip	_d3d12_set_menu_texture_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d12_set_menu_texture_frame
_d3d12_set_menu_texture_frame:          ; @d3d12_set_menu_texture_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	fmov	s8, s0
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x21, x1
	mov	x19, x0
	bl	_config_get_ptr
	mov	x20, x0
Lloh0:
	adrp	x8, _DXGI_FORMAT_B8G8R8A8_UNORM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DXGI_FORMAT_B8G8R8A8_UNORM@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DXGI_FORMAT_EX_A4R4G4B4_UNORM@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DXGI_FORMAT_EX_A4R4G4B4_UNORM@GOTPAGEOFF]
	cmp	w24, #0
	csel	x8, x9, x8, eq
	ldr	w25, [x8]
	add	x24, x19, #16
	ldr	w8, [x19, #32]
	cmp	w8, w23
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x19, #36]
	cmp	w8, w22
	b.eq	LBB0_3
LBB0_2:
	stp	w23, w22, [x19, #32]
	str	w25, [x19, #40]
	add	x8, x19, #60
	str	x8, [x19, #24]
	ldr	w0, [x19, #56]
	mov	x1, x24
	bl	_d3d12_init_texture
LBB0_3:
	lsl	w2, w23, #2
	mov	x0, x23
	mov	x1, x22
	mov	x3, x25
	mov	x4, x21
	mov	x5, x24
	bl	_d3d12_update_texture
	str	s8, [x19, #8]
	stp	xzr, xzr, [sp]
	ldr	w0, [x19, #48]
	add	x2, sp, #8
	mov	x3, sp
	mov	w1, #0
	bl	_D3D12Map
	ldr	x8, [sp]
	ldr	x9, [x8]
	str	s8, [x9, #12]
	ldr	x9, [x8, #8]
	str	s8, [x9, #12]
	ldr	x9, [x8, #16]
	str	s8, [x9, #12]
	ldr	x8, [x8, #24]
	str	s8, [x8, #12]
	ldr	w0, [x19, #48]
	mov	w1, #0
	mov	x2, #0
	bl	_D3D12Unmap
	ldr	x8, [x20]
Lloh4:
	adrp	x9, _RARCH_FILTER_NEAREST@GOTPAGE
Lloh5:
	ldr	x9, [x9, _RARCH_FILTER_NEAREST@GOTPAGEOFF]
Lloh6:
	adrp	x10, _RARCH_FILTER_LINEAR@GOTPAGE
Lloh7:
	ldr	x10, [x10, _RARCH_FILTER_LINEAR@GOTPAGEOFF]
	ldr	x11, [x19]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	x8, [x8]
	ldr	x8, [x11, x8, lsl #3]
Lloh8:
	adrp	x9, _RARCH_WRAP_DEFAULT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RARCH_WRAP_DEFAULT@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x19, #16]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DXGI_FORMAT_B8G8R8A8_UNORM,4,2 ; @DXGI_FORMAT_B8G8R8A8_UNORM
	.comm	_DXGI_FORMAT_EX_A4R4G4B4_UNORM,8,3 ; @DXGI_FORMAT_EX_A4R4G4B4_UNORM
	.comm	_RARCH_FILTER_LINEAR,8,3        ; @RARCH_FILTER_LINEAR
	.comm	_RARCH_WRAP_DEFAULT,8,3         ; @RARCH_WRAP_DEFAULT
	.comm	_RARCH_FILTER_NEAREST,8,3       ; @RARCH_FILTER_NEAREST
	.no_dead_strip	_d3d12_set_menu_texture_frame
.subsections_via_symbols
