	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function caca_set_texture_frame
_caca_set_texture_frame:                ## @caca_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$1, %edx
	movb	$2, %al
	sbbb	$0, %al
	movl	%ecx, %ebx
	movl	%eax, %ecx
	shll	%cl, %ebx
	movl	%r8d, %r15d
	movq	%rsi, %r14
	movq	_caca_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	%r15d, %r15d
	je	LBB0_5
## %bb.3:
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:
	movl	%ebx, %edi
	imull	%r15d, %edi
	callq	_malloc
	movq	%rax, %rdi
	movq	%rax, (%r12)
LBB0_5:
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.6:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.7:
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.10:
	imull	%r15d, %ebx
	movq	%r14, %rsi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_caca_menu_frame,8,3            ## @caca_menu_frame
	.comm	_caca_menu_width,4,2            ## @caca_menu_width
	.comm	_caca_menu_height,4,2           ## @caca_menu_height
	.comm	_caca_menu_pitch,4,2            ## @caca_menu_pitch
	.no_dead_strip	_caca_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 caca_set_texture_frame
_caca_set_texture_frame:                ; @caca_set_texture_frame
	.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	x19, x4
	mov	x20, x1
	cmp	w2, #0
	mov	w8, #1
	cinc	w8, w8, ne
	lsl	w21, w3, w8
Lloh0:
	adrp	x22, _caca_menu_frame@GOTPAGE
Lloh1:
	ldr	x22, [x22, _caca_menu_frame@GOTPAGEOFF]
	ldr	x0, [x22]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
	str	xzr, [x22]
LBB0_2:
	mov	x0, #0
	cbz	w19, LBB0_5
; %bb.3:
	cbz	w21, LBB0_5
; %bb.4:
	mul	w0, w21, w19
	bl	_malloc
	str	x0, [x22]
LBB0_5:
	cbz	w19, LBB0_10
; %bb.6:
	cbz	w21, LBB0_10
; %bb.7:
	cbz	x20, LBB0_10
; %bb.8:
	cbz	x0, LBB0_10
; %bb.9:
	mul	w2, w21, w19
	mov	x1, x20
	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
	b	_memcpy
LBB0_10:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_caca_menu_frame,8,3            ; @caca_menu_frame
	.comm	_caca_menu_width,4,2            ; @caca_menu_width
	.comm	_caca_menu_height,4,2           ; @caca_menu_height
	.comm	_caca_menu_pitch,4,2            ; @caca_menu_pitch
	.no_dead_strip	_caca_set_texture_frame
.subsections_via_symbols
