	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_stop
_i2c_stop:                              ## @i2c_stop
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	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_IBCR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_IBCR_NOACK@GOTPCREL(%rip), %r15
	movq	_IBCR_IBIE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_WRITE1
	movl	$100, %edi
	callq	_DELAY
	movq	%rbx, %rdi
	callq	_wait_for_nibb
	movq	_IIC_ETIMEOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	(%r14), %esi
	movq	_IBCR_MDIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_WRITE1
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_DELAY
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_WRITE1
LBB0_2:
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movq	_IIC_NOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c stop\n"

	.comm	_I2C_IBCR,4,2                   ## @I2C_IBCR
	.comm	_IBCR_NOACK,4,2                 ## @IBCR_NOACK
	.comm	_IBCR_IBIE,4,2                  ## @IBCR_IBIE
	.comm	_IIC_ETIMEOUT,8,3               ## @IIC_ETIMEOUT
	.comm	_IBCR_MDIS,4,2                  ## @IBCR_MDIS
	.comm	_IIC_NOERR,4,2                  ## @IIC_NOERR
	.no_dead_strip	_i2c_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_stop
_i2c_stop:                              ; @i2c_stop
	.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
	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	x20, _I2C_IBCR@GOTPAGE
Lloh3:
	ldr	x20, [x20, _I2C_IBCR@GOTPAGEOFF]
Lloh4:
	adrp	x21, _IBCR_NOACK@GOTPAGE
Lloh5:
	ldr	x21, [x21, _IBCR_NOACK@GOTPAGEOFF]
	ldr	w1, [x20]
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _IBCR_IBIE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IBCR_IBIE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_WRITE1
	mov	w0, #100
	bl	_DELAY
	mov	x0, x19
	bl	_wait_for_nibb
Lloh9:
	adrp	x8, _IIC_ETIMEOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IIC_ETIMEOUT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	ldr	w1, [x20]
Lloh12:
	adrp	x8, _IBCR_MDIS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IBCR_MDIS@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_WRITE1
	mov	w0, #1000
	bl	_DELAY
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_WRITE1
LBB0_2:
	mov	x0, x19
	bl	_mtx_unlock
Lloh15:
	adrp	x8, _IIC_NOERR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IIC_NOERR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c stop\n"

	.comm	_I2C_IBCR,4,2                   ; @I2C_IBCR
	.comm	_IBCR_NOACK,4,2                 ; @IBCR_NOACK
	.comm	_IBCR_IBIE,4,2                  ; @IBCR_IBIE
	.comm	_IIC_ETIMEOUT,8,3               ; @IIC_ETIMEOUT
	.comm	_IBCR_MDIS,4,2                  ; @IBCR_MDIS
	.comm	_IIC_NOERR,4,2                  ; @IIC_NOERR
	.no_dead_strip	_i2c_stop
.subsections_via_symbols
