	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qup_i2c_xfer_v2
_qup_i2c_xfer_v2:                       ## @qup_i2c_xfer_v2
	.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	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_i2c_get_adapdata
	movq	%rax, %r13
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rax)
	movl	8(%rax), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_qup_i2c_determine_mode_v2
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.3:
	movq	_QUP_SW_RESET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%r13), %rsi
	movl	$1, %edi
	callq	_writel
	movq	_QUP_RESET_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_qup_i2c_poll_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.4:
	movq	_I2C_MINI_CORE@GOTPCREL(%rip), %rax
	movq	_I2C_N_VAL_V2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_QUP_CONFIG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%r13), %rsi
	callq	_writel
	movq	_QUP_V2_TAGS_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_QUP_I2C_MASTER_GEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%r13), %rsi
	callq	_writel
	movq	%r13, %rdi
	callq	_qup_i2c_poll_state_i2c_master
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_1:
	movl	%eax, %ebx
LBB0_20:
	movl	8(%r13), %edi
	callq	_pm_runtime_mark_last_busy
	movl	8(%r13), %edi
	callq	_pm_runtime_put_autosuspend
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$0, (%r13)
	je	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	addq	$24, %rdi
	callq	_reinit_completion
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_qup_i2c_bam_xfer
	movl	%eax, %ebx
	movl	$0, (%r13)
	jmp	LBB0_17
LBB0_8:
	movq	%r13, %rdi
	callq	_qup_i2c_conf_mode_v2
	testl	%r14d, %r14d
	jle	LBB0_9
## %bb.12:
	leal	-1(%r14), %eax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	%r14d, %ecx
	shlq	$2, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	shlq	$2, %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%r14), %rax
	movq	%rax, 16(%r13)
	xorl	%eax, %eax
	cmpq	%r14, -64(%rbp)                 ## 8-byte Folded Reload
	sete	%al
	movl	%eax, 4(%r13)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	(%r15,%r14), %eax
	setne	%dl
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_qup_i2c_xfer_v2_msg
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_13 Depth=1
	incl	%r12d
	addq	$4, %r14
	cmpq	%r14, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_14:
	movl	%eax, %ebx
LBB0_15:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_16:
	movq	$0, 16(%r13)
LBB0_17:
	testl	%ebx, %ebx
	jne	LBB0_20
## %bb.18:
	movq	_ONE_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_qup_i2c_bus_active
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movq	_QUP_RESET_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_qup_i2c_change_state
	movl	%r14d, %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_QUP_SW_RESET,8,3               ## @QUP_SW_RESET
	.comm	_QUP_RESET_STATE,4,2            ## @QUP_RESET_STATE
	.comm	_I2C_MINI_CORE,4,2              ## @I2C_MINI_CORE
	.comm	_I2C_N_VAL_V2,4,2               ## @I2C_N_VAL_V2
	.comm	_QUP_CONFIG,8,3                 ## @QUP_CONFIG
	.comm	_QUP_V2_TAGS_EN,4,2             ## @QUP_V2_TAGS_EN
	.comm	_QUP_I2C_MASTER_GEN,8,3         ## @QUP_I2C_MASTER_GEN
	.comm	_EIO,4,2                        ## @EIO
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_ONE_BYTE,4,2                   ## @ONE_BYTE
	.no_dead_strip	_qup_i2c_xfer_v2
.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
_qup_i2c_xfer_v2:                       ; @qup_i2c_xfer_v2
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_i2c_get_adapdata
	mov	x19, x0
	stp	xzr, xzr, [x0, #40]
	ldr	w0, [x0, #8]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_qup_i2c_determine_mode_v2
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	x8, [x19, #32]
Lloh0:
	adrp	x9, _QUP_SW_RESET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QUP_SW_RESET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
Lloh3:
	adrp	x24, _QUP_RESET_STATE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _QUP_RESET_STATE@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_qup_i2c_poll_state
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _I2C_MINI_CORE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I2C_MINI_CORE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _I2C_N_VAL_V2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I2C_N_VAL_V2@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x19, #32]
Lloh11:
	adrp	x9, _QUP_CONFIG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _QUP_CONFIG@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh14:
	adrp	x8, _QUP_V2_TAGS_EN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _QUP_V2_TAGS_EN@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x8, [x19, #32]
Lloh17:
	adrp	x9, _QUP_I2C_MASTER_GEN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _QUP_I2C_MASTER_GEN@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x19
	bl	_qup_i2c_poll_state_i2c_master
	cbz	x0, LBB0_7
; %bb.4:
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_6
LBB0_5:
	mov	x23, x0
LBB0_6:
	ldr	w0, [x19, #8]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19, #8]
	bl	_pm_runtime_put_autosuspend
	mov	x0, x23
	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_7:
	ldr	w8, [x19]
	cbz	w8, LBB0_9
; %bb.8:
	add	x0, x19, #24
	bl	_reinit_completion
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_qup_i2c_bam_xfer
	mov	x23, x0
	str	wzr, [x19]
	b	LBB0_16
LBB0_9:
	mov	x0, x19
	bl	_qup_i2c_conf_mode_v2
	subs	w25, w20, #1
	b.lt	LBB0_13
; %bb.10:
	mov	w22, #0
	mov	w26, w20
Lloh23:
	adrp	x27, _I2C_M_RD@GOTPAGE
Lloh24:
	ldr	x27, [x27, _I2C_M_RD@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	str	x21, [x19, #16]
	cmp	x25, #0
	cset	w8, eq
	str	w8, [x19, #4]
	ldr	w8, [x21]
	ldr	w9, [x27]
	tst	w9, w8
	cset	w2, ne
	mov	x0, x19
	mov	x1, x22
	bl	_qup_i2c_xfer_v2_msg
	cbnz	w0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w22, w22, #1
	sub	x25, x25, #1
	add	x21, x21, #4
	subs	x26, x26, #1
	b.ne	LBB0_11
LBB0_13:
	mov	w23, #0
	b	LBB0_15
LBB0_14:
	mov	x23, x0
LBB0_15:
	str	xzr, [x19, #16]
LBB0_16:
	cbnz	w23, LBB0_6
; %bb.17:
Lloh25:
	adrp	x8, _ONE_BYTE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ONE_BYTE@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qup_i2c_bus_active
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.18:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_qup_i2c_change_state
	mov	x23, x20
	b	LBB0_6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_QUP_SW_RESET,8,3               ; @QUP_SW_RESET
	.comm	_QUP_RESET_STATE,4,2            ; @QUP_RESET_STATE
	.comm	_I2C_MINI_CORE,4,2              ; @I2C_MINI_CORE
	.comm	_I2C_N_VAL_V2,4,2               ; @I2C_N_VAL_V2
	.comm	_QUP_CONFIG,8,3                 ; @QUP_CONFIG
	.comm	_QUP_V2_TAGS_EN,4,2             ; @QUP_V2_TAGS_EN
	.comm	_QUP_I2C_MASTER_GEN,8,3         ; @QUP_I2C_MASTER_GEN
	.comm	_EIO,4,2                        ; @EIO
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_ONE_BYTE,4,2                   ; @ONE_BYTE
	.no_dead_strip	_qup_i2c_xfer_v2
.subsections_via_symbols
