	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_i2c_xfer_msg
_st_i2c_xfer_msg:                       ## @st_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
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_i2c_8bit_addr_from_msg
	movl	%eax, 24(%r12)
	movl	4(%rbx), %eax
	movl	%eax, 52(%r12)
	movl	(%rbx), %eax
	movl	%eax, 48(%r12)
	movq	$0, 40(%r12)
	movl	$0, 28(%r12)
	movl	%r14d, 32(%r12)
	leaq	16(%r12), %r14
	movq	%r14, %rdi
	callq	_reinit_completion
	movq	_SSC_CTL_EN@GOTPCREL(%rip), %rax
	movq	_SSC_CTL_MS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_SSC_CTL_EN_RX_FIFO@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_SSC_CTL_EN_TX_FIFO@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_SSC_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_st_i2c_set_bits
	movq	_SSC_I2C_TXENB@GOTPCREL(%rip), %rax
	movq	_I2C_M_RD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	andl	24(%r12), %esi
	je	LBB0_2
## %bb.1:
	movq	_SSC_I2C_ACKG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_2:
	orl	(%rax), %esi
	movq	_SSC_I2C@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	(%r12), %rdi
	callq	_st_i2c_set_bits
	movl	24(%r12), %esi
	movq	%r12, %rdi
	callq	_st_i2c_write_tx_fifo
	movl	(%rbx), %eax
	testl	%eax, 24(%r12)
	jne	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_st_i2c_wr_fill_tx_fifo
LBB0_4:
	movq	_SSC_IEN_NACKEN@GOTPCREL(%rip), %rax
	movq	_SSC_IEN_TEEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_SSC_IEN_ARBLEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_SSC_IEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	callq	_writel_relaxed
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.5:
	movq	%r12, %rdi
	callq	_st_i2c_wait_free_bus
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	(%r13), %rdi
	addq	(%r12), %rdi
	movq	_SSC_I2C_STRTG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_st_i2c_set_bits
LBB0_7:
	movl	12(%r12), %esi
	movq	%r14, %rdi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	28(%r12), %r15d
	jmp	LBB0_10
LBB0_9:
	movl	8(%r12), %edi
	movl	24(%r12), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movq	_SSC_I2C_STOPG@GOTPCREL(%rip), %rax
	movq	_SSC_I2C_REPSTRTG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	(%r13), %rdi
	addq	(%r12), %rdi
	callq	_st_i2c_clr_bits
	movq	_SSC_CLR_SSCSTOP@GOTPCREL(%rip), %rax
	movq	_SSC_CLR_REPSTRT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_SSC_CLR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	callq	_writel_relaxed
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSC_CTL_EN,4,2                 ## @SSC_CTL_EN
	.comm	_SSC_CTL_MS,4,2                 ## @SSC_CTL_MS
	.comm	_SSC_CTL_EN_RX_FIFO,4,2         ## @SSC_CTL_EN_RX_FIFO
	.comm	_SSC_CTL_EN_TX_FIFO,4,2         ## @SSC_CTL_EN_TX_FIFO
	.comm	_SSC_CTL,8,3                    ## @SSC_CTL
	.comm	_SSC_I2C_TXENB,4,2              ## @SSC_I2C_TXENB
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_SSC_I2C_ACKG,4,2               ## @SSC_I2C_ACKG
	.comm	_SSC_I2C,8,3                    ## @SSC_I2C
	.comm	_SSC_IEN_NACKEN,4,2             ## @SSC_IEN_NACKEN
	.comm	_SSC_IEN_TEEN,4,2               ## @SSC_IEN_TEEN
	.comm	_SSC_IEN_ARBLEN,4,2             ## @SSC_IEN_ARBLEN
	.comm	_SSC_IEN,8,3                    ## @SSC_IEN
	.comm	_SSC_I2C_STRTG,4,2              ## @SSC_I2C_STRTG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Write to slave 0x%x timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_SSC_I2C_STOPG,4,2              ## @SSC_I2C_STOPG
	.comm	_SSC_I2C_REPSTRTG,4,2           ## @SSC_I2C_REPSTRTG
	.comm	_SSC_CLR_SSCSTOP,4,2            ## @SSC_CLR_SSCSTOP
	.comm	_SSC_CLR_REPSTRT,4,2            ## @SSC_CLR_REPSTRT
	.comm	_SSC_CLR,8,3                    ## @SSC_CLR
	.no_dead_strip	_st_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 st_i2c_xfer_msg
_st_i2c_xfer_msg:                       ; @st_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	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	mov	x0, x1
	bl	_i2c_8bit_addr_from_msg
	str	w0, [x19, #24]
	ldr	d0, [x22]
	str	d0, [x19, #48]
	str	xzr, [x19, #40]
	stp	wzr, w20, [x19, #28]
	add	x20, x19, #16
	mov	x0, x20
	bl	_reinit_completion
Lloh0:
	adrp	x8, _SSC_CTL_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSC_CTL_EN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SSC_CTL_MS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SSC_CTL_MS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _SSC_CTL_EN_RX_FIFO@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SSC_CTL_EN_RX_FIFO@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh8:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _SSC_CTL_EN_TX_FIFO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SSC_CTL_EN_TX_FIFO@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _SSC_CTL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SSC_CTL@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_st_i2c_set_bits
Lloh15:
	adrp	x8, _SSC_I2C_TXENB@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SSC_I2C_TXENB@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
Lloh18:
	adrp	x23, _I2C_M_RD@GOTPAGE
Lloh19:
	ldr	x23, [x23, _I2C_M_RD@GOTPAGEOFF]
	ldr	w10, [x23]
Lloh20:
	adrp	x11, _SSC_I2C_ACKG@GOTPAGE
Lloh21:
	ldr	x11, [x11, _SSC_I2C_ACKG@GOTPAGEOFF]
Lloh22:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w1, w9, w8
	ldr	x8, [x19]
Lloh23:
	adrp	x22, _SSC_I2C@GOTPAGE
Lloh24:
	ldr	x22, [x22, _SSC_I2C@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_st_i2c_set_bits
	ldr	w1, [x19, #24]
	mov	x0, x19
	bl	_st_i2c_write_tx_fifo
	ldr	w8, [x19, #24]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_st_i2c_wr_fill_tx_fifo
LBB0_2:
Lloh25:
	adrp	x8, _SSC_IEN_NACKEN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SSC_IEN_NACKEN@GOTPAGEOFF]
Lloh27:
	adrp	x9, _SSC_IEN_TEEN@GOTPAGE
Lloh28:
	ldr	x9, [x9, _SSC_IEN_TEEN@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh31:
	adrp	x9, _SSC_IEN_ARBLEN@GOTPAGE
Lloh32:
	ldr	x9, [x9, _SSC_IEN_ARBLEN@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x19]
Lloh34:
	adrp	x9, _SSC_IEN@GOTPAGE
Lloh35:
	ldr	x9, [x9, _SSC_IEN@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	cbz	w21, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_st_i2c_wait_free_bus
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.4:
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
Lloh37:
	adrp	x8, _SSC_I2C_STRTG@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SSC_I2C_STRTG@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	bl	_st_i2c_set_bits
LBB0_5:
	ldr	w1, [x19, #12]
	mov	x0, x20
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w21, [x19, #28]
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #8]
	ldr	w2, [x19, #24]
Lloh40:
	adrp	x1, l_.str@PAGE
Lloh41:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh42:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
Lloh45:
	adrp	x8, _SSC_I2C_STOPG@GOTPAGE
Lloh46:
	ldr	x8, [x8, _SSC_I2C_STOPG@GOTPAGEOFF]
Lloh47:
	adrp	x9, _SSC_I2C_REPSTRTG@GOTPAGE
Lloh48:
	ldr	x9, [x9, _SSC_I2C_REPSTRTG@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
Lloh50:
	ldr	w9, [x9]
	orr	w1, w9, w8
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_st_i2c_clr_bits
Lloh51:
	adrp	x8, _SSC_CLR_SSCSTOP@GOTPAGE
Lloh52:
	ldr	x8, [x8, _SSC_CLR_SSCSTOP@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
Lloh54:
	adrp	x9, _SSC_CLR_REPSTRT@GOTPAGE
Lloh55:
	ldr	x9, [x9, _SSC_CLR_REPSTRT@GOTPAGEOFF]
Lloh56:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x19]
Lloh57:
	adrp	x9, _SSC_CLR@GOTPAGE
Lloh58:
	ldr	x9, [x9, _SSC_CLR@GOTPAGEOFF]
Lloh59:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
LBB0_9:
	mov	x0, x21
	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 AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh29
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_SSC_CTL_EN,4,2                 ; @SSC_CTL_EN
	.comm	_SSC_CTL_MS,4,2                 ; @SSC_CTL_MS
	.comm	_SSC_CTL_EN_RX_FIFO,4,2         ; @SSC_CTL_EN_RX_FIFO
	.comm	_SSC_CTL_EN_TX_FIFO,4,2         ; @SSC_CTL_EN_TX_FIFO
	.comm	_SSC_CTL,8,3                    ; @SSC_CTL
	.comm	_SSC_I2C_TXENB,4,2              ; @SSC_I2C_TXENB
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_SSC_I2C_ACKG,4,2               ; @SSC_I2C_ACKG
	.comm	_SSC_I2C,8,3                    ; @SSC_I2C
	.comm	_SSC_IEN_NACKEN,4,2             ; @SSC_IEN_NACKEN
	.comm	_SSC_IEN_TEEN,4,2               ; @SSC_IEN_TEEN
	.comm	_SSC_IEN_ARBLEN,4,2             ; @SSC_IEN_ARBLEN
	.comm	_SSC_IEN,8,3                    ; @SSC_IEN
	.comm	_SSC_I2C_STRTG,4,2              ; @SSC_I2C_STRTG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Write to slave 0x%x timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_SSC_I2C_STOPG,4,2              ; @SSC_I2C_STOPG
	.comm	_SSC_I2C_REPSTRTG,4,2           ; @SSC_I2C_REPSTRTG
	.comm	_SSC_CLR_SSCSTOP,4,2            ; @SSC_CLR_SSCSTOP
	.comm	_SSC_CLR_REPSTRT,4,2            ; @SSC_CLR_REPSTRT
	.comm	_SSC_CLR,8,3                    ; @SSC_CLR
	.no_dead_strip	_st_i2c_xfer_msg
.subsections_via_symbols
