	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omap_gem_new                   ## -- Begin function omap_gem_new
	.p2align	4, 0x90
_omap_gem_new:                          ## @omap_gem_new
	.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
	movl	%edx, %r14d
	movq	%rdi, %r15
	movq	%rsi, -48(%rbp)
	movq	8(%rdi), %rcx
	movq	_OMAP_BO_TILED@GOTPCREL(%rip), %r13
	testl	%edx, (%r13)
	je	LBB0_4
## %bb.1:
	cmpl	$0, 12(%rcx)
	je	LBB0_2
## %bb.3:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	_OMAP_BO_SCANOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%r14d, %eax
	movq	_OMAP_BO_MEM_SHMEM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_OMAP_BO_CACHED@GOTPCREL(%rip), %rcx
	movq	_OMAP_BO_WC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	movq	_OMAP_BO_UNCACHED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	xorl	%eax, %eax
	callq	_tiler_get_cpu_cache_flags
	movl	%eax, %r14d
	orl	%ebx, %r14d
	jmp	LBB0_10
LBB0_4:
	movq	_OMAP_BO_SCANOUT@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_7
## %bb.5:
	cmpl	$0, 8(%rcx)
	je	LBB0_6
LBB0_7:
	movq	_OMAP_BO_MEM_DMABUF@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_10
## %bb.8:
	movq	_OMAP_BO_MEM_SHMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_23
LBB0_6:
	movq	_OMAP_BO_MEM_DMA_API@GOTPCREL(%rip), %rax
LBB0_9:
	orl	(%rax), %r14d
LBB0_10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_23
## %bb.11:
	movq	%rax, %r12
	movl	%r14d, (%rax)
	leaq	24(%rax), %rdi
	callq	_mutex_init
	testl	%r14d, (%r13)
	je	LBB0_13
## %bb.12:
	movl	%r14d, %edi
	callq	_gem2fmt
	leaq	-44(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movl	%eax, %edi
	callq	_tiler_align
	movl	%r14d, %edi
	callq	_gem2fmt
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	movl	%eax, %edi
	callq	_tiler_size
	movq	%rax, %rbx
	movl	-44(%rbp), %eax
	movl	%eax, 20(%r12)
	movl	-48(%rbp), %eax
	movl	%eax, 16(%r12)
	jmp	LBB0_14
LBB0_13:
	movl	-48(%rbp), %edi
	callq	_PAGE_ALIGN
	movq	%rax, %rbx
LBB0_14:
	leaq	32(%r12), %r13
	movq	_OMAP_BO_MEM_SHMEM@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_15
## %bb.16:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_drm_gem_object_init
	testl	%eax, %eax
	jne	LBB0_22
## %bb.17:
	movq	(%r13), %rax
	movq	(%rax), %rdi
	movq	_GFP_USER@GOTPCREL(%rip), %rax
	movq	___GFP_DMA32@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_mapping_set_gfp_mask
	jmp	LBB0_18
LBB0_15:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_drm_gem_private_object_init
LBB0_18:
	movq	_OMAP_BO_MEM_DMA_API@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_20
## %bb.19:
	movl	(%r15), %edi
	leaq	12(%r12), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rsi
	callq	_dma_alloc_wc
	movl	%eax, 8(%r12)
	testl	%eax, %eax
	je	LBB0_21
LBB0_20:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mutex_lock
	addq	$4, %r12
	leaq	4(%rbx), %rsi
	movq	%r12, %rdi
	callq	_list_add
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_24
LBB0_21:
	movq	%r13, %rdi
	callq	_drm_gem_object_release
LBB0_22:
	movq	%r12, %rdi
	callq	_kfree
LBB0_23:
	xorl	%r13d, %r13d
LBB0_24:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_BO_TILED,4,2              ## @OMAP_BO_TILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tiled buffers require DMM\n"

	.comm	_OMAP_BO_SCANOUT,4,2            ## @OMAP_BO_SCANOUT
	.comm	_OMAP_BO_MEM_SHMEM,4,2          ## @OMAP_BO_MEM_SHMEM
	.comm	_OMAP_BO_CACHED,4,2             ## @OMAP_BO_CACHED
	.comm	_OMAP_BO_WC,4,2                 ## @OMAP_BO_WC
	.comm	_OMAP_BO_UNCACHED,4,2           ## @OMAP_BO_UNCACHED
	.comm	_OMAP_BO_MEM_DMA_API,4,2        ## @OMAP_BO_MEM_DMA_API
	.comm	_OMAP_BO_MEM_DMABUF,4,2         ## @OMAP_BO_MEM_DMABUF
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_USER,4,2                   ## @GFP_USER
	.comm	___GFP_DMA32,4,2                ## @__GFP_DMA32
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omap_gem_new                   ; -- Begin function omap_gem_new
	.p2align	2
_omap_gem_new:                          ; @omap_gem_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x20, x0
	str	x1, [sp, #8]
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x23, _OMAP_BO_TILED@GOTPAGE
Lloh1:
	ldr	x23, [x23, _OMAP_BO_TILED@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w2
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_7
; %bb.2:
Lloh2:
	adrp	x8, _OMAP_BO_SCANOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OMAP_BO_SCANOUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w8, w21, w8
Lloh5:
	adrp	x9, _OMAP_BO_MEM_SHMEM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _OMAP_BO_MEM_SHMEM@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh8:
	adrp	x9, _OMAP_BO_CACHED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _OMAP_BO_CACHED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _OMAP_BO_WC@GOTPAGE
Lloh12:
	ldr	x10, [x10, _OMAP_BO_WC@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh14:
	adrp	x10, _OMAP_BO_UNCACHED@GOTPAGE
Lloh15:
	ldr	x10, [x10, _OMAP_BO_UNCACHED@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w21, w8, w9
	bl	_tiler_get_cpu_cache_flags
	orr	w21, w21, w0
	b	LBB0_10
LBB0_3:
Lloh17:
	adrp	x8, _OMAP_BO_SCANOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OMAP_BO_SCANOUT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.4:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_8
LBB0_5:
Lloh20:
	adrp	x8, _OMAP_BO_MEM_DMABUF@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OMAP_BO_MEM_DMABUF@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_10
; %bb.6:
Lloh23:
	adrp	x8, _OMAP_BO_MEM_SHMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _OMAP_BO_MEM_SHMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	ldr	w0, [x20]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_23
LBB0_8:
Lloh27:
	adrp	x8, _OMAP_BO_MEM_DMA_API@GOTPAGE
Lloh28:
	ldr	x8, [x8, _OMAP_BO_MEM_DMA_API@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_10:
Lloh29:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh30:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_23
; %bb.11:
	mov	x22, x0
	str	w21, [x0], #24
	bl	_mutex_init
	ldr	w8, [x23]
	tst	w8, w21
	b.eq	LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_gem2fmt
	add	x8, sp, #8
	orr	x1, x8, #0x4
	add	x2, sp, #8
	bl	_tiler_align
	mov	x0, x21
	bl	_gem2fmt
	ldp	w2, w1, [sp, #8]
	bl	_tiler_size
	mov	x24, x0
	ldr	d0, [sp, #8]
	str	d0, [x22, #16]
	b	LBB0_14
LBB0_13:
	ldr	w0, [sp, #8]
	bl	_PAGE_ALIGN
	mov	x24, x0
LBB0_14:
	add	x23, x22, #32
Lloh31:
	adrp	x8, _OMAP_BO_MEM_SHMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _OMAP_BO_MEM_SHMEM@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x24
	tst	w8, w21
	b.eq	LBB0_17
; %bb.15:
	bl	_drm_gem_object_init
	cbnz	w0, LBB0_22
; %bb.16:
	ldr	x8, [x23]
Lloh34:
	adrp	x9, _GFP_USER@GOTPAGE
Lloh35:
	ldr	x9, [x9, _GFP_USER@GOTPAGEOFF]
	ldr	x0, [x8]
Lloh36:
	ldr	w8, [x9]
Lloh37:
	adrp	x9, ___GFP_DMA32@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___GFP_DMA32@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_mapping_set_gfp_mask
	b	LBB0_18
LBB0_17:
	bl	_drm_gem_private_object_init
LBB0_18:
Lloh40:
	adrp	x8, _OMAP_BO_MEM_DMA_API@GOTPAGE
Lloh41:
	ldr	x8, [x8, _OMAP_BO_MEM_DMA_API@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_20
; %bb.19:
	ldr	w0, [x20]
	add	x2, x22, #12
	ldr	w3, [x25]
	mov	x1, x24
	bl	_dma_alloc_wc
	str	w0, [x22, #8]
	cbz	w0, LBB0_21
LBB0_20:
	mov	x0, x19
	bl	_mutex_lock
	add	x0, x22, #4
	add	x1, x19, #4
	bl	_list_add
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_24
LBB0_21:
	mov	x0, x23
	bl	_drm_gem_object_release
LBB0_22:
	mov	x0, x22
	bl	_kfree
LBB0_23:
	mov	x23, #0
LBB0_24:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_BO_TILED,4,2              ; @OMAP_BO_TILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tiled buffers require DMM\n"

	.comm	_OMAP_BO_SCANOUT,4,2            ; @OMAP_BO_SCANOUT
	.comm	_OMAP_BO_MEM_SHMEM,4,2          ; @OMAP_BO_MEM_SHMEM
	.comm	_OMAP_BO_CACHED,4,2             ; @OMAP_BO_CACHED
	.comm	_OMAP_BO_WC,4,2                 ; @OMAP_BO_WC
	.comm	_OMAP_BO_UNCACHED,4,2           ; @OMAP_BO_UNCACHED
	.comm	_OMAP_BO_MEM_DMA_API,4,2        ; @OMAP_BO_MEM_DMA_API
	.comm	_OMAP_BO_MEM_DMABUF,4,2         ; @OMAP_BO_MEM_DMABUF
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_USER,4,2                   ; @GFP_USER
	.comm	___GFP_DMA32,4,2                ; @__GFP_DMA32
.subsections_via_symbols
