	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_dp_dpcd_write_payload
_drm_dp_dpcd_write_payload:             ## @drm_dp_dpcd_write_payload
	.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	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %edi
	movq	_DP_PAYLOAD_TABLE_UPDATE_STATUS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_DP_PAYLOAD_TABLE_UPDATED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_drm_dp_dpcd_writeb
	movl	%r15d, -60(%rbp)
	movl	(%rbx), %eax
	movl	%eax, -56(%rbp)
	movl	4(%rbx), %eax
	movl	%eax, -52(%rbp)
	movl	(%r14), %edi
	movq	_DP_PAYLOAD_ALLOCATE_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rdx
	movl	$3, %ecx
	callq	_drm_dp_dpcd_write
	cmpl	$3, %eax
	jne	LBB0_12
## %bb.1:
	movl	(%r14), %edi
	movl	(%r12), %esi
	leaq	-64(%rbp), %rdx
	callq	_drm_dp_dpcd_readb
	testl	%eax, %eax
	js	LBB0_2
## %bb.4:
	movl	$20, %r13d
	leaq	-64(%rbp), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-64(%rbp), %esi
	movq	_DP_PAYLOAD_TABLE_UPDATED@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	decl	%r13d
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	movl	(%r14), %edi
	movl	(%r12), %esi
	movq	%r15, %rdx
	callq	_drm_dp_dpcd_readb
	testl	%eax, %eax
	jns	LBB0_5
LBB0_2:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_3
LBB0_12:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
LBB0_3:
	movl	%ebx, %esi
	callq	_DRM_DEBUG_KMS
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_PAYLOAD_TABLE_UPDATE_STATUS,4,2 ## @DP_PAYLOAD_TABLE_UPDATE_STATUS
	.comm	_DP_PAYLOAD_TABLE_UPDATED,4,2   ## @DP_PAYLOAD_TABLE_UPDATED
	.comm	_DP_PAYLOAD_ALLOCATE_SET,4,2    ## @DP_PAYLOAD_ALLOCATE_SET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to write payload allocation %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to read payload table status %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"status not set after read payload table status %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_drm_dp_dpcd_write_payload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_dp_dpcd_write_payload
_drm_dp_dpcd_write_payload:             ; @drm_dp_dpcd_write_payload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x2
	mov	x21, 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, #24]
	ldr	w0, [x0]
Lloh3:
	adrp	x22, _DP_PAYLOAD_TABLE_UPDATE_STATUS@GOTPAGE
Lloh4:
	ldr	x22, [x22, _DP_PAYLOAD_TABLE_UPDATE_STATUS@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh5:
	adrp	x23, _DP_PAYLOAD_TABLE_UPDATED@GOTPAGE
Lloh6:
	ldr	x23, [x23, _DP_PAYLOAD_TABLE_UPDATED@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_drm_dp_dpcd_writeb
	str	w21, [sp, #12]
	ldr	d0, [x20]
	stur	d0, [sp, #16]
	ldr	w0, [x19]
Lloh7:
	adrp	x8, _DP_PAYLOAD_ALLOCATE_SET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DP_PAYLOAD_ALLOCATE_SET@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	w3, #3
	bl	_drm_dp_dpcd_write
	cmp	w0, #3
	b.ne	LBB0_7
; %bb.1:
	ldr	w0, [x19]
	ldr	w1, [x22]
	add	x2, sp, #8
	bl	_drm_dp_dpcd_readb
	tbnz	w0, #31, LBB0_6
; %bb.2:
	mov	w21, #20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [sp, #8]
	ldr	w8, [x23]
	tst	w8, w1
	b.ne	LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w21, w21, #1
	b.eq	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #10000
	mov	w1, #20000
	bl	_usleep_range
	ldr	w0, [x19]
	ldr	w1, [x22]
	add	x2, sp, #8
	bl	_drm_dp_dpcd_readb
	tbz	w0, #31, LBB0_3
LBB0_6:
	mov	x20, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
	mov	x20, x0
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
LBB0_8:
	mov	x1, x20
	bl	_DRM_DEBUG_KMS
LBB0_9:
	ldr	x8, [sp, #24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.10:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
LBB0_11:
	mov	w20, #0
	b	LBB0_9
LBB0_12:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_PAYLOAD_TABLE_UPDATE_STATUS,4,2 ; @DP_PAYLOAD_TABLE_UPDATE_STATUS
	.comm	_DP_PAYLOAD_TABLE_UPDATED,4,2   ; @DP_PAYLOAD_TABLE_UPDATED
	.comm	_DP_PAYLOAD_ALLOCATE_SET,4,2    ; @DP_PAYLOAD_ALLOCATE_SET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to write payload allocation %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to read payload table status %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"status not set after read payload table status %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_drm_dp_dpcd_write_payload
.subsections_via_symbols
