	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_dpi_bind
_vc4_dpi_bind:                          ## @vc4_dpi_bind
	.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	%rsi, %rbx
	movq	%rdi, %r12
	callq	_to_platform_device
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_to_vc4_dev
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	$56, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r13
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	_VC4_ENCODER_TYPE_DPI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movq	%r13, 8(%rax)
	movq	%rax, 8(%r13)
	movq	%r15, 48(%r13)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_vc4_ioremap_regs
	movq	%rax, 40(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	40(%r13), %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rdi, 24(%r13)
	movq	_dpi_regs@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 20(%r13)
	callq	_ARRAY_SIZE
	movl	%eax, 16(%r13)
	movq	_DPI_ID@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_DPI_READ
	movq	_DPI_ID_VALUE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_6
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_clk_get
	movq	%rax, (%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	(%r13), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	je	LBB0_19
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_10
LBB0_6:
	movl	(%r15), %edi
	callq	_DPI_READ
	movq	(%rbx), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%rax, %rdx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_11:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_clk_get
	movq	%rax, 32(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	32(%r13), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	je	LBB0_19
## %bb.13:
	leaq	L_.str.4(%rip), %rdi
LBB0_10:
	movl	%ebx, %esi
	callq	_DRM_ERROR
	jmp	LBB0_19
LBB0_14:
	movq	(%r13), %rdi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
LBB0_16:
	movq	8(%r13), %rsi
	movq	_DRM_MODE_ENCODER_DPI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_vc4_dpi_encoder_funcs@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	callq	_drm_encoder_init
	movq	8(%r13), %rdi
	movq	_vc4_dpi_encoder_helper_funcs@GOTPCREL(%rip), %rsi
	callq	_drm_encoder_helper_add
	movq	%r13, %rdi
	callq	_vc4_dpi_init_bridge
	testl	%eax, %eax
	je	LBB0_17
## %bb.18:
	movl	%eax, %r15d
	movq	8(%r13), %rdi
	callq	_drm_encoder_cleanup
	movq	(%r13), %rdi
	callq	_clk_disable_unprepare
	movl	%r15d, %ebx
	jmp	LBB0_19
LBB0_17:
	movq	%r13, %r15
	addq	$16, %r15
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_dev_set_drvdata
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_vc4_debugfs_add_regset32
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VC4_ENCODER_TYPE_DPI,4,2       ## @VC4_ENCODER_TYPE_DPI
	.comm	_dpi_regs,4,2                   ## @dpi_regs
	.comm	_DPI_ID,4,2                     ## @DPI_ID
	.comm	_DPI_ID_VALUE,8,3               ## @DPI_ID_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Port returned 0x%08x for ID instead of 0x%08x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"core"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.2:                               ## @.str.2
	.asciz	"Failed to get core clock: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"pixel"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to get pixel clock: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to turn on core clock: %d\n"

	.comm	_vc4_dpi_encoder_funcs,4,2      ## @vc4_dpi_encoder_funcs
	.comm	_DRM_MODE_ENCODER_DPI,4,2       ## @DRM_MODE_ENCODER_DPI
	.comm	_vc4_dpi_encoder_helper_funcs,4,2 ## @vc4_dpi_encoder_helper_funcs
L_.str.6:                               ## @.str.6
	.asciz	"dpi_regs"

	.no_dead_strip	_vc4_dpi_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_dpi_bind
_vc4_dpi_bind:                          ; @vc4_dpi_bind
	.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	x19, x0
	bl	_to_platform_device
	mov	x23, x0
	mov	x0, x20
	bl	_dev_get_drvdata
	mov	x20, x0
	bl	_to_vc4_dev
	mov	x21, x0
Lloh0:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	mov	w1, #56
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	ldr	w2, [x24]
	mov	x0, x19
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _VC4_ENCODER_TYPE_DPI@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VC4_ENCODER_TYPE_DPI@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x0, #4]
	str	x22, [x0, #8]
	str	x0, [x22, #8]
	str	x23, [x22, #48]
	mov	x0, x23
	mov	w1, #0
	bl	_vc4_ioremap_regs
	str	x0, [x22, #40]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x22, #40]
	cbz	x8, LBB0_7
; %bb.3:
	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	_PTR_ERR
LBB0_4:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_6:
	mov	x0, x24
	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
LBB0_7:
	str	x0, [x22, #24]
Lloh7:
	adrp	x8, _dpi_regs@GOTPAGE
Lloh8:
	ldr	x8, [x8, _dpi_regs@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	str	w0, [x22, #20]
	bl	_ARRAY_SIZE
	mov	x23, x22
	str	w0, [x23, #16]!
Lloh10:
	adrp	x24, _DPI_ID@GOTPAGE
Lloh11:
	ldr	x24, [x24, _DPI_ID@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_DPI_READ
Lloh12:
	adrp	x25, _DPI_ID_VALUE@GOTPAGE
Lloh13:
	ldr	x25, [x25, _DPI_ID_VALUE@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.8:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x22]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.9:
	ldr	x0, [x22]
	bl	_PTR_ERR
	mov	x24, x0
Lloh16:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_6
; %bb.10:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_11:
	ldr	w0, [x24]
	bl	_DPI_READ
	mov	x2, x0
	ldr	x3, [x25]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh23:
	adrp	x8, _ENODEV@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_5
LBB0_12:
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x22, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.13:
	ldr	x0, [x22, #32]
	bl	_PTR_ERR
	mov	x24, x0
Lloh27:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_6
; %bb.14:
Lloh30:
	adrp	x0, l_.str.4@PAGE
Lloh31:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_15:
	mov	x1, x24
	bl	_DRM_ERROR
	b	LBB0_6
LBB0_16:
	ldr	x0, [x22]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_18
; %bb.17:
	mov	x1, x0
Lloh32:
	adrp	x0, l_.str.5@PAGE
Lloh33:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_ERROR
LBB0_18:
	ldr	x1, [x22, #8]
Lloh34:
	adrp	x8, _DRM_MODE_ENCODER_DPI@GOTPAGE
Lloh35:
	ldr	x8, [x8, _DRM_MODE_ENCODER_DPI@GOTPAGEOFF]
Lloh36:
	ldr	w3, [x8]
Lloh37:
	adrp	x2, _vc4_dpi_encoder_funcs@GOTPAGE
Lloh38:
	ldr	x2, [x2, _vc4_dpi_encoder_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x4, #0
	bl	_drm_encoder_init
	ldr	x0, [x22, #8]
Lloh39:
	adrp	x1, _vc4_dpi_encoder_helper_funcs@GOTPAGE
Lloh40:
	ldr	x1, [x1, _vc4_dpi_encoder_helper_funcs@GOTPAGEOFF]
	bl	_drm_encoder_helper_add
	mov	x0, x22
	bl	_vc4_dpi_init_bridge
	mov	x24, x0
	cbz	w0, LBB0_20
; %bb.19:
	ldr	x0, [x22, #8]
	bl	_drm_encoder_cleanup
	ldr	x0, [x22]
	bl	_clk_disable_unprepare
	b	LBB0_6
LBB0_20:
	mov	x0, x19
	mov	x1, x22
	bl	_dev_set_drvdata
	str	x22, [x21]
Lloh41:
	adrp	x1, l_.str.6@PAGE
Lloh42:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	bl	_vc4_debugfs_add_regset32
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VC4_ENCODER_TYPE_DPI,4,2       ; @VC4_ENCODER_TYPE_DPI
	.comm	_dpi_regs,4,2                   ; @dpi_regs
	.comm	_DPI_ID,4,2                     ; @DPI_ID
	.comm	_DPI_ID_VALUE,8,3               ; @DPI_ID_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Port returned 0x%08x for ID instead of 0x%08x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"core"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.2:                               ; @.str.2
	.asciz	"Failed to get core clock: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"pixel"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to get pixel clock: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to turn on core clock: %d\n"

	.comm	_vc4_dpi_encoder_funcs,4,2      ; @vc4_dpi_encoder_funcs
	.comm	_DRM_MODE_ENCODER_DPI,4,2       ; @DRM_MODE_ENCODER_DPI
	.comm	_vc4_dpi_encoder_helper_funcs,4,2 ; @vc4_dpi_encoder_helper_funcs
l_.str.6:                               ; @.str.6
	.asciz	"dpi_regs"

	.no_dead_strip	_vc4_dpi_bind
.subsections_via_symbols
