	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function drm_dp_i2c_xfer
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_drm_dp_i2c_xfer:                       ## @drm_dp_i2c_xfer
	.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	%edx, %r14d
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_dp_aux_i2c_transfer_size@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_DP_AUX_MAX_PAYLOAD_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %esi
	callq	_clamp
	movl	%eax, (%rbx)
	leaq	-80(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.1:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	%r14d, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	leaq	-80(%rbp), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-104(%rbp), %r12                ## 8-byte Reload
	incq	%r12
	cmpq	-96(%rbp), %r12                 ## 8-byte Folded Reload
	je	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	leaq	(%r12,%r12,2), %r15
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,8), %r14
	movl	16(%rax,%r15,8), %eax
	movl	%eax, -60(%rbp)
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_drm_dp_i2c_msg_set_request
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_drm_dp_i2c_do_msg
	movl	%eax, %ebx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_drm_dp_i2c_msg_set_request
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movl	(%r14), %esi
	testl	%esi, %esi
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_dp_aux_i2c_transfer_size@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,8), %r15
	addq	$8, %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, %eax
	shlq	$2, %rax
	addq	(%r15), %rax
	movq	%rax, -72(%rbp)
	subl	%r12d, %esi
	movl	%ebx, %edi
	callq	_min
	movq	%rax, -80(%rbp)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_drm_dp_i2c_drain_msg
	movl	%eax, %ebx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_drm_dp_i2c_msg_set_request
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	addl	-80(%rbp), %r12d
	movl	(%r14), %esi
	cmpl	%r12d, %esi
	ja	LBB0_5
	jmp	LBB0_7
LBB0_8:
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
LBB0_9:
	movq	_DP_AUX_I2C_MOT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, -64(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	leaq	-80(%rbp), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_dp_i2c_do_msg
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dp_aux_i2c_transfer_size,4,2   ## @dp_aux_i2c_transfer_size
	.comm	_DP_AUX_MAX_PAYLOAD_BYTES,4,2   ## @DP_AUX_MAX_PAYLOAD_BYTES
	.comm	_DP_AUX_I2C_MOT,4,2             ## @DP_AUX_I2C_MOT
	.no_dead_strip	_drm_dp_i2c_xfer
.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_xfer
_drm_dp_i2c_xfer:                       ; @drm_dp_i2c_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x22, _dp_aux_i2c_transfer_size@GOTPAGE
Lloh1:
	ldr	x22, [x22, _dp_aux_i2c_transfer_size@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _DP_AUX_MAX_PAYLOAD_BYTES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DP_AUX_MAX_PAYLOAD_BYTES@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #1
	bl	_clamp
	str	w0, [x22]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	cbz	w20, LBB0_8
; %bb.1:
	mov	x25, #0
	mov	w26, w20
	mov	w27, #24
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	cmp	x25, x26
	b.eq	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	madd	x22, x25, x27, x21
	ldr	w8, [x22, #16]
	str	w8, [sp, #28]
	add	x0, sp, #8
	mov	x1, x22
	bl	_drm_dp_i2c_msg_set_request
	stp	xzr, xzr, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_drm_dp_i2c_do_msg
	mov	x23, x0
	add	x0, sp, #8
	mov	x1, x22
	bl	_drm_dp_i2c_msg_set_request
	tbnz	w23, #31, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22]
	cbz	w8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w28, #0
Lloh5:
	adrp	x9, _dp_aux_i2c_transfer_size@GOTPAGE
Lloh6:
	ldr	x9, [x9, _dp_aux_i2c_transfer_size@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x9]
	madd	x9, x25, x27, x21
	add	x24, x9, #8
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x24]
	add	x9, x9, w28, uxtw #2
	str	x9, [sp, #16]
	sub	w1, w8, w28
	mov	x0, x23
	bl	_min
	str	x0, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_drm_dp_i2c_drain_msg
	mov	x23, x0
	add	x0, sp, #8
	mov	x1, x22
	bl	_drm_dp_i2c_msg_set_request
	tbnz	w23, #31, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w9, [sp, #8]
	ldr	w8, [x22]
	add	w28, w28, w9
	cmp	w8, w28
	b.hi	LBB0_6
	b	LBB0_2
LBB0_8:
	mov	w23, #0
LBB0_9:
Lloh8:
	adrp	x8, _DP_AUX_I2C_MOT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DP_AUX_I2C_MOT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	bic	w8, w9, w8
	str	w8, [sp, #24]
	stp	xzr, xzr, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_drm_dp_i2c_do_msg
	mov	x0, x23
	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
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	mov	x23, x20
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_dp_aux_i2c_transfer_size,4,2   ; @dp_aux_i2c_transfer_size
	.comm	_DP_AUX_MAX_PAYLOAD_BYTES,4,2   ; @DP_AUX_MAX_PAYLOAD_BYTES
	.comm	_DP_AUX_I2C_MOT,4,2             ; @DP_AUX_I2C_MOT
	.no_dead_strip	_drm_dp_i2c_xfer
.subsections_via_symbols
