	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_crtc_set_enabled
_omap_crtc_set_enabled:                 ## @omap_crtc_set_enabled
	.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, %r13d
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_to_omap_crtc_state
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r14
	movq	8(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_omap_crtc
	movq	%rax, %r12
	movl	(%rax), %r15d
	xorl	%edi, %edi
	cmpl	%r13d, 4(%rax)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_16
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_omap_irq_enable_framedone
	movl	%r13d, 4(%r12)
	jmp	LBB0_16
LBB0_3:
	movq	%r12, %rbx
	movq	16(%r12), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_OMAP_DISPLAY_TYPE_HDMI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movl	(%rcx), %edi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	*(%rax)
	movl	%r13d, 4(%rbx)
	jmp	LBB0_16
LBB0_5:
	movslq	(%rbx), %rax
	movq	_OMAP_DSS_CHANNEL_DIGIT@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_7
## %bb.6:
	movl	$1, 8(%rbx)
LBB0_7:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rax
	movl	(%rbx), %edi
	movl	%r15d, %r14d
	movl	%r15d, %esi
	callq	*16(%rax)
	movq	%rax, %r15
	movq	8(%rbx), %rax
	movl	(%rbx), %edi
	movl	%r14d, %ebx
	movl	%r14d, %esi
	callq	*8(%rax)
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.8:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	jmp	LBB0_13
LBB0_10:
	testq	%r15, %r15
	je	LBB0_12
## %bb.11:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	jmp	LBB0_13
LBB0_12:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	$2, %edx
LBB0_13:
	callq	_omap_irq_wait_init
	movq	%rax, %r15
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movl	(%rcx), %edi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	*(%rax)
	movl	%r13d, 4(%r12)
	movl	$100, %edi
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_omap_irq_wait
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	testl	%r13d, %r13d
	movl	(%r14), %edi
	movl	12(%r12), %edx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_15:
	movslq	(%r12), %rax
	movq	_OMAP_DSS_CHANNEL_DIGIT@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_16
## %bb.17:
	movl	$0, 8(%r12)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mb                             ## TAILCALL
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_DISPLAY_TYPE_HDMI,8,3     ## @OMAP_DISPLAY_TYPE_HDMI
	.comm	_OMAP_DSS_CHANNEL_DIGIT,8,3     ## @OMAP_DSS_CHANNEL_DIGIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: timeout waiting for %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"enable"

L_.str.2:                               ## @.str.2
	.asciz	"disable"

	.no_dead_strip	_omap_crtc_set_enabled
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_crtc_set_enabled
_omap_crtc_set_enabled:                 ; @omap_crtc_set_enabled
	.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	x20, x1
	mov	x23, x0
	ldr	w0, [x0, #8]
	bl	_to_omap_crtc_state
	mov	x24, x0
	ldr	x21, [x23]
	ldr	x25, [x21, #8]
	mov	x0, x23
	bl	_to_omap_crtc
	mov	x19, x0
	ldp	w22, w8, [x0]
	cmp	w8, w20
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_16
; %bb.1:
	ldr	x8, [x24]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x23
	mov	x1, x20
	bl	_omap_irq_enable_framedone
	str	w20, [x19, #4]
	b	LBB0_16
LBB0_3:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _OMAP_DISPLAY_TYPE_HDMI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OMAP_DISPLAY_TYPE_HDMI@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x25, #8]
	ldr	x8, [x8]
	ldr	w0, [x25]
	mov	x1, x22
	mov	x2, x20
	blr	x8
	str	w20, [x19, #4]
	b	LBB0_16
LBB0_5:
	ldrsw	x8, [x19]
Lloh3:
	adrp	x24, _OMAP_DSS_CHANNEL_DIGIT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _OMAP_DSS_CHANNEL_DIGIT@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_7:
	ldr	x8, [x25, #8]
	ldr	x8, [x8, #16]
	ldr	w0, [x25]
	mov	x1, x22
	blr	x8
	mov	x23, x0
	ldr	x8, [x25, #8]
	ldr	x8, [x8, #8]
	ldr	w0, [x25]
	mov	x1, x22
	blr	x8
	mov	x1, x0
	mov	x0, x21
	cbz	w20, LBB0_9
; %bb.8:
	mov	w2, #1
	b	LBB0_12
LBB0_9:
	cbz	x23, LBB0_11
; %bb.10:
	mov	x1, x23
	mov	w2, #1
	b	LBB0_12
LBB0_11:
	mov	w2, #2
LBB0_12:
	bl	_omap_irq_wait_init
	mov	x23, x0
	ldr	x8, [x25, #8]
	ldr	x8, [x8]
	ldr	w0, [x25]
	mov	x1, x22
	mov	x2, x20
	blr	x8
	str	w20, [x19, #4]
	mov	w0, #100
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	bl	_omap_irq_wait
	cbz	w0, LBB0_14
; %bb.13:
	ldr	w0, [x21]
	ldr	w2, [x19, #12]
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh7:
	adrp	x9, l_.str.2@PAGE
Lloh8:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x3, x9, x8, eq
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_14:
	ldrsw	x8, [x19]
	ldr	x9, [x24]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	str	wzr, [x19, #8]
	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
	b	_mb
LBB0_16:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_DISPLAY_TYPE_HDMI,8,3     ; @OMAP_DISPLAY_TYPE_HDMI
	.comm	_OMAP_DSS_CHANNEL_DIGIT,8,3     ; @OMAP_DSS_CHANNEL_DIGIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: timeout waiting for %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"enable"

l_.str.2:                               ; @.str.2
	.asciz	"disable"

	.no_dead_strip	_omap_crtc_set_enabled
.subsections_via_symbols
