	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_dp_i2c_do_msg
_drm_dp_i2c_do_msg:                     ## @drm_dp_i2c_do_msg
	.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, %r14
	movq	%rdi, %r15
	movq	_dp_aux_i2c_speed_khz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_drm_dp_i2c_retry_count
	movl	$7, %edi
	movl	%eax, %esi
	callq	_max
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, %rcx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	je	LBB0_24
## %bb.1:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_4
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addl	%r12d, %eax
	cmpl	%eax, %r13d
	jae	LBB0_24
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	*(%r15)
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %esi
	movq	_DP_AUX_NATIVE_REPLY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	cmpl	$129, %eax
	je	LBB0_22
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$130, %eax
	jne	LBB0_9
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_DP_AUX_I2C_REPLY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	cmpl	$132, %eax
	jne	LBB0_15
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	incl	8(%r15)
	cmpl	$7, %r12d
	adcl	$0, %r12d
	movq	_AUX_RETRY_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	100(%rdi), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_usleep_range
	movq	%r14, %rdi
	callq	_drm_dp_i2c_msg_write_status_update
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_AUX_RETRY_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	100(%rdi), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_usleep_range
	jmp	LBB0_23
LBB0_24:
	leaq	L_.str.8(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
LBB0_25:
	subl	(%rax), %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	cmpl	$131, %eax
	je	LBB0_19
## %bb.16:
	cmpl	$133, %eax
	jne	LBB0_21
## %bb.17:
	cmpl	4(%r14), %ebx
	je	LBB0_26
## %bb.18:
	movq	%r14, %rdi
	callq	_drm_dp_i2c_msg_write_status_update
	jmp	LBB0_26
LBB0_9:
	cmpl	$128, %eax
	jne	LBB0_12
## %bb.10:
	movl	4(%r14), %edx
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_11
LBB0_4:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS_RATELIMITED
	jmp	LBB0_26
LBB0_12:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_13
LBB0_19:
	movl	4(%r14), %edx
	leaq	L_.str.5(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	incl	12(%r15)
LBB0_11:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	%r14d, %ebx
	jmp	LBB0_26
LBB0_21:
	leaq	L_.str.7(%rip), %rdi
LBB0_13:
	callq	_DRM_ERROR
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_25
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_dp_aux_i2c_speed_khz,4,2       ## @dp_aux_i2c_speed_khz
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"transaction timed out\n"

L_.str.1:                               ## @.str.1
	.asciz	"transaction failed: %d\n"

	.comm	_DP_AUX_NATIVE_REPLY_MASK,4,2   ## @DP_AUX_NATIVE_REPLY_MASK
L_.str.2:                               ## @.str.2
	.asciz	"native nack (result=%d, size=%zu)\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
L_.str.3:                               ## @.str.3
	.asciz	"native defer\n"

	.comm	_AUX_RETRY_INTERVAL,4,2         ## @AUX_RETRY_INTERVAL
L_.str.4:                               ## @.str.4
	.asciz	"invalid native reply %#04x\n"

	.comm	_DP_AUX_I2C_REPLY_MASK,4,2      ## @DP_AUX_I2C_REPLY_MASK
L_.str.5:                               ## @.str.5
	.asciz	"I2C nack (result=%d, size=%zu)\n"

L_.str.6:                               ## @.str.6
	.asciz	"I2C defer\n"

L_.str.7:                               ## @.str.7
	.asciz	"invalid I2C reply %#04x\n"

L_.str.8:                               ## @.str.8
	.asciz	"too many retries, giving up\n"

	.no_dead_strip	_drm_dp_i2c_do_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_dp_i2c_do_msg
_drm_dp_i2c_do_msg:                     ; @drm_dp_i2c_do_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, _dp_aux_i2c_speed_khz@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dp_aux_i2c_speed_khz@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_drm_dp_i2c_retry_count
	mov	x1, x0
	mov	w0, #7
	bl	_max
	cbz	w0, LBB0_10
; %bb.1:
	mov	x22, x0
	mov	w25, #0
	mov	w26, #0
Lloh3:
	adrp	x27, _EBUSY@GOTPAGE
Lloh4:
	ldr	x27, [x27, _EBUSY@GOTPAGEOFF]
Lloh5:
	adrp	x28, _DP_AUX_NATIVE_REPLY_MASK@GOTPAGE
Lloh6:
	ldr	x28, [x28, _DP_AUX_NATIVE_REPLY_MASK@GOTPAGEOFF]
Lloh7:
	adrp	x24, _AUX_RETRY_INTERVAL@GOTPAGE
Lloh8:
	ldr	x24, [x24, _AUX_RETRY_INTERVAL@GOTPAGEOFF]
Lloh9:
	adrp	x23, _DP_AUX_I2C_REPLY_MASK@GOTPAGE
Lloh10:
	ldr	x23, [x23, _DP_AUX_I2C_REPLY_MASK@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x27]
	cmn	w21, w8
	b.ne	LBB0_20
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w25, w25, #1
	add	w8, w26, w22
	cmp	w25, w8
	b.hs	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	mov	x0, x20
	mov	x1, x19
	blr	x8
	mov	x21, x0
	tbnz	w0, #31, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x19]
	ldr	w8, [x28]
	and	w8, w8, w1
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #130
	b.ne	LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x23]
	and	w8, w8, w1
	cmp	w8, #132
	b.ne	LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh11:
	adrp	x0, l_.str.6@PAGE
Lloh12:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	cmp	w26, #7
	cinc	w26, w26, lo
	ldr	w0, [x24]
	add	w1, w0, #100
	bl	_usleep_range
	mov	x0, x19
	bl	_drm_dp_i2c_msg_write_status_update
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w0, [x24]
	add	w1, w0, #100
	bl	_usleep_range
	b	LBB0_3
LBB0_10:
Lloh15:
	adrp	x0, l_.str.8@PAGE
Lloh16:
	add	x0, x0, l_.str.8@PAGEOFF
LBB0_11:
	bl	_DRM_DEBUG_KMS
LBB0_12:
Lloh17:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
	cmp	w8, #131
	b.eq	LBB0_23
; %bb.15:
	cmp	w8, #133
	b.ne	LBB0_24
; %bb.16:
	ldr	w8, [x19, #4]
	cmp	w21, w8
	b.eq	LBB0_13
; %bb.17:
	mov	x0, x19
	bl	_drm_dp_i2c_msg_write_status_update
	b	LBB0_13
LBB0_18:
	cmp	w8, #128
	b.ne	LBB0_22
; %bb.19:
	ldr	w8, [x19, #4]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	stp	x21, x8, [sp]
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_20:
Lloh22:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmn	w21, w8
	b.ne	LBB0_25
; %bb.21:
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS_RATELIMITED
	b	LBB0_13
LBB0_22:
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_12
LBB0_23:
	ldr	w8, [x19, #4]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	stp	x21, x8, [sp]
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x20, #12]
	add	w8, w8, #1
	str	w8, [x20, #12]
	b	LBB0_12
LBB0_24:
Lloh31:
	adrp	x0, l_.str.7@PAGE
Lloh32:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_12
LBB0_25:
	str	x21, [sp]
Lloh33:
	adrp	x0, l_.str.1@PAGE
Lloh34:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_dp_aux_i2c_speed_khz,4,2       ; @dp_aux_i2c_speed_khz
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"transaction timed out\n"

l_.str.1:                               ; @.str.1
	.asciz	"transaction failed: %d\n"

	.comm	_DP_AUX_NATIVE_REPLY_MASK,4,2   ; @DP_AUX_NATIVE_REPLY_MASK
l_.str.2:                               ; @.str.2
	.asciz	"native nack (result=%d, size=%zu)\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
l_.str.3:                               ; @.str.3
	.asciz	"native defer\n"

	.comm	_AUX_RETRY_INTERVAL,4,2         ; @AUX_RETRY_INTERVAL
l_.str.4:                               ; @.str.4
	.asciz	"invalid native reply %#04x\n"

	.comm	_DP_AUX_I2C_REPLY_MASK,4,2      ; @DP_AUX_I2C_REPLY_MASK
l_.str.5:                               ; @.str.5
	.asciz	"I2C nack (result=%d, size=%zu)\n"

l_.str.6:                               ; @.str.6
	.asciz	"I2C defer\n"

l_.str.7:                               ; @.str.7
	.asciz	"invalid I2C reply %#04x\n"

l_.str.8:                               ; @.str.8
	.asciz	"too many retries, giving up\n"

	.no_dead_strip	_drm_dp_i2c_do_msg
.subsections_via_symbols
