	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_create_object              ## -- Begin function vc4_create_object
	.p2align	4, 0x90
_vc4_create_object:                     ## @vc4_create_object
	.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	%rsi, %r14
	callq	_to_vc4_dev
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	_VC4_MADV_WILLNEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	leaq	16(%rbx), %rdi
	xorl	%esi, %esi
	callq	_refcount_set
	leaq	12(%rbx), %rdi
	callq	_mutex_init
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_VC4_BO_TYPE_KERNEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%rbx)
	movq	8(%r15), %rcx
	movq	(%rax), %rax
	shlq	$4, %rax
	incl	8(%rcx,%rax)
	addq	%r14, (%rcx,%rax)
	movq	%r15, %rdi
	callq	_mutex_unlock
	addq	$8, %rbx
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VC4_MADV_WILLNEED,4,2          ## @VC4_MADV_WILLNEED
	.comm	_VC4_BO_TYPE_KERNEL,8,3         ## @VC4_BO_TYPE_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_create_object              ; -- Begin function vc4_create_object
	.p2align	2
_vc4_create_object:                     ; @vc4_create_object
	.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, x1
	bl	_to_vc4_dev
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x8, _VC4_MADV_WILLNEED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VC4_MADV_WILLNEED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #20]
	add	x0, x0, #16
	mov	w1, #0
	bl	_refcount_set
	add	x0, x21, #12
	bl	_mutex_init
	mov	x0, x20
	bl	_mutex_lock
Lloh6:
	adrp	x8, _VC4_BO_TYPE_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VC4_BO_TYPE_KERNEL@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x21]
	ldr	x9, [x20, #8]
	ldr	x8, [x8]
	add	x8, x9, x8, lsl #4
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
	ldr	x9, [x8]
	add	x9, x9, x19
	str	x9, [x8]
	mov	x0, x20
	bl	_mutex_unlock
	add	x0, x21, #8
	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_2:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VC4_MADV_WILLNEED,4,2          ; @VC4_MADV_WILLNEED
	.comm	_VC4_BO_TYPE_KERNEL,8,3         ; @VC4_BO_TYPE_KERNEL
.subsections_via_symbols
