	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_free
_exynos_free:                           ## @exynos_free
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_g_drm_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_g_crtc_id@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_drmModeSetCrtc
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_WARN
LBB0_2:
	movq	16(%r15), %rdi
	movl	24(%r15), %esi
	callq	_exynos_clean_up_pages
	movq	16(%r15), %rdi
	callq	_free
	movq	$0, 16(%r15)
	movq	_EXYNOS_BUFFER_COUNT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	je	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_exynos_bo_destroy
	movq	8(%r15), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movl	(%r14), %eax
	cmpq	%rax, %rbx
	jb	LBB0_4
LBB0_5:
	movq	(%r15), %rdi
	callq	_exynos_device_destroy
	movq	$0, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_drm_fd,4,2                   ## @g_drm_fd
	.comm	_g_crtc_id,4,2                  ## @g_crtc_id
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[video_exynos]: failed to disable the CRTC.\n"

	.comm	_EXYNOS_BUFFER_COUNT,4,2        ## @EXYNOS_BUFFER_COUNT
	.no_dead_strip	_exynos_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_free
_exynos_free:                           ; @exynos_free
	.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, x0
Lloh0:
	adrp	x8, _g_drm_fd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_drm_fd@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _g_crtc_id@GOTPAGE
Lloh4:
	ldr	x8, [x8, _g_crtc_id@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	mov	w6, #0
	mov	x7, #0
	bl	_drmModeSetCrtc
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_WARN
LBB0_2:
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #24]
	bl	_exynos_clean_up_pages
	ldr	x0, [x19, #16]
	bl	_free
	str	xzr, [x19, #16]
Lloh8:
	adrp	x20, _EXYNOS_BUFFER_COUNT@GOTPAGE
Lloh9:
	ldr	x20, [x20, _EXYNOS_BUFFER_COUNT@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	lsl	x22, x21, #3
	ldr	x0, [x8, x22]
	bl	_exynos_bo_destroy
	ldr	x8, [x19, #8]
	str	xzr, [x8, x22]
	add	x21, x21, #1
	ldr	w8, [x20]
	cmp	x21, x8
	b.lo	LBB0_4
LBB0_5:
	ldr	x0, [x19]
	bl	_exynos_device_destroy
	str	xzr, [x19]
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_g_drm_fd,4,2                   ; @g_drm_fd
	.comm	_g_crtc_id,4,2                  ; @g_crtc_id
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[video_exynos]: failed to disable the CRTC.\n"

	.comm	_EXYNOS_BUFFER_COUNT,4,2        ; @EXYNOS_BUFFER_COUNT
	.no_dead_strip	_exynos_free
.subsections_via_symbols
