	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_hdmi_attach
_imx_hdmi_attach:                       ## @imx_hdmi_attach
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	%r15d, 28(%rax)
	movq	_imx_hdmi_get_i2c_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	leaq	16(%rbx), %rdx
	movq	$0, 16(%rbx)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%r15d, %edi
	callq	_ofw_bus_get_node
	leaq	L_.str.1(%rip), %rsi
	leaq	-32(%rbp), %rdx
	movq	%rax, %rdi
	movl	$8, %ecx
	callq	_OF_getencprop
	xorl	%r14d, %r14d
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movq	-32(%rbp), %rax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r15d, %edi
	callq	_imx_hdmi_detach
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	movq	%rax, (%rbx)
	xorl	%eax, %eax
	callq	_imx_ccm_hdmi_enable
	movq	_IOMUXC_GPR3@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_imx_iomux_gpr_get
	movq	_IOMUXC_GPR3_HDMI_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_IOMUXC_GPR3_HDMI_IPU1_DI0@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%rbx), %edi
	callq	_imx_iomux_gpr_set
	movq	_imx_hdmi_init@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_config_intrhook_oneshot
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_imx_hdmi_get_i2c_dev,4,2       ## @imx_hdmi_get_i2c_dev
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot allocate memory resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"ddc-i2c-bus"

	.comm	_IOMUXC_GPR3,4,2                ## @IOMUXC_GPR3
	.comm	_IOMUXC_GPR3_HDMI_MASK,4,2      ## @IOMUXC_GPR3_HDMI_MASK
	.comm	_IOMUXC_GPR3_HDMI_IPU1_DI0,4,2  ## @IOMUXC_GPR3_HDMI_IPU1_DI0
	.comm	_imx_hdmi_init,4,2              ## @imx_hdmi_init
	.no_dead_strip	_imx_hdmi_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_hdmi_attach
_imx_hdmi_attach:                       ; @imx_hdmi_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
Lloh0:
	adrp	x8, _imx_hdmi_get_i2c_dev@GOTPAGE
Lloh1:
	ldr	x8, [x8, _imx_hdmi_get_i2c_dev@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w8, w19, [x0, #24]
	mov	x2, x0
	str	xzr, [x2, #16]!
Lloh3:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20, #8]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_ofw_bus_get_node
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	w3, #8
	bl	_OF_getencprop
	ldr	x8, [sp, #8]
	cmn	w0, #1
	csel	x8, xzr, x8, eq
	str	x8, [x20]
	bl	_imx_ccm_hdmi_enable
Lloh11:
	adrp	x20, _IOMUXC_GPR3@GOTPAGE
Lloh12:
	ldr	x20, [x20, _IOMUXC_GPR3@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_imx_iomux_gpr_get
Lloh13:
	adrp	x8, _IOMUXC_GPR3_HDMI_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IOMUXC_GPR3_HDMI_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh16:
	adrp	x9, _IOMUXC_GPR3_HDMI_IPU1_DI0@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IOMUXC_GPR3_HDMI_IPU1_DI0@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w0, [x20]
	bl	_imx_iomux_gpr_set
Lloh19:
	adrp	x8, _imx_hdmi_init@GOTPAGE
Lloh20:
	ldr	x8, [x8, _imx_hdmi_init@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_config_intrhook_oneshot
	mov	w20, #0
	b	LBB0_3
LBB0_2:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh24:
	adrp	x8, _ENXIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh26:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_imx_hdmi_detach
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_imx_hdmi_get_i2c_dev,4,2       ; @imx_hdmi_get_i2c_dev
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allocate memory resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"ddc-i2c-bus"

	.comm	_IOMUXC_GPR3,4,2                ; @IOMUXC_GPR3
	.comm	_IOMUXC_GPR3_HDMI_MASK,4,2      ; @IOMUXC_GPR3_HDMI_MASK
	.comm	_IOMUXC_GPR3_HDMI_IPU1_DI0,4,2  ; @IOMUXC_GPR3_HDMI_IPU1_DI0
	.comm	_imx_hdmi_init,4,2              ; @imx_hdmi_init
	.no_dead_strip	_imx_hdmi_attach
.subsections_via_symbols
