	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmstb_i2c_wait_for_completion
_brcmstb_i2c_wait_for_completion:       ## @brcmstb_i2c_wait_for_completion
	.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, %r14
	movq	_I2C_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r15
	cmpq	$0, (%r14)
	js	LBB0_3
## %bb.1:
	leaq	8(%r14), %rdi
	movq	%r15, %rsi
	callq	_wait_for_completion_timeout
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jne	LBB0_6
LBB0_2:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_6
LBB0_3:
	movq	_jiffies@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_iic_enable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bsc_readl
	movl	%eax, %ebx
	movq	_BSC_IIC_EN_INTRP_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	testl	%ebx, %r13d
	je	LBB0_4
LBB0_6:
	cmpq	$0, (%r14)
	js	LBB0_8
## %bb.7:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	jne	LBB0_9
LBB0_8:
	movq	_INT_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_brcmstb_i2c_enable_disable_irq
LBB0_9:
	movl	%r12d, %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	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_iic_enable,4,2                 ## @iic_enable
	.comm	_BSC_IIC_EN_INTRP_MASK,4,2      ## @BSC_IIC_EN_INTRP_MASK
	.comm	_INT_DISABLE,4,2                ## @INT_DISABLE
	.no_dead_strip	_brcmstb_i2c_wait_for_completion
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmstb_i2c_wait_for_completion
_brcmstb_i2c_wait_for_completion:       ; @brcmstb_i2c_wait_for_completion
	.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
	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	x1, x0
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_3
; %bb.1:
	add	x0, x19, #8
	bl	_wait_for_completion_timeout
	cbnz	w0, LBB0_6
LBB0_2:
Lloh3:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	x8, [x19]
	tbz	x8, #63, LBB0_7
	b	LBB0_8
LBB0_3:
Lloh6:
	adrp	x22, _jiffies@GOTPAGE
Lloh7:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x20, x8, x1
Lloh8:
	adrp	x23, _iic_enable@GOTPAGE
Lloh9:
	ldr	x23, [x23, _iic_enable@GOTPAGEOFF]
Lloh10:
	adrp	x24, _BSC_IIC_EN_INTRP_MASK@GOTPAGE
Lloh11:
	ldr	x24, [x24, _BSC_IIC_EN_INTRP_MASK@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_bsc_readl
	mov	x21, x0
	ldr	w25, [x24]
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	and	w21, w25, w21
	bl	_cpu_relax
	cbz	w21, LBB0_4
LBB0_6:
	mov	w20, #0
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmn	w20, w8
	b.ne	LBB0_9
LBB0_8:
Lloh15:
	adrp	x8, _INT_DISABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INT_DISABLE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_brcmstb_i2c_enable_disable_irq
LBB0_9:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_TIMEOUT,4,2                ; @I2C_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_iic_enable,4,2                 ; @iic_enable
	.comm	_BSC_IIC_EN_INTRP_MASK,4,2      ; @BSC_IIC_EN_INTRP_MASK
	.comm	_INT_DISABLE,4,2                ; @INT_DISABLE
	.no_dead_strip	_brcmstb_i2c_wait_for_completion
.subsections_via_symbols
