	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_kona_i2c_write_byte
_bcm_kona_i2c_write_byte:               ## @bcm_kona_i2c_write_byte
	.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	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	_I2C_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_bcm_kona_i2c_wait_if_busy
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	_ISR_SES_DONE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ISR_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r13), %rsi
	callq	_writel
	movq	_IER_I2C_INT_EN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IER_OFFSET@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	8(%r13), %rsi
	callq	_writel
	leaq	16(%r13), %rbx
	movq	%rbx, %rdi
	callq	_reinit_completion
	movq	_DAT_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r13), %rsi
	movl	%r15d, %edi
	callq	_writel
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_wait_for_completion_timeout
	movq	%rax, %r15
	movq	(%r14), %rsi
	addq	8(%r13), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_writel
	testq	%r15, %r15
	je	LBB0_3
## %bb.4:
	movq	_CS_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r13), %rdi
	callq	_readl
	movq	_CS_ACK_MASK@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	testl	%eax, (%rcx)
	setne	%dl
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	je	LBB0_7
## %bb.5:
	movq	_EREMOTEIO@GOTPCREL(%rip), %r14
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_7
LBB0_3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %r14
	leaq	L_.str(%rip), %rsi
LBB0_6:
	movl	(%r13), %edi
	callq	_dev_dbg
	xorl	%ebx, %ebx
	subl	(%r14), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_TIMEOUT,4,2                ## @I2C_TIMEOUT
	.comm	_ISR_SES_DONE_MASK,4,2          ## @ISR_SES_DONE_MASK
	.comm	_ISR_OFFSET,8,3                 ## @ISR_OFFSET
	.comm	_IER_I2C_INT_EN_MASK,4,2        ## @IER_I2C_INT_EN_MASK
	.comm	_IER_OFFSET,8,3                 ## @IER_OFFSET
	.comm	_DAT_OFFSET,8,3                 ## @DAT_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"controller timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_CS_OFFSET,8,3                  ## @CS_OFFSET
	.comm	_CS_ACK_MASK,4,2                ## @CS_ACK_MASK
L_.str.1:                               ## @.str.1
	.asciz	"unexpected NAK/ACK\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_bcm_kona_i2c_write_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_kona_i2c_write_byte
_bcm_kona_i2c_write_byte:               ; @bcm_kona_i2c_write_byte
	.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, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _I2C_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x22, x0
	mov	x0, x19
	bl	_bcm_kona_i2c_wait_if_busy
	tbnz	w0, #31, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _ISR_SES_DONE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ISR_SES_DONE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _ISR_OFFSET@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ISR_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh9:
	adrp	x8, _IER_I2C_INT_EN_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IER_I2C_INT_EN_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x24, _IER_OFFSET@GOTPAGE
Lloh13:
	ldr	x24, [x24, _IER_OFFSET@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x1, x9, x8
	bl	_writel
	add	x23, x19, #16
	mov	x0, x23
	bl	_reinit_completion
	ldr	x8, [x19, #8]
Lloh14:
	adrp	x9, _DAT_OFFSET@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DAT_OFFSET@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	mov	x0, x23
	mov	x1, x22
	bl	_wait_for_completion_timeout
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	x9, [x24]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	cbz	x21, LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
Lloh17:
	adrp	x9, _CS_OFFSET@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CS_OFFSET@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh20:
	adrp	x8, _CS_ACK_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CS_ACK_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
	cmp	w8, w20
	b.ne	LBB0_5
; %bb.3:
	mov	w0, #0
	b	LBB0_7
LBB0_4:
Lloh23:
	adrp	x20, _ETIMEDOUT@GOTPAGE
Lloh24:
	ldr	x20, [x20, _ETIMEDOUT@GOTPAGEOFF]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh27:
	adrp	x20, _EREMOTEIO@GOTPAGE
Lloh28:
	ldr	x20, [x20, _EREMOTEIO@GOTPAGEOFF]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	ldr	w0, [x19]
	bl	_dev_dbg
	ldr	w8, [x20]
	neg	w0, w8
LBB0_7:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_TIMEOUT,4,2                ; @I2C_TIMEOUT
	.comm	_ISR_SES_DONE_MASK,4,2          ; @ISR_SES_DONE_MASK
	.comm	_ISR_OFFSET,8,3                 ; @ISR_OFFSET
	.comm	_IER_I2C_INT_EN_MASK,4,2        ; @IER_I2C_INT_EN_MASK
	.comm	_IER_OFFSET,8,3                 ; @IER_OFFSET
	.comm	_DAT_OFFSET,8,3                 ; @DAT_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"controller timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_CS_OFFSET,8,3                  ; @CS_OFFSET
	.comm	_CS_ACK_MASK,4,2                ; @CS_ACK_MASK
l_.str.1:                               ; @.str.1
	.asciz	"unexpected NAK/ACK\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_bcm_kona_i2c_write_byte
.subsections_via_symbols
