	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_crtc_crc_setup_workarounds
_intel_crtc_crc_setup_workarounds:      ## @intel_crtc_crc_setup_workarounds
	.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
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movl	8(%rdi), %edi
	callq	_to_i915
	movq	%rax, %rbx
	leaq	-48(%rbp), %r12
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_drm_modeset_acquire_init
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_drm_atomic_state_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r12, (%rax)
	movq	_EDEADLK@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_intel_atomic_get_crtc_state
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_PTR_ERR
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %eax
	movl	%eax, 16(%rbx)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%rbx)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_HASWELL
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 24(%rbx)
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rax
	movq	_PIPE_A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	movq	_TRANSCODER_EDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, 16(%rbx)
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_drm_atomic_commit
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
	movl	(%r12), %eax
	addl	%r14d, %eax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_drm_atomic_state_clear
	leaq	-48(%rbp), %rdi
	callq	_drm_modeset_backoff
	jmp	LBB0_3
LBB0_13:
	movq	%r15, %rdi
	callq	_drm_atomic_state_put
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_14:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	callq	_WARN
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_drm_modeset_drop_locks
	movq	%rbx, %rdi
	callq	_drm_modeset_acquire_fini
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PIPE_A,8,3                     ## @PIPE_A
	.comm	_TRANSCODER_EDP,8,3             ## @TRANSCODER_EDP
	.comm	_EDEADLK,4,2                    ## @EDEADLK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Toggling workaround to %i returns %i\n"

	.no_dead_strip	_intel_crtc_crc_setup_workarounds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_crtc_crc_setup_workarounds
_intel_crtc_crc_setup_workarounds:      ; @intel_crtc_crc_setup_workarounds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	w0, [x0, #8]
	bl	_to_i915
	mov	x21, x0
	add	x23, sp, #8
	add	x0, sp, #8
	mov	w1, #0
	bl	_drm_modeset_acquire_init
	mov	x0, x21
	bl	_drm_atomic_state_alloc
	cbz	x0, LBB0_13
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x24, _PIPE_A@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PIPE_A@GOTPAGEOFF]
	str	x23, [x0]
Lloh2:
	adrp	x25, _TRANSCODER_EDP@GOTPAGE
Lloh3:
	ldr	x25, [x25, _TRANSCODER_EDP@GOTPAGEOFF]
	mov	w26, #1
Lloh4:
	adrp	x27, _EDEADLK@GOTPAGE
Lloh5:
	ldr	x27, [x27, _EDEADLK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x20
	bl	_intel_atomic_get_crtc_state
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_PTR_ERR
	b	LBB0_10
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x23]
	str	w8, [x23, #16]
	str	w19, [x23, #4]
	mov	x0, x21
	bl	_IS_HASWELL
	cbz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23, #24]
	cbz	x8, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23, #8]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w26, [x23, #16]
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	bl	_drm_atomic_commit
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	ldr	w8, [x27]
	cmn	w0, w8
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	bl	_drm_atomic_state_clear
	add	x0, sp, #8
	bl	_drm_modeset_backoff
	b	LBB0_2
LBB0_12:
	mov	x0, x22
	bl	_drm_atomic_state_put
	b	LBB0_14
LBB0_13:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_14:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x19
	mov	x3, x23
	bl	_WARN
	add	x0, sp, #8
	bl	_drm_modeset_drop_locks
	add	x0, sp, #8
	bl	_drm_modeset_acquire_fini
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PIPE_A,8,3                     ; @PIPE_A
	.comm	_TRANSCODER_EDP,8,3             ; @TRANSCODER_EDP
	.comm	_EDEADLK,4,2                    ; @EDEADLK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Toggling workaround to %i returns %i\n"

	.no_dead_strip	_intel_crtc_crc_setup_workarounds
.subsections_via_symbols
