	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_drm_encoder_attach       ## -- Begin function tegra_drm_encoder_attach
	.p2align	4, 0x90
_tegra_drm_encoder_attach:              ## @tegra_drm_encoder_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	leaq	24(%rdi), %r14
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_OF_getencprop_alloc
	movl	32(%r12), %edi
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	cmpl	$4, %eax
	je	LBB0_5
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	callq	_device_printf
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	movq	_M_OFWPROP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
	jmp	LBB0_4
LBB0_5:
	leaq	8(%r12), %r15
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rsi
	movq	%r15, %rcx
	callq	_gpio_pin_get_by_ofw_property
	movq	$0, -40(%rbp)
	leaq	L_.str.3(%rip), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %ecx
	callq	_OF_getencprop
	movq	-40(%rbp), %rdi
	testq	%rdi, %rdi
	jle	LBB0_7
## %bb.6:
	callq	_OF_device_from_xref
	movq	%rax, 16(%r12)
LBB0_7:
	cmpq	$0, (%r14)
	jne	LBB0_9
## %bb.8:
	cmpq	$0, 16(%r12)
	je	LBB0_4
LBB0_9:
	xorl	%eax, %eax
	cmpq	$0, (%r15)
	je	LBB0_11
## %bb.10:
	movq	_DRM_CONNECTOR_POLL_DISCONNECT@GOTPCREL(%rip), %rcx
	movq	_DRM_CONNECTOR_POLL_CONNECT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%edx, (%r12)
	jmp	LBB0_11
LBB0_4:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nvidia,edid"

L_.str.1:                               ## @.str.1
	.asciz	"Malformed \"nvidia,edid\" property\n"

	.comm	_M_OFWPROP,4,2                  ## @M_OFWPROP
	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.2:                               ## @.str.2
	.asciz	"nvidia,hpd-gpio"

L_.str.3:                               ## @.str.3
	.asciz	"nvidia,ddc-i2c-bus"

	.comm	_DRM_CONNECTOR_POLL_DISCONNECT,4,2 ## @DRM_CONNECTOR_POLL_DISCONNECT
	.comm	_DRM_CONNECTOR_POLL_CONNECT,4,2 ## @DRM_CONNECTOR_POLL_CONNECT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_drm_encoder_attach       ; -- Begin function tegra_drm_encoder_attach
	.p2align	2
_tegra_drm_encoder_attach:              ; @tegra_drm_encoder_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x22, x1
	mov	x19, x0
	add	x20, x0, #24
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x20
	bl	_OF_getencprop_alloc
	mov	x8, x0
	ldr	w0, [x19, #32]
	tbnz	w8, #31, LBB0_5
; %bb.1:
	cmp	w8, #4
	b.eq	LBB0_5
; %bb.2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_device_printf
	ldr	x0, [x20]
	cbz	x0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _M_OFWPROP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _M_OFWPROP@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_free
LBB0_4:
Lloh7:
	adrp	x8, _ENXIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_5:
	add	x21, x19, #8
Lloh10:
	adrp	x2, l_.str.2@PAGE
Lloh11:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x1, x22
	mov	x3, x21
	bl	_gpio_pin_get_by_ofw_property
	str	xzr, [sp, #8]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #8
	mov	x0, x22
	mov	w3, #8
	bl	_OF_getencprop
	ldr	x0, [sp, #8]
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.6:
	bl	_OF_device_from_xref
	str	x0, [x19, #16]
LBB0_7:
	ldr	x8, [x20]
	cbnz	x8, LBB0_9
; %bb.8:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
LBB0_9:
	ldr	x8, [x21]
	cbz	x8, LBB0_11
; %bb.10:
	mov	w0, #0
Lloh14:
	adrp	x8, _DRM_CONNECTOR_POLL_DISCONNECT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DRM_CONNECTOR_POLL_DISCONNECT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _DRM_CONNECTOR_POLL_CONNECT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DRM_CONNECTOR_POLL_CONNECT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nvidia,edid"

l_.str.1:                               ; @.str.1
	.asciz	"Malformed \"nvidia,edid\" property\n"

	.comm	_M_OFWPROP,4,2                  ; @M_OFWPROP
	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.2:                               ; @.str.2
	.asciz	"nvidia,hpd-gpio"

l_.str.3:                               ; @.str.3
	.asciz	"nvidia,ddc-i2c-bus"

	.comm	_DRM_CONNECTOR_POLL_DISCONNECT,4,2 ; @DRM_CONNECTOR_POLL_DISCONNECT
	.comm	_DRM_CONNECTOR_POLL_CONNECT,4,2 ; @DRM_CONNECTOR_POLL_CONNECT
.subsections_via_symbols
