	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_dc_show_crc
_tegra_dc_show_crc:                     ## @tegra_dc_show_crc
	.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, %r15
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_drm_modeset_lock
	movq	8(%rbx), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_DC_COM_CRC_CONTROL_ACTIVE_DATA@GOTPCREL(%rip), %rax
	movq	_DC_COM_CRC_CONTROL_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_DC_COM_CRC_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_tegra_dc_writel
	movq	%rbx, %rdi
	callq	_tegra_dc_commit
	movq	%rbx, %rdi
	callq	_drm_crtc_wait_one_vblank
	movq	%rbx, %rdi
	callq	_drm_crtc_wait_one_vblank
	movq	_DC_COM_CRC_CHECKSUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tegra_dc_readl
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_seq_printf
	movl	(%r12), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_tegra_dc_writel
	jmp	LBB0_3
LBB0_1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_3:
	movq	%rbx, %rdi
	callq	_drm_modeset_unlock
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_DC_COM_CRC_CONTROL_ACTIVE_DATA,4,2 ## @DC_COM_CRC_CONTROL_ACTIVE_DATA
	.comm	_DC_COM_CRC_CONTROL_ENABLE,4,2  ## @DC_COM_CRC_CONTROL_ENABLE
	.comm	_DC_COM_CRC_CONTROL,4,2         ## @DC_COM_CRC_CONTROL
	.comm	_DC_COM_CRC_CHECKSUM,4,2        ## @DC_COM_CRC_CHECKSUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%08x\n"

	.no_dead_strip	_tegra_dc_show_crc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_dc_show_crc
_tegra_dc_show_crc:                     ; @tegra_dc_show_crc
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x19, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_drm_modeset_lock
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _DC_COM_CRC_CONTROL_ACTIVE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DC_COM_CRC_CONTROL_ACTIVE_DATA@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DC_COM_CRC_CONTROL_ENABLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DC_COM_CRC_CONTROL_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh6:
	adrp	x21, _DC_COM_CRC_CONTROL@GOTPAGE
Lloh7:
	ldr	x21, [x21, _DC_COM_CRC_CONTROL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_tegra_dc_writel
	mov	x0, x19
	bl	_tegra_dc_commit
	mov	x0, x19
	bl	_drm_crtc_wait_one_vblank
	mov	x0, x19
	bl	_drm_crtc_wait_one_vblank
Lloh8:
	adrp	x8, _DC_COM_CRC_CHECKSUM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DC_COM_CRC_CHECKSUM@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tegra_dc_readl
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_seq_printf
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #0
	bl	_tegra_dc_writel
	mov	w20, #0
	b	LBB0_3
LBB0_2:
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x19
	bl	_drm_modeset_unlock
	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
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_DC_COM_CRC_CONTROL_ACTIVE_DATA,4,2 ; @DC_COM_CRC_CONTROL_ACTIVE_DATA
	.comm	_DC_COM_CRC_CONTROL_ENABLE,4,2  ; @DC_COM_CRC_CONTROL_ENABLE
	.comm	_DC_COM_CRC_CONTROL,4,2         ; @DC_COM_CRC_CONTROL
	.comm	_DC_COM_CRC_CHECKSUM,4,2        ; @DC_COM_CRC_CHECKSUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%08x\n"

	.no_dead_strip	_tegra_dc_show_crc
.subsections_via_symbols
