	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_csr1212_parse_keyval           ## -- Begin function csr1212_parse_keyval
	.p2align	4, 0x90
_csr1212_parse_keyval:                  ## @csr1212_parse_keyval
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_CSR1212_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	8(%rsi), %r12
	movq	(%rdi), %rdi
	subq	(%rsi), %rdi
	callq	_bytes_to_quads
	movq	%rax, %rbx
	movl	12(%r12,%rax,4), %edi
	callq	_be16_to_cpu
	movq	(%r12,%rbx,4), %rdi
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	8(%r12,%rbx,4), %edx
	movq	8(%r15), %rcx
	movl	%eax, %ebx
	addq	$12, %rcx
	movl	%eax, %esi
	callq	_csr1212_check_crc
	movl	24(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_9
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_12
## %bb.2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jle	LBB0_8
## %bb.3:
	movl	%ebx, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	cmpq	%r15, %r14
	je	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,4), %rax
	movl	(%rax,%r14,4), %r12d
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rbx
	incq	%r14
	movl	%r14d, %edi
	callq	_quads_to_bytes
	addq	%rax, %rbx
	movq	%r13, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	callq	_csr1212_parse_dir_entry
	movl	%eax, %r13d
	cmpq	%r15, %r14
	jne	LBB0_4
LBB0_8:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 20(%r14)
	jmp	LBB0_12
LBB0_9:
	movl	28(%r14), %eax
	movq	_CSR1212_KV_ID_EXTENDED_ROM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.10:
	movl	%ebx, %edi
	callq	_quads_to_bytes
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_CSR1212_MALLOC
	movl	%eax, 16(%r14)
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	movl	%ebx, 12(%r14)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,4), %rsi
	movl	%eax, %edi
	movq	%r15, %rdx
	callq	_memcpy
LBB0_12:
	movl	$1, 8(%r14)
LBB0_13:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_CSR1212_SUCCESS,4,2            ## @CSR1212_SUCCESS
	.comm	_CSR1212_KV_ID_EXTENDED_ROM,4,2 ## @CSR1212_KV_ID_EXTENDED_ROM
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_csr1212_parse_keyval           ; -- Begin function csr1212_parse_keyval
	.p2align	2
_csr1212_parse_keyval:                  ; @csr1212_parse_keyval
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CSR1212_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CSR1212_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	x8, [x0]
	ldp	x9, x21, [x1]
	sub	x0, x8, x9
	bl	_bytes_to_quads
	add	x24, x21, x0, lsl #2
	ldr	w0, [x24, #12]
	bl	_be16_to_cpu
	mov	x21, x0
	ldr	x0, [x24]
	ldr	w2, [x24, #8]
	ldr	x8, [x22, #8]
	add	x3, x8, #12
	mov	x1, x21
	bl	_csr1212_check_crc
	ldr	w8, [x19, #24]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_11
; %bb.2:
	cmp	w21, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x22, #0
	mov	w25, w21
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	cmp	x22, x25
	b.eq	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	w23, [x8, x22, lsl #2]
	cbz	w23, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x20, [x19]
	add	x22, x22, #1
	mov	x0, x22
	bl	_quads_to_bytes
	add	x2, x0, x20
	mov	x0, x19
	mov	x1, x23
	bl	_csr1212_parse_dir_entry
	mov	x20, x0
	cmp	x22, x25
	b.ne	LBB0_5
LBB0_7:
	str	w21, [x19, #20]
	b	LBB0_11
LBB0_8:
	ldr	w8, [x19, #28]
Lloh3:
	adrp	x9, _CSR1212_KV_ID_EXTENDED_ROM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CSR1212_KV_ID_EXTENDED_ROM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_11
; %bb.9:
	mov	x0, x21
	bl	_quads_to_bytes
	mov	x22, x0
	bl	_CSR1212_MALLOC
	str	w0, [x19, #16]
	cbz	w0, LBB0_13
; %bb.10:
	str	w21, [x19, #12]
	ldr	x1, [x24]
	mov	x2, x22
	bl	_memcpy
LBB0_11:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CSR1212_SUCCESS,4,2            ; @CSR1212_SUCCESS
	.comm	_CSR1212_KV_ID_EXTENDED_ROM,4,2 ; @CSR1212_KV_ID_EXTENDED_ROM
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
