	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rcar_du_encoder_init           ## -- Begin function rcar_du_encoder_init
	.p2align	4, 0x90
_rcar_du_encoder_init:                  ## @rcar_du_encoder_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	16(%r15), %rax
	movl	%ebx, %ecx
	movq	%r12, (%rax,%rcx,8)
	movl	%ebx, (%r12)
	movq	%r12, %rdi
	callq	_rcar_encoder_to_drm_encoder
	movq	%rax, %r14
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	movl	%ebx, %ecx
	callq	_dev_dbg
	movq	_RCAR_DU_OUTPUT_DPAD0@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_RCAR_DU_OUTPUT_DPAD1@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_16
LBB0_4:
	movq	%r13, %rdi
	callq	_rcar_du_encoder_count_ports
	cmpl	$1, %eax
	jne	LBB0_16
## %bb.5:
	movq	%r13, %rdi
	callq	_of_drm_find_panel
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_6
## %bb.11:
	movl	(%r15), %edi
	movq	_DRM_MODE_CONNECTOR_DPI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rsi
	callq	_devm_drm_panel_bridge_add
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
LBB0_6:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jns	LBB0_23
	jmp	LBB0_8
LBB0_16:
	movq	%r13, %rdi
	callq	_of_drm_find_bridge
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_17
LBB0_12:
	movq	8(%r15), %rax
	cmpl	$3, (%rax)
	jl	LBB0_19
## %bb.13:
	movq	_RCAR_DU_OUTPUT_LVDS1@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_19
## %bb.14:
	movq	%r13, %rdi
	callq	_rcar_lvds_dual_link
	testq	%rax, %rax
	je	LBB0_19
## %bb.15:
	movq	_ENOLINK@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_19:
	movl	4(%r15), %edi
	movq	_DRM_MODE_ENCODER_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_encoder_funcs@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%r8d, %r8d
	callq	_drm_encoder_init
	testl	%eax, %eax
	js	LBB0_20
## %bb.21:
	movq	_encoder_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_drm_encoder_helper_add
	movq	%r14, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_drm_bridge_attach
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_drm_encoder_cleanup
	movl	%r15d, %ebx
	jmp	LBB0_23
LBB0_17:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
LBB0_18:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%ebx, %ebx
	jns	LBB0_23
LBB0_8:
	cmpq	$0, 8(%r14)
	je	LBB0_10
LBB0_9:
	movq	(%r14), %rax
	movq	%r14, %rdi
	callq	*(%rax)
LBB0_10:
	movl	(%r15), %edi
	movq	%r12, %rsi
	callq	_devm_kfree
LBB0_23:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	%eax, %ebx
	cmpq	$0, 8(%r14)
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"initializing encoder %pOF for output %u\n"

	.comm	_RCAR_DU_OUTPUT_DPAD0,4,2       ## @RCAR_DU_OUTPUT_DPAD0
	.comm	_RCAR_DU_OUTPUT_DPAD1,4,2       ## @RCAR_DU_OUTPUT_DPAD1
	.comm	_DRM_MODE_CONNECTOR_DPI,4,2     ## @DRM_MODE_CONNECTOR_DPI
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_RCAR_DU_OUTPUT_LVDS1,4,2       ## @RCAR_DU_OUTPUT_LVDS1
	.comm	_ENOLINK,4,2                    ## @ENOLINK
	.comm	_encoder_funcs,4,2              ## @encoder_funcs
	.comm	_DRM_MODE_ENCODER_NONE,4,2      ## @DRM_MODE_ENCODER_NONE
	.comm	_encoder_helper_funcs,4,2       ## @encoder_helper_funcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rcar_du_encoder_init           ; -- Begin function rcar_du_encoder_init
	.p2align	2
_rcar_du_encoder_init:                  ; @rcar_du_encoder_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_devm_kzalloc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x21, x0
	ldr	x8, [x19, #16]
	str	x0, [x8, w22, uxtw #3]
	str	w22, [x0]
	bl	_rcar_encoder_to_drm_encoder
	mov	x20, x0
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x22
	bl	_dev_dbg
Lloh5:
	adrp	x8, _RCAR_DU_OUTPUT_DPAD0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RCAR_DU_OUTPUT_DPAD0@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _RCAR_DU_OUTPUT_DPAD1@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RCAR_DU_OUTPUT_DPAD1@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w22
	ccmp	w9, w22, #4, ne
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x23
	bl	_rcar_du_encoder_count_ports
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x23
	bl	_of_drm_find_panel
	mov	x23, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x19]
Lloh11:
	adrp	x8, _DRM_MODE_CONNECTOR_DPI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_DPI@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x1, x23
	bl	_devm_drm_panel_bridge_add
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
LBB0_5:
	mov	x0, x23
	bl	_PTR_ERR
	mov	x22, x0
	tbz	w22, #31, LBB0_19
	b	LBB0_16
LBB0_6:
	mov	x0, x23
	bl	_of_drm_find_bridge
	mov	x23, x0
	cbz	x0, LBB0_14
LBB0_7:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _RCAR_DU_OUTPUT_LVDS1@GOTPAGE
Lloh15:
	ldr	x9, [x9, _RCAR_DU_OUTPUT_LVDS1@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, #3
	ccmp	w9, w22, #0, ge
	b.ne	LBB0_11
; %bb.8:
	mov	x0, x23
	bl	_rcar_lvds_dual_link
	cbz	x0, LBB0_11
; %bb.9:
Lloh17:
	adrp	x8, _ENOLINK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOLINK@GOTPAGEOFF]
	b	LBB0_15
LBB0_10:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_19
LBB0_11:
	ldr	w0, [x19, #4]
Lloh22:
	adrp	x8, _DRM_MODE_ENCODER_NONE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DRM_MODE_ENCODER_NONE@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
Lloh25:
	adrp	x2, _encoder_funcs@GOTPAGE
Lloh26:
	ldr	x2, [x2, _encoder_funcs@GOTPAGEOFF]
	mov	x1, x20
	mov	x4, #0
	bl	_drm_encoder_init
	tbnz	w0, #31, LBB0_20
; %bb.12:
Lloh27:
	adrp	x1, _encoder_helper_funcs@GOTPAGE
Lloh28:
	ldr	x1, [x1, _encoder_helper_funcs@GOTPAGEOFF]
	mov	x0, x20
	bl	_drm_encoder_helper_add
	mov	x0, x20
	mov	x1, x23
	mov	x2, #0
	bl	_drm_bridge_attach
	mov	x22, x0
	cbz	w0, LBB0_19
; %bb.13:
	mov	x0, x20
	bl	_drm_encoder_cleanup
	b	LBB0_19
LBB0_14:
Lloh29:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w22, w8
	tbz	w22, #31, LBB0_19
LBB0_16:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_18
LBB0_17:
	ldr	x8, [x20]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
LBB0_18:
	ldr	w0, [x19]
	mov	x1, x21
	bl	_devm_kfree
LBB0_19:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	x22, x0
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_17
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"initializing encoder %pOF for output %u\n"

	.comm	_RCAR_DU_OUTPUT_DPAD0,4,2       ; @RCAR_DU_OUTPUT_DPAD0
	.comm	_RCAR_DU_OUTPUT_DPAD1,4,2       ; @RCAR_DU_OUTPUT_DPAD1
	.comm	_DRM_MODE_CONNECTOR_DPI,4,2     ; @DRM_MODE_CONNECTOR_DPI
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_RCAR_DU_OUTPUT_LVDS1,4,2       ; @RCAR_DU_OUTPUT_LVDS1
	.comm	_ENOLINK,4,2                    ; @ENOLINK
	.comm	_encoder_funcs,4,2              ; @encoder_funcs
	.comm	_DRM_MODE_ENCODER_NONE,4,2      ; @DRM_MODE_ENCODER_NONE
	.comm	_encoder_helper_funcs,4,2       ; @encoder_helper_funcs
.subsections_via_symbols
