	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_twi_write_next_byte
_at91_twi_write_next_byte:              ## @at91_twi_write_next_byte
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	cmpq	$0, (%rdi)
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	movq	_AT91_TWI_THR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%rbx), %rsi
	callq	_writeb_relaxed
	movq	(%rbx), %rcx
	decq	%rcx
	movq	%rcx, (%rbx)
	jne	LBB0_5
## %bb.2:
	cmpl	$0, 20(%rbx)
	jne	LBB0_4
## %bb.3:
	movq	_AT91_TWI_CR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AT91_TWI_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_at91_twi_write
LBB0_4:
	movq	_AT91_TWI_IDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AT91_TWI_TXRDY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_at91_twi_write
	movq	(%rbx), %rcx
LBB0_5:
	movl	16(%rbx), %edi
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	addq	$4, 8(%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AT91_TWI_THR,8,3               ## @AT91_TWI_THR
	.comm	_AT91_TWI_CR,4,2                ## @AT91_TWI_CR
	.comm	_AT91_TWI_STOP,4,2              ## @AT91_TWI_STOP
	.comm	_AT91_TWI_IDR,4,2               ## @AT91_TWI_IDR
	.comm	_AT91_TWI_TXRDY,4,2             ## @AT91_TWI_TXRDY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrote 0x%x, to go %zu\n"

	.no_dead_strip	_at91_twi_write_next_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at91_twi_write_next_byte
_at91_twi_write_next_byte:              ; @at91_twi_write_next_byte
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	ldr	x8, [x19, #24]
Lloh0:
	adrp	x9, _AT91_TWI_THR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AT91_TWI_THR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writeb_relaxed
	ldr	x8, [x19]
	subs	x3, x8, #1
	str	x3, [x19]
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x19, #20]
	cbnz	w8, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _AT91_TWI_CR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AT91_TWI_CR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _AT91_TWI_STOP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AT91_TWI_STOP@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_at91_twi_write
LBB0_4:
Lloh9:
	adrp	x8, _AT91_TWI_IDR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AT91_TWI_IDR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _AT91_TWI_TXRDY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AT91_TWI_TXRDY@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_at91_twi_write
	ldr	x3, [x19]
LBB0_5:
	ldr	w0, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19, #8]
	add	x8, x8, #4
	str	x8, [x19, #8]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_AT91_TWI_THR,8,3               ; @AT91_TWI_THR
	.comm	_AT91_TWI_CR,4,2                ; @AT91_TWI_CR
	.comm	_AT91_TWI_STOP,4,2              ; @AT91_TWI_STOP
	.comm	_AT91_TWI_IDR,4,2               ; @AT91_TWI_IDR
	.comm	_AT91_TWI_TXRDY,4,2             ; @AT91_TWI_TXRDY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrote 0x%x, to go %zu\n"

	.no_dead_strip	_at91_twi_write_next_byte
.subsections_via_symbols
