	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omapfb_free                    ## -- Begin function omapfb_free
	.p2align	4, 0x90
_omapfb_free:                           ## @omapfb_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, %rbx
	cmpq	$0, 32(%rdi)
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	movq	_OMAPFB_WAITFORGO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	callq	_ioctl
LBB0_2:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	movq	16(%rbx), %rax
	movl	20(%rax), %esi
	callq	_munmap
	movq	$0, 8(%rbx)
LBB0_4:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	leaq	24(%rax), %rdx
	movl	24(%rax), %r15d
	movl	$0, 24(%rax)
	movl	(%rbx), %edi
	movq	_OMAPFB_SETUP_PLANE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	xorl	%eax, %eax
	callq	_ioctl
	movl	(%rbx), %edi
	movq	_OMAPFB_SETUP_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%rbx), %rdx
	addq	$16, %rdx
	xorl	%eax, %eax
	callq	_ioctl
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	movq	24(%rbx), %rdx
	movl	%r15d, 24(%rdx)
	addq	$24, %rdx
	movl	(%rbx), %edi
	movl	(%r14), %esi
	xorl	%eax, %eax
	callq	_ioctl
LBB0_7:
	movq	24(%rbx), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movq	_PROT_READ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	20(%rax), %esi
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%rbx), %r8d
	xorl	%edi, %edi
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %r14
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_9
## %bb.8:
	movq	24(%rbx), %rax
	movq	(%rax), %rsi
	movl	20(%rax), %edx
	movq	%r14, %rdi
	callq	_memcpy
	movq	24(%rbx), %rax
	movl	20(%rax), %esi
	movq	%r14, %rdi
	callq	_munmap
LBB0_9:
	movl	(%rbx), %edi
	movq	_FBIOPUT_VSCREENINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%rbx), %rdx
	addq	$8, %rdx
	xorl	%eax, %eax
	callq	_ioctl
	movq	24(%rbx), %rax
	movq	(%rax), %rdi
	callq	_free
	movq	24(%rbx), %rdi
	movq	$0, (%rdi)
	callq	_free
	movq	$0, 24(%rbx)
LBB0_10:
	movq	16(%rbx), %rdi
	callq	_free
	movq	$0, 16(%rbx)
	movl	(%rbx), %edi
	callq	_close
	movl	$-1, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAPFB_WAITFORGO,4,2           ## @OMAPFB_WAITFORGO
	.comm	_OMAPFB_SETUP_PLANE,4,2         ## @OMAPFB_SETUP_PLANE
	.comm	_OMAPFB_SETUP_MEM,4,2           ## @OMAPFB_SETUP_MEM
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_FBIOPUT_VSCREENINFO,4,2        ## @FBIOPUT_VSCREENINFO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omapfb_free                    ; -- Begin function omapfb_free
	.p2align	2
_omapfb_free:                           ; @omapfb_free
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _OMAPFB_WAITFORGO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OMAPFB_WAITFORGO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ioctl
LBB0_2:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19, #16]
	ldr	w1, [x8, #20]
	bl	_munmap
	str	xzr, [x19, #8]
LBB0_4:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.5:
	ldr	w20, [x8, #24]!
	str	wzr, [x8]
	ldr	w0, [x19]
Lloh3:
	adrp	x21, _OMAPFB_SETUP_PLANE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _OMAPFB_SETUP_PLANE@GOTPAGEOFF]
	ldr	w1, [x21]
	str	x8, [sp]
	bl	_ioctl
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _OMAPFB_SETUP_MEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OMAPFB_SETUP_MEM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	x8, [x19, #24]
	add	x8, x8, #16
	str	x8, [sp]
	bl	_ioctl
	cbz	w20, LBB0_7
; %bb.6:
	ldr	x8, [x19, #24]
	str	w20, [x8, #24]!
	ldr	w0, [x19]
	ldr	w1, [x21]
	str	x8, [sp]
	bl	_ioctl
LBB0_7:
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #20]
Lloh8:
	adrp	x8, _PROT_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PROT_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _PROT_READ@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PROT_READ@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh14:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	ldr	w4, [x19]
	mov	w0, #0
	mov	w5, #0
	bl	_mmap
Lloh17:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:
	mov	x20, x0
	ldr	x8, [x19, #24]
	ldr	x1, [x8]
	ldr	w2, [x8, #20]
	bl	_memcpy
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #20]
	mov	x0, x20
	bl	_munmap
LBB0_9:
	ldr	w0, [x19]
Lloh20:
	adrp	x8, _FBIOPUT_VSCREENINFO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FBIOPUT_VSCREENINFO@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	x8, [x19, #24]
	add	x8, x8, #8
	str	x8, [sp]
	bl	_ioctl
	ldr	x8, [x19, #24]
	ldr	x0, [x8]
	bl	_free
	ldr	x0, [x19, #24]
	str	xzr, [x0]
	bl	_free
	str	xzr, [x19, #24]
LBB0_10:
	ldr	x0, [x19, #16]
	bl	_free
	str	xzr, [x19, #16]
	ldr	w0, [x19]
	bl	_close
	mov	w8, #-1
	str	w8, [x19]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAPFB_WAITFORGO,4,2           ; @OMAPFB_WAITFORGO
	.comm	_OMAPFB_SETUP_PLANE,4,2         ; @OMAPFB_SETUP_PLANE
	.comm	_OMAPFB_SETUP_MEM,4,2           ; @OMAPFB_SETUP_MEM
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_FBIOPUT_VSCREENINFO,4,2        ; @FBIOPUT_VSCREENINFO
.subsections_via_symbols
