	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2c_start                      ## -- Begin function i2c_start
	.p2align	4, 0x90
_i2c_start:                             ## @i2c_start
	.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, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_TWINT@GOTPCREL(%rip), %r12
	movq	_TWSTA@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movb	(%r12), %cl
	movl	$1, %r14d
	btsl	%ecx, %eax
	movq	_TWEN@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	movq	_TWCR@GOTPCREL(%rip), %r13
	movl	%eax, (%r13)
	xorl	%eax, %eax
	callq	_timer_read
	movq	%rax, %r15
	movl	(%r13), %eax
	movl	(%r12), %ecx
	shll	%cl, %r14d
	btl	%ecx, %eax
	jae	LBB0_8
LBB0_1:
	movq	_TW_STATUS@GOTPCREL(%rip), %r15
	movl	$248, %eax
	andl	(%r15), %eax
	movq	_TW_START@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.2:
	movq	_TW_REP_START@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.3:
	movq	_I2C_STATUS_ERROR@GOTPCREL(%rip), %rdi
	jmp	LBB0_20
LBB0_4:
	movq	_TWDR@GOTPCREL(%rip), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	_TWEN@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %r14d
	movl	%r14d, (%r13)
	xorl	%eax, %eax
	callq	_timer_read
	movq	%rax, %r14
	movl	(%r13), %eax
	movq	_TWINT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %eax
	jae	LBB0_13
LBB0_5:
	movl	(%r15), %eax
	andl	$248, %eax
	movq	_TW_MT_SLA_ACK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_TW_MR_SLA_ACK@GOTPCREL(%rip), %rsi
	movq	_I2C_STATUS_SUCCESS@GOTPCREL(%rip), %rdx
	movq	%rdx, %rdi
	cmpq	%rax, (%rsi)
	je	LBB0_7
## %bb.6:
	movq	_I2C_STATUS_ERROR@GOTPCREL(%rip), %rdi
LBB0_7:
	cmpq	%rax, %rcx
	cmoveq	%rdx, %rdi
	jmp	LBB0_20
LBB0_8:
	movq	_I2C_TIMEOUT_INFINITE@GOTPCREL(%rip), %r12
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	movl	$1, %r14d
	shll	%cl, %r14d
	btl	%ecx, %eax
	jb	LBB0_1
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%r12)
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	callq	_timer_read
	subq	%r15, %rax
	cmpq	%rbx, %rax
	jge	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r13), %eax
	movq	_TWINT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_9
LBB0_13:
	movq	_I2C_TIMEOUT_INFINITE@GOTPCREL(%rip), %r12
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_15 Depth=1
	btl	%ecx, %eax
	jb	LBB0_5
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%r12)
	je	LBB0_14
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	xorl	%eax, %eax
	callq	_timer_read
	subq	%r14, %rax
	cmpq	%rbx, %rax
	jge	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	(%r13), %eax
	movq	_TWINT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_14
LBB0_19:
	movq	_I2C_STATUS_TIMEOUT@GOTPCREL(%rip), %rdi
LBB0_20:
	movl	(%rdi), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TWCR,4,2                       ## @TWCR
	.comm	_TWINT,4,2                      ## @TWINT
	.comm	_TWSTA,4,2                      ## @TWSTA
	.comm	_TWEN,4,2                       ## @TWEN
	.comm	_I2C_TIMEOUT_INFINITE,8,3       ## @I2C_TIMEOUT_INFINITE
	.comm	_I2C_STATUS_TIMEOUT,4,2         ## @I2C_STATUS_TIMEOUT
	.comm	_TW_STATUS,4,2                  ## @TW_STATUS
	.comm	_TW_START,4,2                   ## @TW_START
	.comm	_TW_REP_START,4,2               ## @TW_REP_START
	.comm	_I2C_STATUS_ERROR,4,2           ## @I2C_STATUS_ERROR
	.comm	_TWDR,8,3                       ## @TWDR
	.comm	_TW_MT_SLA_ACK,8,3              ## @TW_MT_SLA_ACK
	.comm	_TW_MR_SLA_ACK,8,3              ## @TW_MR_SLA_ACK
	.comm	_I2C_STATUS_SUCCESS,4,2         ## @I2C_STATUS_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2c_start                      ; -- Begin function i2c_start
	.p2align	2
_i2c_start:                             ; @i2c_start
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _TWINT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TWINT@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	w26, #1
Lloh2:
	adrp	x9, _TWSTA@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TWSTA@GOTPAGEOFF]
	lsl	w8, w26, w8
Lloh4:
	ldr	w9, [x9]
	lsl	w9, w26, w9
	orr	w8, w9, w8
Lloh5:
	adrp	x25, _TWEN@GOTPAGE
Lloh6:
	ldr	x25, [x25, _TWEN@GOTPAGEOFF]
	ldr	w9, [x25]
	lsl	w9, w26, w9
	orr	w8, w8, w9
Lloh7:
	adrp	x23, _TWCR@GOTPAGE
Lloh8:
	ldr	x23, [x23, _TWCR@GOTPAGEOFF]
	str	w8, [x23]
	bl	_timer_read
	ldr	w8, [x23]
	ldr	w10, [x22]
	lsl	w9, w26, w10
	tst	w9, w8
	b.eq	LBB0_5
LBB0_1:
Lloh9:
	adrp	x21, _TW_STATUS@GOTPAGE
Lloh10:
	ldr	x21, [x21, _TW_STATUS@GOTPAGEOFF]
	ldr	w8, [x21]
	and	w8, w8, #0xf8
Lloh11:
	adrp	x10, _TW_START@GOTPAGE
Lloh12:
	ldr	x10, [x10, _TW_START@GOTPAGEOFF]
Lloh13:
	adrp	x11, _TW_REP_START@GOTPAGE
Lloh14:
	ldr	x11, [x11, _TW_REP_START@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
Lloh16:
	ldr	w11, [x11]
Lloh17:
	adrp	x24, _I2C_STATUS_ERROR@GOTPAGE
Lloh18:
	ldr	x24, [x24, _I2C_STATUS_ERROR@GOTPAGEOFF]
	cmp	w8, w10
	ccmp	w8, w11, #4, ne
	b.ne	LBB0_4
; %bb.2:
Lloh19:
	adrp	x8, _TWDR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TWDR@GOTPAGEOFF]
Lloh21:
	str	x20, [x8]
	ldr	w8, [x25]
	mov	w10, #1
	lsl	w8, w10, w8
	orr	w8, w8, w9
	str	w8, [x23]
	bl	_timer_read
	ldr	w8, [x23]
	ldr	w9, [x22]
	lsr	w10, w8, w9
	tbz	w10, #0, LBB0_10
LBB0_3:
	ldr	w8, [x21]
	and	x8, x8, #0xf8
Lloh22:
	adrp	x9, _TW_MT_SLA_ACK@GOTPAGE
Lloh23:
	ldr	x9, [x9, _TW_MT_SLA_ACK@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
Lloh25:
	adrp	x10, _TW_MR_SLA_ACK@GOTPAGE
Lloh26:
	ldr	x10, [x10, _TW_MR_SLA_ACK@GOTPAGEOFF]
Lloh27:
	ldr	x10, [x10]
	cmp	x10, x8
	ccmp	x9, x8, #4, ne
Lloh28:
	adrp	x8, _I2C_STATUS_SUCCESS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _I2C_STATUS_SUCCESS@GOTPAGEOFF]
	csel	x24, x8, x24, eq
LBB0_4:
	ldr	w0, [x24]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x21, x0
Lloh30:
	adrp	x27, _I2C_TIMEOUT_INFINITE@GOTPAGE
Lloh31:
	ldr	x27, [x27, _I2C_TIMEOUT_INFINITE@GOTPAGEOFF]
Lloh32:
	adrp	x24, _I2C_STATUS_TIMEOUT@GOTPAGE
Lloh33:
	ldr	x24, [x24, _I2C_STATUS_TIMEOUT@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	lsl	w9, w26, w10
	tst	w9, w8
	b.ne	LBB0_1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x27]
	cmp	x9, x19
	b.eq	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_timer_read
	sub	x8, x0, x21
	cmp	x8, x19
	b.ge	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x23]
	ldr	w10, [x22]
	b	LBB0_6
LBB0_10:
	mov	x20, x0
Lloh34:
	adrp	x26, _I2C_TIMEOUT_INFINITE@GOTPAGE
Lloh35:
	ldr	x26, [x26, _I2C_TIMEOUT_INFINITE@GOTPAGEOFF]
Lloh36:
	adrp	x25, _I2C_STATUS_TIMEOUT@GOTPAGE
Lloh37:
	ldr	x25, [x25, _I2C_STATUS_TIMEOUT@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	lsr	w10, w8, w9
	tbnz	w10, #0, LBB0_3
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x26]
	cmp	x10, x19
	b.eq	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_timer_read
	sub	x8, x0, x20
	cmp	x8, x19
	b.ge	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x23]
	ldr	w9, [x22]
	b	LBB0_11
LBB0_15:
	mov	x24, x25
	b	LBB0_4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_TWCR,4,2                       ; @TWCR
	.comm	_TWINT,4,2                      ; @TWINT
	.comm	_TWSTA,4,2                      ; @TWSTA
	.comm	_TWEN,4,2                       ; @TWEN
	.comm	_I2C_TIMEOUT_INFINITE,8,3       ; @I2C_TIMEOUT_INFINITE
	.comm	_I2C_STATUS_TIMEOUT,4,2         ; @I2C_STATUS_TIMEOUT
	.comm	_TW_STATUS,4,2                  ; @TW_STATUS
	.comm	_TW_START,4,2                   ; @TW_START
	.comm	_TW_REP_START,4,2               ; @TW_REP_START
	.comm	_I2C_STATUS_ERROR,4,2           ; @I2C_STATUS_ERROR
	.comm	_TWDR,8,3                       ; @TWDR
	.comm	_TW_MT_SLA_ACK,8,3              ; @TW_MT_SLA_ACK
	.comm	_TW_MR_SLA_ACK,8,3              ; @TW_MR_SLA_ACK
	.comm	_I2C_STATUS_SUCCESS,4,2         ; @I2C_STATUS_SUCCESS
.subsections_via_symbols
