	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sti_hdmi_bind
_sti_hdmi_bind:                         ## @sti_hdmi_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rdi, %r14
	callq	_dev_get_drvdata
	movq	%rax, %rbx
	movq	%r15, 16(%rax)
	movq	%r15, %rdi
	callq	_sti_hdmi_find_encoder
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%r14, %rdi
	movq	%rax, %r14
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, 8(%rax)
	movl	(%r12), %edx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, 8(%rax)
	movq	_sti_hdmi_bridge_funcs@GOTPCREL(%rip), %rcx
	movq	%rcx, (%rax)
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_drm_bridge_attach
	movq	%r13, (%r14)
	movq	_DRM_CONNECTOR_POLL_HPD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_DRM_MODE_CONNECTOR_HDMIA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	12(%rbx), %r8d
	movq	_sti_hdmi_connector_funcs@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_drm_connector_init_with_ddc
	movq	_sti_hdmi_connector_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_drm_connector_helper_add
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_sti_hdmi_connector_init_property
	movq	%r14, (%rbx)
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_drm_connector_attach_encoder
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_sti_hdmi_register_audio_driver
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_10
LBB0_8:
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_hdmi_audio_infoframe_init
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
LBB0_10:
	callq	_DRM_ERROR
	movq	$0, (%rbx)
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	subl	(%rax), %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_HDMI_DEFAULT_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HDMI_INT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hdmi_write
	xorl	%r12d, %r12d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_sti_hdmi_bridge_funcs,4,2      ## @sti_hdmi_bridge_funcs
	.comm	_DRM_CONNECTOR_POLL_HPD,4,2     ## @DRM_CONNECTOR_POLL_HPD
	.comm	_sti_hdmi_connector_funcs,4,2   ## @sti_hdmi_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_HDMIA,4,2   ## @DRM_MODE_CONNECTOR_HDMIA
	.comm	_sti_hdmi_connector_helper_funcs,4,2 ## @sti_hdmi_connector_helper_funcs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to attach a connector to a encoder\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to attach an audio codec\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to init audio infoframe\n"

	.comm	_HDMI_DEFAULT_INT,4,2           ## @HDMI_DEFAULT_INT
	.comm	_HDMI_INT_EN,4,2                ## @HDMI_INT_EN
	.no_dead_strip	_sti_hdmi_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sti_hdmi_bind
_sti_hdmi_bind:                         ; @sti_hdmi_bind
	.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	x21, x2
	mov	x20, x0
	bl	_dev_get_drvdata
	mov	x19, x0
	str	x21, [x0, #16]
	mov	x0, x21
	bl	_sti_hdmi_find_encoder
	cbz	x0, LBB0_10
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_10
; %bb.2:
	mov	x23, x0
	str	x19, [x0, #8]
	ldr	w2, [x24]
	mov	x0, x20
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_10
; %bb.3:
	mov	x1, x0
Lloh2:
	adrp	x8, _sti_hdmi_bridge_funcs@GOTPAGE
Lloh3:
	ldr	x8, [x8, _sti_hdmi_bridge_funcs@GOTPAGEOFF]
	stp	x8, x19, [x0]
	mov	x0, x22
	mov	x2, #0
	bl	_drm_bridge_attach
	str	x22, [x23]
Lloh4:
	adrp	x8, _DRM_CONNECTOR_POLL_HPD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DRM_CONNECTOR_POLL_HPD@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x23]
Lloh7:
	adrp	x8, _DRM_MODE_CONNECTOR_HDMIA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_HDMIA@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	ldr	w4, [x19, #12]
Lloh10:
	adrp	x2, _sti_hdmi_connector_funcs@GOTPAGE
Lloh11:
	ldr	x2, [x2, _sti_hdmi_connector_funcs@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x23
	bl	_drm_connector_init_with_ddc
Lloh12:
	adrp	x1, _sti_hdmi_connector_helper_funcs@GOTPAGE
Lloh13:
	ldr	x1, [x1, _sti_hdmi_connector_helper_funcs@GOTPAGEOFF]
	mov	x0, x23
	bl	_drm_connector_helper_add
	mov	x0, x21
	mov	x1, x23
	bl	_sti_hdmi_connector_init_property
	str	x23, [x19]
	mov	x0, x23
	mov	x1, x22
	bl	_drm_connector_attach_encoder
	cbz	w0, LBB0_5
; %bb.4:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	bl	_sti_hdmi_register_audio_driver
	cbz	w0, LBB0_7
; %bb.6:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_7:
	add	x0, x19, #8
	bl	_hdmi_audio_infoframe_init
	cbz	w0, LBB0_12
; %bb.8:
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_9:
	bl	_DRM_ERROR
	str	xzr, [x19]
LBB0_10:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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_12:
Lloh23:
	adrp	x8, _HDMI_DEFAULT_INT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HDMI_DEFAULT_INT@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _HDMI_INT_EN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HDMI_INT_EN@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hdmi_write
	mov	w0, #0
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_sti_hdmi_bridge_funcs,4,2      ; @sti_hdmi_bridge_funcs
	.comm	_DRM_CONNECTOR_POLL_HPD,4,2     ; @DRM_CONNECTOR_POLL_HPD
	.comm	_sti_hdmi_connector_funcs,4,2   ; @sti_hdmi_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_HDMIA,4,2   ; @DRM_MODE_CONNECTOR_HDMIA
	.comm	_sti_hdmi_connector_helper_funcs,4,2 ; @sti_hdmi_connector_helper_funcs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to attach a connector to a encoder\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to attach an audio codec\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to init audio infoframe\n"

	.comm	_HDMI_DEFAULT_INT,4,2           ; @HDMI_DEFAULT_INT
	.comm	_HDMI_INT_EN,4,2                ; @HDMI_INT_EN
	.no_dead_strip	_sti_hdmi_bind
.subsections_via_symbols
