	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pms_i2c_write
_pms_i2c_write:                         ## @pms_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	_i2c_count@GOTPCREL(%rip), %r8
	movslq	(%r8), %rcx
	testq	%rcx, %rcx
	jle	LBB0_1
## %bb.2:
	movq	_i2cinfo@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leal	1(%rcx), %r9d
	xorl	%eax, %eax
	movl	$1, %r10d
	xorl	%r11d, %r11d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%eax
	cmpl	%ecx, %eax
	jge	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%eax, %rdx
	leaq	(%rdx,%rdx,2), %rdx
	cmpq	%rbx, (%rdi,%rdx,8)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rsi, 8(%rdi,%rdx,8)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r14, 16(%rdi,%rdx,8)
	cmovel	%r10d, %r11d
	movq	%r14, 16(%rdi,%rdx,8)
	movl	%r9d, %eax
	jmp	LBB0_6
LBB0_1:
	xorl	%r11d, %r11d
	xorl	%eax, %eax
LBB0_7:
	cmpl	%ecx, %eax
	jne	LBB0_10
## %bb.8:
	cmpl	$63, %ecx
	jg	LBB0_10
## %bb.9:
	movq	_i2cinfo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rcx,%rcx,2), %rdx
	movq	%rbx, (%rax,%rdx,8)
	movq	%rsi, 8(%rax,%rdx,8)
	movq	%r14, 16(%rax,%rdx,8)
	leal	1(%rcx), %eax
	movl	%eax, (%r8)
LBB0_10:
	xorl	%eax, %eax
	testl	%r11d, %r11d
	jne	LBB0_15
## %bb.11:
	movl	$41, %edi
	callq	_mvv_write
	movl	$42, %edi
	movq	%r14, %rsi
	callq	_mvv_write
	movl	$40, %edi
	movq	%rbx, %rsi
	callq	_mvv_write
	movq	_io_port@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_outb
	movq	_data_port@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_inb
	testb	$1, %al
	je	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_inb
	testb	$1, %al
	jne	LBB0_13
## %bb.14:
	movl	(%rbx), %edi
	callq	_inb
	movl	%eax, %ecx
	movl	%eax, %edx
	andl	$2, %edx
	xorl	%eax, %eax
	negl	%edx
	sbbl	%eax, %eax
	orl	%ecx, %eax
LBB0_15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_i2c_count,4,2                  ## @i2c_count
	.comm	_i2cinfo,8,3                    ## @i2cinfo
	.comm	_io_port,4,2                    ## @io_port
	.comm	_data_port,4,2                  ## @data_port
	.no_dead_strip	_pms_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pms_i2c_write
_pms_i2c_write:                         ; @pms_i2c_write
	.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, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _i2c_count@GOTPAGE
Lloh1:
	ldr	x8, [x8, _i2c_count@GOTPAGEOFF]
	ldrsw	x9, [x8]
Lloh2:
	adrp	x11, _i2cinfo@GOTPAGE
Lloh3:
	ldr	x11, [x11, _i2cinfo@GOTPAGEOFF]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w13, #0
	mov	w10, #0
	ldr	x12, [x11]
	add	w14, w9, #1
	mov	w15, #24
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w13, w13, #1
	cmp	w13, w9
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	smull	x16, w13, w15
	ldr	x16, [x12, x16]
	cmp	x16, x19
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x16, w13
	madd	x17, x16, x15, x12
	ldr	x17, [x17, #8]
	cmp	x17, x1
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x13, x16, x15, x12
	ldr	x16, [x13, #16]
	cmp	x16, x20
	csinc	w10, w10, wzr, ne
	str	x20, [x13, #16]
	mov	x13, x14
	b	LBB0_2
LBB0_6:
	mov	w10, #0
	mov	w13, #0
LBB0_7:
	cmp	w13, w9
	b.ne	LBB0_10
; %bb.8:
	cmp	w9, #63
	b.gt	LBB0_10
; %bb.9:
	ldr	x11, [x11]
	mov	w12, #24
	madd	x11, x9, x12, x11
	stp	x19, x1, [x11]
	str	x20, [x11, #16]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_10:
	cbz	w10, LBB0_12
; %bb.11:
	mov	w0, #0
	b	LBB0_16
LBB0_12:
	mov	w0, #41
	bl	_mvv_write
	mov	w0, #42
	mov	x1, x20
	bl	_mvv_write
	mov	w0, #40
	mov	x1, x19
	bl	_mvv_write
Lloh4:
	adrp	x8, _io_port@GOTPAGE
Lloh5:
	ldr	x8, [x8, _io_port@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_outb
Lloh7:
	adrp	x19, _data_port@GOTPAGE
Lloh8:
	ldr	x19, [x19, _data_port@GOTPAGEOFF]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_inb
	tbz	w0, #0, LBB0_13
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_inb
	tbnz	w0, #0, LBB0_14
; %bb.15:
	ldr	w0, [x19]
	bl	_inb
	tst	w0, #0x2
	csinv	w0, w0, wzr, eq
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_i2c_count,4,2                  ; @i2c_count
	.comm	_i2cinfo,8,3                    ; @i2cinfo
	.comm	_io_port,4,2                    ; @io_port
	.comm	_data_port,4,2                  ; @data_port
	.no_dead_strip	_pms_i2c_write
.subsections_via_symbols
