	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdn_dp_dpcd_write              ## -- Begin function cdn_dp_dpcd_write
	.p2align	4, 0x90
_cdn_dp_dpcd_write:                     ## @cdn_dp_dpcd_write
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ecx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, -80(%rbp)
	movl	%esi, %eax
	shrl	$16, %eax
	movzbl	%al, %eax
	movl	%eax, -72(%rbp)
	movzbl	%ch, %eax
	movl	%eax, -68(%rbp)
	movl	%esi, %r13d
	movzbl	%cl, %eax
	movl	%eax, -64(%rbp)
	movl	%edx, -60(%rbp)
	movq	_MB_MODULE_ID_DP_TX@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_DPTX_WRITE_DPCD@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-80(%rbp), %r8
	movl	$24, %ecx
	callq	_cdn_dp_mailbox_send
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	$20, %ecx
	callq	_cdn_dp_mailbox_validate_receive
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	leaq	-112(%rbp), %rsi
	movq	%r14, %rdi
	movl	$20, %edx
	callq	_cdn_dp_mailbox_read_receive
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_DRM_DEV_ERROR
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	-104(%rbp), %eax
	movl	-100(%rbp), %ecx
	shll	$16, %eax
	shll	$8, %ecx
	orl	%eax, %ecx
	orl	-96(%rbp), %ecx
	xorl	%ebx, %ebx
	cmpl	%r13d, %ecx
	je	LBB0_7
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	negl	%eax
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_MODULE_ID_DP_TX,4,2         ## @MB_MODULE_ID_DP_TX
	.comm	_DPTX_WRITE_DPCD,4,2            ## @DPTX_WRITE_DPCD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dpcd write failed: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function cdn_dp_dpcd_write
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
lCPI0_1:
	.long	4294967280                      ; 0xfffffff0
	.long	4294967288                      ; 0xfffffff8
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_cdn_dp_dpcd_write
	.p2align	2
_cdn_dp_dpcd_write:                     ; @cdn_dp_dpcd_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	dup.2s	v0, w1
Lloh3:
	adrp	x8, lCPI0_1@PAGE
Lloh4:
	ldr	d1, [x8, lCPI0_1@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi	d1, #0x0000ff000000ff
	and.8b	v0, v0, v1
Lloh5:
	adrp	x8, lCPI0_0@PAGE
Lloh6:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	stp	d1, d0, [sp, #32]
	and	w8, w1, #0xff
	stp	w8, w2, [sp, #48]
Lloh7:
	adrp	x22, _MB_MODULE_ID_DP_TX@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MB_MODULE_ID_DP_TX@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh9:
	adrp	x23, _DPTX_WRITE_DPCD@GOTPAGE
Lloh10:
	ldr	x23, [x23, _DPTX_WRITE_DPCD@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x4, sp, #32
	mov	w3, #24
	bl	_cdn_dp_mailbox_send
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	mov	w3, #20
	bl	_cdn_dp_mailbox_validate_receive
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.2:
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #20
	bl	_cdn_dp_mailbox_read_receive
	mov	x21, x0
	cbz	w0, LBB0_6
LBB0_3:
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_DRM_DEV_ERROR
LBB0_4:
	ldr	x8, [sp, #56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	ldp	w8, w9, [sp, #20]
	lsl	w9, w9, #8
	orr	w8, w9, w8, lsl #16
	ldr	w9, [sp, #28]
	orr	w8, w8, w9
	cmp	w8, w20
	b.eq	LBB0_9
; %bb.7:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cbz	w8, LBB0_9
; %bb.8:
	neg	w21, w8
	b	LBB0_3
LBB0_9:
	mov	w21, #0
	b	LBB0_4
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_MODULE_ID_DP_TX,4,2         ; @MB_MODULE_ID_DP_TX
	.comm	_DPTX_WRITE_DPCD,4,2            ; @DPTX_WRITE_DPCD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dpcd write failed: %d\n"

.subsections_via_symbols
