	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_dc_init
_tegra_dc_init:                         ## @tegra_dc_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	4(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %rbx
	movq	_HOST1X_SYNCPT_CLIENT_MANAGED@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%r12, %rdi
	callq	_host1x_client_to_dc
	movq	%rax, %r14
	movq	(%rbx), %r15
	movq	%rax, %rdi
	callq	_tegra_dc_has_window_groups
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %r15
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_host1x_syncpt_request
	movl	%eax, (%r14)
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	20(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_4:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_host1x_client_iommu_attach
	movq	%rax, 8(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	8(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_31
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_31
LBB0_6:
	movq	24(%r15), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_8
## %bb.7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_tegra_dc_add_shared_planes
	jmp	LBB0_9
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_tegra_dc_add_planes
LBB0_9:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_26
LBB0_11:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	24(%r15), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_16
## %bb.12:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_tegra_dc_cursor_plane_create
	jmp	LBB0_13
LBB0_16:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$2, %edx
	movl	$1, %ecx
	callq	_tegra_dc_overlay_plane_create
LBB0_13:
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.17:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_14:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	addq	$32, %r14
	movq	_tegra_crtc_funcs@GOTPCREL(%rip), %r8
	movq	%r14, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r9d, %r9d
	callq	_drm_crtc_init_with_planes
	testl	%eax, %eax
	js	LBB0_15
## %bb.18:
	movq	_tegra_crtc_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_drm_crtc_helper_add
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	24(%r13), %rax
	movq	(%rax), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rcx), %rax
	jle	LBB0_20
## %bb.19:
	movq	%rax, (%rcx)
LBB0_20:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_tegra_dc_rgb_init
	testl	%eax, %eax
	jns	LBB0_23
## %bb.21:
	movl	%eax, %r15d
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	jne	LBB0_22
LBB0_23:
	movl	16(%r13), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	20(%r13), %ebx
	movq	_tegra_dc_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_dev_name
	xorl	%r15d, %r15d
	movl	%ebx, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	movl	%eax, %r8d
	movq	%r13, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	jns	LBB0_31
## %bb.24:
	movl	%eax, %r14d
	movl	16(%r13), %edx
	movl	20(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r14d, %r15d
	jmp	LBB0_25
LBB0_15:
	movl	%eax, %r15d
	jmp	LBB0_25
LBB0_22:
	movl	20(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_25:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
LBB0_26:
	movq	%r13, %rdi
	callq	_IS_ERR_OR_NULL
	testl	%eax, %eax
	jne	LBB0_28
## %bb.27:
	movq	%r13, %rdi
	callq	_drm_plane_cleanup
LBB0_28:
	movq	%rbx, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_30
## %bb.29:
	movq	%rbx, %rdi
	callq	_drm_plane_cleanup
LBB0_30:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rsi
	movq	%r12, %rdi
	callq	_host1x_client_iommu_detach
	movl	(%rbx), %edi
	callq	_host1x_syncpt_free
LBB0_31:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST1X_SYNCPT_CLIENT_MANAGED,8,3 ## @HOST1X_SYNCPT_CLIENT_MANAGED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate syncpoint\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to attach to domain: %d\n"

	.comm	_tegra_crtc_funcs,4,2           ## @tegra_crtc_funcs
	.comm	_tegra_crtc_helper_funcs,4,2    ## @tegra_crtc_helper_funcs
	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"failed to initialize RGB output: %d\n"

	.comm	_tegra_dc_irq,4,2               ## @tegra_dc_irq
L_.str.3:                               ## @.str.3
	.asciz	"failed to request IRQ#%u: %d\n"

	.no_dead_strip	_tegra_dc_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_dc_init
_tegra_dc_init:                         ; @tegra_dc_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
	ldr	w0, [x0, #4]
	bl	_dev_get_drvdata
	mov	x23, x0
Lloh0:
	adrp	x8, _HOST1X_SYNCPT_CLIENT_MANAGED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HOST1X_SYNCPT_CLIENT_MANAGED@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	mov	x0, x19
	bl	_host1x_client_to_dc
	mov	x20, x0
	ldr	x26, [x23]
	bl	_tegra_dc_has_window_groups
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	bl	_host1x_syncpt_request
	str	w0, [x20]
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w0, [x20, #20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_3:
	mov	x0, x19
	mov	w1, #1
	bl	_host1x_client_iommu_attach
	str	x0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x0, [x20, #8]
	bl	_PTR_ERR
	mov	x24, x0
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_dev_err
	b	LBB0_22
LBB0_5:
	mov	w24, #0
	b	LBB0_22
LBB0_6:
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x23
	mov	x1, x20
	bl	_tegra_dc_add_shared_planes
	b	LBB0_9
LBB0_8:
	mov	x0, x23
	mov	x1, x20
	bl	_tegra_dc_add_planes
LBB0_9:
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x24, x0
	mov	x22, #0
	b	LBB0_17
LBB0_11:
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x23
	mov	x1, x20
	bl	_tegra_dc_cursor_plane_create
	b	LBB0_14
LBB0_13:
	mov	x0, x23
	mov	x1, x20
	mov	w2, #2
	mov	w3, #1
	bl	_tegra_dc_overlay_plane_create
LBB0_14:
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_23
; %bb.15:
	mov	x0, x22
	bl	_PTR_ERR
LBB0_16:
	mov	x24, x0
LBB0_17:
	mov	x0, x22
	bl	_IS_ERR_OR_NULL
	cbnz	w0, LBB0_19
; %bb.18:
	mov	x0, x22
	bl	_drm_plane_cleanup
LBB0_19:
	mov	x0, x21
	bl	_IS_ERR
	cbnz	x0, LBB0_21
; %bb.20:
	mov	x0, x21
	bl	_drm_plane_cleanup
LBB0_21:
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_host1x_client_iommu_detach
	ldr	w0, [x20]
	bl	_host1x_syncpt_free
LBB0_22:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_23:
	add	x25, x20, #32
Lloh7:
	adrp	x4, _tegra_crtc_funcs@GOTPAGE
Lloh8:
	ldr	x4, [x4, _tegra_crtc_funcs@GOTPAGEOFF]
	mov	x0, x23
	mov	x1, x25
	mov	x2, x21
	mov	x3, x22
	mov	x5, #0
	bl	_drm_crtc_init_with_planes
	tbnz	w0, #31, LBB0_16
; %bb.24:
Lloh9:
	adrp	x1, _tegra_crtc_helper_funcs@GOTPAGE
Lloh10:
	ldr	x1, [x1, _tegra_crtc_helper_funcs@GOTPAGEOFF]
	mov	x0, x25
	bl	_drm_crtc_helper_add
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	ldr	x9, [x26]
	cmp	x8, x9
	b.le	LBB0_26
; %bb.25:
	str	x8, [x26]
LBB0_26:
	mov	x0, x23
	mov	x1, x20
	bl	_tegra_dc_rgb_init
	tbz	w0, #31, LBB0_28
; %bb.27:
	mov	x24, x0
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_30
LBB0_28:
	ldp	w24, w23, [x20, #16]
Lloh14:
	adrp	x8, _tegra_dc_irq@GOTPAGE
Lloh15:
	ldr	x8, [x8, _tegra_dc_irq@GOTPAGEOFF]
Lloh16:
	ldr	w25, [x8]
	mov	x0, x23
	bl	_dev_name
	mov	x4, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	mov	w3, #0
	mov	x5, x20
	bl	_devm_request_irq
	mov	w24, #0
	tbz	w0, #31, LBB0_22
; %bb.29:
	mov	x23, x0
	ldp	w2, w0, [x20, #16]
	str	x23, [sp]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	mov	x24, x23
	b	LBB0_17
LBB0_30:
	ldr	w0, [x20, #20]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x24
	bl	_dev_err
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST1X_SYNCPT_CLIENT_MANAGED,8,3 ; @HOST1X_SYNCPT_CLIENT_MANAGED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate syncpoint\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to attach to domain: %d\n"

	.comm	_tegra_crtc_funcs,4,2           ; @tegra_crtc_funcs
	.comm	_tegra_crtc_helper_funcs,4,2    ; @tegra_crtc_helper_funcs
	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"failed to initialize RGB output: %d\n"

	.comm	_tegra_dc_irq,4,2               ; @tegra_dc_irq
l_.str.3:                               ; @.str.3
	.asciz	"failed to request IRQ#%u: %d\n"

	.no_dead_strip	_tegra_dc_init
.subsections_via_symbols
