	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_dw_read
_i2c_dw_read:                           ## @i2c_dw_read
	.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
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	cmpq	%rcx, %rax
	jae	LBB0_14
## %bb.1:
	movq	%rdi, %r14
	movq	48(%rdi), %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	leaq	24(%rdi), %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	leaq	32(%rdi), %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	_STATUS_READ_IN_PROGRESS@GOTPCREL(%rip), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	movq	%rax, (%r14)
	cmpq	%rcx, %rax
	jae	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	leaq	(%rax,%rax,2), %rdx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testl	%esi, (%rdi,%rdx,8)
	je	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %eax
	andl	16(%r14), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	8(%rcx,%rdx,8), %rax
	leaq	16(%rcx,%rdx,8), %rcx
	cmovneq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	cmovneq	-56(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	(%rcx), %r13
	movq	(%rax), %r15
	movq	_DW_IC_RXFLR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dw_readl
	movq	%rax, %rbx
	testq	%r15, %r15
	setg	%al
	jle	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, %ebx
	jle	LBB0_11
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14), %rax
	leaq	(%rax,%rax,2), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx,%rax,8), %r12
	movq	_DW_IC_DATA_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dw_readl
	movq	%rax, (%r13)
	movq	_I2C_M_RECV_LEN@GOTPCREL(%rip), %rcx
	testq	%r12, (%rcx)
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	_I2C_SMBUS_BLOCK_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	ja	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_i2c_dw_recv_len
	movq	%rax, %r15
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	movq	%r15, %rax
	decl	40(%r14)
	addq	$8, %r13
	decq	%r15
	cmpq	$2, %rax
	setge	%al
	jl	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=2
	leal	-1(%rbx), %ecx
	cmpl	$1, %ebx
	movl	%ecx, %ebx
	jg	LBB0_5
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_STATUS_READ_IN_PROGRESS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	testb	%al, %al
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	notl	%ecx
	andl	%ecx, 16(%r14)
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	jmp	LBB0_13
LBB0_15:
	orl	%ecx, 16(%r14)
	movq	%r15, 24(%r14)
	movq	%r13, 32(%r14)
LBB0_14:
	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	_STATUS_READ_IN_PROGRESS,4,2    ## @STATUS_READ_IN_PROGRESS
	.comm	_DW_IC_RXFLR,4,2                ## @DW_IC_RXFLR
	.comm	_DW_IC_DATA_CMD,4,2             ## @DW_IC_DATA_CMD
	.comm	_I2C_M_RECV_LEN,8,3             ## @I2C_M_RECV_LEN
	.comm	_I2C_SMBUS_BLOCK_MAX,8,3        ## @I2C_SMBUS_BLOCK_MAX
	.no_dead_strip	_i2c_dw_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_dw_read
_i2c_dw_read:                           ; @i2c_dw_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldp	x8, x9, [x0]
	cmp	x8, x9
	b.hs	LBB0_12
; %bb.1:
	mov	x19, x0
	ldr	x22, [x0, #48]
	add	x11, x0, #24
	add	x10, x0, #32
	stp	x10, x11, [sp]                  ; 16-byte Folded Spill
	mov	w25, #24
Lloh0:
	adrp	x12, _STATUS_READ_IN_PROGRESS@GOTPAGE
Lloh1:
	ldr	x12, [x12, _STATUS_READ_IN_PROGRESS@GOTPAGEOFF]
Lloh2:
	adrp	x28, _DW_IC_DATA_CMD@GOTPAGE
Lloh3:
	ldr	x28, [x28, _DW_IC_DATA_CMD@GOTPAGEOFF]
Lloh4:
	adrp	x26, _I2C_M_RECV_LEN@GOTPAGE
Lloh5:
	ldr	x26, [x26, _I2C_M_RECV_LEN@GOTPAGEOFF]
Lloh6:
	adrp	x27, _I2C_SMBUS_BLOCK_MAX@GOTPAGE
Lloh7:
	ldr	x27, [x27, _I2C_SMBUS_BLOCK_MAX@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	str	x8, [x19]
	cmp	x8, x9
	b.hs	LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mul	x10, x8, x25
	ldr	w10, [x22, x10]
Lloh8:
	adrp	x11, _I2C_M_RD@GOTPAGE
Lloh9:
	ldr	x11, [x11, _I2C_M_RD@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x19, #16]
	ldr	w10, [x12]
	madd	x8, x8, x25, x22
	add	x11, x8, #8
	add	x8, x8, #16
	tst	w10, w9
	ldp	x10, x9, [sp]                   ; 16-byte Folded Reload
	csel	x9, x11, x9, eq
	csel	x8, x8, x10, eq
	ldr	x23, [x8]
	ldr	x20, [x9]
Lloh11:
	adrp	x8, _DW_IC_RXFLR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DW_IC_RXFLR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dw_readl
	mov	x21, x0
	cmp	x20, #0
	cset	w8, gt
	cmp	x20, #1
	ccmp	w21, #1, #8, ge
	b.lt	LBB0_9
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19]
	mul	x8, x8, x25
	ldrsw	x24, [x22, x8]
	ldr	w1, [x28]
	mov	x0, x19
	bl	_dw_readl
	str	x0, [x23]
	ldr	x8, [x26]
	and	x8, x8, x24
	ldr	x9, [x27]
	cmp	x8, #0
	ccmp	x0, x9, #2, ne
	ccmp	x0, #0, #4, ls
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x1, x0
	mov	x0, x19
	bl	_i2c_dw_recv_len
	mov	x20, x0
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	x9, x20
	add	x23, x23, #8
	ldr	w8, [x19, #40]
	sub	w8, w8, #1
	str	w8, [x19, #40]
	subs	x20, x20, #1
	cset	w8, gt
	cmp	x9, #2
	b.lt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
	sub	w9, w21, #1
	cmp	w21, #1
	mov	x21, x9
	b.gt	LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh14:
	adrp	x12, _STATUS_READ_IN_PROGRESS@GOTPAGE
Lloh15:
	ldr	x12, [x12, _STATUS_READ_IN_PROGRESS@GOTPAGEOFF]
	ldr	w9, [x12]
	tbnz	w8, #0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19, #16]
	bic	w8, w8, w9
	str	w8, [x19, #16]
	ldp	x8, x9, [x19]
	b	LBB0_2
LBB0_11:
	ldr	w8, [x19, #16]
	orr	w8, w8, w9
	str	w8, [x19, #16]
	stp	x20, x23, [x19, #24]
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_STATUS_READ_IN_PROGRESS,4,2    ; @STATUS_READ_IN_PROGRESS
	.comm	_DW_IC_RXFLR,4,2                ; @DW_IC_RXFLR
	.comm	_DW_IC_DATA_CMD,4,2             ; @DW_IC_DATA_CMD
	.comm	_I2C_M_RECV_LEN,8,3             ; @I2C_M_RECV_LEN
	.comm	_I2C_SMBUS_BLOCK_MAX,8,3        ; @I2C_SMBUS_BLOCK_MAX
	.no_dead_strip	_i2c_dw_read
.subsections_via_symbols
