	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qup_i2c_xfer_v2_msg
_qup_i2c_xfer_v2_msg:                   ## @qup_i2c_xfer_v2_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	24(%rdi), %r12
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	jne	LBB0_1
## %bb.2:
	movq	_QUP_READ_LIMIT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_RECV_MAX_DATA_LEN@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%r12), %r14
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_qup_i2c_set_blk_data
	cmpl	$0, 32(%rbx)
	je	LBB0_20
## %bb.4:
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%rbx), %eax
	subl	%eax, 64(%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r14,%rax,4), %r14
	incl	%r15d
	cmpl	32(%rbx), %r15d
	jae	LBB0_20
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_qup_i2c_get_data_len
	movl	%eax, %r13d
	movl	%r15d, 36(%rbx)
	movl	92(%rbx), %edi
	movl	%edi, 88(%rbx)
	movl	%eax, 40(%rbx)
	movq	24(%rbx), %rdx
	movq	%rbx, %rsi
	callq	_qup_i2c_set_tags
	movq	%rax, 72(%rbx)
	movq	%r14, 48(%rbx)
	movl	%r13d, %ecx
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, 80(%rbx)
	movl	$2, 56(%rbx)
	addl	$2, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	%rcx, %rax
	movq	%rax, 80(%rbx)
	xorl	%r13d, %r13d
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%r13d, 60(%rbx)
	xorl	%edx, %edx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	orl	%r15d, %eax
	sete	%al
	cmpl	$0, 16(%rbx)
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	32(%rbx), %ecx
	decl	%ecx
	cmpl	%ecx, %r15d
	setb	%cl
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movb	$1, %cl
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movb	%al, %dl
	movzbl	%cl, %ecx
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_qup_i2c_conf_xfer_v2
	testl	%eax, %eax
	jne	LBB0_21
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_qup_i2c_check_msg_len
	testq	%rax, %rax
	je	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$1, 8(%r12)
	jne	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rax
	movl	(%rax), %eax
	movq	_I2C_SMBUS_BLOCK_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, 8(%r12)
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	$1, %edx
	callq	_qup_i2c_xfer_v2_msg
	movl	$0, (%rbx)
	testl	%eax, %eax
	jne	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	incl	8(%r12)
	jmp	LBB0_19
LBB0_20:
	xorl	%eax, %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_EPROTO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_RECV_MAX_DATA_LEN,8,3          ## @RECV_MAX_DATA_LEN
	.comm	_QUP_READ_LIMIT,8,3             ## @QUP_READ_LIMIT
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ## @I2C_SMBUS_BLOCK_MAX
	.comm	_EPROTO,4,2                     ## @EPROTO
	.no_dead_strip	_qup_i2c_xfer_v2_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qup_i2c_xfer_v2_msg
_qup_i2c_xfer_v2_msg:                   ; @qup_i2c_xfer_v2_msg
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0, #24]
	ldr	x24, [x22]
Lloh0:
	adrp	x8, _RECV_MAX_DATA_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RECV_MAX_DATA_LEN@GOTPAGEOFF]
Lloh2:
	adrp	x9, _QUP_READ_LIMIT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _QUP_READ_LIMIT@GOTPAGEOFF]
	cmp	w2, #0
	csel	x8, x9, x8, eq
	ldr	x8, [x8]
	str	x8, [x0, #8]
	mov	x1, x22
	bl	_qup_i2c_set_blk_data
	ldr	w8, [x21, #32]
	cbz	w8, LBB0_16
; %bb.1:
	mov	w25, #0
Lloh4:
	adrp	x26, _I2C_SMBUS_BLOCK_MAX@GOTPAGE
Lloh5:
	ldr	x26, [x26, _I2C_SMBUS_BLOCK_MAX@GOTPAGEOFF]
	mov	w27, #1
	mov	w28, #2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, w23, uxtw #2
	ldr	w8, [x21, #8]
	ldr	w9, [x21, #64]
	sub	w8, w9, w8
	str	w8, [x21, #64]
	add	w25, w25, #1
	ldr	w8, [x21, #32]
	cmp	w25, w8
	b.hs	LBB0_16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_qup_i2c_get_data_len
	mov	x23, x0
	ldr	w0, [x21, #92]
	str	w0, [x21, #88]
	stp	w25, w23, [x21, #36]
	ldr	x2, [x21, #24]
	mov	x1, x21
	bl	_qup_i2c_set_tags
	str	x0, [x21, #72]
	str	x24, [x21, #48]
	cbz	w19, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x0, [x21, #80]
	str	w28, [x21, #56]
	add	w8, w23, #2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #0
	add	x9, x0, w23, uxtw
	str	x9, [x21, #80]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	orr	w9, w20, w25
	str	w8, [x21, #60]
	cmp	w9, #0
	cset	w2, eq
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21, #32]
	sub	w8, w8, #1
	cmp	w25, w8
	cset	w3, lo
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w3, #1
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	x1, x19
	bl	_qup_i2c_conf_xfer_v2
	cbnz	w0, LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_qup_i2c_check_msg_len
	cbz	x0, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22, #8]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	cbnz	w8, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	ldr	w8, [x8]
	ldr	w9, [x26]
	cmp	w8, w9
	b.gt	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	str	w8, [x22, #8]
	str	w27, [x21]
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	bl	_qup_i2c_xfer_v2_msg
	str	wzr, [x21]
	cbnz	w0, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22, #8]
	add	w8, w8, #1
	str	w8, [x22, #8]
	b	LBB0_2
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_18:
Lloh6:
	adrp	x8, _EPROTO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RECV_MAX_DATA_LEN,8,3          ; @RECV_MAX_DATA_LEN
	.comm	_QUP_READ_LIMIT,8,3             ; @QUP_READ_LIMIT
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ; @I2C_SMBUS_BLOCK_MAX
	.comm	_EPROTO,4,2                     ; @EPROTO
	.no_dead_strip	_qup_i2c_xfer_v2_msg
.subsections_via_symbols
