	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __csr1212_attach_keyval_to_directory
___csr1212_attach_keyval_to_directory:  ## @__csr1212_attach_keyval_to_directory
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	$1, %edi
	testq	%r12, %r12
	je	LBB0_3
## %bb.1:
	testq	%r14, %r14
	je	LBB0_3
## %bb.2:
	movq	16(%r12), %rax
	movq	_CSR1212_KV_TYPE_DIRECTORY@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
LBB0_3:
	callq	_BUG_ON
	movl	$24, %edi
	callq	_CSR1212_MALLOC
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_csr1212_keep_keyval
LBB0_7:
	movq	%r14, 16(%rbx)
	movq	$0, (%rbx)
	movq	(%r12), %rax
	movq	%rax, 8(%rbx)
	cmpq	$0, 8(%r12)
	je	LBB0_8
## %bb.9:
	testq	%rax, %rax
	je	LBB0_11
LBB0_10:
	movq	%rbx, (%rax)
LBB0_11:
	movq	%rbx, (%r12)
	movq	_CSR1212_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, 8(%r12)
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_CSR1212_KV_TYPE_DIRECTORY,8,3  ## @CSR1212_KV_TYPE_DIRECTORY
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CSR1212_SUCCESS,4,2            ## @CSR1212_SUCCESS
	.no_dead_strip	___csr1212_attach_keyval_to_directory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __csr1212_attach_keyval_to_directory
___csr1212_attach_keyval_to_directory:  ; @__csr1212_attach_keyval_to_directory
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	w0, #1
	cbz	x19, LBB0_3
; %bb.1:
	cbz	x20, LBB0_3
; %bb.2:
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x9, _CSR1212_KV_TYPE_DIRECTORY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CSR1212_KV_TYPE_DIRECTORY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
LBB0_3:
	bl	_BUG_ON
	mov	w0, #24
	bl	_CSR1212_MALLOC
	cbz	x0, LBB0_10
; %bb.4:
	mov	x22, x0
	cbz	w21, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_csr1212_keep_keyval
LBB0_6:
	str	x20, [x22, #16]
	ldp	x8, x9, [x19]
	stp	xzr, x8, [x22]
	cbz	x9, LBB0_12
; %bb.7:
	cbz	x8, LBB0_9
LBB0_8:
	str	x22, [x8]
LBB0_9:
	str	x22, [x19]
Lloh3:
	adrp	x8, _CSR1212_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CSR1212_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_10:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
	str	x22, [x19, #8]
	cbnz	x8, LBB0_8
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CSR1212_KV_TYPE_DIRECTORY,8,3  ; @CSR1212_KV_TYPE_DIRECTORY
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CSR1212_SUCCESS,4,2            ; @CSR1212_SUCCESS
	.no_dead_strip	___csr1212_attach_keyval_to_directory
.subsections_via_symbols
