	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_start_ll
_i2c_start_ll:                          ## @i2c_start_ll
	.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, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movq	_I2C_CONTROL_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_I2CCR_MEN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rax, %rdi
	callq	_i2c_write_reg
	movl	$10, %edi
	callq	_DELAY
	movq	_I2C_STATUS_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_i2c_read_reg
	movq	_I2CSR_MBB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_IIC_EBUSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_4
LBB0_2:
	movq	_I2CCR_MSTA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r13), %edx
	movl	(%r12), %esi
	movq	_I2CCR_MTX@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_i2c_write_reg
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_wait_for_busbusy
	movl	%eax, %esi
	movq	_IIC_NOERR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_4
## %bb.3:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_i2c_write_reg
	movq	_I2C_DATA_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_i2c_write_reg
	movl	%r14d, (%rbx)
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	%r14d, %ecx
	callq	_DEVICE_DEBUGF
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_wait_for_xfer
	movl	%eax, %esi
LBB0_4:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i2c_error_handler              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_CONTROL_REG,4,2            ## @I2C_CONTROL_REG
	.comm	_I2CCR_MEN,4,2                  ## @I2CCR_MEN
	.comm	_I2C_STATUS_REG,4,2             ## @I2C_STATUS_REG
	.comm	_I2CSR_MBB,4,2                  ## @I2CSR_MBB
	.comm	_IIC_EBUSERR,4,2                ## @IIC_EBUSERR
	.comm	_I2CCR_MSTA,4,2                 ## @I2CCR_MSTA
	.comm	_I2CCR_MTX,4,2                  ## @I2CCR_MTX
	.comm	_IIC_NOERR,4,2                  ## @IIC_NOERR
	.comm	_I2C_DATA_REG,4,2               ## @I2C_DATA_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"start  0x%02x\n"

	.no_dead_strip	_i2c_start_ll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_start_ll
_i2c_start_ll:                          ; @i2c_start_ll
	.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	x20, x1
	bl	_device_get_softc
	mov	x19, x0
Lloh0:
	adrp	x22, _I2C_CONTROL_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _I2C_CONTROL_REG@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x23, _I2CCR_MEN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _I2CCR_MEN@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_i2c_write_reg
	mov	w0, #10
	bl	_DELAY
Lloh4:
	adrp	x21, _I2C_STATUS_REG@GOTPAGE
Lloh5:
	ldr	x21, [x21, _I2C_STATUS_REG@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_i2c_read_reg
Lloh6:
	adrp	x8, _I2CSR_MBB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2CSR_MBB@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _IIC_EBUSERR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IIC_EBUSERR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	b	LBB0_4
LBB0_2:
	ldr	w1, [x22]
	ldr	w8, [x23]
Lloh12:
	adrp	x9, _I2CCR_MSTA@GOTPAGE
Lloh13:
	ldr	x9, [x9, _I2CCR_MSTA@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _I2CCR_MTX@GOTPAGE
Lloh16:
	ldr	x9, [x9, _I2CCR_MTX@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_i2c_write_reg
	mov	x0, x19
	mov	w1, #1
	bl	_wait_for_busbusy
	mov	x1, x0
Lloh18:
	adrp	x8, _IIC_NOERR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IIC_NOERR@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_i2c_write_reg
Lloh21:
	adrp	x8, _I2C_DATA_REG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _I2C_DATA_REG@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_i2c_write_reg
	str	w20, [x19]
Lloh24:
	adrp	x2, l_.str@PAGE
Lloh25:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #2
	mov	x3, x20
	bl	_DEVICE_DEBUGF
	mov	x0, x19
	mov	w1, #1
	bl	_wait_for_xfer
	mov	x1, x0
LBB0_4:
	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_error_handler
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_CONTROL_REG,4,2            ; @I2C_CONTROL_REG
	.comm	_I2CCR_MEN,4,2                  ; @I2CCR_MEN
	.comm	_I2C_STATUS_REG,4,2             ; @I2C_STATUS_REG
	.comm	_I2CSR_MBB,4,2                  ; @I2CSR_MBB
	.comm	_IIC_EBUSERR,4,2                ; @IIC_EBUSERR
	.comm	_I2CCR_MSTA,4,2                 ; @I2CCR_MSTA
	.comm	_I2CCR_MTX,4,2                  ; @I2CCR_MTX
	.comm	_IIC_NOERR,4,2                  ; @IIC_NOERR
	.comm	_I2C_DATA_REG,4,2               ; @I2C_DATA_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"start  0x%02x\n"

	.no_dead_strip	_i2c_start_ll
.subsections_via_symbols
