	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_mobile_i2c_isr
_sh_mobile_i2c_isr:                     ## @sh_mobile_i2c_isr
	.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, %rdi
	callq	_platform_get_drvdata
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_ICSR
	movl	%eax, %edi
	callq	_ioread8
	movl	%eax, %r14d
	movb	(%r13), %al
	orb	%r14b, %al
	movb	%al, (%r13)
	movl	20(%r13), %edi
	movq	8(%r13), %rcx
	movq	_I2C_M_RD@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	andl	(%rcx), %edx
	leaq	L_.str.2(%rip), %rdx
	leaq	L_.str.1(%rip), %r8
	cmoveq	%rdx, %r8
	movl	16(%r13), %r9d
	movl	4(%rcx), %ecx
	movl	%ecx, (%rsp)
	movzbl	%al, %ecx
	movzbl	%r14b, %r15d
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_dbg
	movq	_ICSR_AL@GOTPCREL(%rip), %rax
	movq	_ICSR_TACK@GOTPCREL(%rip), %rcx
	movb	(%rcx), %bl
	orb	(%rax), %bl
	testb	%r15b, %bl
	je	LBB0_2
## %bb.1:
	notb	%bl
	andb	%r14b, %bl
	movq	%r13, %rdi
	callq	_ICSR
	movzbl	%bl, %edi
	movl	%eax, %esi
	callq	_iowrite8
	xorl	%r15d, %r15d
	jmp	LBB0_6
LBB0_2:
	movq	8(%r13), %rax
	movl	(%r12), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	callq	_sh_mobile_i2c_isr_rx
	jmp	LBB0_5
LBB0_4:
	movq	%r13, %rdi
	callq	_sh_mobile_i2c_isr_tx
LBB0_5:
	movl	%eax, %r15d
LBB0_6:
	movq	_ICSR_WAIT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	testb	%r14b, %al
	je	LBB0_8
## %bb.7:
	notb	%al
	andb	%al, %r14b
	movq	%r13, %rdi
	callq	_ICSR
	movzbl	%r14b, %edi
	movl	%eax, %esi
	callq	_iowrite8
LBB0_8:
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.9:
	movq	_SW_DONE@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	orb	%al, (%r13)
	addq	$4, %r13
	movq	%r13, %rdi
	callq	_wake_up
LBB0_10:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %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	"i2c_isr 0x%02x 0x%02x %s %d %d!\n"

	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
L_.str.1:                               ## @.str.1
	.asciz	"read"

L_.str.2:                               ## @.str.2
	.asciz	"write"

	.comm	_ICSR_AL,1,0                    ## @ICSR_AL
	.comm	_ICSR_TACK,1,0                  ## @ICSR_TACK
	.comm	_ICSR_WAIT,1,0                  ## @ICSR_WAIT
	.comm	_SW_DONE,1,0                    ## @SW_DONE
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_sh_mobile_i2c_isr
.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_isr
_sh_mobile_i2c_isr:                     ; @sh_mobile_i2c_isr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x0, x1
	bl	_platform_get_drvdata
	mov	x19, x0
	bl	_ICSR
	bl	_ioread8
	mov	x20, x0
	ldrb	w8, [x19]
	orr	w8, w8, w0
	strb	w8, [x19]
	ldr	x9, [x19, #8]
Lloh0:
	adrp	x21, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x21, [x21, _I2C_M_RD@GOTPAGEOFF]
	ldr	w10, [x21]
Lloh2:
	adrp	x11, l_.str.1@PAGE
Lloh3:
	add	x11, x11, l_.str.1@PAGEOFF
Lloh4:
	adrp	x12, l_.str.2@PAGE
Lloh5:
	add	x12, x12, l_.str.2@PAGEOFF
	ldp	w13, w6, [x9]
	tst	w10, w13
	csel	x4, x12, x11, eq
	ldp	w5, w0, [x19, #16]
	and	w3, w8, #0xff
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
Lloh8:
	adrp	x8, _ICSR_AL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ICSR_AL@GOTPAGEOFF]
	ldrb	w8, [x8]
Lloh10:
	adrp	x9, _ICSR_TACK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ICSR_TACK@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
	bic	w21, w20, w8
	mov	x0, x19
	bl	_ICSR
	mov	x1, x0
	mov	x0, x21
	bl	_iowrite8
	mov	w21, #0
	b	LBB0_6
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	ldr	w9, [x21]
	mov	x0, x19
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bl	_sh_mobile_i2c_isr_rx
	b	LBB0_5
LBB0_4:
	bl	_sh_mobile_i2c_isr_tx
LBB0_5:
	mov	x21, x0
LBB0_6:
Lloh12:
	adrp	x8, _ICSR_WAIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ICSR_WAIT@GOTPAGEOFF]
	ldrb	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.7:
	bic	w20, w20, w8
	mov	x0, x19
	bl	_ICSR
	mov	x1, x0
	mov	x0, x20
	bl	_iowrite8
LBB0_8:
	cbz	w21, LBB0_10
; %bb.9:
Lloh14:
	adrp	x8, _SW_DONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SW_DONE@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldrb	w9, [x19]
	orr	w8, w9, w8
	strb	w8, [x19], #4
	mov	x0, x19
	bl	_wake_up
LBB0_10:
Lloh16:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c_isr 0x%02x 0x%02x %s %d %d!\n"

	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
l_.str.1:                               ; @.str.1
	.asciz	"read"

l_.str.2:                               ; @.str.2
	.asciz	"write"

	.comm	_ICSR_AL,1,0                    ; @ICSR_AL
	.comm	_ICSR_TACK,1,0                  ; @ICSR_TACK
	.comm	_ICSR_WAIT,1,0                  ; @ICSR_WAIT
	.comm	_SW_DONE,1,0                    ; @SW_DONE
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_sh_mobile_i2c_isr
.subsections_via_symbols
