	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_i2c_reset
_omap_i2c_reset:                        ## @omap_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
	movq	(%rdi), %rdx
	movq	_OMAP_I2C_OMAP1_REV_2@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	(%rcx), %rdx
	jl	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movq	_OMAP_I2C_SYSC_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_omap_i2c_read_reg
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_OMAP_I2C_CON_REG@GOTPCREL(%rip), %r13
	movl	(%r13), %r12d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_omap_i2c_read_reg
	movq	_OMAP_I2C_CON_EN@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_omap_i2c_write_reg
	movl	(%r15), %esi
	movq	_SYSC_SOFTRESET_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_omap_i2c_write_reg
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	_OMAP_I2C_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	addq	(%r15), %r12
	movl	(%r13), %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_omap_i2c_write_reg
	movq	_OMAP_I2C_SYSS_REG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_omap_i2c_read_reg
	movq	_SYSS_RESETDONE_MASK@GOTPCREL(%rip), %r14
	testl	%eax, (%r14)
	jne	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movq	%r12, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_omap_i2c_read_reg
	testl	%eax, (%r14)
	je	LBB0_3
LBB0_6:
	movq	_OMAP_I2C_SYSC_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_omap_i2c_write_reg
	movq	(%rbx), %rax
	movq	_OMAP_I2C_REV_ON_3430_3530@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_8
## %bb.7:
	movq	$0, 8(%rbx)
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_I2C_OMAP1_REV_2,8,3       ## @OMAP_I2C_OMAP1_REV_2
	.comm	_OMAP_I2C_SYSC_REG,4,2          ## @OMAP_I2C_SYSC_REG
	.comm	_OMAP_I2C_CON_REG,4,2           ## @OMAP_I2C_CON_REG
	.comm	_OMAP_I2C_CON_EN,4,2            ## @OMAP_I2C_CON_EN
	.comm	_SYSC_SOFTRESET_MASK,4,2        ## @SYSC_SOFTRESET_MASK
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_OMAP_I2C_TIMEOUT,8,3           ## @OMAP_I2C_TIMEOUT
	.comm	_OMAP_I2C_SYSS_REG,4,2          ## @OMAP_I2C_SYSS_REG
	.comm	_SYSS_RESETDONE_MASK,4,2        ## @SYSS_RESETDONE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for controller reset\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_OMAP_I2C_REV_ON_3430_3530,8,3  ## @OMAP_I2C_REV_ON_3430_3530
	.no_dead_strip	_omap_i2c_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_i2c_reset
_omap_i2c_reset:                        ; @omap_i2c_reset
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _OMAP_I2C_OMAP1_REV_2@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OMAP_I2C_OMAP1_REV_2@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x22, _OMAP_I2C_SYSC_REG@GOTPAGE
Lloh4:
	ldr	x22, [x22, _OMAP_I2C_SYSC_REG@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_omap_i2c_read_reg
	mov	x20, x0
Lloh5:
	adrp	x24, _OMAP_I2C_CON_REG@GOTPAGE
Lloh6:
	ldr	x24, [x24, _OMAP_I2C_CON_REG@GOTPAGEOFF]
	ldr	w21, [x24]
	mov	x0, x19
	mov	x1, x21
	bl	_omap_i2c_read_reg
Lloh7:
	adrp	x25, _OMAP_I2C_CON_EN@GOTPAGE
Lloh8:
	ldr	x25, [x25, _OMAP_I2C_CON_EN@GOTPAGEOFF]
	ldr	w8, [x25]
	bic	w2, w0, w8
	mov	x0, x19
	mov	x1, x21
	bl	_omap_i2c_write_reg
	ldr	w1, [x22]
Lloh9:
	adrp	x8, _SYSC_SOFTRESET_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SYSC_SOFTRESET_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_omap_i2c_write_reg
Lloh12:
	adrp	x23, _jiffies@GOTPAGE
Lloh13:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x21, [x23]
Lloh14:
	adrp	x8, _OMAP_I2C_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OMAP_I2C_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	x26, [x8]
	ldr	w1, [x24]
	ldr	w2, [x25]
	mov	x0, x19
	bl	_omap_i2c_write_reg
Lloh17:
	adrp	x24, _OMAP_I2C_SYSS_REG@GOTPAGE
Lloh18:
	ldr	x24, [x24, _OMAP_I2C_SYSS_REG@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_omap_i2c_read_reg
Lloh19:
	adrp	x25, _SYSS_RESETDONE_MASK@GOTPAGE
Lloh20:
	ldr	x25, [x25, _SYSS_RESETDONE_MASK@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.2:
	add	x21, x26, x21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	mov	x1, x21
	bl	_time_after
	cbnz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x24]
	mov	x0, x19
	bl	_omap_i2c_read_reg
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_3
LBB0_5:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_omap_i2c_write_reg
	ldr	x8, [x19]
Lloh21:
	adrp	x9, _OMAP_I2C_REV_ON_3430_3530@GOTPAGE
Lloh22:
	ldr	x9, [x9, _OMAP_I2C_REV_ON_3430_3530@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.6:
	mov	w0, #0
	str	xzr, [x19, #8]
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	w0, [x19, #16]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
Lloh26:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_I2C_OMAP1_REV_2,8,3       ; @OMAP_I2C_OMAP1_REV_2
	.comm	_OMAP_I2C_SYSC_REG,4,2          ; @OMAP_I2C_SYSC_REG
	.comm	_OMAP_I2C_CON_REG,4,2           ; @OMAP_I2C_CON_REG
	.comm	_OMAP_I2C_CON_EN,4,2            ; @OMAP_I2C_CON_EN
	.comm	_SYSC_SOFTRESET_MASK,4,2        ; @SYSC_SOFTRESET_MASK
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_OMAP_I2C_TIMEOUT,8,3           ; @OMAP_I2C_TIMEOUT
	.comm	_OMAP_I2C_SYSS_REG,4,2          ; @OMAP_I2C_SYSS_REG
	.comm	_SYSS_RESETDONE_MASK,4,2        ; @SYSS_RESETDONE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for controller reset\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_OMAP_I2C_REV_ON_3430_3530,8,3  ; @OMAP_I2C_REV_ON_3430_3530
	.no_dead_strip	_omap_i2c_reset
.subsections_via_symbols
