	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_twi_xfer
_at91_twi_xfer:                         ## @at91_twi_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_i2c_get_adapdata
	movq	%rax, %r13
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_dev_dbg
	movl	28(%r13), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	cmpl	$2, %r12d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	jne	LBB0_22
## %bb.3:
	movl	(%r15), %r14d
	testl	%r14d, %r14d
	jle	LBB0_4
## %bb.5:
	movq	8(%r15), %r10
	movq	_AT91_TWI_IADRSZ_1@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%edx, %edx
	cmpl	$8, %r14d
	jae	LBB0_7
## %bb.6:
	xorl	%r11d, %r11d
	jmp	LBB0_15
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_33
LBB0_4:
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	jmp	LBB0_21
LBB0_7:
	leaq	-1(%r14), %rax
	leal	-1(%r14), %ecx
	movl	%ecx, %esi
	subl	%eax, %esi
	xorl	%r11d, %r11d
	cmpl	%ecx, %esi
	jg	LBB0_15
## %bb.8:
	shrq	$32, %rax
	jne	LBB0_15
## %bb.9:
	movl	%r14d, %r11d
	andl	$-8, %r11d
	leaq	-8(%r11), %rsi
	movq	%rsi, %rcx
	shrq	$3, %rcx
	incq	%rcx
	movl	%ecx, %eax
	andl	$7, %eax
	cmpq	$56, %rsi
	jb	LBB0_12
## %bb.10:
	andq	$-8, %rcx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	addq	$-8, %rcx
	jne	LBB0_11
LBB0_12:
	testq	%rax, %rax
	je	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	decq	%rax
	jne	LBB0_13
LBB0_14:
	cmpq	%r14, %r11
	je	LBB0_20
LBB0_15:
	movq	%r14, %r9
	subq	%r11, %r9
	movq	%r11, %rax
	notq	%rax
	addq	%r14, %rax
	je	LBB0_18
## %bb.16:
	movq	%r9, %rbx
	andq	$-2, %rbx
	leal	(,%r11,8), %esi
	movl	%r11d, %eax
	notl	%eax
	addl	%r14d, %eax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	cltq
	movl	(%r10,%rax,4), %edi
	movl	%esi, %ecx
	shll	%cl, %edi
	orl	%edx, %edi
	movl	%r11d, %ecx
	xorl	$-2, %ecx
	addl	%r14d, %ecx
	movslq	%ecx, %rcx
	movl	(%r10,%rcx,4), %edx
	leal	8(%rsi), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	orl	%edi, %edx
	addq	$2, %r11
	addl	$16, %esi
	addl	$-2, %eax
	addq	$-2, %rbx
	jne	LBB0_17
LBB0_18:
	testb	$1, %r9b
	je	LBB0_20
## %bb.19:
	movl	%r11d, %eax
	notl	%eax
	addl	%r14d, %eax
	cltq
	movl	(%r10,%rax,4), %eax
	shll	$3, %r11d
	movl	%r11d, %ecx
	shll	%cl, %eax
	orl	%edx, %eax
	movl	%eax, %edx
LBB0_20:
	imull	%r8d, %r14d
LBB0_21:
	addq	$24, %r15
	movq	_AT91_TWI_IADR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_at91_twi_write
LBB0_22:
	movl	$0, (%r13)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	40(%r13), %rax
	andl	16(%r15), %r12d
	cmpq	$0, (%rax)
	je	LBB0_23
## %bb.24:
	movslq	(%r15), %rax
	movq	_AT91_TWI_CR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testq	%rax, %rax
	jle	LBB0_29
## %bb.25:
	movq	_AT91_I2C_MAX_ALT_CMD_DATA_SIZE@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jle	LBB0_29
## %bb.26:
	movq	_AT91_TWI_ACMEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_at91_twi_write
	movq	_AT91_TWI_ACR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movslq	(%r15), %rdi
	callq	_AT91_TWI_ACR_DATAL
	movl	%r12d, %edx
	testl	%r12d, %r12d
	je	LBB0_28
## %bb.27:
	movq	_AT91_TWI_ACR_DIR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_28:
	orl	%eax, %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_at91_twi_write
	movl	$1, (%r13)
	xorl	%eax, %eax
	jmp	LBB0_30
LBB0_23:
	movb	$1, %al
	jmp	LBB0_30
LBB0_29:
	movq	_AT91_TWI_ACMDIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_at91_twi_write
	cmpl	$0, (%r13)
	sete	%al
LBB0_30:
	movq	_AT91_TWI_MMR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	20(%r15), %edx
	shll	$16, %edx
	orl	%r14d, %edx
	testl	%r12d, %r12d
	je	LBB0_32
## %bb.31:
	movq	_AT91_TWI_MREAD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
LBB0_32:
	xorl	%ecx, %ecx
	testb	%al, %al
	cmovnel	%r12d, %ecx
	orl	%ecx, %edx
	movq	%r13, %rdi
	callq	_at91_twi_write
	movslq	(%r15), %rax
	movq	%rax, 8(%r13)
	movq	8(%r15), %rax
	movq	%rax, 16(%r13)
	movq	%r15, 32(%r13)
	movl	$0, 24(%r13)
	movq	%r13, %rdi
	callq	_at91_do_twi_transfer
	testl	%eax, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmovsl	%eax, %ebx
LBB0_33:
	movl	28(%r13), %edi
	callq	_pm_runtime_mark_last_busy
	movl	28(%r13), %edi
	callq	_pm_runtime_put_autosuspend
	movl	%ebx, %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	"at91_xfer: processing %d messages:\n"

	.comm	_AT91_TWI_IADRSZ_1,8,3          ## @AT91_TWI_IADRSZ_1
	.comm	_AT91_TWI_IADR,4,2              ## @AT91_TWI_IADR
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_AT91_I2C_MAX_ALT_CMD_DATA_SIZE,8,3 ## @AT91_I2C_MAX_ALT_CMD_DATA_SIZE
	.comm	_AT91_TWI_CR,4,2                ## @AT91_TWI_CR
	.comm	_AT91_TWI_ACMEN,4,2             ## @AT91_TWI_ACMEN
	.comm	_AT91_TWI_ACR,4,2               ## @AT91_TWI_ACR
	.comm	_AT91_TWI_ACR_DIR,4,2           ## @AT91_TWI_ACR_DIR
	.comm	_AT91_TWI_ACMDIS,4,2            ## @AT91_TWI_ACMDIS
	.comm	_AT91_TWI_MMR,4,2               ## @AT91_TWI_MMR
	.comm	_AT91_TWI_MREAD,4,2             ## @AT91_TWI_MREAD
	.no_dead_strip	_at91_twi_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function at91_twi_xfer
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_at91_twi_xfer:                         ; @at91_twi_xfer
	.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, x2
	mov	x21, x1
	mov	x22, x0
	bl	_i2c_get_adapdata
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x20
	bl	_dev_dbg
	ldr	w0, [x19, #28]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_5
; %bb.1:
	cmp	w20, #2
	b.ne	LBB0_6
; %bb.2:
	mov	x22, x21
	ldr	w8, [x22], #24
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	ldr	x10, [x21, #8]
Lloh2:
	adrp	x9, _AT91_TWI_IADRSZ_1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AT91_TWI_IADRSZ_1@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, #16
	b.hs	LBB0_8
; %bb.4:
	mov	x11, #0
	mov	w2, #0
	b	LBB0_13
LBB0_5:
	mov	x22, x0
	b	LBB0_24
LBB0_6:
	mov	w23, #0
	b	LBB0_17
LBB0_7:
	mov	w23, #0
	mov	w2, #0
	b	LBB0_16
LBB0_8:
	mov	w2, #0
	mov	x11, #0
	sub	x12, x8, #1
	sub	w13, w8, #1
	sub	w14, w13, w12
	cmp	w14, w13
	b.gt	LBB0_13
; %bb.9:
	lsr	x13, x12, #32
	cbnz	x13, LBB0_13
; %bb.10:
	movi.2d	v0, #0000000000000000
	movi.4s	v1, #32
Lloh5:
	adrp	x11, lCPI0_0@PAGE
Lloh6:
	ldr	q2, [x11, lCPI0_0@PAGEOFF]
	and	x11, x8, #0xfffffff0
	movi.4s	v3, #64
	movi.4s	v4, #96
	movi.4s	v5, #16
	mov	x13, x11
	movi.2d	v6, #0000000000000000
	movi.2d	v7, #0000000000000000
	movi.2d	v16, #0000000000000000
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x14, x10, w12, sxtw #2
	ldur	q17, [x14, #-12]
	rev64.4s	v17, v17
	ext.16b	v17, v17, v17, #8
	ldur	q18, [x14, #-28]
	rev64.4s	v18, v18
	ext.16b	v18, v18, v18, #8
	ldur	q19, [x14, #-44]
	rev64.4s	v19, v19
	ext.16b	v19, v19, v19, #8
	ldur	q20, [x14, #-60]
	rev64.4s	v20, v20
	ext.16b	v20, v20, v20, #8
	shl.4s	v21, v2, #3
	add.4s	v22, v21, v1
	add.4s	v23, v21, v3
	add.4s	v24, v21, v4
	ushl.4s	v17, v17, v21
	ushl.4s	v18, v18, v22
	ushl.4s	v19, v19, v23
	ushl.4s	v20, v20, v24
	orr.16b	v0, v17, v0
	orr.16b	v6, v18, v6
	orr.16b	v7, v19, v7
	orr.16b	v16, v20, v16
	add.4s	v2, v2, v5
	sub	w12, w12, #16
	sub	x13, x13, #16
	cbnz	x13, LBB0_11
; %bb.12:
	orr.16b	v0, v6, v0
	orr.16b	v0, v7, v0
	orr.16b	v0, v16, v0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	fmov	w12, s0
	mov.s	w13, v0[1]
	orr	w2, w12, w13
	cmp	x11, x8
	b.eq	LBB0_15
LBB0_13:
	lsl	w12, w11, #3
	mvn	w13, w11
	add	w13, w13, w8
	sub	x11, x8, x11
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x10, w13, sxtw #2]
	lsl	w14, w14, w12
	orr	w2, w14, w2
	add	w12, w12, #8
	sub	w13, w13, #1
	subs	x11, x11, #1
	b.ne	LBB0_14
LBB0_15:
	mul	w23, w8, w9
LBB0_16:
Lloh7:
	adrp	x8, _AT91_TWI_IADR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AT91_TWI_IADR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_at91_twi_write
	mov	x21, x22
LBB0_17:
	str	wzr, [x19]
	ldr	w8, [x21, #16]
Lloh10:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh11:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	and	w24, w9, w8
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	cbz	x8, LBB0_21
; %bb.18:
	ldrsw	x8, [x21]
Lloh13:
	adrp	x9, _AT91_TWI_CR@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AT91_TWI_CR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x9]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.19:
Lloh16:
	adrp	x9, _AT91_I2C_MAX_ALT_CMD_DATA_SIZE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AT91_I2C_MAX_ALT_CMD_DATA_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.le	LBB0_22
; %bb.20:
Lloh19:
	adrp	x8, _AT91_TWI_ACMEN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AT91_TWI_ACMEN@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_at91_twi_write
Lloh22:
	adrp	x8, _AT91_TWI_ACR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AT91_TWI_ACR@GOTPAGEOFF]
Lloh24:
	ldr	w22, [x8]
	ldrsw	x0, [x21]
	bl	_AT91_TWI_ACR_DATAL
Lloh25:
	adrp	x8, _AT91_TWI_ACR_DIR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AT91_TWI_ACR_DIR@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w24, #0
	csel	w8, wzr, w8, eq
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x22
	bl	_at91_twi_write
	mov	w8, #0
	mov	w9, #1
	str	w9, [x19]
	b	LBB0_23
LBB0_21:
	mov	w8, #1
	b	LBB0_23
LBB0_22:
Lloh28:
	adrp	x8, _AT91_TWI_ACMDIS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AT91_TWI_ACMDIS@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_at91_twi_write
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w8, eq
LBB0_23:
Lloh31:
	adrp	x9, _AT91_TWI_MMR@GOTPAGE
Lloh32:
	ldr	x9, [x9, _AT91_TWI_MMR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x9]
	ldr	w9, [x21, #20]
	orr	w9, w23, w9, lsl #16
	cmp	w24, #0
	cset	w10, ne
Lloh34:
	adrp	x11, _AT91_TWI_MREAD@GOTPAGE
Lloh35:
	ldr	x11, [x11, _AT91_TWI_MREAD@GOTPAGEOFF]
Lloh36:
	ldr	w11, [x11]
	tst	w8, w10
	csel	w8, w11, wzr, ne
	orr	w2, w9, w8
	mov	x0, x19
	bl	_at91_twi_write
	ldrsw	x8, [x21]
	ldr	x9, [x21, #8]
	stp	x8, x9, [x19, #8]
	str	x21, [x19, #32]
	str	wzr, [x19, #24]
	mov	x0, x19
	bl	_at91_do_twi_transfer
	cmp	w0, #0
	csel	w22, w0, w20, lt
LBB0_24:
	ldr	w0, [x19, #28]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19, #28]
	bl	_pm_runtime_put_autosuspend
	mov	x0, x22
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"at91_xfer: processing %d messages:\n"

	.comm	_AT91_TWI_IADRSZ_1,8,3          ; @AT91_TWI_IADRSZ_1
	.comm	_AT91_TWI_IADR,4,2              ; @AT91_TWI_IADR
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_AT91_I2C_MAX_ALT_CMD_DATA_SIZE,8,3 ; @AT91_I2C_MAX_ALT_CMD_DATA_SIZE
	.comm	_AT91_TWI_CR,4,2                ; @AT91_TWI_CR
	.comm	_AT91_TWI_ACMEN,4,2             ; @AT91_TWI_ACMEN
	.comm	_AT91_TWI_ACR,4,2               ; @AT91_TWI_ACR
	.comm	_AT91_TWI_ACR_DIR,4,2           ; @AT91_TWI_ACR_DIR
	.comm	_AT91_TWI_ACMDIS,4,2            ; @AT91_TWI_ACMDIS
	.comm	_AT91_TWI_MMR,4,2               ; @AT91_TWI_MMR
	.comm	_AT91_TWI_MREAD,4,2             ; @AT91_TWI_MREAD
	.no_dead_strip	_at91_twi_xfer
.subsections_via_symbols
