	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_realloc_buffer
_exynos_realloc_buffer:                 ## @exynos_realloc_buffer
	.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
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movl	%esi, %r13d
	movq	(%rax,%r13,8), %rdi
	movl	$-1, %r15d
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	movl	%edx, %r12d
	xorl	%r15d, %r15d
	cmpl	%edx, (%rdi)
	jae	LBB0_10
## %bb.2:
	movl	%esi, %ebx
	callq	_exynos_bo_destroy
	movl	16(%r14), %edi
	movl	%r12d, %esi
	callq	_exynos_create_mapped_buffer
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	8(%r14), %rcx
	movq	%rax, (%rcx,%r13,8)
	movq	_EXYNOS_IMAGE_COUNT@GOTPCREL(%rip), %r8
	movl	(%r8), %edx
	testl	%edx, %edx
	je	LBB0_10
## %bb.5:
	movq	_defaults@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	xorl	%edi, %edi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rdi
	movl	%edx, %ecx
	cmpq	%rcx, %rdi
	jae	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, (%rsi,%rdi,4)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%rax), %edx
	movq	(%r14), %rcx
	movq	(%rcx,%rdi,8), %rcx
	movq	(%rcx), %rcx
	movl	%edx, (%rcx)
	movl	(%r8), %edx
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
	movl	$-1, %r15d
	jmp	LBB0_10
LBB0_9:
	xorl	%r15d, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[video_exynos]: reallocation failed\n"

	.comm	_EXYNOS_IMAGE_COUNT,4,2         ## @EXYNOS_IMAGE_COUNT
	.comm	_defaults,8,3                   ## @defaults
	.no_dead_strip	_exynos_realloc_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_realloc_buffer
_exynos_realloc_buffer:                 ; @exynos_realloc_buffer
	.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	x20, x0
	ldr	x8, [x0, #8]
	ldr	x0, [x8, w1, uxtw #3]
	cbz	x0, LBB0_10
; %bb.1:
	mov	x21, x2
	ldr	w8, [x0]
	cmp	w8, w2
	b.hs	LBB0_8
; %bb.2:
	mov	x19, x1
	bl	_exynos_bo_destroy
	ldr	w0, [x20, #16]
	mov	x1, x21
	bl	_exynos_create_mapped_buffer
	cbz	x0, LBB0_9
; %bb.3:
	mov	w8, w19
	ldr	x9, [x20, #8]
	str	x0, [x9, x8, lsl #3]
Lloh0:
	adrp	x8, _EXYNOS_IMAGE_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXYNOS_IMAGE_COUNT@GOTPAGEOFF]
	ldr	w11, [x8]
	cbz	w11, LBB0_8
; %bb.4:
	mov	x9, #0
Lloh2:
	adrp	x10, _defaults@GOTPAGE
Lloh3:
	ldr	x10, [x10, _defaults@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x9, #1
	cmp	x9, w11, uxtw
	b.hs	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10, x9, lsl #2]
	cmp	w12, w19
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w11, [x0, #4]
	ldr	x12, [x20]
	ldr	x12, [x12, x9, lsl #3]
	ldr	x12, [x12]
	str	w11, [x12]
	ldr	w11, [x8]
	b	LBB0_5
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
LBB0_10:
	mov	w0, #-1
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[video_exynos]: reallocation failed\n"

	.comm	_EXYNOS_IMAGE_COUNT,4,2         ; @EXYNOS_IMAGE_COUNT
	.comm	_defaults,8,3                   ; @defaults
	.no_dead_strip	_exynos_realloc_buffer
.subsections_via_symbols
