	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_connector_ddc_detect
_nouveau_connector_ddc_detect:          ## @nouveau_connector_ddc_detect
	.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	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	callq	_nouveau_connector
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_nouveau_drm
	movl	(%rax), %edi
	callq	_nouveau_gpio
	movq	%rax, %r12
	movq	(%r14), %rax
	movq	_DCB_CONNECTOR_eDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	_DCB_GPIO_PANEL_POWER@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$255, %ecx
	callq	*(%r12)
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	(%r14), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$255, %ecx
	movl	$1, %r8d
	callq	*8(%r12)
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	_DRM_CONNECTOR_MAX_ENCODER@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.5:
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	movq	_DRM_CONNECTOR_MAX_ENCODER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r13
	jge	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movl	(%rax,%r13,4), %esi
	testl	%esi, %esi
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_DRM_MODE_OBJECT_ENCODER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_drm_mode_object_find
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	callq	_obj_to_encoder
	movl	%eax, %edi
	callq	_nouveau_encoder
	movq	(%rax), %r14
	testq	%r14, %r14
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r12
	movq	%r14, %rdi
	movl	$80, %esi
	callq	_nv_probe_i2c
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax)
	jmp	LBB0_15
LBB0_12:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_14
## %bb.13:
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_14:
	movq	_DCB_GPIO_PANEL_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	$255, %ecx
	xorl	%r8d, %r8d
	callq	*8(%rdi)
LBB0_15:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_DCB_CONNECTOR_eDP,8,3          ## @DCB_CONNECTOR_eDP
	.comm	_DCB_GPIO_PANEL_POWER,4,2       ## @DCB_GPIO_PANEL_POWER
	.comm	_DRM_CONNECTOR_MAX_ENCODER,4,2  ## @DRM_CONNECTOR_MAX_ENCODER
	.comm	_DRM_MODE_OBJECT_ENCODER,4,2    ## @DRM_MODE_OBJECT_ENCODER
	.no_dead_strip	_nouveau_connector_ddc_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_connector_ddc_detect
_nouveau_connector_ddc_detect:          ; @nouveau_connector_ddc_detect
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0, #8]
	bl	_nouveau_connector
	mov	x23, x0
	mov	x0, x21
	bl	_nouveau_drm
	ldr	w0, [x0]
	bl	_nouveau_gpio
	mov	x22, x0
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _DCB_CONNECTOR_eDP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DCB_CONNECTOR_eDP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x22]
Lloh3:
	adrp	x24, _DCB_GPIO_PANEL_POWER@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DCB_GPIO_PANEL_POWER@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x22
	mov	w1, #0
	mov	w3, #255
	blr	x8
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	x8, [x22, #8]
	ldr	w2, [x24]
	mov	x0, x22
	mov	w1, #0
	mov	w3, #255
	mov	w4, #1
	blr	x8
	mov	w0, #300
	bl	_msleep
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
Lloh8:
	adrp	x26, _DRM_CONNECTOR_MAX_ENCODER@GOTPAGE
Lloh9:
	ldr	x26, [x26, _DRM_CONNECTOR_MAX_ENCODER@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.5:
	mov	x27, #0
Lloh10:
	adrp	x28, _DRM_MODE_OBJECT_ENCODER@GOTPAGE
Lloh11:
	ldr	x28, [x28, _DRM_MODE_OBJECT_ENCODER@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x27, x27, #1
	ldrsw	x8, [x26]
	cmp	x27, x8
	b.ge	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	w1, [x8, x27, lsl #2]
	cbz	w1, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w2, [x28]
	mov	x0, x21
	bl	_drm_mode_object_find
	cbz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_obj_to_encoder
	bl	_nouveau_encoder
	ldr	x24, [x0]
	cbz	x24, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x25, x0
	mov	x0, x24
	mov	w1, #80
	bl	_nv_probe_i2c
	cbz	x0, LBB0_6
; %bb.11:
	str	x25, [x19]
	b	LBB0_15
LBB0_12:
	cbnz	w23, LBB0_14
; %bb.13:
	ldr	x8, [x22, #8]
Lloh12:
	adrp	x9, _DCB_GPIO_PANEL_POWER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DCB_GPIO_PANEL_POWER@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x9]
	mov	x0, x22
	mov	w1, #0
	mov	w3, #255
	mov	w4, #0
	blr	x8
LBB0_14:
	mov	x24, #0
LBB0_15:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_DCB_CONNECTOR_eDP,8,3          ; @DCB_CONNECTOR_eDP
	.comm	_DCB_GPIO_PANEL_POWER,4,2       ; @DCB_GPIO_PANEL_POWER
	.comm	_DRM_CONNECTOR_MAX_ENCODER,4,2  ; @DRM_CONNECTOR_MAX_ENCODER
	.comm	_DRM_MODE_OBJECT_ENCODER,4,2    ; @DRM_MODE_OBJECT_ENCODER
	.no_dead_strip	_nouveau_connector_ddc_detect
.subsections_via_symbols
