	.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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	cmpl	$131, %r14d
	jne	LBB0_1
## %bb.2:
	movq	_I2C_BAUD_RATE_FAST@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_I2C_BAUD_RATE_DEF@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_mtx_lock
	movq	_I2C_CONTROL_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_i2c_write_reg
	movq	_I2C_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_i2c_write_reg
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_DELAY
	movq	_I2C_FDR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_i2c_write_reg
	movq	_I2C_DFSRR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_I2C_DFSSR_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_i2c_write_reg
	movl	(%r15), %esi
	movq	_I2C_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_i2c_write_reg
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_DELAY
	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
	.comm	_I2C_BAUD_RATE_FAST,4,2         ## @I2C_BAUD_RATE_FAST
	.comm	_I2C_BAUD_RATE_DEF,4,2          ## @I2C_BAUD_RATE_DEF
	.comm	_I2C_CONTROL_REG,4,2            ## @I2C_CONTROL_REG
	.comm	_I2C_STATUS_REG,4,2             ## @I2C_STATUS_REG
	.comm	_I2C_FDR_REG,4,2                ## @I2C_FDR_REG
	.comm	_I2C_DFSRR_REG,4,2              ## @I2C_DFSRR_REG
	.comm	_I2C_DFSSR_DIV,4,2              ## @I2C_DFSSR_DIV
	.comm	_I2C_ENABLE,4,2                 ## @I2C_ENABLE
	.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	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	x8, _I2C_BAUD_RATE_FAST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_BAUD_RATE_FAST@GOTPAGEOFF]
Lloh2:
	adrp	x9, _I2C_BAUD_RATE_DEF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _I2C_BAUD_RATE_DEF@GOTPAGEOFF]
	cmp	w20, #131
	csel	x8, x8, x9, eq
	ldr	w20, [x8]
	bl	_mtx_lock
Lloh4:
	adrp	x21, _I2C_CONTROL_REG@GOTPAGE
Lloh5:
	ldr	x21, [x21, _I2C_CONTROL_REG@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_i2c_write_reg
Lloh6:
	adrp	x8, _I2C_STATUS_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2C_STATUS_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_i2c_write_reg
	mov	w0, #1000
	bl	_DELAY
Lloh9:
	adrp	x8, _I2C_FDR_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I2C_FDR_REG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_i2c_write_reg
Lloh12:
	adrp	x8, _I2C_DFSRR_REG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I2C_DFSRR_REG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _I2C_DFSSR_DIV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I2C_DFSSR_DIV@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_i2c_write_reg
	ldr	w1, [x21]
Lloh18:
	adrp	x8, _I2C_ENABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _I2C_ENABLE@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_i2c_write_reg
	mov	w0, #1000
	bl	_DELAY
	mov	x0, x19
	bl	_mtx_unlock
Lloh21:
	adrp	x8, _IIC_NOERR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IIC_NOERR@GOTPAGEOFF]
Lloh23:
	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	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_BAUD_RATE_FAST,4,2         ; @I2C_BAUD_RATE_FAST
	.comm	_I2C_BAUD_RATE_DEF,4,2          ; @I2C_BAUD_RATE_DEF
	.comm	_I2C_CONTROL_REG,4,2            ; @I2C_CONTROL_REG
	.comm	_I2C_STATUS_REG,4,2             ; @I2C_STATUS_REG
	.comm	_I2C_FDR_REG,4,2                ; @I2C_FDR_REG
	.comm	_I2C_DFSRR_REG,4,2              ; @I2C_DFSRR_REG
	.comm	_I2C_DFSSR_DIV,4,2              ; @I2C_DFSSR_DIV
	.comm	_I2C_ENABLE,4,2                 ; @I2C_ENABLE
	.comm	_IIC_NOERR,4,2                  ; @IIC_NOERR
	.no_dead_strip	_i2c_reset
.subsections_via_symbols
