	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_kona_send_i2c_cmd
_bcm_kona_send_i2c_cmd:                 ## @bcm_kona_send_i2c_cmd
	.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, %r15d
	movq	%rdi, %rbx
	movq	_I2C_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_bcm_kona_i2c_wait_if_busy
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	_IER_I2C_INT_EN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IER_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	leaq	16(%rbx), %r13
	movq	%r13, %rdi
	callq	_reinit_completion
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_bcm_kona_i2c_send_cmd_to_ctrl
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_wait_for_completion_timeout
	movq	%rax, %r15
	movq	_IER_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	callq	_writel
	testq	%r15, %r15
	jne	LBB0_3
## %bb.2:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %r14d
LBB0_3:
	movq	_BCM_CMD_NOACTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcm_kona_i2c_send_cmd_to_ctrl
LBB0_4:
	movl	%r14d, %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	_IER_I2C_INT_EN_MASK,4,2        ## @IER_I2C_INT_EN_MASK
	.comm	_IER_OFFSET,8,3                 ## @IER_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"controller timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_BCM_CMD_NOACTION,4,2           ## @BCM_CMD_NOACTION
	.no_dead_strip	_bcm_kona_send_i2c_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_kona_send_i2c_cmd
_bcm_kona_send_i2c_cmd:                 ; @bcm_kona_send_i2c_cmd
	.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
	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
	mov	x20, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _IER_I2C_INT_EN_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IER_I2C_INT_EN_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x24, _IER_OFFSET@GOTPAGE
Lloh7:
	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
	mov	x0, x19
	mov	x1, x21
	bl	_bcm_kona_i2c_send_cmd_to_ctrl
	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
	cbnz	x21, LBB0_3
; %bb.2:
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
Lloh13:
	adrp	x8, _BCM_CMD_NOACTION@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BCM_CMD_NOACTION@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bcm_kona_i2c_send_cmd_to_ctrl
LBB0_4:
	mov	x0, x20
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_TIMEOUT,4,2                ; @I2C_TIMEOUT
	.comm	_IER_I2C_INT_EN_MASK,4,2        ; @IER_I2C_INT_EN_MASK
	.comm	_IER_OFFSET,8,3                 ; @IER_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"controller timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_BCM_CMD_NOACTION,4,2           ; @BCM_CMD_NOACTION
	.no_dead_strip	_bcm_kona_send_i2c_cmd
.subsections_via_symbols
