	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_i3c_master_send_ccc_cmd
_cdns_i3c_master_send_ccc_cmd:          ## @cdns_i3c_master_send_ccc_cmd
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_to_cdns_i3c_master
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_cdns_i3c_master_alloc_xfer
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	8(%rax), %rbx
	movl	(%r14), %edi
	callq	_CMD1_FIFO_CCC
	movl	%eax, 20(%rbx)
	movq	_CMD0_FIFO_IS_CCC@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_CMD0_FIFO_PL_LEN
	orl	%r13d, %eax
	movl	%eax, (%rbx)
	movq	_I3C_CCC_DIRECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	je	LBB0_4
## %bb.3:
	movq	8(%r14), %rax
	movl	8(%rax), %edi
	callq	_CMD0_FIFO_DEV_ADDR
	orl	(%rbx), %eax
	movl	%eax, (%rbx)
LBB0_4:
	cmpq	$0, 16(%r14)
	je	LBB0_6
## %bb.5:
	movq	_CMD0_FIFO_RNW@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movq	8(%r14), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 16(%rbx)
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_6:
	movq	8(%r14), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 8(%rbx)
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
LBB0_7:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_cdns_i3c_master_queue_xfer
	movq	%r12, %rbx
	addq	$16, %rbx
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_cdns_i3c_master_unqueue_xfer
LBB0_9:
	movl	(%r12), %ebx
	movq	8(%r12), %rdi
	callq	_cdns_i3c_cmd_get_err
	movl	%eax, 4(%r14)
	movq	%r12, %rdi
	callq	_cdns_i3c_master_free_xfer
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CMD0_FIFO_IS_CCC,4,2           ## @CMD0_FIFO_IS_CCC
	.comm	_I3C_CCC_DIRECT,4,2             ## @I3C_CCC_DIRECT
	.comm	_CMD0_FIFO_RNW,4,2              ## @CMD0_FIFO_RNW
	.no_dead_strip	_cdns_i3c_master_send_ccc_cmd
.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_send_ccc_cmd
_cdns_i3c_master_send_ccc_cmd:          ; @cdns_i3c_master_send_ccc_cmd
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	bl	_to_cdns_i3c_master
	mov	x21, x0
	mov	w1, #1
	bl	_cdns_i3c_master_alloc_xfer
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x19]
	bl	_CMD1_FIFO_CCC
	str	w0, [x22, #20]
Lloh0:
	adrp	x8, _CMD0_FIFO_IS_CCC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD0_FIFO_IS_CCC@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_CMD0_FIFO_PL_LEN
	orr	w8, w0, w23
	str	w8, [x22]
	ldr	w9, [x19]
Lloh3:
	adrp	x10, _I3C_CCC_DIRECT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _I3C_CCC_DIRECT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #8]
	bl	_CMD0_FIFO_DEV_ADDR
	ldr	w8, [x22]
	orr	w8, w8, w0
	str	w8, [x22]
LBB0_3:
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_6
; %bb.4:
Lloh6:
	adrp	x9, _CMD0_FIFO_RNW@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CMD0_FIFO_RNW@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x22], #12
	ldr	x8, [x19, #8]
	b	LBB0_7
LBB0_5:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_6:
	ldr	x8, [x19, #8]
	add	x22, x22, #4
LBB0_7:
	ldr	d0, [x8]
	str	d0, [x22]
	mov	x0, x21
	mov	x1, x20
	bl	_cdns_i3c_master_queue_xfer
	add	x22, x20, #16
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x22
	bl	_wait_for_completion_timeout
	cbnz	w0, LBB0_9
; %bb.8:
	mov	x0, x21
	mov	x1, x20
	bl	_cdns_i3c_master_unqueue_xfer
LBB0_9:
	ldr	w21, [x20]
	ldr	x0, [x20, #8]
	bl	_cdns_i3c_cmd_get_err
	str	w0, [x19, #4]
	mov	x0, x20
	bl	_cdns_i3c_master_free_xfer
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CMD0_FIFO_IS_CCC,4,2           ; @CMD0_FIFO_IS_CCC
	.comm	_I3C_CCC_DIRECT,4,2             ; @I3C_CCC_DIRECT
	.comm	_CMD0_FIFO_RNW,4,2              ; @CMD0_FIFO_RNW
	.no_dead_strip	_cdns_i3c_master_send_ccc_cmd
.subsections_via_symbols
