	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a10hdmi_attach
_a10hdmi_attach:                        ## @a10hdmi_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	%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
	movl	%edi, %r12d
	callq	_device_get_softc
	movq	%rax, %r14
	movq	_a10hdmi_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	20(%r14), %rdx
	movl	%r12d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_2
LBB0_3:
	leaq	8(%r14), %r15
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %edi
	xorl	%esi, %esi
	movq	%r15, %rcx
	callq	_clk_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_6:
	leaq	12(%r14), %r13
	leaq	L_.str.3(%rip), %rdx
	movl	%r12d, %edi
	xorl	%esi, %esi
	movq	%r13, %rcx
	callq	_clk_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_5
LBB0_8:
	leaq	16(%r14), %rcx
	leaq	L_.str.5(%rip), %rdx
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_clk_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.6(%rip), %rsi
	movl	%r12d, %edi
	callq	_device_printf
LBB0_10:
	movl	(%r13), %edi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_5
LBB0_12:
	movl	(%r15), %edi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %rsi
LBB0_5:
	movl	%r12d, %edi
	callq	_device_printf
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r14, %rdi
	callq	_a10hdmi_init
	movq	_a10hdmi_hpd@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movl	%r12d, (%r14)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_config_intrhook_establish      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_a10hdmi_spec,4,2               ## @a10hdmi_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot allocate resources for device\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"ahb"

L_.str.2:                               ## @.str.2
	.asciz	"cannot find ahb clock\n"

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

L_.str.4:                               ## @.str.4
	.asciz	"cannot find hdmi clock\n"

L_.str.5:                               ## @.str.5
	.asciz	"lcd"

L_.str.6:                               ## @.str.6
	.asciz	"cannot find lcd clock\n"

L_.str.7:                               ## @.str.7
	.asciz	"cannot enable hdmi clock\n"

L_.str.8:                               ## @.str.8
	.asciz	"cannot enable ahb gate\n"

	.comm	_a10hdmi_hpd,4,2                ## @a10hdmi_hpd
	.no_dead_strip	_a10hdmi_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a10hdmi_attach
_a10hdmi_attach:                        ; @a10hdmi_attach
	.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	x19, x0
	bl	_device_get_softc
	mov	x20, x0
Lloh0:
	adrp	x8, _a10hdmi_spec@GOTPAGE
Lloh1:
	ldr	x8, [x8, _a10hdmi_spec@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, x0, #20
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	b	LBB0_13
LBB0_2:
	add	x21, x20, #8
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	x3, x21
	bl	_clk_get_by_ofw_name
	cbz	w0, LBB0_4
; %bb.3:
	mov	x22, x0
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_4:
	add	x23, x20, #12
Lloh12:
	adrp	x2, l_.str.3@PAGE
Lloh13:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	x3, x23
	bl	_clk_get_by_ofw_name
	cbz	w0, LBB0_6
; %bb.5:
	mov	x22, x0
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_6:
	add	x3, x20, #16
Lloh16:
	adrp	x2, l_.str.5@PAGE
Lloh17:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_clk_get_by_ofw_name
	cbz	w0, LBB0_8
; %bb.7:
Lloh18:
	adrp	x1, l_.str.6@PAGE
Lloh19:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_device_printf
LBB0_8:
	ldr	w0, [x23]
	bl	_clk_enable
	cbz	w0, LBB0_10
; %bb.9:
	mov	x22, x0
Lloh20:
	adrp	x1, l_.str.7@PAGE
Lloh21:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_12
LBB0_10:
	ldr	w0, [x21]
	bl	_clk_enable
	cbz	w0, LBB0_14
; %bb.11:
	mov	x22, x0
Lloh22:
	adrp	x1, l_.str.8@PAGE
Lloh23:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_12:
	mov	x0, x19
	bl	_device_printf
LBB0_13:
	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_14:
	mov	x0, x20
	bl	_a10hdmi_init
Lloh24:
	adrp	x8, _a10hdmi_hpd@GOTPAGE
Lloh25:
	ldr	x8, [x8, _a10hdmi_hpd@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	stp	w19, w8, [x20]
	mov	x0, x20
	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
	b	_config_intrhook_establish
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_a10hdmi_spec,4,2               ; @a10hdmi_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot allocate resources for device\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"ahb"

l_.str.2:                               ; @.str.2
	.asciz	"cannot find ahb clock\n"

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

l_.str.4:                               ; @.str.4
	.asciz	"cannot find hdmi clock\n"

l_.str.5:                               ; @.str.5
	.asciz	"lcd"

l_.str.6:                               ; @.str.6
	.asciz	"cannot find lcd clock\n"

l_.str.7:                               ; @.str.7
	.asciz	"cannot enable hdmi clock\n"

l_.str.8:                               ; @.str.8
	.asciz	"cannot enable ahb gate\n"

	.comm	_a10hdmi_hpd,4,2                ; @a10hdmi_hpd
	.no_dead_strip	_a10hdmi_attach
.subsections_via_symbols
