	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function geni_i2c_rx_one_msg
_geni_i2c_rx_one_msg:                   ## @geni_i2c_rx_one_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	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	24(%rdi), %r12
	movq	(%rsi), %r15
	leaq	L_.str(%rip), %rdi
	callq	_of_machine_is_compatible
	testl	%eax, %eax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_1
LBB0_3:
	movb	$1, %bl
	movq	_GENI_SE_FIFO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	jmp	LBB0_4
LBB0_1:
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_i2c_get_dma_safe_msg_buf
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %r13
	movq	_GENI_SE_DMA@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_4:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_geni_se_select_mode
	movq	_SE_I2C_RX_TRANS_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movq	%r15, %rdi
	callq	_writel_relaxed
	movq	_I2C_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_geni_se_setup_m_cmd
	testb	%bl, %bl
	je	LBB0_6
## %bb.5:
	xorl	%r13d, %r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_6:
	leaq	-48(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_geni_se_rx_dma_prep
	testq	%rax, %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	movq	_GENI_SE_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_geni_se_select_mode
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_i2c_put_dma_safe_msg_buf
	xorl	%r13d, %r13d
LBB0_8:
	leaq	16(%r14), %rdi
	movq	_XFER_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_geni_i2c_abort_xfer
LBB0_10:
	movq	$0, 8(%r14)
	testq	%r13, %r13
	je	LBB0_14
## %bb.11:
	cmpl	$0, (%r14)
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_geni_i2c_rx_fsm_rst
LBB0_13:
	movl	-48(%rbp), %esi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_geni_se_rx_dma_unprep
	xorl	%edx, %edx
	cmpl	$0, (%r14)
	sete	%dl
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_i2c_put_dma_safe_msg_buf
LBB0_14:
	movl	(%r14), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lenovo,yoga-c630"

	.comm	_GENI_SE_DMA,4,2                ## @GENI_SE_DMA
	.comm	_GENI_SE_FIFO,4,2               ## @GENI_SE_FIFO
	.comm	_SE_I2C_RX_TRANS_LEN,8,3        ## @SE_I2C_RX_TRANS_LEN
	.comm	_I2C_READ,4,2                   ## @I2C_READ
	.comm	_XFER_TIMEOUT,4,2               ## @XFER_TIMEOUT
	.no_dead_strip	_geni_i2c_rx_one_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function geni_i2c_rx_one_msg
_geni_i2c_rx_one_msg:                   ; @geni_i2c_rx_one_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
	add	x22, x0, #24
	ldr	x21, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_of_machine_is_compatible
	cbz	w0, LBB0_2
LBB0_1:
	mov	x23, #0
	mov	w25, #1
Lloh2:
	adrp	x8, _GENI_SE_FIFO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GENI_SE_FIFO@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x0, x20
	mov	w1, #32
	bl	_i2c_get_dma_safe_msg_buf
	cbz	x0, LBB0_1
; %bb.3:
	mov	x23, x0
	mov	w25, #0
Lloh4:
	adrp	x8, _GENI_SE_DMA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GENI_SE_DMA@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_geni_se_select_mode
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _SE_I2C_RX_TRANS_LEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SE_I2C_RX_TRANS_LEN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel_relaxed
Lloh9:
	adrp	x8, _I2C_READ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I2C_READ@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x24
	bl	_geni_se_setup_m_cmd
	tbnz	w25, #0, LBB0_7
; %bb.5:
	add	x3, sp, #12
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	bl	_geni_se_rx_dma_prep
	cbz	x0, LBB0_8
; %bb.6:
Lloh12:
	adrp	x8, _GENI_SE_FIFO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GENI_SE_FIFO@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_geni_se_select_mode
	mov	x0, x23
	mov	x1, x20
	mov	w2, #0
	bl	_i2c_put_dma_safe_msg_buf
LBB0_7:
	mov	x23, #0
LBB0_8:
	add	x0, x19, #16
Lloh15:
	adrp	x8, _XFER_TIMEOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _XFER_TIMEOUT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_10
; %bb.9:
	str	xzr, [x19, #8]
	cbnz	x23, LBB0_11
	b	LBB0_14
LBB0_10:
	mov	x0, x19
	bl	_geni_i2c_abort_xfer
	str	xzr, [x19, #8]
	cbz	x23, LBB0_14
LBB0_11:
	ldr	w8, [x19]
	cbz	w8, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_geni_i2c_rx_fsm_rst
LBB0_13:
	ldr	w1, [sp, #12]
	mov	x0, x22
	mov	x2, x21
	bl	_geni_se_rx_dma_unprep
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w2, eq
	mov	x0, x23
	mov	x1, x20
	bl	_i2c_put_dma_safe_msg_buf
LBB0_14:
	ldr	w0, [x19]
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lenovo,yoga-c630"

	.comm	_GENI_SE_DMA,4,2                ; @GENI_SE_DMA
	.comm	_GENI_SE_FIFO,4,2               ; @GENI_SE_FIFO
	.comm	_SE_I2C_RX_TRANS_LEN,8,3        ; @SE_I2C_RX_TRANS_LEN
	.comm	_I2C_READ,4,2                   ; @I2C_READ
	.comm	_XFER_TIMEOUT,4,2               ; @XFER_TIMEOUT
	.no_dead_strip	_geni_i2c_rx_one_msg
.subsections_via_symbols
