	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdv_hdmi_init                  ## -- Begin function cdv_hdmi_init
	.p2align	4, 0x90
_cdv_hdmi_init:                         ## @cdv_hdmi_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%rax, %r12
	movl	(%rbx), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movq	%rax, %r14
	movl	(%rbx), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	leaq	28(%r14), %rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r13
	movq	_DRM_CONNECTOR_POLL_HPD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movq	_cdv_hdmi_save@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r14)
	movq	_cdv_hdmi_restore@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r14)
	movq	%r12, %r15
	addq	$28, %r15
	movq	_DRM_MODE_CONNECTOR_DVID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_cdv_hdmi_connector_funcs@GOTPCREL(%rip), %rdx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_drm_connector_init
	movq	_DRM_MODE_ENCODER_TMDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_psb_intel_lvds_enc_funcs@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	callq	_drm_encoder_init
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_gma_connector_attach_encoder
	movq	_INTEL_OUTPUT_HDMI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
	movl	$0, 4(%r13)
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, 16(%r12)
	movq	%r15, %r13
	movq	_cdv_hdmi_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_drm_encoder_helper_add
	movq	_cdv_hdmi_connector_helper_funcs@GOTPCREL(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_connector_helper_add
	movq	_SubPixelHorizontalRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	movq	$0, 28(%r14)
	movq	%r14, %rdi
	addq	$36, %rdi
	movl	4(%rbx), %esi
	movq	_DRM_MODE_SCALE_FULLSCREEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_drm_object_attach_property
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	$129, %edx
	je	LBB0_4
## %bb.5:
	cmpl	$128, %edx
	jne	LBB0_10
## %bb.6:
	movq	_DDI1_SELECT@GOTPCREL(%rip), %rax
	movq	_GPIOD@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_DDI0_SELECT@GOTPCREL(%rip), %rax
	movq	_GPIOE@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %esi
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	cmpl	$129, %edx
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	%rbx, %rdi
	callq	_psb_intel_i2c_create
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 16(%rcx)
	movq	%rbx, 8(%rcx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_connector_register         ## TAILCALL
LBB0_10:
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	callq	_DRM_ERROR
	jmp	LBB0_11
LBB0_8:
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
LBB0_11:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_drm_encoder_cleanup
	movq	%rbx, %rdi
	callq	_drm_connector_cleanup
LBB0_12:
	movq	%r14, %rdi
	callq	_kfree
LBB0_13:
	movq	%r12, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_DRM_CONNECTOR_POLL_HPD,4,2     ## @DRM_CONNECTOR_POLL_HPD
	.comm	_cdv_hdmi_save,4,2              ## @cdv_hdmi_save
	.comm	_cdv_hdmi_restore,4,2           ## @cdv_hdmi_restore
	.comm	_cdv_hdmi_connector_funcs,4,2   ## @cdv_hdmi_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_DVID,4,2    ## @DRM_MODE_CONNECTOR_DVID
	.comm	_psb_intel_lvds_enc_funcs,4,2   ## @psb_intel_lvds_enc_funcs
	.comm	_DRM_MODE_ENCODER_TMDS,4,2      ## @DRM_MODE_ENCODER_TMDS
	.comm	_INTEL_OUTPUT_HDMI,4,2          ## @INTEL_OUTPUT_HDMI
	.comm	_cdv_hdmi_helper_funcs,4,2      ## @cdv_hdmi_helper_funcs
	.comm	_cdv_hdmi_connector_helper_funcs,4,2 ## @cdv_hdmi_connector_helper_funcs
	.comm	_SubPixelHorizontalRGB,4,2      ## @SubPixelHorizontalRGB
	.comm	_DRM_MODE_SCALE_FULLSCREEN,4,2  ## @DRM_MODE_SCALE_FULLSCREEN
	.comm	_GPIOE,4,2                      ## @GPIOE
	.comm	_DDI0_SELECT,4,2                ## @DDI0_SELECT
	.comm	_GPIOD,4,2                      ## @GPIOD
	.comm	_DDI1_SELECT,4,2                ## @DDI1_SELECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown reg 0x%x for HDMI\n"

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

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

L_.str.3:                               ## @.str.3
	.asciz	"No ddc adapter available!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdv_hdmi_init                  ; -- Begin function cdv_hdmi_init
	.p2align	2
_cdv_hdmi_init:                         ; @cdv_hdmi_init
	.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	x22, x2
	mov	x21, x0
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w1, [x23]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_14
; %bb.2:
	mov	x20, x0
	ldr	w1, [x23]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_13
; %bb.3:
	mov	x25, x0
	add	x23, x20, #28
Lloh2:
	adrp	x8, _DRM_CONNECTOR_POLL_HPD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DRM_CONNECTOR_POLL_HPD@GOTPAGEOFF]
Lloh4:
	adrp	x9, _cdv_hdmi_save@GOTPAGE
Lloh5:
	ldr	x9, [x9, _cdv_hdmi_save@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	str	w9, [x20, #52]
Lloh8:
	adrp	x9, _cdv_hdmi_restore@GOTPAGE
Lloh9:
	ldr	x9, [x9, _cdv_hdmi_restore@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w8, w9, [x20, #44]
	add	x24, x19, #28
Lloh11:
	adrp	x8, _DRM_MODE_CONNECTOR_DVID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_DVID@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	adrp	x2, _cdv_hdmi_connector_funcs@GOTPAGE
Lloh15:
	ldr	x2, [x2, _cdv_hdmi_connector_funcs@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x23
	bl	_drm_connector_init
Lloh16:
	adrp	x8, _DRM_MODE_ENCODER_TMDS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DRM_MODE_ENCODER_TMDS@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
Lloh19:
	adrp	x2, _psb_intel_lvds_enc_funcs@GOTPAGE
Lloh20:
	ldr	x2, [x2, _psb_intel_lvds_enc_funcs@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x24
	mov	x4, #0
	bl	_drm_encoder_init
	mov	x0, x20
	mov	x1, x19
	bl	_gma_connector_attach_encoder
Lloh21:
	adrp	x8, _INTEL_OUTPUT_HDMI@GOTPAGE
Lloh22:
	ldr	x8, [x8, _INTEL_OUTPUT_HDMI@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	stp	w22, wzr, [x25]
	str	x25, [x19, #16]
Lloh24:
	adrp	x1, _cdv_hdmi_helper_funcs@GOTPAGE
Lloh25:
	ldr	x1, [x1, _cdv_hdmi_helper_funcs@GOTPAGEOFF]
	mov	x0, x24
	bl	_drm_encoder_helper_add
Lloh26:
	adrp	x1, _cdv_hdmi_connector_helper_funcs@GOTPAGE
Lloh27:
	ldr	x1, [x1, _cdv_hdmi_connector_helper_funcs@GOTPAGEOFF]
	mov	x0, x23
	bl	_drm_connector_helper_add
Lloh28:
	adrp	x8, _SubPixelHorizontalRGB@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SubPixelHorizontalRGB@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	str	w8, [x20, #40]
	stp	wzr, wzr, [x20, #28]
	add	x0, x20, #36
	ldr	w1, [x21, #4]
Lloh31:
	adrp	x8, _DRM_MODE_SCALE_FULLSCREEN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DRM_MODE_SCALE_FULLSCREEN@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	bl	_drm_object_attach_property
	cmp	w22, #129
	b.eq	LBB0_7
; %bb.4:
	cmp	w22, #128
	b.ne	LBB0_10
; %bb.5:
Lloh34:
	adrp	x8, _DDI1_SELECT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _DDI1_SELECT@GOTPAGEOFF]
Lloh36:
	adrp	x9, _GPIOD@GOTPAGE
Lloh37:
	ldr	x9, [x9, _GPIOD@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	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:
Lloh38:
	adrp	x8, _DDI0_SELECT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _DDI0_SELECT@GOTPAGEOFF]
Lloh40:
	adrp	x9, _GPIOE@GOTPAGE
Lloh41:
	ldr	x9, [x9, _GPIOE@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x9]
	ldr	w8, [x8]
	str	w8, [x19, #8]
Lloh42:
	adrp	x8, l_.str.2@PAGE
Lloh43:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh44:
	adrp	x9, l_.str.1@PAGE
Lloh45:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w22, #129
	csel	x2, x9, x8, eq
	mov	x0, x21
	bl	_psb_intel_i2c_create
	str	x0, [x19]
	cbz	x0, LBB0_11
; %bb.9:
	stp	x21, x0, [x25, #8]
	mov	x0, x23
	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	_drm_connector_register
LBB0_10:
Lloh46:
	adrp	x0, l_.str@PAGE
Lloh47:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_DRM_ERROR
	b	LBB0_12
LBB0_11:
	ldr	w0, [x21]
Lloh48:
	adrp	x1, l_.str.3@PAGE
Lloh49:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_12:
	mov	x0, x24
	bl	_drm_encoder_cleanup
	mov	x0, x23
	bl	_drm_connector_cleanup
LBB0_13:
	mov	x0, x20
	bl	_kfree
LBB0_14:
	mov	x0, x19
	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	_kfree
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_DRM_CONNECTOR_POLL_HPD,4,2     ; @DRM_CONNECTOR_POLL_HPD
	.comm	_cdv_hdmi_save,4,2              ; @cdv_hdmi_save
	.comm	_cdv_hdmi_restore,4,2           ; @cdv_hdmi_restore
	.comm	_cdv_hdmi_connector_funcs,4,2   ; @cdv_hdmi_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_DVID,4,2    ; @DRM_MODE_CONNECTOR_DVID
	.comm	_psb_intel_lvds_enc_funcs,4,2   ; @psb_intel_lvds_enc_funcs
	.comm	_DRM_MODE_ENCODER_TMDS,4,2      ; @DRM_MODE_ENCODER_TMDS
	.comm	_INTEL_OUTPUT_HDMI,4,2          ; @INTEL_OUTPUT_HDMI
	.comm	_cdv_hdmi_helper_funcs,4,2      ; @cdv_hdmi_helper_funcs
	.comm	_cdv_hdmi_connector_helper_funcs,4,2 ; @cdv_hdmi_connector_helper_funcs
	.comm	_SubPixelHorizontalRGB,4,2      ; @SubPixelHorizontalRGB
	.comm	_DRM_MODE_SCALE_FULLSCREEN,4,2  ; @DRM_MODE_SCALE_FULLSCREEN
	.comm	_GPIOE,4,2                      ; @GPIOE
	.comm	_DDI0_SELECT,4,2                ; @DDI0_SELECT
	.comm	_GPIOD,4,2                      ; @GPIOD
	.comm	_DDI1_SELECT,4,2                ; @DDI1_SELECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown reg 0x%x for HDMI\n"

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

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

l_.str.3:                               ; @.str.3
	.asciz	"No ddc adapter available!\n"

.subsections_via_symbols
