	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_dp_i2c_drain_msg
_drm_dp_i2c_drain_msg:                  ## @drm_dp_i2c_drain_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
	movl	(%rsi), %r13d
	movq	(%rsi), %rax
	movq	%rax, -48(%rbp)
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	leaq	-48(%rbp), %r15
	leaq	L_.str(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	%ebx, -44(%rbp)
	subl	%ebx, %esi
	movl	%esi, -48(%rbp)
	jle	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_drm_dp_i2c_do_msg
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %esi
	cmpl	%esi, %ebx
	jge	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r13d, %ebx
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_DRM_DEBUG_KMS
	movl	-48(%rbp), %esi
	movl	%ebx, %r13d
	jmp	LBB0_7
LBB0_3:
	movq	_EPROTO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	testl	%ebx, %ebx
	cmovnel	%ebx, %r13d
LBB0_8:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPROTO,4,2                     ## @EPROTO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Partial I2C reply: requested %zu bytes got %d bytes\n"

	.no_dead_strip	_drm_dp_i2c_drain_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_drain_msg
_drm_dp_i2c_drain_msg:                  ; @drm_dp_i2c_drain_msg
	.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
	ldr	w20, [x1]
	ldr	x8, [x1]
	str	x8, [sp, #8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, l_.str@PAGE
Lloh1:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	w8, w1, w22
	ldr	w9, [sp, #12]
	add	w9, w9, w22
	stp	w8, w9, [sp, #8]
	cmp	w8, #0
	b.le	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_drm_dp_i2c_do_msg
	mov	x22, x0
	cmp	w0, #0
	b.le	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [sp, #8]
	cmp	w22, w1
	ccmp	w22, w20, #0, lt
	b.ge	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	x2, x22
	bl	_DRM_DEBUG_KMS
	ldr	w1, [sp, #8]
	mov	x20, x22
	b	LBB0_2
LBB0_6:
Lloh2:
	adrp	x8, _EPROTO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	csneg	w20, w22, w8, ne
LBB0_7:
	mov	x0, x20
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EPROTO,4,2                     ; @EPROTO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Partial I2C reply: requested %zu bytes got %d bytes\n"

	.no_dead_strip	_drm_dp_i2c_drain_msg
.subsections_via_symbols
