	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_dm_connector_mode_valid ## -- Begin function amdgpu_dm_connector_mode_valid
	.p2align	4, 0x90
_amdgpu_dm_connector_mode_valid:        ## @amdgpu_dm_connector_mode_valid
	.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
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_MODE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%rdi), %rax
	movq	(%rax), %r13
	callq	_to_amdgpu_dm_connector
	movq	%rax, %r15
	movl	(%r12), %eax
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_13
## %bb.1:
	movq	_DRM_MODE_FLAG_DBLSCAN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	16(%r15), %rax
	movq	_DRM_FORCE_UNSPECIFIED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	cmpl	$0, 8(%r15)
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_handle_edid_mgmt
LBB0_5:
	movq	%rbx, %rdi
	callq	_to_amdgpu_dm_connector
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_create_stream_for_sink
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r15
	movl	(%r13), %edi
	movq	%rax, %rsi
	callq	_dc_validate_stream
	movq	_DC_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.10:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_12
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_13
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_13
LBB0_11:
	movl	12(%r12), %esi
	movl	4(%r12), %ecx
	movl	8(%r12), %edx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %r8d
	callq	_DRM_DEBUG_KMS
LBB0_12:
	movq	%r15, %rdi
	callq	_dc_stream_release
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_MODE_ERROR,4,2                 ## @MODE_ERROR
	.comm	_DC_OK,4,2                      ## @DC_OK
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ## @DRM_MODE_FLAG_DBLSCAN
	.comm	_DRM_FORCE_UNSPECIFIED,8,3      ## @DRM_FORCE_UNSPECIFIED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dc_sink is NULL!\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to create stream for sink!\n"

	.comm	_MODE_OK,4,2                    ## @MODE_OK
L_.str.2:                               ## @.str.2
	.asciz	"Mode %dx%d (clk %d) failed DC validation with error %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_dm_connector_mode_valid ; -- Begin function amdgpu_dm_connector_mode_valid
	.p2align	2
_amdgpu_dm_connector_mode_valid:        ; @amdgpu_dm_connector_mode_valid
	.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	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MODE_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MODE_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldr	x8, [x0]
	ldr	x23, [x8]
	bl	_to_amdgpu_dm_connector
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x9, _DRM_MODE_FLAG_DBLSCAN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRM_MODE_FLAG_DBLSCAN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_2:
	mov	x0, x19
	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_3:
	mov	x22, x0
	ldr	x8, [x0, #16]
Lloh9:
	adrp	x9, _DRM_FORCE_UNSPECIFIED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DRM_FORCE_UNSPECIFIED@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.4:
	ldr	w8, [x22, #8]
	cbnz	w8, LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_handle_edid_mgmt
LBB0_6:
	mov	x0, x21
	bl	_to_amdgpu_dm_connector
	ldr	x8, [x0]
	cbz	x8, LBB0_10
; %bb.7:
	mov	x0, x22
	mov	x1, x20
	mov	x2, #0
	mov	x3, #0
	bl	_create_stream_for_sink
	cbz	x0, LBB0_11
; %bb.8:
	mov	x21, x0
	ldr	w0, [x23]
	mov	x1, x21
	bl	_dc_validate_stream
Lloh12:
	adrp	x8, _DC_OK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DC_OK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.9:
Lloh15:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
Lloh17:
	ldr	w19, [x8]
	b	LBB0_13
LBB0_10:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_2
LBB0_11:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_2
LBB0_12:
	mov	x4, x0
	ldp	w2, w1, [x20, #8]
	ldr	w3, [x20, #4]
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_13:
	mov	x0, x21
	bl	_dc_stream_release
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MODE_ERROR,4,2                 ; @MODE_ERROR
	.comm	_DC_OK,4,2                      ; @DC_OK
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ; @DRM_MODE_FLAG_DBLSCAN
	.comm	_DRM_FORCE_UNSPECIFIED,8,3      ; @DRM_FORCE_UNSPECIFIED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dc_sink is NULL!\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to create stream for sink!\n"

	.comm	_MODE_OK,4,2                    ; @MODE_OK
l_.str.2:                               ; @.str.2
	.asciz	"Mode %dx%d (clk %d) failed DC validation with error %d\n"

.subsections_via_symbols
