	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_reset
_i2c_reset:                             ## @i2c_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -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_MDIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_WRITE1
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_DELAY
	movq	_I2C_IBFD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$20, %edx
	callq	_WRITE1
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_WRITE1
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_DELAY
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movq	_IIC_NOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c reset\n"

	.comm	_I2C_IBCR,4,2                   ## @I2C_IBCR
	.comm	_IBCR_MDIS,4,2                  ## @IBCR_MDIS
	.comm	_I2C_IBFD,4,2                   ## @I2C_IBFD
	.comm	_IIC_NOERR,4,2                  ## @IIC_NOERR
	.no_dead_strip	_i2c_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_reset
_i2c_reset:                             ; @i2c_reset
	.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
	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]
	ldr	w1, [x20]
Lloh4:
	adrp	x8, _IBCR_MDIS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IBCR_MDIS@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_WRITE1
	mov	w0, #1000
	bl	_DELAY
Lloh7:
	adrp	x8, _I2C_IBFD@GOTPAGE
Lloh8:
	ldr	x8, [x8, _I2C_IBFD@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #20
	bl	_WRITE1
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_WRITE1
	mov	w0, #1000
	bl	_DELAY
	mov	x0, x19
	bl	_mtx_unlock
Lloh10:
	adrp	x8, _IIC_NOERR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IIC_NOERR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c reset\n"

	.comm	_I2C_IBCR,4,2                   ; @I2C_IBCR
	.comm	_IBCR_MDIS,4,2                  ; @IBCR_MDIS
	.comm	_I2C_IBFD,4,2                   ; @I2C_IBFD
	.comm	_IIC_NOERR,4,2                  ; @IIC_NOERR
	.no_dead_strip	_i2c_reset
.subsections_via_symbols
