	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omapfb_setup_pages
_omapfb_setup_pages:                    ## @omapfb_setup_pages
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %rax
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movl	(%r15), %edi
	movl	$16, %esi
	callq	_calloc
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movl	(%r15), %edx
	testl	%edx, %edx
	jle	LBB0_4
## %bb.5:
	movq	40(%r15), %rcx
	movl	(%rcx), %r11d
	movq	32(%r15), %r8
	movl	4(%r15), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ecx, %rsi
	xorl	%edi, %edi
	cmpl	$1, %edx
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_7
## %bb.6:
	xorl	%esi, %esi
	jmp	LBB0_9
LBB0_4:
	movl	4(%r15), %edx
	jmp	LBB0_12
LBB0_7:
	movl	%edx, %r14d
	andl	$-2, %r14d
	leaq	24(%rax), %rcx
	leal	(%r11,%r11), %r12d
	leaq	(,%rsi,4), %r13
	leaq	(,%rsi,8), %r10
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%edi, -24(%rcx)
	movq	%r8, -16(%rcx)
	movl	$0, -20(%rcx)
	leal	(%r11,%rdi), %r9d
	movl	%r9d, -8(%rcx)
	leaq	(%r8,%r13), %rbx
	movq	%rbx, (%rcx)
	movl	$0, -4(%rcx)
	addq	$2, %rsi
	addq	$32, %rcx
	addl	%r12d, %edi
	addq	%r10, %r8
	cmpq	%rsi, %r14
	jne	LBB0_8
LBB0_9:
	testb	$1, %dl
	je	LBB0_11
## %bb.10:
	movq	%rsi, %rcx
	shlq	$4, %rcx
	imull	%esi, %r11d
	movl	%r11d, (%rax,%rcx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	imulq	%rsi, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rdi,4), %rdx
	movq	%rdx, 8(%rax,%rcx)
	movl	$0, 4(%rax,%rcx)
LBB0_11:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_12:
	movq	$0, 24(%r15)
	movq	%rax, 8(%r15)
	movq	8(%rax), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_memset
	movq	%r15, %rdi
	callq	_omapfb_page_flip
	movq	8(%r15), %rax
	movl	$1, 4(%rax)
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
	movl	$-1, %r14d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[video_omap]: pages allocation failed.\n"

	.no_dead_strip	_omapfb_setup_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omapfb_setup_pages
_omapfb_setup_pages:                    ; @omapfb_setup_pages
	.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
	ldr	x0, [x0, #16]
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	mov	w1, #16
	bl	_calloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_13
LBB0_2:
	ldr	w10, [x19]
	cmp	w10, #0
	b.le	LBB0_5
; %bb.3:
	ldp	x11, x8, [x19, #32]
	ldr	w8, [x8]
	ldr	w2, [x19, #4]
	sxtw	x12, w2
	lsl	x9, x12, #2
	cmp	w10, #4
	b.hs	LBB0_6
; %bb.4:
	mov	x13, #0
	b	LBB0_9
LBB0_5:
	ldr	w2, [x19, #4]
	b	LBB0_11
LBB0_6:
	mov	w14, #0
	add	x15, x12, x12, lsl #1
	and	x13, x10, #0xfffffffc
	lsl	x15, x15, #2
	lsl	x16, x12, #4
	add	x17, x0, #32
	lsl	w1, w8, #2
	lsl	w3, w8, #1
	add	w4, w3, w8
	mov	x5, x13
	mov	x6, x11
	lsl	x7, x12, #3
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x20, x6, x9
	stur	x20, [x17, #-8]
	add	w20, w8, w14
	add	x21, x6, x7
	str	x21, [x17, #8]
	add	w21, w3, w14
	add	x22, x6, x15
	str	x22, [x17, #24]
	add	w22, w4, w14
	stur	x6, [x17, #-24]
	stp	w14, wzr, [x17, #-32]
	stp	w20, wzr, [x17, #-16]
	stp	w21, wzr, [x17]
	add	x6, x6, x16
	stp	w22, wzr, [x17, #16]
	add	x17, x17, #64
	add	w14, w14, w1
	subs	x5, x5, #4
	b.ne	LBB0_7
; %bb.8:
	cmp	x13, x10
	b.eq	LBB0_11
LBB0_9:
	mul	w14, w8, w13
	mul	x12, x13, x12
	add	x11, x11, x12, lsl #2
	add	x12, x0, x13, lsl #4
	add	x12, x12, #8
	sub	x10, x10, x13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	str	x11, [x12]
	stp	w14, wzr, [x12, #-8]
	add	w14, w14, w8
	add	x11, x11, x9
	add	x12, x12, #16
	subs	x10, x10, #1
	b.ne	LBB0_10
LBB0_11:
	str	xzr, [x19, #24]
	str	x0, [x19, #8]
	ldr	x0, [x0, #8]
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
	mov	x0, x19
	bl	_omapfb_page_flip
	mov	w0, #0
	ldr	x8, [x19, #8]
	mov	w9, #1
	str	w9, [x8, #4]
LBB0_12:
	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
LBB0_13:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
	mov	w0, #-1
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[video_omap]: pages allocation failed.\n"

	.no_dead_strip	_omapfb_setup_pages
.subsections_via_symbols
