	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_start
_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_vf_i2c_dbg
	movq	%rbx, %rdi
	callq	_mtx_lock
	movq	_I2C_IBAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_WRITE1
	movq	_I2C_IBSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_READ1
	movq	_IBSR_IBB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_mtx_unlock
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_vf_i2c_dbg
	movq	_IIC_EBUSERR@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %r14d
	jmp	LBB0_6
LBB0_2:
	movq	_IBCR_MSSL@GOTPCREL(%rip), %rax
	movq	_IBCR_NOACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	orl	(%rax), %r15d
	movq	_IBCR_IBIE@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_I2C_IBCR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_WRITE1
	movl	$100, %edi
	callq	_DELAY
	movq	_IBCR_TXRX@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_WRITE1
	movq	_I2C_IBDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_WRITE1
	movq	%rbx, %rdi
	callq	_wait_for_iif
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mtx_unlock
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_vf_i2c_dbg
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_IIC_NOERR@GOTPCREL(%rip), %rax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c start\n"

	.comm	_I2C_IBAD,4,2                   ## @I2C_IBAD
	.comm	_I2C_IBSR,4,2                   ## @I2C_IBSR
	.comm	_IBSR_IBB,4,2                   ## @IBSR_IBB
L_.str.1:                               ## @.str.1
	.asciz	"cant i2c start: IIC_EBUSBSY\n"

	.comm	_IIC_EBUSERR,4,2                ## @IIC_EBUSERR
	.comm	_IBCR_MSSL,4,2                  ## @IBCR_MSSL
	.comm	_IBCR_NOACK,4,2                 ## @IBCR_NOACK
	.comm	_IBCR_IBIE,4,2                  ## @IBCR_IBIE
	.comm	_I2C_IBCR,4,2                   ## @I2C_IBCR
	.comm	_IBCR_TXRX,4,2                  ## @IBCR_TXRX
	.comm	_I2C_IBDR,4,2                   ## @I2C_IBDR
L_.str.2:                               ## @.str.2
	.asciz	"cant i2c start: iif error\n"

	.comm	_IIC_NOERR,4,2                  ## @IIC_NOERR
	.no_dead_strip	_i2c_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_start
_i2c_start:                             ; @i2c_start
	.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	x20, x1
	bl	_device_get_softc
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_vf_i2c_dbg
	mov	x0, x19
	bl	_mtx_lock
Lloh2:
	adrp	x8, _I2C_IBAD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2C_IBAD@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_WRITE1
Lloh5:
	adrp	x8, _I2C_IBSR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I2C_IBSR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_READ1
Lloh8:
	adrp	x8, _IBSR_IBB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IBSR_IBB@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_mtx_unlock
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_vf_i2c_dbg
Lloh13:
	adrp	x8, _IIC_EBUSERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IIC_EBUSERR@GOTPAGEOFF]
LBB0_2:
	ldr	w20, [x8]
	b	LBB0_5
LBB0_3:
Lloh15:
	adrp	x8, _IBCR_MSSL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IBCR_MSSL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _IBCR_NOACK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _IBCR_NOACK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _IBCR_IBIE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _IBCR_IBIE@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh23:
	ldr	w9, [x10]
	orr	w21, w8, w9
Lloh24:
	adrp	x22, _I2C_IBCR@GOTPAGE
Lloh25:
	ldr	x22, [x22, _I2C_IBCR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_WRITE1
	mov	w0, #100
	bl	_DELAY
Lloh26:
	adrp	x8, _IBCR_TXRX@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IBCR_TXRX@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	orr	w2, w8, w21
	ldr	w1, [x22]
	mov	x0, x19
	bl	_WRITE1
Lloh29:
	adrp	x8, _I2C_IBDR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _I2C_IBDR@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_WRITE1
	mov	x0, x19
	bl	_wait_for_iif
	mov	x20, x0
	mov	x0, x19
	bl	_mtx_unlock
	cbz	w20, LBB0_6
; %bb.4:
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_vf_i2c_dbg
LBB0_5:
	mov	x0, x20
	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
LBB0_6:
Lloh34:
	adrp	x8, _IIC_NOERR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IIC_NOERR@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c start\n"

	.comm	_I2C_IBAD,4,2                   ; @I2C_IBAD
	.comm	_I2C_IBSR,4,2                   ; @I2C_IBSR
	.comm	_IBSR_IBB,4,2                   ; @IBSR_IBB
l_.str.1:                               ; @.str.1
	.asciz	"cant i2c start: IIC_EBUSBSY\n"

	.comm	_IIC_EBUSERR,4,2                ; @IIC_EBUSERR
	.comm	_IBCR_MSSL,4,2                  ; @IBCR_MSSL
	.comm	_IBCR_NOACK,4,2                 ; @IBCR_NOACK
	.comm	_IBCR_IBIE,4,2                  ; @IBCR_IBIE
	.comm	_I2C_IBCR,4,2                   ; @I2C_IBCR
	.comm	_IBCR_TXRX,4,2                  ; @IBCR_TXRX
	.comm	_I2C_IBDR,4,2                   ; @I2C_IBDR
l_.str.2:                               ; @.str.2
	.asciz	"cant i2c start: iif error\n"

	.comm	_IIC_NOERR,4,2                  ; @IIC_NOERR
	.no_dead_strip	_i2c_start
.subsections_via_symbols
