	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmstb_i2c_do_addr
_brcmstb_i2c_do_addr:                   ## @brcmstb_i2c_do_addr
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_I2C_M_TEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_5
## %bb.1:
	movl	4(%rbx), %eax
	shrl	$7, %eax
	andb	$6, %al
	orb	$-16, %al
	movq	_chip_address@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movzbl	%al, %esi
	movq	%r14, %rdi
	callq	_bsc_writel
	movb	4(%rbx), %al
	movb	%al, -25(%rbp)
	leaq	-25(%rbp), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_brcmstb_i2c_write_data_byte
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
## %bb.4:
	movq	_COND_RESTART@GOTPCREL(%rip), %rax
	movq	_COND_NOSTOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_brcmstb_set_i2c_start_stop
	movl	4(%rbx), %eax
	shrl	$7, %eax
	andb	$6, %al
	orb	$-15, %al
	movb	%al, -25(%rbp)
	leaq	-25(%rbp), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_brcmstb_i2c_write_data_byte
	testq	%rax, %rax
	jns	LBB0_6
LBB0_2:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	callq	_i2c_8bit_addr_from_msg
	movq	_chip_address@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movzbl	%al, %esi
	movq	%r14, %rdi
	callq	_bsc_writel
	xorl	%r15d, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_TEN,4,2                  ## @I2C_M_TEN
	.comm	_chip_address,4,2               ## @chip_address
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_COND_RESTART,4,2               ## @COND_RESTART
	.comm	_COND_NOSTOP,4,2                ## @COND_NOSTOP
	.no_dead_strip	_brcmstb_i2c_do_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmstb_i2c_do_addr
_brcmstb_i2c_do_addr:                   ; @brcmstb_i2c_do_addr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _I2C_M_TEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_TEN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	ldr	w8, [x20, #4]
	lsr	w8, w8, #7
	orr	w8, w8, #0xf0
Lloh3:
	adrp	x9, _chip_address@GOTPAGE
Lloh4:
	ldr	x9, [x9, _chip_address@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x9]
	mov	w9, #246
	and	w1, w8, w9
	mov	x0, x19
	bl	_bsc_writel
	ldr	w8, [x20, #4]
	strb	w8, [sp, #15]
	add	x1, sp, #15
	mov	x0, x19
	mov	w2, #0
	bl	_brcmstb_i2c_write_data_byte
	tbnz	x0, #63, LBB0_4
; %bb.2:
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
Lloh9:
	adrp	x8, _COND_RESTART@GOTPAGE
Lloh10:
	ldr	x8, [x8, _COND_RESTART@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _COND_NOSTOP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _COND_NOSTOP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_brcmstb_set_i2c_start_stop
	ldr	w8, [x20, #4]
	lsr	w8, w8, #7
	and	w8, w8, #0x6
	orr	w8, w8, #0xfffffff1
	strb	w8, [sp, #15]
	add	x1, sp, #15
	mov	x0, x19
	mov	w2, #0
	bl	_brcmstb_i2c_write_data_byte
	mov	x8, x0
	mov	w0, #0
	tbz	x8, #63, LBB0_7
LBB0_4:
Lloh15:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	bl	_i2c_8bit_addr_from_msg
	mov	x1, x0
Lloh18:
	adrp	x8, _chip_address@GOTPAGE
Lloh19:
	ldr	x8, [x8, _chip_address@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_bsc_writel
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_TEN,4,2                  ; @I2C_M_TEN
	.comm	_chip_address,4,2               ; @chip_address
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_COND_RESTART,4,2               ; @COND_RESTART
	.comm	_COND_NOSTOP,4,2                ; @COND_NOSTOP
	.no_dead_strip	_brcmstb_i2c_do_addr
.subsections_via_symbols
