	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hw20k2_i2c_write
_hw20k2_i2c_write:                      ## @hw20k2_i2c_write
	.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	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movb	(%rdi), %r12b
	shlb	$3, %r12b
	movq	_I2C_IF_STATUS@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_hw_read_20kx
	movl	%eax, -44(%rbp)
	movq	_I2C_STATUS_BC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	addl	(%rbx), %edx
	xorl	%eax, %eax
	cmpl	$4, %edx
	cmovel	%eax, %edx
	movl	%r12d, %ecx
	shll	%cl, %r14d
	orl	%r15d, %r14d
	leaq	-44(%rbp), %rdi
	callq	_set_field
	movl	(%r13), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_hw_write_20kx
	movq	%rbx, %rdi
	callq	_hw20k2_i2c_wait_data_ready
	movq	_I2C_IF_WDATA@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_hw_write_20kx
	movq	%rbx, %rdi
	callq	_hw20k2_i2c_wait_data_ready
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_hw_write_20kx
	movq	%rbx, %rdi
	callq	_hw20k2_i2c_wait_data_ready
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_IF_STATUS,4,2              ## @I2C_IF_STATUS
	.comm	_I2C_STATUS_BC,4,2              ## @I2C_STATUS_BC
	.comm	_I2C_IF_WDATA,4,2               ## @I2C_IF_WDATA
	.no_dead_strip	_hw20k2_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hw20k2_i2c_write
_hw20k2_i2c_write:                      ; @hw20k2_i2c_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w22, [x0]
Lloh0:
	adrp	x23, _I2C_IF_STATUS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _I2C_IF_STATUS@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_hw_read_20kx
	str	w0, [sp, #12]
Lloh2:
	adrp	x8, _I2C_STATUS_BC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2C_STATUS_BC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldp	w8, w9, [x19]
	add	w8, w9, w8
	cmp	w8, #4
	csel	w2, wzr, w8, eq
	lsl	w8, w22, #3
	lsl	w8, w20, w8
	orr	w20, w8, w21
	add	x0, sp, #12
	bl	_set_field
	ldr	w1, [x23]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_hw_write_20kx
	mov	x0, x19
	bl	_hw20k2_i2c_wait_data_ready
Lloh5:
	adrp	x21, _I2C_IF_WDATA@GOTPAGE
Lloh6:
	ldr	x21, [x21, _I2C_IF_WDATA@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_hw_write_20kx
	mov	x0, x19
	bl	_hw20k2_i2c_wait_data_ready
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_hw_write_20kx
	mov	x0, x19
	bl	_hw20k2_i2c_wait_data_ready
	mov	w0, #0
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_IF_STATUS,4,2              ; @I2C_IF_STATUS
	.comm	_I2C_STATUS_BC,4,2              ; @I2C_STATUS_BC
	.comm	_I2C_IF_WDATA,4,2               ; @I2C_IF_WDATA
	.no_dead_strip	_hw20k2_i2c_write
.subsections_via_symbols
