	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_iproc_i2c_xfer_wait
_bcm_iproc_i2c_xfer_wait:               ## @bcm_iproc_i2c_xfer_wait
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	_I2C_TIMEOUT_MSEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	movq	_M_CMD_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_iproc_i2c_wr_reg
	cmpq	$0, 8(%r13)
	je	LBB0_2
## %bb.1:
	leaq	16(%r13), %rdi
	movq	%rbx, %rsi
	callq	_wait_for_completion_timeout
	movq	%rax, %rbx
	movq	_IE_OFFSET@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_iproc_i2c_wr_reg
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_iproc_i2c_rd_reg
	movq	8(%r13), %rdi
	callq	_synchronize_irq
	testq	%rbx, %rbx
	jne	LBB0_9
LBB0_7:
	cmpl	$0, 4(%r13)
	jne	LBB0_9
## %bb.8:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_M_FIFO_RX_FLUSH_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_M_FIFO_TX_FLUSH_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	_M_FIFO_CTRL_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_iproc_i2c_wr_reg
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_2:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	addq	%rbx, %r12
	movq	_IS_OFFSET@GOTPCREL(%rip), %r15
	movq	_ISR_MASK@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_iproc_i2c_rd_reg
	movl	%eax, %ebx
	andl	(%r14), %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_bcm_iproc_i2c_process_m_event
	movl	(%r15), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_iproc_i2c_wr_reg
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r12, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	xorl	%eax, %eax
	callq	_cond_resched
	cmpl	$0, 4(%r13)
	je	LBB0_3
## %bb.5:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_7
LBB0_9:
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_bcm_iproc_i2c_check_status
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %r14d
	movq	_M_FIFO_RX_FLUSH_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_M_FIFO_TX_FLUSH_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	_M_FIFO_CTRL_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_iproc_i2c_wr_reg
	jmp	LBB0_12
LBB0_10:
	xorl	%r14d, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_TIMEOUT_MSEC,4,2           ## @I2C_TIMEOUT_MSEC
	.comm	_M_CMD_OFFSET,4,2               ## @M_CMD_OFFSET
	.comm	_IE_OFFSET,4,2                  ## @IE_OFFSET
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_IS_OFFSET,4,2                  ## @IS_OFFSET
	.comm	_ISR_MASK,4,2                   ## @ISR_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"transaction timed out\n"

	.comm	_M_FIFO_RX_FLUSH_SHIFT,4,2      ## @M_FIFO_RX_FLUSH_SHIFT
	.comm	_M_FIFO_TX_FLUSH_SHIFT,4,2      ## @M_FIFO_TX_FLUSH_SHIFT
	.comm	_M_FIFO_CTRL_OFFSET,4,2         ## @M_FIFO_CTRL_OFFSET
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_bcm_iproc_i2c_xfer_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_iproc_i2c_xfer_wait
_bcm_iproc_i2c_xfer_wait:               ; @bcm_iproc_i2c_xfer_wait
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _I2C_TIMEOUT_MSEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_TIMEOUT_MSEC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x21, x0
Lloh3:
	adrp	x8, _M_CMD_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _M_CMD_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_iproc_i2c_wr_reg
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, x19, #16
	mov	x1, x21
	bl	_wait_for_completion_timeout
	mov	x21, x0
Lloh6:
	adrp	x22, _IE_OFFSET@GOTPAGE
Lloh7:
	ldr	x22, [x22, _IE_OFFSET@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_iproc_i2c_wr_reg
	ldr	w1, [x22]
	mov	x0, x19
	bl	_iproc_i2c_rd_reg
	ldr	x0, [x19, #8]
	bl	_synchronize_irq
	b	LBB0_5
LBB0_2:
Lloh8:
	adrp	x24, _jiffies@GOTPAGE
Lloh9:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x22, x8, x21
Lloh10:
	adrp	x25, _IS_OFFSET@GOTPAGE
Lloh11:
	ldr	x25, [x25, _IS_OFFSET@GOTPAGEOFF]
Lloh12:
	adrp	x26, _ISR_MASK@GOTPAGE
Lloh13:
	ldr	x26, [x26, _ISR_MASK@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	bl	_iproc_i2c_rd_reg
	ldr	w8, [x26]
	and	w23, w8, w0
	mov	x0, x19
	mov	x1, x23
	bl	_bcm_iproc_i2c_process_m_event
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x23
	bl	_iproc_i2c_wr_reg
	ldr	x0, [x24]
	mov	x1, x22
	bl	_time_after
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_cpu_relax
	bl	_cond_resched
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_3
LBB0_5:
	cbnz	x21, LBB0_7
LBB0_6:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_9
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_bcm_iproc_i2c_check_status
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.8:
Lloh14:
	adrp	x8, _M_FIFO_RX_FLUSH_SHIFT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _M_FIFO_RX_FLUSH_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_BIT
	mov	x21, x0
Lloh17:
	adrp	x8, _M_FIFO_TX_FLUSH_SHIFT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _M_FIFO_TX_FLUSH_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_BIT
	orr	w2, w0, w21
Lloh20:
	adrp	x8, _M_FIFO_CTRL_OFFSET@GOTPAGE
Lloh21:
	ldr	x8, [x8, _M_FIFO_CTRL_OFFSET@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_iproc_i2c_wr_reg
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh25:
	adrp	x8, _M_FIFO_RX_FLUSH_SHIFT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _M_FIFO_RX_FLUSH_SHIFT@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_BIT
	mov	x20, x0
Lloh28:
	adrp	x8, _M_FIFO_TX_FLUSH_SHIFT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _M_FIFO_TX_FLUSH_SHIFT@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	bl	_BIT
	orr	w2, w0, w20
Lloh31:
	adrp	x8, _M_FIFO_CTRL_OFFSET@GOTPAGE
Lloh32:
	ldr	x8, [x8, _M_FIFO_CTRL_OFFSET@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_iproc_i2c_wr_reg
Lloh34:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_TIMEOUT_MSEC,4,2           ; @I2C_TIMEOUT_MSEC
	.comm	_M_CMD_OFFSET,4,2               ; @M_CMD_OFFSET
	.comm	_IE_OFFSET,4,2                  ; @IE_OFFSET
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_IS_OFFSET,4,2                  ; @IS_OFFSET
	.comm	_ISR_MASK,4,2                   ; @ISR_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"transaction timed out\n"

	.comm	_M_FIFO_RX_FLUSH_SHIFT,4,2      ; @M_FIFO_RX_FLUSH_SHIFT
	.comm	_M_FIFO_TX_FLUSH_SHIFT,4,2      ; @M_FIFO_TX_FLUSH_SHIFT
	.comm	_M_FIFO_CTRL_OFFSET,4,2         ; @M_FIFO_CTRL_OFFSET
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_bcm_iproc_i2c_xfer_wait
.subsections_via_symbols
