	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wmt_i2c_read
_wmt_i2c_read:                          ## @wmt_i2c_read
	.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
	callq	_i2c_get_adapdata
	movq	%rax, %r13
	movq	%rax, %r14
	movq	_I2C_M_NOSTART@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, (%r15)
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_wmt_i2c_wait_bus_not_busy
	testl	%eax, %eax
	js	LBB0_20
LBB0_2:
	movq	_REG_CR@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	callq	_readw
	movq	_CR_TX_END@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%rbx), %rsi
	addq	8(%r14), %rsi
	callq	_writew
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	callq	_readw
	movq	_CR_TX_NEXT_NO_ACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%rbx), %rsi
	addq	8(%r14), %rsi
	callq	_writew
	movl	(%r12), %eax
	testl	%eax, (%r15)
	je	LBB0_3
## %bb.4:
	cmpl	$1, 4(%r15)
	jne	LBB0_6
LBB0_5:
	movq	_REG_CR@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	callq	_readw
	movq	_CR_TX_NEXT_NO_ACK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	8(%r14), %rsi
	movl	%eax, %edi
	callq	_writew
LBB0_6:
	addq	$16, %r13
	movq	%r13, %rdi
	callq	_reinit_completion
	movq	(%r14), %rax
	movq	_I2C_MODE_STANDARD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.8:
	movq	_TCR_STANDARD_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_TCR_FAST_MODE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %edi
	movq	_TCR_SLAVE_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	8(%r15), %eax
	movq	_TCR_MASTER_READ@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edi
	orl	%eax, %edi
	movq	_REG_TCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	callq	_writew
	movl	(%r12), %eax
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.10:
	movq	_REG_CR@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	callq	_readw
	movq	_CR_CPU_RDY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	8(%r14), %rsi
	movl	%eax, %edi
	callq	_writew
LBB0_11:
	cmpl	$0, 4(%r15)
	je	LBB0_19
## %bb.12:
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_CR_CPU_RDY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_REG_CR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	8(%r14), %rsi
	movl	%eax, %edi
	callq	_writew
	movslq	4(%r15), %rax
	cmpq	%rax, %rbx
	jae	LBB0_19
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msecs_to_jiffies
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r14, %rdi
	callq	_wmt_check_status
	testl	%eax, %eax
	jne	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_REG_CDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	callq	_readw
	sarl	$8, %eax
	movq	16(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	4(%r15), %r12
	decq	%r12
	movq	_REG_CR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	callq	_readw
	cmpq	%r12, %rbx
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_CR_TX_NEXT_NO_ACK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_18
LBB0_19:
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_3:
	movq	_REG_CR@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	callq	_readw
	movq	_CR_CPU_RDY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	8(%r14), %rsi
	movl	%eax, %edi
	callq	_writew
	cmpl	$1, 4(%r15)
	je	LBB0_5
	jmp	LBB0_6
LBB0_14:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_NOSTART,4,2              ## @I2C_M_NOSTART
	.comm	_REG_CR,8,3                     ## @REG_CR
	.comm	_CR_TX_END,4,2                  ## @CR_TX_END
	.comm	_CR_TX_NEXT_NO_ACK,4,2          ## @CR_TX_NEXT_NO_ACK
	.comm	_CR_CPU_RDY,4,2                 ## @CR_CPU_RDY
	.comm	_I2C_MODE_STANDARD,8,3          ## @I2C_MODE_STANDARD
	.comm	_TCR_STANDARD_MODE,4,2          ## @TCR_STANDARD_MODE
	.comm	_TCR_FAST_MODE,4,2              ## @TCR_FAST_MODE
	.comm	_TCR_MASTER_READ,4,2            ## @TCR_MASTER_READ
	.comm	_TCR_SLAVE_ADDR_MASK,4,2        ## @TCR_SLAVE_ADDR_MASK
	.comm	_REG_TCR,8,3                    ## @REG_TCR
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_REG_CDR,8,3                    ## @REG_CDR
	.no_dead_strip	_wmt_i2c_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wmt_i2c_read
_wmt_i2c_read:                          ; @wmt_i2c_read
	.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	x19, x1
	bl	_i2c_get_adapdata
	mov	x20, x0
	ldr	w8, [x19]
Lloh0:
	adrp	x25, _I2C_M_NOSTART@GOTPAGE
Lloh1:
	ldr	x25, [x25, _I2C_M_NOSTART@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_wmt_i2c_wait_bus_not_busy
	tbnz	w0, #31, LBB0_18
LBB0_2:
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x22, _REG_CR@GOTPAGE
Lloh3:
	ldr	x22, [x22, _REG_CR@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readw
Lloh4:
	adrp	x8, _CR_TX_END@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CR_TX_END@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	bic	w0, w0, w8
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writew
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readw
Lloh7:
	adrp	x23, _CR_TX_NEXT_NO_ACK@GOTPAGE
Lloh8:
	ldr	x23, [x23, _CR_TX_NEXT_NO_ACK@GOTPAGEOFF]
	ldr	w8, [x23]
	bic	w0, w0, w8
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writew
	ldr	w8, [x19]
	ldr	w9, [x25]
Lloh9:
	adrp	x24, _CR_CPU_RDY@GOTPAGE
Lloh10:
	ldr	x24, [x24, _CR_CPU_RDY@GOTPAGEOFF]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readw
	ldr	w8, [x24]
	orr	w0, w8, w0
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writew
LBB0_4:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readw
	ldr	w8, [x23]
	orr	w0, w8, w0
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writew
LBB0_6:
	add	x21, x20, #16
	mov	x0, x21
	bl	_reinit_completion
Lloh11:
	adrp	x8, _I2C_MODE_STANDARD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I2C_MODE_STANDARD@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _TCR_STANDARD_MODE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _TCR_STANDARD_MODE@GOTPAGEOFF]
Lloh16:
	adrp	x10, _TCR_FAST_MODE@GOTPAGE
Lloh17:
	ldr	x10, [x10, _TCR_FAST_MODE@GOTPAGEOFF]
	ldp	x11, x12, [x20]
	cmp	x11, x8
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _TCR_SLAVE_ADDR_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _TCR_SLAVE_ADDR_MASK@GOTPAGEOFF]
	ldr	w10, [x19, #8]
Lloh20:
	ldr	w9, [x9]
	and	w9, w9, w10
Lloh21:
	adrp	x10, _TCR_MASTER_READ@GOTPAGE
Lloh22:
	ldr	x10, [x10, _TCR_MASTER_READ@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	orr	w8, w8, w10
	orr	w0, w8, w9
Lloh24:
	adrp	x8, _REG_TCR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _REG_TCR@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	add	x1, x8, x12
	bl	_writew
	ldr	w8, [x19]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readw
	ldr	w8, [x24]
	orr	w0, w8, w0
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writew
LBB0_8:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_16
; %bb.9:
	mov	x25, #0
Lloh27:
	adrp	x26, _REG_CDR@GOTPAGE
Lloh28:
	ldr	x26, [x26, _REG_CDR@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x24]
	orr	w0, w8, w0
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writew
	ldrsw	x8, [x19, #4]
	cmp	x25, x8
	b.hs	LBB0_16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #500
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x21
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	bl	_wmt_check_status
	cbnz	w0, LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x20, #8]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readw
	asr	w8, w0, #8
	ldr	x9, [x19, #16]
	str	w8, [x9, x25, lsl #2]
	add	x25, x25, #1
	ldrsw	x8, [x19, #4]
	sub	x27, x8, #1
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readw
	cmp	x25, x27
	b.ne	LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w8, w0
	orr	w0, w8, w9
	b	LBB0_11
LBB0_16:
	mov	w0, #0
	b	LBB0_18
LBB0_17:
Lloh29:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_NOSTART,4,2              ; @I2C_M_NOSTART
	.comm	_REG_CR,8,3                     ; @REG_CR
	.comm	_CR_TX_END,4,2                  ; @CR_TX_END
	.comm	_CR_TX_NEXT_NO_ACK,4,2          ; @CR_TX_NEXT_NO_ACK
	.comm	_CR_CPU_RDY,4,2                 ; @CR_CPU_RDY
	.comm	_I2C_MODE_STANDARD,8,3          ; @I2C_MODE_STANDARD
	.comm	_TCR_STANDARD_MODE,4,2          ; @TCR_STANDARD_MODE
	.comm	_TCR_FAST_MODE,4,2              ; @TCR_FAST_MODE
	.comm	_TCR_MASTER_READ,4,2            ; @TCR_MASTER_READ
	.comm	_TCR_SLAVE_ADDR_MASK,4,2        ; @TCR_SLAVE_ADDR_MASK
	.comm	_REG_TCR,8,3                    ; @REG_TCR
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_REG_CDR,8,3                    ; @REG_CDR
	.no_dead_strip	_wmt_i2c_read
.subsections_via_symbols
