	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qup_i2c_xfer
_qup_i2c_xfer:                          ## @qup_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
	pushq	%rax
	.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, %r12
	callq	_i2c_get_adapdata
	movq	%rax, %r15
	movl	(%rax), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_13
## %bb.1:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r15)
	movq	_QUP_SW_RESET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	movl	$1, %edi
	callq	_writel
	movq	_QUP_RESET_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_qup_i2c_poll_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.2:
	movq	_I2C_MINI_CORE@GOTPCREL(%rip), %rax
	movq	_I2C_N_VAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_QUP_CONFIG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	testl	%r14d, %r14d
	jle	LBB0_15
## %bb.3:
	movl	%r14d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_qup_i2c_poll_state_i2c_master
	testq	%rax, %rax
	jne	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	callq	_qup_i2c_check_msg_len
	testq	%rax, %rax
	jne	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, 8(%r15)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_qup_i2c_read_one
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_qup_i2c_write_one
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_QUP_RESET_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_qup_i2c_change_state
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	addq	$4, %r12
	decq	%r13
	jne	LBB0_4
LBB0_15:
	movl	%r14d, %ebx
	jmp	LBB0_14
LBB0_13:
	movl	%eax, %ebx
LBB0_14:
	movl	(%r15), %edi
	callq	_pm_runtime_mark_last_busy
	movl	(%r15), %edi
	callq	_pm_runtime_put_autosuspend
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_18:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
	.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,4,2                  ## @I2C_N_VAL
	.comm	_QUP_CONFIG,8,3                 ## @QUP_CONFIG
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.no_dead_strip	_qup_i2c_xfer
.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
_qup_i2c_xfer:                          ; @qup_i2c_xfer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
	mov	x19, x0
	ldr	w0, [x0]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_12
; %bb.1:
	stp	xzr, xzr, [x19, #24]
	ldr	x8, [x19, #16]
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	x23, _QUP_RESET_STATE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _QUP_RESET_STATE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_qup_i2c_poll_state
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.2:
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@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I2C_N_VAL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x19, #16]
Lloh11:
	adrp	x9, _QUP_CONFIG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _QUP_CONFIG@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	cmp	w20, #1
	b.lt	LBB0_11
; %bb.3:
	mov	w24, w20
Lloh14:
	adrp	x25, _I2C_M_RD@GOTPAGE
Lloh15:
	ldr	x25, [x25, _I2C_M_RD@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_qup_i2c_poll_state_i2c_master
	cbnz	x0, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_qup_i2c_check_msg_len
	cbnz	x0, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x21, [x19, #8]
	ldr	w8, [x21]
	ldr	w9, [x25]
	mov	x0, x19
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_qup_i2c_read_one
	mov	x22, x0
	cbz	w0, LBB0_9
	b	LBB0_13
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_qup_i2c_write_one
	mov	x22, x0
	cbnz	w0, LBB0_13
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_qup_i2c_change_state
	cbnz	w0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #4
	subs	x24, x24, #1
	b.ne	LBB0_4
LBB0_11:
	mov	x22, x20
	b	LBB0_13
LBB0_12:
	mov	x22, x0
LBB0_13:
	ldr	w0, [x19]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19]
	bl	_pm_runtime_put_autosuspend
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.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,4,2                  ; @I2C_N_VAL
	.comm	_QUP_CONFIG,8,3                 ; @QUP_CONFIG
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_qup_i2c_xfer
.subsections_via_symbols
