	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_dc_init_sync               ## -- Begin function ipu_dc_init_sync
	.p2align	4, 0x90
_ipu_dc_init_sync:                      ## @ipu_dc_init_sync
	.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	%r8d, -56(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movq	%rdi, %r12
	movq	16(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_ipu_di_get_num
	movq	%rax, (%r12)
	movl	%r14d, %edi
	callq	_ipu_bus_format_to_map
	movl	%eax, %ebx
	xorl	%eax, %eax
	testl	%r15d, %r15d
	sete	%al
	movl	$6, %r14d
	subl	%eax, %r14d
	xorl	%eax, %eax
	cmpq	$0, (%r12)
	setne	%al
	leal	(%rax,%rax,4), %r13d
	movq	_DC_EVT_NL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movl	%r13d, %edx
	movl	$3, %ecx
	callq	_dc_link_event
	movq	_DC_EVT_EOL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	movl	$2, %ecx
	callq	_dc_link_event
	movq	_DC_EVT_NEW_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	movl	$1, %ecx
	callq	_dc_link_event
	jmp	LBB0_3
LBB0_2:
	movl	%r13d, %r15d
	orl	$2, %r15d
	movq	%r12, %rdi
	movl	%r15d, %edx
	movl	$3, %ecx
	callq	_dc_link_event
	movq	_DC_EVT_EOL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	3(%r13), %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	_dc_link_event
	movq	_DC_EVT_NEW_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	1(%r13), %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	$1, %ecx
	callq	_dc_link_event
	xorl	%edi, %edi
	callq	_WROD
	movq	_SYNC_WAVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	pushq	$1
	pushq	%r14
	pushq	$8
	callq	_dc_write_tmpl
	addq	$32, %rsp
	xorl	%edi, %edi
	callq	_WROD
	movq	_SYNC_WAVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	pushq	$0
	pushq	%r14
	pushq	$4
	callq	_dc_write_tmpl
	addq	$32, %rsp
	addl	$4, %r13d
	movq	_WRG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_NULL_WAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%r13d, %esi
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	pushq	$1
	pushq	$0
	pushq	$0
	callq	_dc_write_tmpl
	addq	$32, %rsp
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r13d
LBB0_3:
	xorl	%edi, %edi
	callq	_WROD
	movq	_SYNC_WAVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	pushq	$1
	pushq	%r14
	pushq	$0
	callq	_dc_write_tmpl
	addq	$32, %rsp
	movq	_DC_EVT_NF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_dc_link_event
	movq	_DC_EVT_NFIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_dc_link_event
	movq	_DC_EVT_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_dc_link_event
	movq	_DC_EVT_EOFIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_dc_link_event
	movq	_DC_EVT_NEW_CHAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_dc_link_event
	movq	_DC_EVT_NEW_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_dc_link_event
	movq	_DC_WR_CH_CONF@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movq	_DC_WR_CH_CONF_FIELD_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%edi, %ecx
	orl	%eax, %ecx
	notl	%edi
	andl	%eax, %edi
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	cmovnel	%ecx, %edi
	movq	(%rbx), %rsi
	addq	8(%r12), %rsi
	callq	_writel
	movq	_DC_WR_CH_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rbx
	movq	(%r12), %rdi
	callq	_DC_DISP_CONF2
	addq	%rax, %rbx
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_writel
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DC_EVT_NL,4,2                  ## @DC_EVT_NL
	.comm	_DC_EVT_EOL,4,2                 ## @DC_EVT_EOL
	.comm	_DC_EVT_NEW_DATA,4,2            ## @DC_EVT_NEW_DATA
	.comm	_SYNC_WAVE,4,2                  ## @SYNC_WAVE
	.comm	_WRG,4,2                        ## @WRG
	.comm	_NULL_WAVE,4,2                  ## @NULL_WAVE
	.comm	_DC_EVT_NF,4,2                  ## @DC_EVT_NF
	.comm	_DC_EVT_NFIELD,4,2              ## @DC_EVT_NFIELD
	.comm	_DC_EVT_EOF,4,2                 ## @DC_EVT_EOF
	.comm	_DC_EVT_EOFIELD,4,2             ## @DC_EVT_EOFIELD
	.comm	_DC_EVT_NEW_CHAN,4,2            ## @DC_EVT_NEW_CHAN
	.comm	_DC_EVT_NEW_ADDR,4,2            ## @DC_EVT_NEW_ADDR
	.comm	_DC_WR_CH_CONF,8,3              ## @DC_WR_CH_CONF
	.comm	_DC_WR_CH_CONF_FIELD_MODE,4,2   ## @DC_WR_CH_CONF_FIELD_MODE
	.comm	_DC_WR_CH_ADDR,8,3              ## @DC_WR_CH_ADDR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_dc_init_sync               ; -- Begin function ipu_dc_init_sync
	.p2align	2
_ipu_dc_init_sync:                      ; @ipu_dc_init_sync
	.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	x25, x4
	mov	x22, x3
	mov	x21, x2
	mov	x20, x0
	ldr	x26, [x0, #16]
	mov	x0, x1
	bl	_ipu_di_get_num
	str	x0, [x20]
	mov	x0, x22
	bl	_ipu_bus_format_to_map
	mov	x22, x0
	cmp	w21, #0
	mov	w8, #5
	cinc	w23, w8, ne
	ldr	x9, [x20]
	cmp	x9, #0
	csel	w24, wzr, w8, eq
Lloh0:
	adrp	x8, _DC_EVT_NL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DC_EVT_NL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x28, _SYNC_WAVE@GOTPAGE
Lloh4:
	ldr	x28, [x28, _SYNC_WAVE@GOTPAGEOFF]
	cbz	w21, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x2, x24
	mov	w3, #3
	bl	_dc_link_event
Lloh5:
	adrp	x8, _DC_EVT_EOL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DC_EVT_EOL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x24
	mov	w3, #2
	bl	_dc_link_event
Lloh8:
	adrp	x8, _DC_EVT_NEW_DATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DC_EVT_NEW_DATA@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x24
	mov	w3, #1
	bl	_dc_link_event
	b	LBB0_3
LBB0_2:
	mov	x28, x26
	orr	w26, w24, #0x2
	mov	x0, x20
	mov	x2, x26
	mov	w3, #3
	bl	_dc_link_event
Lloh11:
	adrp	x8, _DC_EVT_EOL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DC_EVT_EOL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	w27, w24, #3
	mov	x0, x20
	mov	x2, x27
	mov	w3, #2
	bl	_dc_link_event
Lloh14:
	adrp	x8, _DC_EVT_NEW_DATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DC_EVT_NEW_DATA@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	str	w25, [sp, #12]                  ; 4-byte Folded Spill
	add	w25, w24, #1
	mov	w19, #1
	mov	x0, x20
	mov	x2, x25
	mov	w3, #1
	bl	_dc_link_event
	mov	w0, #0
	bl	_WROD
	mov	x2, x0
Lloh17:
	adrp	x8, _SYNC_WAVE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SYNC_WAVE@GOTPAGEOFF]
Lloh19:
	ldr	w5, [x8]
	str	w19, [sp]
	mov	w19, #1
	mov	x0, x20
	mov	x1, x26
	mov	x26, x28
Lloh20:
	adrp	x28, _SYNC_WAVE@GOTPAGE
Lloh21:
	ldr	x28, [x28, _SYNC_WAVE@GOTPAGEOFF]
	mov	w3, #0
	mov	x4, x22
	mov	w6, #8
	mov	x7, x23
	bl	_dc_write_tmpl
	mov	w0, #0
	bl	_WROD
	mov	x2, x0
	ldr	w5, [x28]
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x27
	mov	w3, #0
	mov	x4, x22
	mov	w6, #4
	mov	x7, x23
	bl	_dc_write_tmpl
	add	w1, w24, #4
Lloh22:
	adrp	x8, _WRG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _WRG@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
Lloh25:
	adrp	x8, _NULL_WAVE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _NULL_WAVE@GOTPAGEOFF]
Lloh27:
	ldr	w5, [x8]
	str	w19, [sp]
	mov	x0, x20
	mov	w3, #0
	mov	x4, x22
	mov	w6, #0
	mov	w7, #0
	bl	_dc_write_tmpl
	mov	x24, x25
	ldr	w25, [sp, #12]                  ; 4-byte Folded Reload
LBB0_3:
	mov	w0, #0
	bl	_WROD
	mov	x2, x0
	ldr	w5, [x28]
	mov	w8, #1
	str	w8, [sp]
	mov	x0, x20
	mov	x1, x24
	mov	w3, #0
	mov	x4, x22
	mov	w6, #0
	mov	x7, x23
	bl	_dc_write_tmpl
Lloh28:
	adrp	x8, _DC_EVT_NF@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DC_EVT_NF@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_dc_link_event
Lloh31:
	adrp	x8, _DC_EVT_NFIELD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DC_EVT_NFIELD@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_dc_link_event
Lloh34:
	adrp	x8, _DC_EVT_EOF@GOTPAGE
Lloh35:
	ldr	x8, [x8, _DC_EVT_EOF@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_dc_link_event
Lloh37:
	adrp	x8, _DC_EVT_EOFIELD@GOTPAGE
Lloh38:
	ldr	x8, [x8, _DC_EVT_EOFIELD@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_dc_link_event
Lloh40:
	adrp	x8, _DC_EVT_NEW_CHAN@GOTPAGE
Lloh41:
	ldr	x8, [x8, _DC_EVT_NEW_CHAN@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_dc_link_event
Lloh43:
	adrp	x8, _DC_EVT_NEW_ADDR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _DC_EVT_NEW_ADDR@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_dc_link_event
	ldr	x8, [x20, #8]
Lloh46:
	adrp	x19, _DC_WR_CH_CONF@GOTPAGE
Lloh47:
	ldr	x19, [x19, _DC_WR_CH_CONF@GOTPAGEOFF]
	ldr	x9, [x19]
	add	x0, x9, x8
	bl	_readl
Lloh48:
	adrp	x8, _DC_WR_CH_CONF_FIELD_MODE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _DC_WR_CH_CONF_FIELD_MODE@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	orr	w9, w8, w0
	bic	w8, w0, w8
	cmp	w21, #0
	csel	w0, w8, w9, eq
	ldr	x8, [x20, #8]
	ldr	x9, [x19]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x20, #8]
Lloh51:
	adrp	x9, _DC_WR_CH_ADDR@GOTPAGE
Lloh52:
	ldr	x9, [x9, _DC_WR_CH_ADDR@GOTPAGEOFF]
Lloh53:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x19, [x26]
	ldr	x0, [x20]
	bl	_DC_DISP_CONF2
	add	x1, x0, x19
	mov	x0, x25
	bl	_writel
	mov	w0, #0
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_DC_EVT_NL,4,2                  ; @DC_EVT_NL
	.comm	_DC_EVT_EOL,4,2                 ; @DC_EVT_EOL
	.comm	_DC_EVT_NEW_DATA,4,2            ; @DC_EVT_NEW_DATA
	.comm	_SYNC_WAVE,4,2                  ; @SYNC_WAVE
	.comm	_WRG,4,2                        ; @WRG
	.comm	_NULL_WAVE,4,2                  ; @NULL_WAVE
	.comm	_DC_EVT_NF,4,2                  ; @DC_EVT_NF
	.comm	_DC_EVT_NFIELD,4,2              ; @DC_EVT_NFIELD
	.comm	_DC_EVT_EOF,4,2                 ; @DC_EVT_EOF
	.comm	_DC_EVT_EOFIELD,4,2             ; @DC_EVT_EOFIELD
	.comm	_DC_EVT_NEW_CHAN,4,2            ; @DC_EVT_NEW_CHAN
	.comm	_DC_EVT_NEW_ADDR,4,2            ; @DC_EVT_NEW_ADDR
	.comm	_DC_WR_CH_CONF,8,3              ; @DC_WR_CH_CONF
	.comm	_DC_WR_CH_CONF_FIELD_MODE,4,2   ; @DC_WR_CH_CONF_FIELD_MODE
	.comm	_DC_WR_CH_ADDR,8,3              ; @DC_WR_CH_ADDR
.subsections_via_symbols
