	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfin_twi_handle_interrupt
_bfin_twi_handle_interrupt:             ## @bfin_twi_handle_interrupt
	.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	%rdi, %r13
	callq	_read_INT_STAT
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_read_MASTER_STAT
	movl	%eax, %r14d
	movq	_XMTSERV@GOTPCREL(%rip), %r12
	testw	%r15w, (%r12)
	je	LBB0_10
## %bb.1:
	cmpl	$0, (%r13)
	jle	LBB0_3
## %bb.2:
	movq	8(%r13), %rax
	leaq	4(%rax), %rcx
	movq	%rcx, 8(%r13)
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_write_XMT_DATA8
	decl	(%r13)
	jmp	LBB0_9
LBB0_3:
	movq	16(%r13), %rax
	movq	_TWI_I2C_MODE_COMBINED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	callq	_read_MASTER_CTL
	movq	_MDIR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_RSTART@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_5:
	cmpl	$0, 24(%r13)
	je	LBB0_42
## %bb.6:
	movq	%r13, %rdi
	callq	_read_MASTER_CTL
	movq	_STOP@GOTPCREL(%rip), %rcx
LBB0_7:
	orl	(%rcx), %eax
LBB0_8:
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_write_MASTER_CTL
LBB0_9:
	xorl	%eax, %eax
	callq	_SSYNC
	movzwl	(%r12), %esi
	movq	%r13, %rdi
	callq	_write_INT_STAT
	xorl	%eax, %eax
	callq	_SSYNC
LBB0_10:
	movq	_RCVSERV@GOTPCREL(%rip), %r12
	testw	%r15w, (%r12)
	je	LBB0_21
## %bb.11:
	cmpl	$0, 36(%r13)
	jle	LBB0_15
## %bb.12:
	movq	%r13, %rdi
	callq	_read_RCV_DATA8
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	movq	16(%r13), %rdx
	movq	_TWI_I2C_MODE_COMBINED@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_18
## %bb.13:
	movq	_TWI_I2C_MODE_STANDARDSUB@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 16(%r13)
	movl	36(%r13), %edx
	cmpl	$1, %edx
	jne	LBB0_19
## %bb.14:
	incl	%eax
	cmpl	$0, 24(%r13)
	movl	$1, %edx
	cmovnel	%eax, %edx
	jmp	LBB0_19
LBB0_15:
	cmpl	$0, 24(%r13)
	je	LBB0_37
## %bb.16:
	movq	%r13, %rdi
	callq	_read_MASTER_CTL
	movq	_STOP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r13, %rdi
	movl	%eax, %esi
LBB0_17:
	callq	_write_MASTER_CTL
	xorl	%eax, %eax
	callq	_SSYNC
	jmp	LBB0_20
LBB0_18:
	movl	36(%r13), %edx
LBB0_19:
	addq	$4, %rcx
	movq	%rcx, 8(%r13)
	decl	%edx
	movl	%edx, 36(%r13)
LBB0_20:
	movzwl	(%r12), %esi
	movq	%r13, %rdi
	callq	_write_INT_STAT
	xorl	%eax, %eax
	callq	_SSYNC
LBB0_21:
	movq	_MERR@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	testw	%r15w, %ax
	je	LBB0_25
## %bb.22:
	movzwl	%ax, %esi
	movq	%r13, %rdi
	callq	_write_INT_STAT
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_write_INT_MASK
	movq	%r13, %rdi
	movl	$62, %esi
	callq	_write_MASTER_STAT
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_write_MASTER_CTL
	xorl	%eax, %eax
	callq	_SSYNC
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, 40(%r13)
	movq	_MCOMP@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	testw	%r15w, %ax
	je	LBB0_41
## %bb.23:
	movzwl	%ax, %esi
	movq	%r13, %rdi
	callq	_write_INT_STAT
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_write_INT_MASK
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_write_MASTER_CTL
	xorl	%eax, %eax
	callq	_SSYNC
	cmpl	$0, (%r13)
	je	LBB0_30
LBB0_24:
	movq	_ANAK@GOTPCREL(%rip), %rcx
	movl	$0, %eax
	testw	%r14w, (%rcx)
	jne	LBB0_41
	jmp	LBB0_31
LBB0_25:
	movq	_MCOMP@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	testw	%r15w, %ax
	je	LBB0_32
## %bb.26:
	movzwl	%ax, %esi
	movq	%r13, %rdi
	callq	_write_INT_STAT
	xorl	%eax, %eax
	callq	_SSYNC
	movq	16(%r13), %rax
	movq	_TWI_I2C_MODE_COMBINED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_33
## %bb.27:
	cmpl	$0, 36(%r13)
	je	LBB0_46
## %bb.28:
	movq	%r13, %rdi
	callq	_read_MASTER_CTL
	andl	$-16321, %eax                   ## imm = 0xC03F
	movl	36(%r13), %esi
LBB0_29:
	shll	$6, %esi
	orl	%eax, %esi
	jmp	LBB0_47
LBB0_30:
	movq	_BUFRDERR@GOTPCREL(%rip), %rcx
	movl	$1, %eax
	testw	%r14w, (%rcx)
	je	LBB0_24
LBB0_31:
	movl	%eax, 40(%r13)
	jmp	LBB0_41
LBB0_32:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	movq	_TWI_I2C_MODE_REPEAT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_40
## %bb.34:
	movslq	28(%r13), %rax
	incq	%rax
	cmpl	32(%r13), %eax
	jge	LBB0_40
## %bb.35:
	movl	%eax, 28(%r13)
	movq	48(%r13), %rcx
	leaq	(%rax,%rax,2), %rax
	movq	8(%rcx,%rax,8), %rdx
	movq	%rdx, 8(%r13)
	movl	16(%rcx,%rax,8), %edx
	movl	%edx, 36(%r13)
	movl	%edx, (%r13)
	movl	20(%rcx,%rax,8), %esi
	movq	%r13, %rdi
	callq	_write_MASTER_ADDR
	movq	48(%r13), %rax
	movslq	28(%r13), %rcx
	leaq	(%rcx,%rcx,2), %rdx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rax,%rdx,8)
	je	LBB0_49
## %bb.36:
	movq	_I2C_SMBUS_READ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 56(%r13)
	jmp	LBB0_51
LBB0_37:
	movq	16(%r13), %rax
	movq	_TWI_I2C_MODE_REPEAT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.38:
	movslq	28(%r13), %rax
	incq	%rax
	cmpl	32(%r13), %eax
	jge	LBB0_20
## %bb.39:
	movq	48(%r13), %rcx
	leaq	(%rax,%rax,2), %rax
	movq	_I2C_M_RD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	andl	(%rcx,%rax,8), %ebx
	movq	%r13, %rdi
	callq	_read_MASTER_CTL
	movq	_RSTART@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_MDIR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%eax, %esi
	testl	%ebx, %ebx
	cmovel	%ecx, %esi
	movq	%r13, %rdi
	jmp	LBB0_17
LBB0_40:
	movl	$1, 40(%r13)
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_write_INT_MASK
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_write_MASTER_CTL
	xorl	%eax, %eax
	callq	_SSYNC
LBB0_41:
	addq	$44, %r13
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_complete                       ## TAILCALL
LBB0_42:
	movq	_TWI_I2C_MODE_REPEAT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.43:
	movslq	28(%r13), %rax
	incq	%rax
	cmpl	32(%r13), %eax
	jge	LBB0_9
## %bb.44:
	movq	48(%r13), %rcx
	leaq	(%rax,%rax,2), %rax
	movq	_I2C_M_RD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	andl	(%rcx,%rax,8), %ebx
	movq	%r13, %rdi
	callq	_read_MASTER_CTL
	movq	_RSTART@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_MDIR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ebx, %ebx
	je	LBB0_54
## %bb.45:
	orl	%ecx, %eax
	jmp	LBB0_8
LBB0_46:
	movl	$1, 36(%r13)
	movl	$1, 24(%r13)
	movq	%r13, %rdi
	callq	_read_MASTER_CTL
	movl	%eax, %esi
	orl	$16320, %esi                    ## imm = 0x3FC0
LBB0_47:
	movq	%r13, %rdi
	callq	_write_MASTER_CTL
LBB0_48:
	movq	%r13, %rdi
	callq	_read_MASTER_CTL
	movq	_RSTART@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	%r13, %rdi
	callq	_write_MASTER_CTL
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_SSYNC                          ## TAILCALL
LBB0_49:
	movq	_I2C_SMBUS_WRITE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 56(%r13)
	cmpl	$0, (%r13)
	jle	LBB0_51
## %bb.50:
	movq	8(%r13), %rax
	leaq	4(%rax), %rcx
	movq	%rcx, 8(%r13)
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_write_XMT_DATA8
	decl	(%r13)
	xorl	%eax, %eax
	callq	_SSYNC
	movq	48(%r13), %rax
	movslq	28(%r13), %rcx
LBB0_51:
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %ebx
	movq	%r13, %rdi
	callq	_read_MASTER_CTL
	cmpl	$255, %ebx
	jg	LBB0_53
## %bb.52:
	andl	$-16321, %eax                   ## imm = 0xC03F
	movq	48(%r13), %rcx
	movslq	28(%r13), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movl	16(%rcx,%rdx,8), %esi
	jmp	LBB0_29
LBB0_53:
	orl	$16320, %eax                    ## imm = 0x3FC0
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_write_MASTER_CTL
	movl	$1, 24(%r13)
	jmp	LBB0_48
LBB0_54:
	notl	%ecx
	andl	%ecx, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_XMTSERV,2,1                    ## @XMTSERV
	.comm	_TWI_I2C_MODE_COMBINED,8,3      ## @TWI_I2C_MODE_COMBINED
	.comm	_MDIR,4,2                       ## @MDIR
	.comm	_RSTART,4,2                     ## @RSTART
	.comm	_STOP,4,2                       ## @STOP
	.comm	_TWI_I2C_MODE_REPEAT,8,3        ## @TWI_I2C_MODE_REPEAT
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_RCVSERV,2,1                    ## @RCVSERV
	.comm	_TWI_I2C_MODE_STANDARDSUB,8,3   ## @TWI_I2C_MODE_STANDARDSUB
	.comm	_MERR,2,1                       ## @MERR
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MCOMP,2,1                      ## @MCOMP
	.comm	_BUFRDERR,2,1                   ## @BUFRDERR
	.comm	_ANAK,2,1                       ## @ANAK
	.comm	_I2C_SMBUS_READ,4,2             ## @I2C_SMBUS_READ
	.comm	_I2C_SMBUS_WRITE,4,2            ## @I2C_SMBUS_WRITE
	.no_dead_strip	_bfin_twi_handle_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfin_twi_handle_interrupt
_bfin_twi_handle_interrupt:             ; @bfin_twi_handle_interrupt
	.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	x19, x0
	bl	_read_INT_STAT
	mov	x21, x0
	mov	x0, x19
	bl	_read_MASTER_STAT
	mov	x20, x0
Lloh0:
	adrp	x22, _XMTSERV@GOTPAGE
Lloh1:
	ldr	x22, [x22, _XMTSERV@GOTPAGEOFF]
	ldrh	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w1, [x8], #4
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_write_XMT_DATA8
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	b	LBB0_8
LBB0_3:
	ldr	x8, [x19, #16]
Lloh2:
	adrp	x9, _TWI_I2C_MODE_COMBINED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TWI_I2C_MODE_COMBINED@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_read_MASTER_CTL
Lloh5:
	adrp	x8, _MDIR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MDIR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh8:
	adrp	x9, _RSTART@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RSTART@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w8, w9
	b	LBB0_7
LBB0_5:
	ldr	w9, [x19, #24]
	cbz	w9, LBB0_43
; %bb.6:
	mov	x0, x19
	bl	_read_MASTER_CTL
Lloh11:
	adrp	x8, _STOP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STOP@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w1, w8, w0
LBB0_7:
	mov	x0, x19
	bl	_write_MASTER_CTL
LBB0_8:
	bl	_SSYNC
	ldrh	w1, [x22]
	mov	x0, x19
	bl	_write_INT_STAT
	bl	_SSYNC
LBB0_9:
Lloh14:
	adrp	x22, _RCVSERV@GOTPAGE
Lloh15:
	ldr	x22, [x22, _RCVSERV@GOTPAGEOFF]
	ldrh	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_20
; %bb.10:
	ldr	w8, [x19, #36]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.11:
	mov	x0, x19
	bl	_read_RCV_DATA8
	ldp	x8, x9, [x19, #8]
	str	w0, [x8]
Lloh16:
	adrp	x10, _TWI_I2C_MODE_COMBINED@GOTPAGE
Lloh17:
	ldr	x10, [x10, _TWI_I2C_MODE_COMBINED@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_17
; %bb.12:
Lloh19:
	adrp	x9, _TWI_I2C_MODE_STANDARDSUB@GOTPAGE
Lloh20:
	ldr	x9, [x9, _TWI_I2C_MODE_STANDARDSUB@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	str	x9, [x19, #16]
	ldr	w9, [x19, #36]
	cmp	w9, #1
	b.ne	LBB0_18
; %bb.13:
	ldr	w9, [x19, #24]
	cmp	w9, #0
	mov	w9, #1
	csinc	w9, w9, w0, eq
	b	LBB0_18
LBB0_14:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_38
; %bb.15:
	mov	x0, x19
	bl	_read_MASTER_CTL
Lloh22:
	adrp	x8, _STOP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _STOP@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w1, w8, w0
LBB0_16:
	mov	x0, x19
	bl	_write_MASTER_CTL
	bl	_SSYNC
	b	LBB0_19
LBB0_17:
	ldr	w9, [x19, #36]
LBB0_18:
	add	x8, x8, #4
	str	x8, [x19, #8]
	sub	w8, w9, #1
	str	w8, [x19, #36]
LBB0_19:
	ldrh	w1, [x22]
	mov	x0, x19
	bl	_write_INT_STAT
	bl	_SSYNC
LBB0_20:
Lloh25:
	adrp	x8, _MERR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MERR@GOTPAGEOFF]
	ldrh	w1, [x8]
	tst	w1, w21
	b.eq	LBB0_25
; %bb.21:
	mov	x0, x19
	bl	_write_INT_STAT
	mov	x0, x19
	mov	w1, #0
	bl	_write_INT_MASK
	mov	x0, x19
	mov	w1, #62
	bl	_write_MASTER_STAT
	mov	x0, x19
	mov	w1, #0
	bl	_write_MASTER_CTL
	bl	_SSYNC
Lloh27:
	adrp	x8, _EIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19, #40]
Lloh30:
	adrp	x8, _MCOMP@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MCOMP@GOTPAGEOFF]
	ldrh	w1, [x8]
	tst	w1, w21
	b.eq	LBB0_42
; %bb.22:
	mov	x0, x19
	bl	_write_INT_STAT
	mov	x0, x19
	mov	w1, #0
	bl	_write_INT_MASK
	mov	x0, x19
	mov	w1, #0
	bl	_write_MASTER_CTL
	bl	_SSYNC
	ldr	w8, [x19]
	cbz	w8, LBB0_30
LBB0_23:
Lloh32:
	adrp	x8, _ANAK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ANAK@GOTPAGEOFF]
	ldrh	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_42
; %bb.24:
	mov	w8, #0
	b	LBB0_32
LBB0_25:
Lloh34:
	adrp	x8, _MCOMP@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MCOMP@GOTPAGEOFF]
	ldrh	w1, [x8]
	tst	w1, w21
	b.eq	LBB0_33
; %bb.26:
	mov	x0, x19
	bl	_write_INT_STAT
	bl	_SSYNC
	ldr	x8, [x19, #16]
Lloh36:
	adrp	x9, _TWI_I2C_MODE_COMBINED@GOTPAGE
Lloh37:
	ldr	x9, [x9, _TWI_I2C_MODE_COMBINED@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_34
; %bb.27:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_47
; %bb.28:
	mov	x0, x19
	bl	_read_MASTER_CTL
	and	w8, w0, #0xffffc03f
	ldr	w9, [x19, #36]
LBB0_29:
	orr	w1, w8, w9, lsl #6
	b	LBB0_48
LBB0_30:
Lloh39:
	adrp	x8, _BUFRDERR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _BUFRDERR@GOTPAGEOFF]
	ldrh	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_23
; %bb.31:
	mov	w8, #1
LBB0_32:
	str	w8, [x19, #40]
	b	LBB0_42
LBB0_33:
	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
LBB0_34:
Lloh41:
	adrp	x9, _TWI_I2C_MODE_REPEAT@GOTPAGE
Lloh42:
	ldr	x9, [x9, _TWI_I2C_MODE_REPEAT@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_41
; %bb.35:
	ldp	w8, w9, [x19, #28]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x8, x8, #1
	cmp	w8, w9
	b.ge	LBB0_41
; %bb.36:
	str	w8, [x19, #28]
	ldr	x9, [x19, #48]
	mov	w20, #24
	madd	x8, x8, x20, x9
	ldr	x9, [x8, #8]
	str	x9, [x19, #8]
	ldp	w9, w1, [x8, #16]
	str	w9, [x19, #36]
	str	w9, [x19]
	mov	x0, x19
	bl	_write_MASTER_ADDR
	ldr	x8, [x19, #48]
	ldrsw	x9, [x19, #28]
	mul	x10, x9, x20
	ldr	w10, [x8, x10]
Lloh44:
	adrp	x11, _I2C_M_RD@GOTPAGE
Lloh45:
	ldr	x11, [x11, _I2C_M_RD@GOTPAGEOFF]
Lloh46:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_50
; %bb.37:
Lloh47:
	adrp	x10, _I2C_SMBUS_READ@GOTPAGE
Lloh48:
	ldr	x10, [x10, _I2C_SMBUS_READ@GOTPAGEOFF]
Lloh49:
	ldr	w10, [x10]
	str	w10, [x19, #56]
	b	LBB0_52
LBB0_38:
	ldr	x8, [x19, #16]
Lloh50:
	adrp	x9, _TWI_I2C_MODE_REPEAT@GOTPAGE
Lloh51:
	ldr	x9, [x9, _TWI_I2C_MODE_REPEAT@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.39:
	ldp	w8, w9, [x19, #28]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x8, x8, #1
	cmp	w8, w9
	b.ge	LBB0_19
; %bb.40:
	ldr	x9, [x19, #48]
	mov	w10, #24
	mul	x8, x8, x10
	ldr	w23, [x9, x8]
Lloh53:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh54:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh55:
	ldr	w24, [x8]
	mov	x0, x19
	bl	_read_MASTER_CTL
Lloh56:
	adrp	x8, _RSTART@GOTPAGE
Lloh57:
	ldr	x8, [x8, _RSTART@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
Lloh59:
	adrp	x9, _MDIR@GOTPAGE
Lloh60:
	ldr	x9, [x9, _MDIR@GOTPAGEOFF]
	orr	w8, w8, w0
Lloh61:
	ldr	w9, [x9]
	bic	w10, w8, w9
	orr	w8, w8, w9
	tst	w24, w23
	csel	w1, w10, w8, eq
	b	LBB0_16
LBB0_41:
	mov	w8, #1
	str	w8, [x19, #40]
	mov	x0, x19
	mov	w1, #0
	bl	_write_INT_MASK
	mov	x0, x19
	mov	w1, #0
	bl	_write_MASTER_CTL
	bl	_SSYNC
LBB0_42:
	add	x0, x19, #44
	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
	b	_complete
LBB0_43:
Lloh62:
	adrp	x9, _TWI_I2C_MODE_REPEAT@GOTPAGE
Lloh63:
	ldr	x9, [x9, _TWI_I2C_MODE_REPEAT@GOTPAGEOFF]
Lloh64:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.44:
	ldp	w8, w9, [x19, #28]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x8, x8, #1
	cmp	w8, w9
	b.ge	LBB0_8
; %bb.45:
	ldr	x9, [x19, #48]
	mov	w10, #24
	mul	x8, x8, x10
	ldr	w8, [x9, x8]
Lloh65:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh66:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh67:
	ldr	w9, [x9]
	and	w23, w9, w8
	mov	x0, x19
	bl	_read_MASTER_CTL
Lloh68:
	adrp	x8, _RSTART@GOTPAGE
Lloh69:
	ldr	x8, [x8, _RSTART@GOTPAGEOFF]
Lloh70:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh71:
	adrp	x9, _MDIR@GOTPAGE
Lloh72:
	ldr	x9, [x9, _MDIR@GOTPAGEOFF]
Lloh73:
	ldr	w9, [x9]
	cbz	w23, LBB0_55
; %bb.46:
	orr	w1, w8, w9
	b	LBB0_7
LBB0_47:
	mov	w8, #1
	str	w8, [x19, #36]
	str	w8, [x19, #24]
	mov	x0, x19
	bl	_read_MASTER_CTL
	orr	w1, w0, #0x3fc0
LBB0_48:
	mov	x0, x19
	bl	_write_MASTER_CTL
LBB0_49:
	mov	x0, x19
	bl	_read_MASTER_CTL
Lloh74:
	adrp	x8, _RSTART@GOTPAGE
Lloh75:
	ldr	x8, [x8, _RSTART@GOTPAGEOFF]
Lloh76:
	ldr	w8, [x8]
	bic	w1, w0, w8
	mov	x0, x19
	bl	_write_MASTER_CTL
	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
	b	_SSYNC
LBB0_50:
Lloh77:
	adrp	x10, _I2C_SMBUS_WRITE@GOTPAGE
Lloh78:
	ldr	x10, [x10, _I2C_SMBUS_WRITE@GOTPAGEOFF]
Lloh79:
	ldr	w10, [x10]
	str	w10, [x19, #56]
	ldr	w10, [x19]
	cmp	w10, #1
	b.lt	LBB0_52
; %bb.51:
	ldr	x8, [x19, #8]
	ldr	w1, [x8], #4
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_write_XMT_DATA8
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	bl	_SSYNC
	ldr	x8, [x19, #48]
	ldrsw	x9, [x19, #28]
LBB0_52:
	mov	w10, #24
	madd	x8, x9, x10, x8
	ldr	w20, [x8, #16]
	mov	x0, x19
	bl	_read_MASTER_CTL
	cmp	w20, #255
	b.gt	LBB0_54
; %bb.53:
	and	w8, w0, #0xffffc03f
	ldr	x9, [x19, #48]
	ldrsw	x10, [x19, #28]
	mov	w11, #24
	madd	x9, x10, x11, x9
	ldr	w9, [x9, #16]
	b	LBB0_29
LBB0_54:
	orr	w1, w0, #0x3fc0
	mov	x0, x19
	bl	_write_MASTER_CTL
	mov	w8, #1
	str	w8, [x19, #24]
	b	LBB0_49
LBB0_55:
	bic	w1, w8, w9
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.cfi_endproc
                                        ; -- End function
	.comm	_XMTSERV,2,1                    ; @XMTSERV
	.comm	_TWI_I2C_MODE_COMBINED,8,3      ; @TWI_I2C_MODE_COMBINED
	.comm	_MDIR,4,2                       ; @MDIR
	.comm	_RSTART,4,2                     ; @RSTART
	.comm	_STOP,4,2                       ; @STOP
	.comm	_TWI_I2C_MODE_REPEAT,8,3        ; @TWI_I2C_MODE_REPEAT
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_RCVSERV,2,1                    ; @RCVSERV
	.comm	_TWI_I2C_MODE_STANDARDSUB,8,3   ; @TWI_I2C_MODE_STANDARDSUB
	.comm	_MERR,2,1                       ; @MERR
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MCOMP,2,1                      ; @MCOMP
	.comm	_BUFRDERR,2,1                   ; @BUFRDERR
	.comm	_ANAK,2,1                       ; @ANAK
	.comm	_I2C_SMBUS_READ,4,2             ; @I2C_SMBUS_READ
	.comm	_I2C_SMBUS_WRITE,4,2            ; @I2C_SMBUS_WRITE
	.no_dead_strip	_bfin_twi_handle_interrupt
.subsections_via_symbols
