	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_i2c_xfer_msg
_meson_i2c_xfer_msg:                    ## @meson_i2c_xfer_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rsi, 40(%rdi)
	movl	%edx, (%rdi)
	movl	$0, 4(%rdi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rdi)
	callq	_meson_i2c_reset_tokens
	movq	_I2C_M_IGNORE_NAK@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	andq	(%r15), %r14
	movq	_REG_CTRL_ACK_IGNORE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmovneq	%rdx, %r14
	movq	_REG_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r14, %rcx
	callq	_meson_i2c_set_mask
	movq	(%r15), %rax
	movq	_I2C_M_NOSTART@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	testq	%rcx, %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_meson_i2c_do_start
	movq	(%r15), %rax
LBB0_2:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	_STATE_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_STATE_READ@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	_meson_i2c_prepare_xfer
	leaq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_reinit_completion
	movl	(%r12), %esi
	movq	_REG_CTRL_START@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	%rbx, %rdi
	movq	%rcx, %rdx
	callq	_meson_i2c_set_mask
	movq	_I2C_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_wait_for_completion_timeout
	movq	%rax, %r13
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_spin_lock_irqsave
	movq	_REG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rdx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_meson_i2c_set_mask
	testq	%r13, %r13
	jne	LBB0_7
## %bb.6:
	movq	_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_7:
	movl	4(%rbx), %eax
	testl	%eax, %eax
	cmovnel	%eax, %r12d
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_spin_unlock_irqrestore
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_IGNORE_NAK,8,3           ## @I2C_M_IGNORE_NAK
	.comm	_REG_CTRL_ACK_IGNORE,8,3        ## @REG_CTRL_ACK_IGNORE
	.comm	_REG_CTRL,4,2                   ## @REG_CTRL
	.comm	_I2C_M_NOSTART,4,2              ## @I2C_M_NOSTART
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.comm	_STATE_READ,4,2                 ## @STATE_READ
	.comm	_STATE_WRITE,4,2                ## @STATE_WRITE
	.comm	_REG_CTRL_START,8,3             ## @REG_CTRL_START
	.comm	_I2C_TIMEOUT_MS,4,2             ## @I2C_TIMEOUT_MS
	.comm	_STATE_IDLE,4,2                 ## @STATE_IDLE
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_meson_i2c_xfer_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_i2c_xfer_msg
_meson_i2c_xfer_msg:                    ; @meson_i2c_xfer_msg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x19, x0
	stp	xzr, x1, [x0, #32]
	stp	w2, wzr, [x0]
	str	xzr, [x0, #24]
	bl	_meson_i2c_reset_tokens
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _I2C_M_IGNORE_NAK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_IGNORE_NAK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _REG_CTRL_ACK_IGNORE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _REG_CTRL_ACK_IGNORE@GOTPAGEOFF]
Lloh5:
	ldr	x2, [x10]
	tst	x9, x8
	csel	x20, xzr, x2, eq
Lloh6:
	adrp	x23, _REG_CTRL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _REG_CTRL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	mov	x3, x20
	bl	_meson_i2c_set_mask
	ldr	x8, [x21]
Lloh8:
	adrp	x9, _I2C_M_NOSTART@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I2C_M_NOSTART@GOTPAGEOFF]
Lloh10:
	ldrsw	x9, [x9]
	tst	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	bl	_meson_i2c_do_start
	ldr	x8, [x21]
LBB0_2:
Lloh11:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh12:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
Lloh14:
	adrp	x10, _STATE_READ@GOTPAGE
Lloh15:
	ldr	x10, [x10, _STATE_READ@GOTPAGEOFF]
Lloh16:
	adrp	x11, _STATE_WRITE@GOTPAGE
Lloh17:
	ldr	x11, [x11, _STATE_WRITE@GOTPAGEOFF]
	tst	x9, x8
	csel	x8, x11, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #12]
	mov	x0, x19
	bl	_meson_i2c_prepare_xfer
	add	x21, x19, #16
	mov	x0, x21
	bl	_reinit_completion
	ldr	w1, [x23]
Lloh18:
	adrp	x24, _REG_CTRL_START@GOTPAGE
Lloh19:
	ldr	x24, [x24, _REG_CTRL_START@GOTPAGEOFF]
	ldr	x2, [x24]
	mov	x0, x19
	mov	x3, x2
	bl	_meson_i2c_set_mask
Lloh20:
	adrp	x8, _I2C_TIMEOUT_MS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _I2C_TIMEOUT_MS@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x21
	bl	_wait_for_completion_timeout
	mov	x22, x0
	add	x21, x19, #8
	mov	x0, x21
	mov	x1, x20
	bl	_spin_lock_irqsave
	ldr	w1, [x23]
	ldr	x2, [x24]
	mov	x0, x19
	mov	x3, #0
	bl	_meson_i2c_set_mask
	cbz	x22, LBB0_4
; %bb.3:
	mov	w8, #0
	b	LBB0_5
LBB0_4:
Lloh23:
	adrp	x8, _STATE_IDLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _STATE_IDLE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh26:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_5:
	ldr	w9, [x19, #4]
	cmp	w9, #0
	csel	w19, w8, w9, eq
	mov	x0, x21
	mov	x1, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_IGNORE_NAK,8,3           ; @I2C_M_IGNORE_NAK
	.comm	_REG_CTRL_ACK_IGNORE,8,3        ; @REG_CTRL_ACK_IGNORE
	.comm	_REG_CTRL,4,2                   ; @REG_CTRL
	.comm	_I2C_M_NOSTART,4,2              ; @I2C_M_NOSTART
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.comm	_STATE_READ,4,2                 ; @STATE_READ
	.comm	_STATE_WRITE,4,2                ; @STATE_WRITE
	.comm	_REG_CTRL_START,8,3             ; @REG_CTRL_START
	.comm	_I2C_TIMEOUT_MS,4,2             ; @I2C_TIMEOUT_MS
	.comm	_STATE_IDLE,4,2                 ; @STATE_IDLE
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_meson_i2c_xfer_msg
.subsections_via_symbols
