	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_dm_crtc_init
_amdgpu_dm_crtc_init:                   ## @amdgpu_dm_crtc_init
	.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
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$48, %edi
	callq	_kzalloc
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_DRM_PLANE_TYPE_CURSOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r12)
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_amdgpu_dm_plane_init
	movl	%eax, %ebx
	movl	(%r13), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %r13
	movl	8(%r15), %edi
	movq	%rax, %r14
	addq	$16, %r14
	movq	_amdgpu_dm_crtc_funcs@GOTPCREL(%rip), %r8
	movq	%r14, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %rcx
	xorl	%r9d, %r9d
	callq	_drm_crtc_init_with_planes
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	movq	%r13, %r14
LBB0_4:
	movq	%r14, %rdi
	callq	_kfree
	movq	%r12, %rdi
	callq	_kfree
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_amdgpu_dm_crtc_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_drm_crtc_helper_add
	movq	24(%r13), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	*%rax
LBB0_7:
	movq	(%r15), %rax
	movq	8(%rax), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%r13)
	movl	%ecx, 32(%r13)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%r13)
	movl	$0, 16(%r13)
	movl	$-1, 8(%r13)
	movq	(%rax), %rax
	movq	%r13, (%rax,%rcx,8)
	movq	_MAX_COLOR_LUT_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%ecx, %esi
	movl	$1, %edx
	callq	_drm_crtc_enable_color_mgmt
	movq	_MAX_COLOR_LEGACY_LUT_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_drm_mode_crtc_set_gamma_size
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_DRM_PLANE_TYPE_CURSOR,4,2      ## @DRM_PLANE_TYPE_CURSOR
	.comm	_amdgpu_dm_crtc_funcs,4,2       ## @amdgpu_dm_crtc_funcs
	.comm	_amdgpu_dm_crtc_helper_funcs,4,2 ## @amdgpu_dm_crtc_helper_funcs
	.comm	_MAX_COLOR_LUT_ENTRIES,4,2      ## @MAX_COLOR_LUT_ENTRIES
	.comm	_MAX_COLOR_LEGACY_LUT_ENTRIES,4,2 ## @MAX_COLOR_LEGACY_LUT_ENTRIES
	.no_dead_strip	_amdgpu_dm_crtc_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_dm_crtc_init
_amdgpu_dm_crtc_init:                   ; @amdgpu_dm_crtc_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #48
	bl	_kzalloc
	mov	x22, x0
	cbz	x0, LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _DRM_PLANE_TYPE_CURSOR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DRM_PLANE_TYPE_CURSOR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x22, #40]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #0
	mov	x3, #0
	bl	_amdgpu_dm_plane_init
	mov	x25, x0
	ldr	w1, [x21]
	mov	w0, #48
	bl	_kzalloc
	mov	x21, x0
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x20, #8]
	add	x23, x21, #16
Lloh8:
	adrp	x4, _amdgpu_dm_crtc_funcs@GOTPAGE
Lloh9:
	ldr	x4, [x4, _amdgpu_dm_crtc_funcs@GOTPAGEOFF]
	mov	x1, x23
	mov	x2, x24
	mov	x3, x22
	mov	x5, #0
	bl	_drm_crtc_init_with_planes
	cbz	w0, LBB0_7
; %bb.3:
	mov	x25, x0
	b	LBB0_5
LBB0_4:
	mov	x21, #0
	neg	w25, w23
LBB0_5:
	mov	x0, x21
	bl	_kfree
	mov	x0, x22
	bl	_kfree
LBB0_6:
	mov	x0, x25
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh10:
	adrp	x1, _amdgpu_dm_crtc_helper_funcs@GOTPAGE
Lloh11:
	ldr	x1, [x1, _amdgpu_dm_crtc_helper_funcs@GOTPAGEOFF]
	mov	x0, x23
	bl	_drm_crtc_helper_add
	ldr	x8, [x21, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x23
	blr	x8
LBB0_9:
	ldr	x8, [x20]
	ldp	x8, x9, [x8]
	ldr	w9, [x9]
	stp	w9, w9, [x21, #32]
	str	x19, [x21]
	str	wzr, [x21, #16]
	mov	w9, #-1
	str	w9, [x21, #8]
	str	x21, [x8, x19, lsl #3]
Lloh12:
	adrp	x8, _MAX_COLOR_LUT_ENTRIES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAX_COLOR_LUT_ENTRIES@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x23
	mov	w2, #1
	mov	x3, x1
	bl	_drm_crtc_enable_color_mgmt
Lloh15:
	adrp	x8, _MAX_COLOR_LEGACY_LUT_ENTRIES@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MAX_COLOR_LEGACY_LUT_ENTRIES@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_drm_mode_crtc_set_gamma_size
	mov	w25, #0
	b	LBB0_6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_DRM_PLANE_TYPE_CURSOR,4,2      ; @DRM_PLANE_TYPE_CURSOR
	.comm	_amdgpu_dm_crtc_funcs,4,2       ; @amdgpu_dm_crtc_funcs
	.comm	_amdgpu_dm_crtc_helper_funcs,4,2 ; @amdgpu_dm_crtc_helper_funcs
	.comm	_MAX_COLOR_LUT_ENTRIES,4,2      ; @MAX_COLOR_LUT_ENTRIES
	.comm	_MAX_COLOR_LEGACY_LUT_ENTRIES,4,2 ; @MAX_COLOR_LEGACY_LUT_ENTRIES
	.no_dead_strip	_amdgpu_dm_crtc_init
.subsections_via_symbols
