	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scmi_reset_protocol_init
_scmi_reset_protocol_init:              ## @scmi_reset_protocol_init
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_SCMI_PROTOCOL_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_scmi_version_get
	movl	16(%r14), %r15d
	movl	-36(%rbp), %edi
	callq	_PROTOCOL_REV_MAJOR
	movl	%eax, %ebx
	movl	-36(%rbp), %edi
	callq	_PROTOCOL_REV_MINOR
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
	movl	16(%r14), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_scmi_reset_attributes_get
	movl	16(%r14), %edi
	movl	(%r15), %esi
	movl	(%rbx), %ecx
	movl	$4, %edx
	callq	_devm_kcalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.4:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rax, %rdx
	callq	_scmi_reset_domain_attributes_get
	cmpl	$2, (%r15)
	jl	LBB0_7
## %bb.5:
	movl	$1, %ebx
	movl	$4, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdx
	addq	%r12, %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_scmi_reset_domain_attributes_get
	incq	%rbx
	movslq	(%r15), %rax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_7:
	movq	_reset_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r14)
	movq	%r15, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCMI_PROTOCOL_RESET,4,2        ## @SCMI_PROTOCOL_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reset Version %d.%d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_reset_ops,4,2                  ## @reset_ops
	.no_dead_strip	_scmi_reset_protocol_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scmi_reset_protocol_init
_scmi_reset_protocol_init:              ; @scmi_reset_protocol_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _SCMI_PROTOCOL_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCMI_PROTOCOL_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_scmi_version_get
	ldr	w20, [x19, #16]
	ldr	w0, [sp, #12]
	bl	_PROTOCOL_REV_MAJOR
	mov	x21, x0
	ldr	w0, [sp, #12]
	bl	_PROTOCOL_REV_MINOR
	mov	x3, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
	ldr	w0, [x19, #16]
Lloh5:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_scmi_reset_attributes_get
	ldr	w0, [x19, #16]
	ldr	w1, [x20]
	ldr	w3, [x21]
	mov	w2, #4
	bl	_devm_kcalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x2, x0
	mov	x0, x19
	mov	w1, #0
	bl	_scmi_reset_domain_attributes_get
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.4:
	mov	w21, #1
	mov	w22, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x2, x8, x22
	mov	x0, x19
	mov	x1, x21
	bl	_scmi_reset_domain_attributes_get
	add	x21, x21, #1
	ldrsw	x8, [x20]
	add	x22, x22, #4
	cmp	x21, x8
	b.lt	LBB0_5
LBB0_6:
	mov	w0, #0
Lloh7:
	adrp	x8, _reset_ops@GOTPAGE
Lloh8:
	ldr	x8, [x8, _reset_ops@GOTPAGEOFF]
	stp	x20, x8, [x19]
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SCMI_PROTOCOL_RESET,4,2        ; @SCMI_PROTOCOL_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reset Version %d.%d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_reset_ops,4,2                  ; @reset_ops
	.no_dead_strip	_scmi_reset_protocol_init
.subsections_via_symbols
