	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scmi_base_implementation_list_get
_scmi_base_implementation_list_get:     ## @scmi_base_implementation_list_get
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rdi), %rbx
	movq	_BASE_DISCOVER_LIST_PROTOCOLS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SCMI_PROTOCOL_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %r9
	movl	$4, %ecx
	xorl	%r8d, %r8d
	callq	_scmi_xfer_get_init
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_28
## %bb.1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax
	movq	%r14, %rcx
	movq	(%rax), %r14
	movq	8(%rax), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	leaq	16(%r14), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	112(%rcx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	16(%rcx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	32(%r14), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	12(%rcx), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, %eax
	je	LBB0_26
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
                                        ##     Child Loop BB0_23 Depth 2
	movl	%r15d, %ebx
	movl	%r15d, %edi
	callq	_cpu_to_le32
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_scmi_do_xfer
	testl	%eax, %eax
	jne	LBB0_24
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rbx), %r15d
	movq	_MAX_PROTOCOLS_IMP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	jg	LBB0_25
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, %eax
	jle	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%ebx, %r8
	movl	%eax, %r10d
	cmpl	$8, %eax
	jb	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r8,4), %rdx
	subq	-104(%rbp), %rdx                ## 8-byte Folded Reload
	cmpq	$32, %rdx
	jae	LBB0_10
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdx, %rsi
	notq	%rsi
	addq	%r10, %rsi
	movq	%r10, %rdi
	andq	$3, %rdi
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r8,4), %rbx
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	16(%r14,%rdx,4), %ecx
	movl	%ecx, (%rbx,%rdx,4)
	incq	%rdx
	decq	%rdi
	jne	LBB0_20
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$3, %rsi
	jb	LBB0_2
## %bb.22:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r8,4), %rsi
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	16(%r14,%rdx,4), %ecx
	movl	%ecx, -12(%rsi,%rdx,4)
	movl	20(%r14,%rdx,4), %ecx
	movl	%ecx, -8(%rsi,%rdx,4)
	movl	24(%r14,%rdx,4), %ecx
	movl	%ecx, -4(%rsi,%rdx,4)
	movl	28(%r14,%rdx,4), %ecx
	movl	%ecx, (%rsi,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %r10
	jne	LBB0_23
	jmp	LBB0_2
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%r10d, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rsi
	movq	%rsi, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r9d
	andl	$3, %r9d
	cmpq	$24, %rsi
	jae	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	andq	$-4, %rdi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r8,4), %rbx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	16(%r14,%rsi,4), %xmm0
	movups	32(%r14,%rsi,4), %xmm1
	movups	%xmm0, -112(%rbx,%rsi,4)
	movups	%xmm1, -96(%rbx,%rsi,4)
	movups	48(%r14,%rsi,4), %xmm0
	movups	64(%r14,%rsi,4), %xmm1
	movups	%xmm0, -80(%rbx,%rsi,4)
	movups	%xmm1, -64(%rbx,%rsi,4)
	movups	80(%r14,%rsi,4), %xmm0
	movups	96(%r14,%rsi,4), %xmm1
	movups	%xmm0, -48(%rbx,%rsi,4)
	movups	%xmm1, -32(%rbx,%rsi,4)
	movups	112(%r14,%rsi,4), %xmm0
	movups	128(%r14,%rsi,4), %xmm1
	movups	%xmm0, -16(%rbx,%rsi,4)
	movups	%xmm1, (%rbx,%rsi,4)
	addq	$32, %rsi
	addq	$-4, %rdi
	jne	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	testq	%r9, %r9
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rsi,%r8), %rdi
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rdi,4), %rdi
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rsi,4), %rsi
	shlq	$5, %r9
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rsi,%rbx), %xmm0
	movups	(%rsi,%rbx), %xmm1
	movups	%xmm0, -16(%rdi,%rbx)
	movups	%xmm1, (%rdi,%rbx)
	addq	$32, %rbx
	cmpq	%rbx, %r9
	jne	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r10, %rdx
	je	LBB0_2
	jmp	LBB0_18
LBB0_24:
	movl	%eax, %r13d
	jmp	LBB0_27
LBB0_25:
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
LBB0_26:
	xorl	%r13d, %r13d
LBB0_27:
	movq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_scmi_xfer_put
LBB0_28:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BASE_DISCOVER_LIST_PROTOCOLS,4,2 ## @BASE_DISCOVER_LIST_PROTOCOLS
	.comm	_SCMI_PROTOCOL_BASE,4,2         ## @SCMI_PROTOCOL_BASE
	.comm	_MAX_PROTOCOLS_IMP,4,2          ## @MAX_PROTOCOLS_IMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No. of Protocol > MAX_PROTOCOLS_IMP"

	.no_dead_strip	_scmi_base_implementation_list_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scmi_base_implementation_list_get
_scmi_base_implementation_list_get:     ; @scmi_base_implementation_list_get
	.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, x1
	mov	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _BASE_DISCOVER_LIST_PROTOCOLS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BASE_DISCOVER_LIST_PROTOCOLS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _SCMI_PROTOCOL_BASE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCMI_PROTOCOL_BASE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x5, sp, #8
	mov	w3, #4
	mov	w4, #0
	bl	_scmi_xfer_get_init
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.1:
	str	x20, [sp]                       ; 8-byte Folded Spill
	mov	w22, #0
	ldr	x8, [sp, #8]
	ldp	x25, x24, [x8]
	add	x26, x25, #16
	add	x27, x21, #32
	add	x28, x25, #32
Lloh6:
	adrp	x20, _MAX_PROTOCOLS_IMP@GOTPAGE
Lloh7:
	ldr	x20, [x20, _MAX_PROTOCOLS_IMP@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x8
	cbz	w0, LBB0_16
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
	mov	x0, x22
	bl	_cpu_to_le32
	str	w0, [x24]
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_scmi_do_xfer
	cbnz	w0, LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x25]
	bl	_le32_to_cpu
	ldr	w9, [x20]
	add	w8, w0, w22
	cmp	w8, w9
	b.gt	LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x10, w22
	mov	w9, w0
	cmp	w0, #16
	b.lo	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x21, x10, lsl #2
	sub	x11, x11, x26
	cmp	x11, #64
	b.hs	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x11, #0
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x11, x10
	add	x10, x21, x10, lsl #2
	add	x12, x26, x11, lsl #2
	sub	x9, x9, x11
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x12], #4
	str	w11, [x10], #4
	subs	x9, x9, #1
	b.ne	LBB0_10
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	and	x11, x9, #0xfffffff0
	add	x12, x27, x10, lsl #2
	mov	x13, x28
	mov	x14, x11
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x13, #-16]
	ldp	q2, q3, [x13, #16]
	stp	q0, q1, [x12, #-32]
	stp	q2, q3, [x12], #64
	add	x13, x13, #64
	subs	x14, x14, #16
	b.ne	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	x11, x9
	b.eq	LBB0_2
	b	LBB0_9
LBB0_14:
	mov	x23, x0
	b	LBB0_17
LBB0_15:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_dev_err
LBB0_16:
	mov	w23, #0
LBB0_17:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_scmi_xfer_put
LBB0_18:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BASE_DISCOVER_LIST_PROTOCOLS,4,2 ; @BASE_DISCOVER_LIST_PROTOCOLS
	.comm	_SCMI_PROTOCOL_BASE,4,2         ; @SCMI_PROTOCOL_BASE
	.comm	_MAX_PROTOCOLS_IMP,4,2          ; @MAX_PROTOCOLS_IMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No. of Protocol > MAX_PROTOCOLS_IMP"

	.no_dead_strip	_scmi_base_implementation_list_get
.subsections_via_symbols
