	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_bo_create                  ## -- Begin function vc4_bo_create
	.p2align	4, 0x90
_vc4_bo_create:                         ## @vc4_bo_create
	.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	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rsi, %rax
	movq	%rdi, %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_roundup
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_to_vc4_dev
	testq	%r12, %r12
	je	LBB0_12
## %bb.1:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_vc4_bo_get_from_cache
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %r14
	testl	%r13d, %r13d
	jne	LBB0_11
## %bb.3:
	movl	4(%r14), %edx
	movl	8(%r14), %edi
	xorl	%esi, %esi
	callq	_memset
	jmp	LBB0_11
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_drm_gem_cma_create
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_vc4_bo_cache_purge
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_drm_gem_cma_create
	movq	%rax, %r13
LBB0_6:
	movq	%r13, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_vc4_bo_userspace_cache_purge
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_drm_gem_cma_create
	movq	%rax, %r13
LBB0_8:
	movq	%r13, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_drm_info_printer
	movl	%eax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_vc4_bo_stats_print
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %r14
	jmp	LBB0_11
LBB0_10:
	movq	%r13, %rdi
	callq	_to_vc4_bo
	movq	%rax, %r14
	movq	___VC4_MADV_NOTSUPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_vc4_bo_set_label
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_11:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate from CMA:\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	___VC4_MADV_NOTSUPP,4,2         ## @__VC4_MADV_NOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_bo_create                  ; -- Begin function vc4_bo_create
	.p2align	2
_vc4_bo_create:                         ; @vc4_bo_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x3
	mov	x23, x2
	mov	x8, x1
	mov	x21, x0
Lloh0:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x8
	bl	_roundup
	mov	x22, x0
	mov	x0, x21
	bl	_to_vc4_dev
	cbz	x22, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_vc4_bo_get_from_cache
	cbz	x0, LBB0_5
; %bb.2:
	mov	x24, x0
	cbnz	w23, LBB0_12
; %bb.3:
	ldp	w2, w0, [x24, #4]
	mov	w1, #0
	bl	_memset
	b	LBB0_12
LBB0_4:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ERR_PTR
LBB0_5:
	mov	x0, x21
	mov	x1, x22
	bl	_drm_gem_cma_create
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_vc4_bo_cache_purge
	mov	x0, x21
	mov	x1, x22
	bl	_drm_gem_cma_create
	mov	x23, x0
LBB0_7:
	mov	x0, x23
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x21
	bl	_vc4_bo_userspace_cache_purge
	mov	x0, x21
	mov	x1, x22
	bl	_drm_gem_cma_create
	mov	x23, x0
LBB0_9:
	mov	x0, x23
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.10:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_drm_info_printer
	str	w0, [sp, #8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	add	x0, sp, #8
	mov	x1, x19
	bl	_vc4_bo_stats_print
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x24, x0
	b	LBB0_12
LBB0_11:
	mov	x0, x23
	bl	_to_vc4_bo
	mov	x24, x0
Lloh11:
	adrp	x8, ___VC4_MADV_NOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, ___VC4_MADV_NOTSUPP@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x0]
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x23
	mov	x1, x20
	bl	_vc4_bo_set_label
	mov	x0, x19
	bl	_mutex_unlock
LBB0_12:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate from CMA:\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	___VC4_MADV_NOTSUPP,4,2         ; @__VC4_MADV_NOTSUPP
.subsections_via_symbols
