	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_repeated_start
_i2c_repeated_start:                    ## @i2c_repeated_start
	.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
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_vf_i2c_dbg
	movq	%rbx, %rdi
	callq	_mtx_lock
	movq	_I2C_IBAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_WRITE1
	movq	_I2C_IBSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_READ1
	movq	_IBSR_IBB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movl	$10, %edi
	callq	_DELAY
	movq	_I2C_IBCR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_READ1
	movq	_IBCR_RSTA@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_IBCR_IBIE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_WRITE1
	movl	$10, %edi
	callq	_DELAY
	movq	_I2C_IBDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_WRITE1
	movq	%rbx, %rdi
	callq	_wait_for_iif
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mtx_unlock
	testl	%r14d, %r14d
	jne	LBB0_5
## %bb.3:
	movq	_IIC_NOERR@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movq	_IIC_EBUSERR@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %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 repeated start\n"

	.comm	_I2C_IBAD,4,2                   ## @I2C_IBAD
	.comm	_I2C_IBSR,4,2                   ## @I2C_IBSR
	.comm	_IBSR_IBB,4,2                   ## @IBSR_IBB
	.comm	_IIC_EBUSERR,4,2                ## @IIC_EBUSERR
	.comm	_I2C_IBCR,4,2                   ## @I2C_IBCR
	.comm	_IBCR_RSTA,4,2                  ## @IBCR_RSTA
	.comm	_IBCR_IBIE,4,2                  ## @IBCR_IBIE
	.comm	_I2C_IBDR,4,2                   ## @I2C_IBDR
	.comm	_IIC_NOERR,4,2                  ## @IIC_NOERR
	.no_dead_strip	_i2c_repeated_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_repeated_start
_i2c_repeated_start:                    ; @i2c_repeated_start
	.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	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_vf_i2c_dbg
	mov	x0, x19
	bl	_mtx_lock
Lloh2:
	adrp	x8, _I2C_IBAD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2C_IBAD@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_WRITE1
Lloh5:
	adrp	x8, _I2C_IBSR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I2C_IBSR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_READ1
Lloh8:
	adrp	x8, _IBSR_IBB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IBSR_IBB@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	w0, #10
	bl	_DELAY
Lloh11:
	adrp	x21, _I2C_IBCR@GOTPAGE
Lloh12:
	ldr	x21, [x21, _I2C_IBCR@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_READ1
Lloh13:
	adrp	x8, _IBCR_RSTA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IBCR_RSTA@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _IBCR_IBIE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IBCR_IBIE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w2, w8, w9
	ldr	w1, [x21]
	mov	x0, x19
	bl	_WRITE1
	mov	w0, #10
	bl	_DELAY
Lloh19:
	adrp	x8, _I2C_IBDR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _I2C_IBDR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_WRITE1
	mov	x0, x19
	bl	_wait_for_iif
	mov	x20, x0
	mov	x0, x19
	bl	_mtx_unlock
Lloh22:
	adrp	x8, _IIC_NOERR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IIC_NOERR@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w20, #0
	csel	w0, w8, w20, eq
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_mtx_unlock
Lloh25:
	adrp	x8, _IIC_EBUSERR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IIC_EBUSERR@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
LBB0_3:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c repeated start\n"

	.comm	_I2C_IBAD,4,2                   ; @I2C_IBAD
	.comm	_I2C_IBSR,4,2                   ; @I2C_IBSR
	.comm	_IBSR_IBB,4,2                   ; @IBSR_IBB
	.comm	_IIC_EBUSERR,4,2                ; @IIC_EBUSERR
	.comm	_I2C_IBCR,4,2                   ; @I2C_IBCR
	.comm	_IBCR_RSTA,4,2                  ; @IBCR_RSTA
	.comm	_IBCR_IBIE,4,2                  ; @IBCR_IBIE
	.comm	_I2C_IBDR,4,2                   ; @I2C_IBDR
	.comm	_IIC_NOERR,4,2                  ; @IIC_NOERR
	.no_dead_strip	_i2c_repeated_start
.subsections_via_symbols
