	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function video_layout_load_image
_video_layout_load_image:               ## @video_layout_load_image
	.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
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	callq	_video_driver_supports_rgba
	movl	%eax, -56(%rbp)
	movq	_video_layout_state@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	$0, 40(%rax)
	je	LBB0_6
## %bb.1:
	movq	%rbx, %r15
	movq	%rsp, %r13
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	(%r15), %rax
	movl	32(%rax), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_strlcpy
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_strlcat
	xorl	%r15d, %r15d
	leaq	-64(%rbp), %rsi
	leaq	-72(%rbp), %rcx
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_file_archive_compressed_read
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	callq	_image_texture_get_type
	movq	-64(%rbp), %rdx
	movq	-72(%rbp), %rcx
	leaq	-56(%rbp), %rdi
	movl	%eax, %esi
	callq	_image_texture_load_buffer
	movl	%eax, %ebx
	movq	-64(%rbp), %rdi
	callq	_free
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.14:
	movq	%r13, %rsp
	movq	_video_layout_state@GOTPCREL(%rip), %rbx
	jmp	LBB0_9
LBB0_6:
	movq	%rsp, %r12
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	(%rbx), %rax
	movl	32(%rax), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_strlcpy
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_strlcat
	leaq	-56(%rbp), %rdi
	movq	%r15, %rsi
	callq	_image_texture_load
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	%r12, %rsp
LBB0_9:
	movq	(%rbx), %rax
	movq	24(%rax), %rcx
	movl	16(%rax), %edi
	movl	-56(%rbp), %esi
	callq	*(%rcx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%rax, %r14
	movq	(%rbx), %rdi
	movslq	(%rdi), %r15
	leal	1(%r15), %edx
	movl	%edx, (%rdi)
	addq	$8, %rdi
	movl	$8, %esi
	callq	_vec_size
	movq	(%rbx), %rax
	movq	8(%rax), %rax
	movq	%r14, (%rax,%r15,8)
	jmp	LBB0_12
LBB0_2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_5
LBB0_10:
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	movq	%r12, %rsi
	callq	_RARCH_LOG
	movq	%r13, %rsp
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_RARCH_LOG
	xorl	%r15d, %r15d
	movq	%r12, %rsp
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.13:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_video_layout_state,8,3         ## @video_layout_state
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"video_layout: failed to decompress image: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"video_layout: failed to load image: %s\n"

	.no_dead_strip	_video_layout_load_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function video_layout_load_image
_video_layout_load_image:               ; @video_layout_load_image
	.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
	sub	sp, sp, #32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_video_driver_supports_rgba
	stur	w0, [x29, #-64]
Lloh3:
	adrp	x22, _video_layout_state@GOTPAGE
Lloh4:
	ldr	x22, [x22, _video_layout_state@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x8, [x8, #40]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x23, sp
Lloh5:
	adrp	x8, _PATH_MAX_LENGTH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PATH_MAX_LENGTH@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	mov	x9, x21
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
	ldr	x8, [x22]
	ldr	w1, [x8, #32]
	mov	x0, x20
	mov	x2, x21
	bl	_strlcpy
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_strlcat
	sub	x1, x29, #72
	sub	x3, x29, #80
	mov	x0, x20
	mov	x2, #0
	bl	_file_archive_compressed_read
	cbz	w0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_image_texture_get_type
	mov	x1, x0
	ldp	x3, x2, [x29, #-80]
	sub	x0, x29, #64
	bl	_image_texture_load_buffer
	mov	x19, x0
	ldur	x0, [x29, #-72]
	bl	_free
	cbz	w19, LBB0_6
LBB0_3:
	mov	sp, x23
	ldr	x8, [x22]
	ldr	x9, [x8, #24]
	ldr	x9, [x9]
	ldr	w0, [x8, #16]
	ldur	w1, [x29, #-64]
	blr	x9
	cbz	x0, LBB0_9
; %bb.4:
	mov	x20, x0
	ldr	x0, [x22]
	ldrsw	x19, [x0]
	add	w2, w19, #1
	str	w2, [x0], #8
	mov	w1, #8
	bl	_vec_size
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	str	x20, [x8, x19, lsl #3]
	b	LBB0_10
LBB0_5:
	mov	x23, sp
Lloh10:
	adrp	x8, _PATH_MAX_LENGTH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PATH_MAX_LENGTH@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	mov	x9, x21
Lloh13:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh14:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
	ldr	x8, [x22]
	ldr	w1, [x8, #32]
	mov	x0, x20
	mov	x2, x21
	bl	_strlcpy
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_strlcat
	sub	x0, x29, #64
	mov	x1, x20
	bl	_image_texture_load
	cbnz	w0, LBB0_3
LBB0_6:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
LBB0_8:
	mov	x1, x20
	bl	_RARCH_LOG
	mov	sp, x23
LBB0_9:
	mov	w19, #0
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x19
	sub	sp, x29, #48
	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
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_video_layout_state,8,3         ; @video_layout_state
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"video_layout: failed to decompress image: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"video_layout: failed to load image: %s\n"

	.no_dead_strip	_video_layout_load_image
.subsections_via_symbols
