	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dp_read_desc               ## -- Begin function drm_dp_read_desc
	.p2align	4, 0x90
_drm_dp_read_desc:                      ## @drm_dp_read_desc
	.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	%edx, %r14d
	movq	%rsi, %rbx
	leaq	4(%rsi), %r15
	testl	%edx, %edx
	jne	LBB0_1
## %bb.2:
	movq	_DP_SINK_OUI@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_DP_BRANCH_OUI@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movq	%r15, %rdx
	movl	$20, %ecx
	callq	_drm_dp_dpcd_read
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_drm_dp_get_quirks
	movl	%eax, (%rbx)
	movl	16(%rbx), %edi
	movl	$4, %esi
	callq	_strnlen
	testl	%r14d, %r14d
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rcx, %rsi
	movl	20(%rbx), %ecx
	movl	16(%rbx), %r9d
	movl	(%rbx), %r10d
	movl	4(%rbx), %r11d
	movl	%r11d, %r14d
	sarl	$4, %r14d
	andl	$15, %r11d
	movl	12(%rbx), %r15d
	movl	8(%rbx), %ebx
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdi
	movl	$4, %edx
	movl	%eax, %r8d
	pushq	%r10
	pushq	%rbx
	pushq	%r15
	pushq	%r11
	pushq	%r14
	callq	_DRM_DEBUG_KMS
	addq	$48, %rsp
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_BRANCH_OUI,4,2              ## @DP_BRANCH_OUI
	.comm	_DP_SINK_OUI,4,2                ## @DP_SINK_OUI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DP %s: OUI %*phD dev-ID %*pE HW-rev %d.%d SW-rev %d.%d quirks 0x%04x\n"

L_.str.1:                               ## @.str.1
	.asciz	"branch"

L_.str.2:                               ## @.str.2
	.asciz	"sink"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dp_read_desc               ; -- Begin function drm_dp_read_desc
	.p2align	2
_drm_dp_read_desc:                      ; @drm_dp_read_desc
	.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	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, _DP_BRANCH_OUI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_BRANCH_OUI@GOTPAGEOFF]
	add	x21, x1, #4
Lloh2:
	adrp	x9, _DP_SINK_OUI@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DP_SINK_OUI@GOTPAGEOFF]
	cmp	w2, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	x2, x21
	mov	w3, #20
	bl	_drm_dp_dpcd_read
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	bl	_drm_dp_get_quirks
	str	w0, [x19]
	ldr	w0, [x19, #16]
	mov	w1, #4
	bl	_strnlen
	mov	x4, x0
Lloh4:
	adrp	x8, l_.str.1@PAGE
Lloh5:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh6:
	adrp	x9, l_.str.2@PAGE
Lloh7:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x1, x9, x8, eq
	ldp	w5, w3, [x19, #16]
	ldp	w9, w8, [x19]
	asr	w6, w8, #4
	and	w7, w8, #0xf
	ldp	w10, w8, [x19, #8]
	stp	w10, w9, [sp, #4]
	str	w8, [sp]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #4
	bl	_DRM_DEBUG_KMS
	mov	w0, #0
LBB0_2:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_BRANCH_OUI,4,2              ; @DP_BRANCH_OUI
	.comm	_DP_SINK_OUI,4,2                ; @DP_SINK_OUI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DP %s: OUI %*phD dev-ID %*pE HW-rev %d.%d SW-rev %d.%d quirks 0x%04x\n"

l_.str.1:                               ; @.str.1
	.asciz	"branch"

l_.str.2:                               ; @.str.2
	.asciz	"sink"

.subsections_via_symbols
