	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_i2c_rd                      ## -- Begin function t4_i2c_rd
	.p2align	4, 0x90
_t4_i2c_rd:                             ## @t4_i2c_rd
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	_I2C_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r9d, %eax
	jb	LBB0_1
## %bb.2:
	movl	%r9d, %ebx
	movl	%r8d, %r14d
	movl	%ecx, %r12d
	cmpl	%r8d, %eax
	jbe	LBB0_4
## %bb.3:
	leal	(%rbx,%r14), %ecx
	cmpl	%eax, %ecx
	jbe	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	-88(%rbp), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	$40, %edx
	callq	_memset
	movq	_FW_LDST_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_CMD_OP_V
	movl	%eax, %r15d
	movq	_FW_CMD_REQUEST_F@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_FW_CMD_READ_F@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_FW_LDST_ADDRSPC_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_LDST_CMD_ADDRSPACE_V
	orl	%eax, %r15d
	movl	%r15d, %edi
	callq	_cpu_to_be32
	movq	%rax, -56(%rbp)
	movq	-56(%rbp), %rax
	movq	%rax, 32(%rsp)
	movups	-88(%rbp), %xmm0
	movups	-72(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_FW_LEN16
	movl	%eax, %edi
	callq	_cpu_to_be32
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, %edx
	movl	$255, %ecx
	cmovnsl	%edx, %ecx
	movq	%rax, -64(%rbp)
	movl	%ecx, -88(%rbp)
	movl	%r12d, -84(%rbp)
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.5:
	movq	16(%rbp), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$4, %ebx
	movl	$4, %r12d
	cmovbl	%ebx, %r12d
	movl	%r14d, -80(%rbp)
	movl	%r12d, -76(%rbp)
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	leaq	-88(%rbp), %rdx
	movl	$40, %ecx
	leaq	-136(%rbp), %r8
	callq	_t4_wr_mbox
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-120(%rbp), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_memcpy
	addl	%r12d, %r14d
	movl	%r12d, %eax
	leaq	(%r15,%rax,4), %r15
	subl	%r12d, %ebx
	jne	LBB0_6
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %r13d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_PAGE_SIZE,4,2              ## @I2C_PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FW_LDST_CMD,4,2                ## @FW_LDST_CMD
	.comm	_FW_CMD_REQUEST_F,4,2           ## @FW_CMD_REQUEST_F
	.comm	_FW_CMD_READ_F,4,2              ## @FW_CMD_READ_F
	.comm	_FW_LDST_ADDRSPC_I2C,4,2        ## @FW_LDST_ADDRSPC_I2C
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_i2c_rd                      ; -- Begin function t4_i2c_rd
	.p2align	2
_t4_i2c_rd:                             ; @t4_i2c_rd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
Lloh0:
	adrp	x8, _I2C_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w5
	b.lo	LBB0_7
; %bb.1:
	mov	x20, x5
	mov	x21, x4
	add	w9, w5, w4
	cmp	w8, w4
	ccmp	w9, w8, #0, hi
	b.hi	LBB0_7
; %bb.2:
	mov	x19, x6
	mov	x24, x3
	mov	x25, x2
	mov	x22, x1
	mov	x23, x0
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh3:
	adrp	x8, _FW_LDST_CMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FW_LDST_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_FW_CMD_OP_V
Lloh6:
	adrp	x8, _FW_CMD_REQUEST_F@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FW_CMD_REQUEST_F@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _FW_CMD_READ_F@GOTPAGE
Lloh10:
	ldr	x9, [x9, _FW_CMD_READ_F@GOTPAGEOFF]
	orr	w8, w8, w0
Lloh11:
	ldr	w9, [x9]
	orr	w26, w8, w9
Lloh12:
	adrp	x8, _FW_LDST_ADDRSPC_I2C@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FW_LDST_ADDRSPC_I2C@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_FW_LDST_CMD_ADDRSPACE_V
	orr	w0, w26, w0
	bl	_cpu_to_be32
	str	x0, [sp, #72]
	ldur	q0, [sp, #40]
	ldur	q1, [sp, #56]
	stp	q0, q1, [sp]
	str	x0, [sp, #32]
	mov	x0, sp
	bl	_FW_LEN16
	bl	_cpu_to_be32
	str	x0, [sp, #64]
	mov	w8, #255
	cmp	w25, #0
	csel	w8, w8, w25, lt
	stp	w8, w24, [sp, #40]
	cbz	w20, LBB0_6
; %bb.3:
	mov	w25, #4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w20, #4
	csel	w24, w20, w25, lo
	stp	w21, w24, [sp, #48]
	add	x2, sp, #40
	mov	x4, sp
	mov	x0, x23
	mov	x1, x22
	mov	w3, #40
	bl	_t4_wr_mbox
	cbnz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [sp, #16]
	mov	x0, x19
	mov	x2, x24
	bl	_memcpy
	add	w21, w21, w24
	add	x19, x19, w24, uxtw #2
	subs	w20, w20, w24
	b.ne	LBB0_4
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_PAGE_SIZE,4,2              ; @I2C_PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FW_LDST_CMD,4,2                ; @FW_LDST_CMD
	.comm	_FW_CMD_REQUEST_F,4,2           ; @FW_CMD_REQUEST_F
	.comm	_FW_CMD_READ_F,4,2              ; @FW_CMD_READ_F
	.comm	_FW_LDST_ADDRSPC_I2C,4,2        ; @FW_LDST_ADDRSPC_I2C
.subsections_via_symbols
