	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_shared_plane_set_owner
_tegra_shared_plane_set_owner:          ## @tegra_shared_plane_set_owner
	.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	%rsi, %r12
	movq	%rdi, %r14
	movq	_DC_WIN_CORE_WINDOWGROUP_SET_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tegra_plane_offset
	movq	8(%r14), %r15
	testq	%r12, %r12
	movq	%r12, %rbx
	cmoveq	%r15, %rbx
	movq	8(%rbx), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %esi
	callq	_tegra_dc_readl
	movl	%eax, %r13d
	movq	_OWNER_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	movl	%eax, %ecx
	andl	%r13d, %ecx
	testq	%r12, %r12
	je	LBB0_4
## %bb.1:
	cmpl	%eax, %ecx
	je	LBB0_4
## %bb.2:
	cmpl	(%r12), %ecx
	jne	LBB0_3
LBB0_4:
	testq	%r15, %r15
	je	LBB0_7
## %bb.5:
	cmpl	%eax, %ecx
	jne	LBB0_7
## %bb.6:
	movl	(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdx, %r15
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %r8d
	callq	_dev_dbg
	movl	(%r15), %eax
LBB0_7:
	testq	%r12, %r12
	je	LBB0_9
## %bb.8:
	notl	%eax
	andl	%eax, %r13d
	movl	(%r12), %edi
	callq	_OWNER
LBB0_9:
	orl	%r13d, %eax
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_tegra_dc_writel
	movq	%r12, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_dev_WARN
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DC_WIN_CORE_WINDOWGROUP_SET_CONTROL,4,2 ## @DC_WIN_CORE_WINDOWGROUP_SET_CONTROL
	.comm	_OWNER_MASK,4,2                 ## @OWNER_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"window %u owned by head %u\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"window %u not owned by head %u but %u\n"

	.no_dead_strip	_tegra_shared_plane_set_owner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_shared_plane_set_owner
_tegra_shared_plane_set_owner:          ; @tegra_shared_plane_set_owner
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _DC_WIN_CORE_WINDOWGROUP_SET_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DC_WIN_CORE_WINDOWGROUP_SET_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_tegra_plane_offset
	mov	x21, x0
	ldr	x26, [x20, #8]
	cmp	x19, #0
	csel	x22, x26, x19, eq
	ldr	x25, [x22, #8]
	ldr	w24, [x20]
	mov	x0, x22
	mov	x1, x21
	bl	_tegra_dc_readl
	mov	x23, x0
Lloh3:
	adrp	x27, _OWNER_MASK@GOTPAGE
Lloh4:
	ldr	x27, [x27, _OWNER_MASK@GOTPAGEOFF]
	ldr	w4, [x27]
	and	w3, w4, w0
	cbz	x19, LBB0_3
; %bb.1:
	cmp	w3, w4
	b.eq	LBB0_3
; %bb.2:
	ldr	w8, [x19]
	cmp	w3, w8
	b.ne	LBB0_9
LBB0_3:
	cmp	x26, #0
	ccmp	w3, w4, #0, ne
	b.ne	LBB0_5
; %bb.4:
	ldr	w3, [x26]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x25
	mov	x2, x24
	bl	_dev_dbg
	ldr	w4, [x27]
LBB0_5:
	cbz	x19, LBB0_7
; %bb.6:
	bic	w23, w23, w4
	ldr	w0, [x19]
	bl	_OWNER
	orr	w1, w0, w23
	b	LBB0_8
LBB0_7:
	orr	w1, w4, w23
LBB0_8:
	mov	x0, x22
	mov	x2, x21
	bl	_tegra_dc_writel
	mov	w0, #0
	str	x19, [x20, #8]
	b	LBB0_10
LBB0_9:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x25
	mov	x2, x24
	bl	_dev_WARN
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DC_WIN_CORE_WINDOWGROUP_SET_CONTROL,4,2 ; @DC_WIN_CORE_WINDOWGROUP_SET_CONTROL
	.comm	_OWNER_MASK,4,2                 ; @OWNER_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"window %u owned by head %u\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"window %u not owned by head %u but %u\n"

	.no_dead_strip	_tegra_shared_plane_set_owner
.subsections_via_symbols
