	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fpga_set_texture_frame
_fpga_set_texture_frame:                ## @fpga_set_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	cmpl	$1, %edx
	movb	$2, %al
	sbbb	$0, %al
	movl	%ecx, %ebx
	movl	%ecx, %r14d
	movl	%eax, %ecx
	shll	%cl, %r14d
	movl	%r8d, %r13d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	_fpga_menu_frame@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free
	movq	$0, (%r12)
LBB0_2:
	xorl	%edi, %edi
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.3:
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.4:
	movl	%r14d, %edi
	imull	%r13d, %edi
	callq	_malloc
	movq	%rax, %rdi
	movq	%rax, (%r12)
LBB0_5:
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.6:
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.7:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_10
## %bb.8:
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	movl	%ebx, %r12d
	xorl	%ebx, %ebx
	testl	%r15d, %r15d
	setne	%bl
	movl	%r14d, %edx
	imull	%r13d, %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	movq	_fpga_menu_width@GOTPCREL(%rip), %rax
	movl	%r12d, (%rax)
	movq	_fpga_menu_height@GOTPCREL(%rip), %rax
	movl	%r13d, (%rax)
	movq	_fpga_menu_pitch@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	shll	$4, %ebx
	addl	$16, %ebx
	movq	_fpga_menu_bits@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fpga_menu_frame,8,3            ## @fpga_menu_frame
	.comm	_fpga_menu_width,4,2            ## @fpga_menu_width
	.comm	_fpga_menu_height,4,2           ## @fpga_menu_height
	.comm	_fpga_menu_pitch,4,2            ## @fpga_menu_pitch
	.comm	_fpga_menu_bits,4,2             ## @fpga_menu_bits
	.no_dead_strip	_fpga_set_texture_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fpga_set_texture_frame
_fpga_set_texture_frame:                ; @fpga_set_texture_frame
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x4
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	cmp	w2, #0
	mov	w8, #1
	cinc	w8, w8, ne
	lsl	w23, w3, w8
Lloh0:
	adrp	x24, _fpga_menu_frame@GOTPAGE
Lloh1:
	ldr	x24, [x24, _fpga_menu_frame@GOTPAGEOFF]
	ldr	x0, [x24]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
	str	xzr, [x24]
LBB0_2:
	mov	x0, #0
	cbz	w20, LBB0_5
; %bb.3:
	cbz	w23, LBB0_5
; %bb.4:
	mul	w0, w23, w20
	bl	_malloc
	str	x0, [x24]
LBB0_5:
	cbz	w20, LBB0_10
; %bb.6:
	cbz	w23, LBB0_10
; %bb.7:
	cbz	x22, LBB0_10
; %bb.8:
	cbz	x0, LBB0_10
; %bb.9:
	mul	w2, w23, w20
	mov	x1, x22
	bl	_memcpy
Lloh2:
	adrp	x8, _fpga_menu_width@GOTPAGE
Lloh3:
	ldr	x8, [x8, _fpga_menu_width@GOTPAGEOFF]
Lloh4:
	adrp	x9, _fpga_menu_height@GOTPAGE
Lloh5:
	ldr	x9, [x9, _fpga_menu_height@GOTPAGEOFF]
Lloh6:
	str	w21, [x8]
Lloh7:
	str	w20, [x9]
Lloh8:
	adrp	x8, _fpga_menu_pitch@GOTPAGE
Lloh9:
	ldr	x8, [x8, _fpga_menu_pitch@GOTPAGEOFF]
Lloh10:
	str	w23, [x8]
	mov	w8, #32
	mov	w9, #16
	cmp	w19, #0
	csel	w8, w9, w8, eq
Lloh11:
	adrp	x9, _fpga_menu_bits@GOTPAGE
Lloh12:
	ldr	x9, [x9, _fpga_menu_bits@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_fpga_menu_frame,8,3            ; @fpga_menu_frame
	.comm	_fpga_menu_width,4,2            ; @fpga_menu_width
	.comm	_fpga_menu_height,4,2           ; @fpga_menu_height
	.comm	_fpga_menu_pitch,4,2            ; @fpga_menu_pitch
	.comm	_fpga_menu_bits,4,2             ; @fpga_menu_bits
	.no_dead_strip	_fpga_set_texture_frame
.subsections_via_symbols
