	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_copy_state                  ## -- Begin function dc_copy_state
	.p2align	4, 0x90
_dc_copy_state:                         ## @dc_copy_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, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kvmalloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_19
## %bb.1:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$32, %edx
	callq	_memcpy
	movq	_MAX_PIPES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.2:
	movq	24(%r15), %rax
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	xorl	%edx, %edx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	addq	$40, %rdx
	cmpq	%rdx, %rcx
	je	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%rax,%rdx), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rsi), %rsi
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%rax,%rsi,8), %rsi
	movq	%rsi, 32(%rax,%rdx)
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%rax,%rdx), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rsi), %rsi
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%rax,%rsi,8), %rsi
	movq	%rsi, 24(%rax,%rdx)
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rax,%rdx), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rsi), %rsi
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%rax,%rsi,8), %rsi
	movq	%rsi, 16(%rax,%rdx)
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rax,%rdx), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rsi), %rsi
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%rax,%rsi,8), %rsi
	movq	%rsi, 8(%rax,%rdx)
	jmp	LBB0_11
LBB0_12:
	cmpl	$0, (%r15)
	jle	LBB0_18
## %bb.13:
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%r14
	movslq	(%r15), %rax
	cmpq	%rax, %r14
	jge	LBB0_18
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
	movq	16(%r15), %rax
	movl	(%rax,%r14,4), %edi
	callq	_dc_stream_retain
	movq	8(%r15), %rax
	movq	%r14, %r12
	shlq	$4, %r12
	cmpl	$0, (%rax,%r12)
	jle	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rax,%r12), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_dc_plane_state_retain
	incq	%rbx
	movq	8(%r15), %rax
	movslq	(%rax,%r12), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_16
	jmp	LBB0_17
LBB0_18:
	movq	%r15, %rdi
	addq	$4, %rdi
	callq	_kref_init
LBB0_19:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_MAX_PIPES,4,2                  ## @MAX_PIPES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_copy_state                  ; -- Begin function dc_copy_state
	.p2align	2
_dc_copy_state:                         ; @dc_copy_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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kvmalloc
	mov	x19, x0
	cbz	x0, LBB0_19
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #32
	bl	_memcpy
Lloh3:
	adrp	x8, _MAX_PIPES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_PIPES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.2:
	ldr	x9, [x19, #24]
	add	x10, x9, #32
	mov	w11, #40
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #40
	subs	x8, x8, #1
	b.eq	LBB0_12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10]
	cbz	x12, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x12]
	madd	x12, x12, x11, x9
	str	x12, [x10]
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldur	x12, [x10, #-8]
	cbz	x12, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x12]
	madd	x12, x12, x11, x9
	stur	x12, [x10, #-8]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldur	x12, [x10, #-16]
	cbz	x12, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x12]
	madd	x12, x12, x11, x9
	stur	x12, [x10, #-16]
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	x12, [x10, #-24]
	cbz	x12, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x12]
	madd	x12, x12, x11, x9
	stur	x12, [x10, #-24]
	b	LBB0_3
LBB0_12:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.13:
	mov	x20, #0
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.ge	LBB0_18
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x20, lsl #2]
	bl	_dc_stream_retain
	ldr	x8, [x19, #8]
	lsl	x21, x20, #4
	ldr	w9, [x8, x21]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x22, #0
LBB0_17:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x8, x8, x21
	ldr	x8, [x8, #8]
	ldr	w0, [x8, x22, lsl #2]
	bl	_dc_plane_state_retain
	add	x22, x22, #1
	ldr	x8, [x19, #8]
	ldrsw	x9, [x8, x21]
	cmp	x22, x9
	b.lt	LBB0_17
	b	LBB0_14
LBB0_18:
	add	x0, x19, #4
	bl	_kref_init
LBB0_19:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_MAX_PIPES,4,2                  ; @MAX_PIPES
.subsections_via_symbols
