	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_plane_duplicate_state
_vc4_plane_duplicate_state:             ## @vc4_plane_duplicate_state
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	xorl	%r15d, %r15d
LBB0_2:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%rbx), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	$40, %esi
	callq	_kmemdup
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	%rax, %r14
	leaq	32(%rax), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	$0, 24(%r14)
	movq	%r14, %r15
	addq	$8, %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	___drm_atomic_helper_plane_duplicate_state
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.5:
	movl	(%r14), %esi
	shll	$2, %esi
	movl	(%r12), %edx
	callq	_kmemdup
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movl	(%r14), %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_2
LBB0_8:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_vc4_plane_duplicate_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_plane_duplicate_state
_vc4_plane_duplicate_state:             ; @vc4_plane_duplicate_state
	.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	x21, x0
	ldr	x8, [x0]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_3
LBB0_1:
	mov	x20, #0
LBB0_2:
	mov	x0, x20
	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_3:
	ldr	x0, [x21]
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #40
	bl	_kmemdup
	cbz	x0, LBB0_1
; %bb.4:
	mov	x19, x0
	add	x0, x0, #32
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	xzr, [x19, #24]
	add	x20, x19, #8
	mov	x0, x21
	mov	x1, x20
	bl	___drm_atomic_helper_plane_duplicate_state
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_2
; %bb.5:
	ldr	w8, [x19]
	lsl	w1, w8, #2
	ldr	w2, [x22]
	bl	_kmemdup
	str	x0, [x19, #16]
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w8, [x19]
	str	w8, [x19, #4]
	b	LBB0_2
LBB0_7:
	mov	x0, x19
	bl	_kfree
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_vc4_plane_duplicate_state
.subsections_via_symbols
