	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_mobile_i2c_xfer
_sh_mobile_i2c_xfer:                    ## @sh_mobile_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	callq	_i2c_get_adapdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_activate_ch
	testl	%r15d, %r15d
	jle	LBB0_5
## %bb.1:
	movl	%r15d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	leaq	L_.str.1(%rip), %r13
	movq	_ICSR_BUSY@GOTPCREL(%rip), %r14
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%rax,4), %rsi
	movq	%rbx, %rdi
	callq	_start_ch
	testl	%eax, %eax
	jne	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_OP_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_i2c_op
	movl	8(%rbx), %edi
	movq	_SW_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ICSR_TACK@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	andl	(%rbx), %esi
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %edx
	callq	_wait_event_timeout
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$-1001, %r15d                   ## imm = 0xFC17
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_ICSR
	movl	%eax, %edi
	callq	_ioread8
	movl	%eax, %r12d
	movl	(%rbx), %ecx
	movl	4(%rbx), %edi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_dev_dbg
	testl	%r12d, (%r14)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	$10, %edi
	callq	_udelay
	incl	%r15d
	jne	LBB0_9
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	orl	(%rbx), %r12d
	movq	_ICSR_AL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ICSR_TACK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testl	%r12d, %eax
	jne	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	cmpq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_2
LBB0_5:
	movq	%rbx, %rdi
	callq	_deactivate_ch
	jmp	LBB0_16
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	4(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
LBB0_14:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	%rbx, %rdi
	callq	_deactivate_ch
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.15:
	negl	%r14d
	movl	%r14d, %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_deactivate_ch
	movl	%r12d, %r15d
	jmp	LBB0_16
LBB0_13:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_OP_START,4,2                   ## @OP_START
	.comm	_ICSR_TACK,4,2                  ## @ICSR_TACK
	.comm	_SW_DONE,4,2                    ## @SW_DONE
	.comm	_HZ,4,2                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Transfer request timed out\n"

L_.str.1:                               ## @.str.1
	.asciz	"val 0x%02x pd->sr 0x%02x\n"

	.comm	_ICSR_BUSY,4,2                  ## @ICSR_BUSY
	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"Polling timed out\n"

	.comm	_ICSR_AL,4,2                    ## @ICSR_AL
	.no_dead_strip	_sh_mobile_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_mobile_i2c_xfer
_sh_mobile_i2c_xfer:                    ; @sh_mobile_i2c_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
	mov	x20, x0
	bl	_activate_ch
	cmp	w19, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x25, #0
	mov	w8, w19
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x27, _OP_START@GOTPAGE
Lloh1:
	ldr	x27, [x27, _OP_START@GOTPAGEOFF]
Lloh2:
	adrp	x28, _ICSR_TACK@GOTPAGE
Lloh3:
	ldr	x28, [x28, _ICSR_TACK@GOTPAGEOFF]
Lloh4:
	adrp	x22, _ICSR_BUSY@GOTPAGE
Lloh5:
	ldr	x22, [x22, _ICSR_BUSY@GOTPAGEOFF]
Lloh6:
	adrp	x23, l_.str.1@PAGE
Lloh7:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	add	x1, x21, x25, lsl #2
	mov	x0, x20
	bl	_start_ch
	cbnz	w0, LBB0_15
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x26, x27
	ldr	w1, [x27]
	mov	x0, x20
	mov	w2, #0
	bl	_i2c_op
	ldr	w0, [x20, #8]
	ldr	w8, [x20]
	ldr	w9, [x28]
Lloh8:
	adrp	x10, _SW_DONE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _SW_DONE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w10, w9
	and	w1, w9, w8
Lloh11:
	adrp	x8, _HZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	add	w2, w8, w8, lsl #2
	bl	_wait_event_timeout
	cbnz	w0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20, #4]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w27, #-1001
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	bl	_ICSR
	bl	_ioread8
	mov	x24, x0
	ldp	w3, w0, [x20]
	mov	x1, x23
	mov	x2, x24
	bl	_dev_dbg
	ldr	w8, [x22]
	tst	w8, w24
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	w0, #10
	bl	_udelay
	adds	w27, w27, #1
	b.lo	LBB0_6
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x20]
	orr	w8, w8, w24
	ldr	w9, [x28]
Lloh16:
	adrp	x10, _ICSR_AL@GOTPAGE
Lloh17:
	ldr	x10, [x10, _ICSR_AL@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x25, x25, #1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x25, x8
	mov	x27, x26
	b.ne	LBB0_2
LBB0_10:
	mov	x0, x20
	bl	_deactivate_ch
	b	LBB0_14
LBB0_11:
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w21, [x8]
	ldr	w0, [x20, #4]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_12:
	mov	x0, x20
	bl	_deactivate_ch
	cbz	w21, LBB0_14
; %bb.13:
	neg	w19, w21
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
	mov	x24, x0
	mov	x0, x20
	bl	_deactivate_ch
	mov	x19, x24
	b	LBB0_14
LBB0_16:
Lloh24:
	adrp	x8, _EIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh26:
	ldr	w21, [x8]
	b	LBB0_12
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_OP_START,4,2                   ; @OP_START
	.comm	_ICSR_TACK,4,2                  ; @ICSR_TACK
	.comm	_SW_DONE,4,2                    ; @SW_DONE
	.comm	_HZ,4,2                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Transfer request timed out\n"

l_.str.1:                               ; @.str.1
	.asciz	"val 0x%02x pd->sr 0x%02x\n"

	.comm	_ICSR_BUSY,4,2                  ; @ICSR_BUSY
	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"Polling timed out\n"

	.comm	_ICSR_AL,4,2                    ; @ICSR_AL
	.no_dead_strip	_sh_mobile_i2c_xfer
.subsections_via_symbols
