	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_kona_i2c_do_addr
_bcm_kona_i2c_do_addr:                  ## @bcm_kona_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_7
## %bb.1:
	movl	4(%rbx), %eax
	shrl	$7, %eax
	andb	$6, %al
	orb	$-16, %al
	movzbl	%al, %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bcm_kona_i2c_write_byte
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	movzbl	4(%rbx), %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bcm_kona_i2c_write_byte
	testq	%rax, %rax
	js	LBB0_9
## %bb.4:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_11
## %bb.5:
	movq	_BCM_CMD_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bcm_kona_send_i2c_cmd
	testq	%rax, %rax
	js	LBB0_9
## %bb.6:
	movl	4(%rbx), %eax
	shrl	$7, %eax
	andb	$6, %al
	orb	$-15, %al
	movzbl	%al, %esi
	jmp	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	callq	_i2c_8bit_addr_from_msg
	movzbl	%al, %esi
LBB0_8:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bcm_kona_i2c_write_byte
	testq	%rax, %rax
	jns	LBB0_11
LBB0_9:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_10
LBB0_2:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %r15d
LBB0_11:
	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	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_BCM_CMD_RESTART,4,2            ## @BCM_CMD_RESTART
	.no_dead_strip	_bcm_kona_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 bcm_kona_i2c_do_addr
_bcm_kona_i2c_do_addr:                  ; @bcm_kona_i2c_do_addr
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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_6
; %bb.1:
	ldr	w8, [x20, #4]
	lsr	w8, w8, #7
	orr	w8, w8, #0xf0
	mov	w9, #246
	and	w1, w8, w9
	mov	x0, x19
	mov	w2, #0
	bl	_bcm_kona_i2c_write_byte
	tbnz	x0, #63, LBB0_8
; %bb.2:
	ldrb	w1, [x20, #4]
	mov	x0, x19
	mov	w2, #0
	bl	_bcm_kona_i2c_write_byte
	tbnz	x0, #63, LBB0_8
; %bb.3:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.4:
Lloh6:
	adrp	x8, _BCM_CMD_RESTART@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BCM_CMD_RESTART@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bcm_kona_send_i2c_cmd
	tbnz	x0, #63, LBB0_8
; %bb.5:
	ldr	w8, [x20, #4]
	lsr	w8, w8, #7
	orr	w8, w8, #0xfffffff1
	mov	w9, #247
	and	w1, w8, w9
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_i2c_8bit_addr_from_msg
	mov	x1, x0
LBB0_7:
	mov	x0, x19
	mov	w2, #0
	bl	_bcm_kona_i2c_write_byte
	mov	x8, x0
	mov	w0, #0
	tbz	x8, #63, LBB0_9
LBB0_8:
Lloh9:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_TEN,4,2                  ; @I2C_M_TEN
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_BCM_CMD_RESTART,4,2            ; @BCM_CMD_RESTART
	.no_dead_strip	_bcm_kona_i2c_do_addr
.subsections_via_symbols
