	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_i3c_master_i2c_xfers
_cdns_i3c_master_i2c_xfers:             ## @cdns_i3c_master_i2c_xfers
	.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	$40, %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, %r12
	callq	_i2c_dev_get_master
	movq	%rax, %rdi
	callq	_to_cdns_i3c_master
	cmpl	%ebx, (%rax)
	jge	LBB0_1
LBB0_4:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r15
	testl	%ebx, %ebx
	jle	LBB0_15
## %bb.2:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(,%rax,8), %rax
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx), %rdi
	movq	_CMD0_FIFO_PL_LEN_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jg	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	andl	8(%r12,%rbx), %r14d
	movl	$4, %esi
	callq	_DIV_ROUND_UP
	testl	%r14d, %r14d
	movl	$0, %ecx
	cmovel	%eax, %ecx
	cmovnel	%eax, %r14d
	addl	%ecx, %r15d
	addl	%r14d, %r13d
	addq	$24, %rbx
	cmpq	%rbx, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_3
## %bb.7:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	cmpl	4(%rdi), %r15d
	ja	LBB0_4
## %bb.8:
	cmpl	8(%rdi), %r13d
	ja	LBB0_4
## %bb.9:
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_cdns_i3c_master_alloc_xfer
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	%rax, %r13
	shlq	$5, -72(%rbp)                   ## 8-byte Folded Spill
	xorl	%r15d, %r15d
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	12(%r12), %eax
	movl	%eax, 24(%r14,%r15)
	movq	(%r12), %rax
	movq	%rax, 16(%r14,%r15)
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	addq	$24, %r12
	addq	$32, %r15
	cmpq	%r15, -72(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_19
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %r14
	movl	16(%r12), %edi
	callq	_CMD0_FIFO_DEV_ADDR
	movl	%eax, %ebx
	movq	(%r12), %rdi
	callq	_CMD0_FIFO_PL_LEN
	movl	%eax, %r13d
	orl	%ebx, %r13d
	movq	_XMIT_BURST_WITHOUT_SUBADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CMD0_FIFO_PRIV_XMIT_MODE
	orl	%r13d, %eax
	movl	%eax, (%r14,%r15)
	movl	8(%r12), %ecx
	movq	_I2C_M_TEN@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_CMD0_FIFO_IS_10B@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, (%r14,%r15)
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	_I2C_M_RD@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_CMD0_FIFO_RNW@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r14,%r15)
	movl	12(%r12), %eax
	movl	%eax, 28(%r14,%r15)
	movq	(%r12), %rax
	movq	%rax, 8(%r14,%r15)
	jmp	LBB0_18
LBB0_15:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_cdns_i3c_master_alloc_xfer
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_16
LBB0_20:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_cdns_i3c_master_queue_xfer
	leaq	4(%r13), %r14
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	jne	LBB0_22
## %bb.21:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_cdns_i3c_master_unqueue_xfer
LBB0_22:
	movl	(%r13), %ebx
	movq	%r13, %rdi
	callq	_cdns_i3c_master_free_xfer
	jmp	LBB0_23
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_19:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_CMD0_FIFO_PL_LEN_MAX,8,3       ## @CMD0_FIFO_PL_LEN_MAX
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_XMIT_BURST_WITHOUT_SUBADDR,4,2 ## @XMIT_BURST_WITHOUT_SUBADDR
	.comm	_I2C_M_TEN,4,2                  ## @I2C_M_TEN
	.comm	_CMD0_FIFO_IS_10B,4,2           ## @CMD0_FIFO_IS_10B
	.comm	_CMD0_FIFO_RNW,4,2              ## @CMD0_FIFO_RNW
	.no_dead_strip	_cdns_i3c_master_i2c_xfers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_i3c_master_i2c_xfers
_cdns_i3c_master_i2c_xfers:             ; @cdns_i3c_master_i2c_xfers
	.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
	mov	x21, x2
	mov	x20, x1
	bl	_i2c_dev_get_master
	bl	_to_cdns_i3c_master
	ldr	w8, [x0]
	cmp	w8, w21
	b.ge	LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_3:
	mov	x0, x19
	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
LBB0_4:
	mov	x19, x0
	cmp	w21, #1
	b.lt	LBB0_18
; %bb.5:
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	mov	w24, #0
	mov	w25, #0
	mov	w28, w21
	add	x26, x20, #8
Lloh2:
	adrp	x27, _CMD0_FIFO_PL_LEN_MAX@GOTPAGE
Lloh3:
	ldr	x27, [x27, _CMD0_FIFO_PL_LEN_MAX@GOTPAGEOFF]
Lloh4:
	adrp	x23, _I2C_M_RD@GOTPAGE
Lloh5:
	ldr	x23, [x23, _I2C_M_RD@GOTPAGEOFF]
	str	x28, [sp]                       ; 8-byte Folded Spill
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x0, [x26, #-8]
	ldr	x8, [x27]
	cmp	x0, x8
	b.gt	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w22, [x26], #24
	ldr	w19, [x23]
	mov	w1, #4
	bl	_DIV_ROUND_UP
	tst	w19, w22
	csel	w8, w0, wzr, eq
	add	w25, w25, w8
	csel	w8, wzr, w0, eq
	add	w24, w24, w8
	subs	x28, x28, #1
	b.ne	LBB0_6
; %bb.8:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w8, [x0, #4]
	cmp	w25, w8
	b.hi	LBB0_1
; %bb.9:
	ldr	w8, [x0, #8]
	cmp	w24, w8
	b.hi	LBB0_1
; %bb.10:
	mov	x1, x21
	bl	_cdns_i3c_master_alloc_xfer
	cbz	x0, LBB0_22
; %bb.11:
	mov	x21, x0
	mov	x24, #0
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	lsl	x25, x8, #5
Lloh6:
	adrp	x26, _XMIT_BURST_WITHOUT_SUBADDR@GOTPAGE
Lloh7:
	ldr	x26, [x26, _XMIT_BURST_WITHOUT_SUBADDR@GOTPAGEOFF]
Lloh8:
	adrp	x27, _I2C_M_TEN@GOTPAGE
Lloh9:
	ldr	x27, [x27, _I2C_M_TEN@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x20, #12]
	add	x9, x28, x24
	str	w8, [x9, #24]
	ldr	x8, [x20]
	str	x8, [x9, #16]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x24, x24, #32
	add	x20, x20, #24
	cmp	x25, x24
	b.eq	LBB0_23
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x28, [x21, #8]
	ldr	w0, [x20, #16]
	bl	_CMD0_FIFO_DEV_ADDR
	mov	x22, x0
	ldr	x0, [x20]
	bl	_CMD0_FIFO_PL_LEN
	orr	w19, w0, w22
	ldr	w0, [x26]
	bl	_CMD0_FIFO_PRIV_XMIT_MODE
	orr	w8, w19, w0
	str	w8, [x28, x24]
	ldr	w9, [x20, #8]
	ldr	w10, [x27]
	tst	w10, w9
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
Lloh10:
	adrp	x10, _CMD0_FIFO_IS_10B@GOTPAGE
Lloh11:
	ldr	x10, [x10, _CMD0_FIFO_IS_10B@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	orr	w8, w10, w8
	str	w8, [x28, x24]
LBB0_16:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w10, [x23]
	tst	w10, w9
	b.eq	LBB0_12
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
Lloh13:
	adrp	x9, _CMD0_FIFO_RNW@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CMD0_FIFO_RNW@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
	add	x9, x28, x24
	str	w8, [x9]
	ldr	w8, [x20, #12]
	str	w8, [x9, #28]
	ldr	x8, [x20]
	str	x8, [x9, #8]
	b	LBB0_13
LBB0_18:
	mov	x0, x19
	mov	x1, x21
	bl	_cdns_i3c_master_alloc_xfer
	mov	x21, x0
	cbz	x0, LBB0_22
LBB0_19:
	mov	x0, x19
	mov	x1, x21
	bl	_cdns_i3c_master_queue_xfer
	add	x20, x21, #4
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x20
	bl	_wait_for_completion_timeout
	cbnz	w0, LBB0_21
; %bb.20:
	mov	x0, x19
	mov	x1, x21
	bl	_cdns_i3c_master_unqueue_xfer
LBB0_21:
	ldr	w19, [x21]
	mov	x0, x21
	bl	_cdns_i3c_master_free_xfer
	b	LBB0_3
LBB0_22:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_23:
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_CMD0_FIFO_PL_LEN_MAX,8,3       ; @CMD0_FIFO_PL_LEN_MAX
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_XMIT_BURST_WITHOUT_SUBADDR,4,2 ; @XMIT_BURST_WITHOUT_SUBADDR
	.comm	_I2C_M_TEN,4,2                  ; @I2C_M_TEN
	.comm	_CMD0_FIFO_IS_10B,4,2           ; @CMD0_FIFO_IS_10B
	.comm	_CMD0_FIFO_RNW,4,2              ; @CMD0_FIFO_RNW
	.no_dead_strip	_cdns_i3c_master_i2c_xfers
.subsections_via_symbols
