	.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	%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
	movl	%esi, %r12d
	callq	_device_get_softc
	movq	%rax, %r15
	leaq	L_.str(%rip), %rdx
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_DEVICE_DEBUGF
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_imx_ccm_ipg_hz
	movq	%rax, %r14
	movl	4(%r15), %edi
	movl	%r12d, %esi
	callq	_IICBUS_GET_FREQUENCY
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_howmany
	movq	%rax, %r12
	movq	_clkdiv_table@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_nitems
	testq	%rax, %rax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	cmpq	%r12, (%rdi,%r14)
	jae	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	callq	_nitems
	addq	$16, %r14
	cmpq	%rax, %rbx
	jb	LBB0_2
LBB0_4:
	movq	(%r13), %rax
	shlq	$4, %rbx
	movq	(%rax,%rbx), %rcx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_5
## %bb.6:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rcx
	jmp	LBB0_7
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ecx
LBB0_7:
	movq	_SBT_1US@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpq	$9000000, %rcx                  ## imm = 0x895440
	ja	LBB0_8
## %bb.9:
	movl	$9000000, %eax                  ## imm = 0x895440
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_10
LBB0_8:
	xorl	%eax, %eax
LBB0_10:
	imull	%eax, %esi
	movl	%esi, (%r15)
	movq	_I2C_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_i2c_write_reg
	movq	_I2C_CONTROL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_i2c_write_reg
	movq	_I2C_FDR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r13), %rax
	movl	8(%rax,%rbx), %edx
	movq	%r15, %rdi
	callq	_i2c_write_reg
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i2c_recover_bus                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset\n"

	.comm	_clkdiv_table,8,3               ## @clkdiv_table
	.comm	_SBT_1US,4,2                    ## @SBT_1US
	.comm	_I2C_STATUS_REG,4,2             ## @I2C_STATUS_REG
	.comm	_I2C_CONTROL_REG,4,2            ## @I2C_CONTROL_REG
	.comm	_I2C_FDR_REG,4,2                ## @I2C_FDR_REG
	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	bl	_device_get_softc
	mov	x19, x0
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_DEVICE_DEBUGF
	bl	_imx_ccm_ipg_hz
	mov	x20, x0
	ldr	w0, [x19, #4]
	mov	x1, x21
	bl	_IICBUS_GET_FREQUENCY
	mov	x1, x0
	mov	x0, x20
	bl	_howmany
	mov	x21, x0
Lloh2:
	adrp	x22, _clkdiv_table@GOTPAGE
Lloh3:
	ldr	x22, [x22, _clkdiv_table@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_nitems
	cbz	x0, LBB0_4
; %bb.1:
	mov	x24, #0
	mov	x23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldr	x8, [x0, x24]
	cmp	x8, x21
	b.hs	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	bl	_nitems
	add	x24, x24, #16
	cmp	x23, x0
	b.lo	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	x23, #0
LBB0_5:
	ldr	x8, [x22]
	lsl	x21, x23, #4
	ldr	x8, [x8, x21]
	udiv	x8, x20, x8
Lloh4:
	adrp	x9, _SBT_1US@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SBT_1US@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	mov	w10, #21568
	movk	w10, #137, lsl #16
	udiv	x8, x10, x8
	mul	w8, w9, w8
	str	w8, [x19]
Lloh7:
	adrp	x8, _I2C_STATUS_REG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _I2C_STATUS_REG@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_i2c_write_reg
Lloh10:
	adrp	x8, _I2C_CONTROL_REG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _I2C_CONTROL_REG@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_i2c_write_reg
Lloh13:
	adrp	x8, _I2C_FDR_REG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _I2C_FDR_REG@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	x8, [x22]
	add	x8, x8, x21
	ldr	w2, [x8, #8]
	mov	x0, x19
	bl	_i2c_write_reg
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_i2c_recover_bus
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset\n"

	.comm	_clkdiv_table,8,3               ; @clkdiv_table
	.comm	_SBT_1US,4,2                    ; @SBT_1US
	.comm	_I2C_STATUS_REG,4,2             ; @I2C_STATUS_REG
	.comm	_I2C_CONTROL_REG,4,2            ; @I2C_CONTROL_REG
	.comm	_I2C_FDR_REG,4,2                ; @I2C_FDR_REG
	.no_dead_strip	_i2c_reset
.subsections_via_symbols
