	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pt1_i2c_xfer
_pt1_i2c_xfer:                          ## @pt1_i2c_xfer
	.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, %ebx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_i2c_get_adapdata
	movl	%ebx, %ecx
	testl	%ebx, %ebx
	jle	LBB0_19
## %bb.1:
	movq	%rax, %r12
	xorl	%r14d, %r14d
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	leaq	-44(%rbp), %r15
	movq	%r15, %rsi
	callq	_pt1_i2c_begin
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	_pt1_i2c_write_msg
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	_pt1_i2c_end
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testl	%eax, %eax
	js	LBB0_18
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %r14d
	jge	LBB0_19
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
	movslq	%r14d, %r15
	movq	%r15, %rbx
	shlq	$4, %rbx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi,%rbx)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%rdi, %rbx
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%r14), %edx
	cmpl	%ecx, %edx
	jge	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	shlq	$4, %r15
	leaq	(%rdi,%r15), %r13
	testl	%eax, (%r13)
	je	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	4(%rdi,%r15), %r14
	cmpq	$5, %r14
	jge	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	leaq	-44(%rbp), %rsi
	callq	_pt1_i2c_begin
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rcx
	callq	_pt1_i2c_write_msg
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rcx
	callq	_pt1_i2c_read_msg
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	_pt1_i2c_end
	testl	%eax, %eax
	js	LBB0_18
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_pt1_read_reg
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%rdi,%r15), %rcx
	leal	-1(%r14), %edx
	movl	%r14d, %esi
	andl	$3, %esi
	je	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, -4(%rcx,%r14,4)
	decq	%r14
	sarl	$8, %eax
	decl	%esi
	jne	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$3, %edx
	jb	LBB0_15
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, -4(%rcx,%r14,4)
	movl	%eax, %edx
	sarl	$8, %edx
	movl	%edx, -8(%rcx,%r14,4)
	movl	%eax, %edx
	sarl	$16, %edx
	movl	%edx, -12(%rcx,%r14,4)
	movl	%eax, %edx
	sarl	$24, %edx
	movl	%edx, -16(%rcx,%r14,4)
	addq	$-4, %r14
	sarl	$31, %eax
	testl	%r14d, %r14d
	jne	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r14d
	jmp	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_3:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_19
LBB0_18:
	movl	%eax, %ecx
LBB0_19:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_pt1_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pt1_i2c_xfer
_pt1_i2c_xfer:                          ; @pt1_i2c_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x20, x1
	bl	_i2c_get_adapdata
	cmp	w19, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x21, x0
	mov	w26, #0
Lloh0:
	adrp	x24, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x24, [x24, _I2C_M_RD@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #12
	mov	x0, x21
	bl	_pt1_i2c_begin
	ldr	w1, [sp, #12]
	add	x2, sp, #12
	mov	x0, x21
	mov	x3, x22
	bl	_pt1_i2c_write_msg
	ldr	w1, [sp, #12]
	mov	x0, x21
	bl	_pt1_i2c_end
	tbnz	w0, #31, LBB0_15
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
	cmp	w26, w19
	b.ge	LBB0_16
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	add	x22, x20, w26, sxtw #4
	ldr	w9, [x22]
	ldr	w8, [x24]
	tst	w8, w9
	b.ne	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x20, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x9, w26
	add	x25, x9, #1
	cmp	w25, w19
	b.ge	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x20, x25, lsl #4
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x20, x25, lsl #4
	ldr	w26, [x8, #4]
	cmp	w26, #5
	b.ge	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #12
	mov	x0, x21
	bl	_pt1_i2c_begin
	ldr	w1, [sp, #12]
	add	x2, sp, #12
	mov	x0, x21
	mov	x3, x22
	bl	_pt1_i2c_write_msg
	ldr	w1, [sp, #12]
	add	x2, sp, #12
	mov	x0, x21
	mov	x3, x23
	bl	_pt1_i2c_read_msg
	ldr	w1, [sp, #12]
	mov	x0, x21
	bl	_pt1_i2c_end
	tbnz	w0, #31, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	w1, #2
	bl	_pt1_read_reg
	cbz	w26, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x8, w26
	add	x9, x20, x25, lsl #4
	ldr	x9, [x9, #8]
	add	x8, x9, x8, lsl #2
	sub	x8, x8, #4
LBB0_12:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	w0, [x8], #-4
	asr	w0, w0, #8
	subs	w26, w26, #1
	b.ne	LBB0_12
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, x25
	b	LBB0_3
LBB0_14:
Lloh2:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_16
LBB0_15:
	mov	x19, x0
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_pt1_i2c_xfer
.subsections_via_symbols
