	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_csr1212_associate_keyval       ## -- Begin function csr1212_associate_keyval
	.p2align	4, 0x90
_csr1212_associate_keyval:              ## @csr1212_associate_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	$1, %edi
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.1:
	testq	%r14, %r14
	je	LBB0_11
## %bb.2:
	movl	8(%rbx), %eax
	movq	_CSR1212_KV_ID_DESCRIPTOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	je	LBB0_11
## %bb.3:
	movl	8(%r14), %ecx
	movq	_CSR1212_KV_ID_EXTENDED_KEY@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r11d
	movq	_CSR1212_KV_ID_EXTENDED_DATA@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r10d
	cmpl	%edx, %ecx
	je	LBB0_8
## %bb.4:
	movq	_CSR1212_KV_ID_DEPENDENT_INFO@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_8
## %bb.5:
	cmpl	%r11d, %ecx
	je	LBB0_8
## %bb.6:
	cmpl	%r10d, %ecx
	je	LBB0_8
## %bb.7:
	cmpl	$48, %ecx
	jl	LBB0_11
LBB0_8:
	cmpl	%r10d, %ecx
	sete	%r9b
	cmpl	%r11d, %ecx
	sete	%r15b
	movq	_CSR1212_KV_ID_EXTENDED_KEY_SPECIFIER_ID@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	cmpl	%r8d, %eax
	setne	%dl
	orb	%r15b, %dl
	cmpl	%r11d, %eax
	setne	%sil
	cmpb	$1, %dl
	jne	LBB0_11
## %bb.9:
	orb	%r9b, %sil
	je	LBB0_11
## %bb.10:
	xorl	%edx, %edx
	cmpl	%r11d, %eax
	setne	%dl
	cmpl	%r8d, %eax
	setne	%sil
	cmpl	%r11d, %ecx
	sete	%al
	andb	%sil, %al
	cmpl	%r10d, %ecx
	movzbl	%al, %eax
	cmovnel	%eax, %edx
	orb	%dl, %al
	movzbl	%al, %edi
LBB0_11:
	callq	_BUG_ON
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_csr1212_release_keyval
LBB0_13:
	movq	%r14, %rdi
	callq	_csr1212_keep_keyval
	movq	%r14, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSR1212_KV_ID_DESCRIPTOR,4,2   ## @CSR1212_KV_ID_DESCRIPTOR
	.comm	_CSR1212_KV_ID_DEPENDENT_INFO,4,2 ## @CSR1212_KV_ID_DEPENDENT_INFO
	.comm	_CSR1212_KV_ID_EXTENDED_KEY,4,2 ## @CSR1212_KV_ID_EXTENDED_KEY
	.comm	_CSR1212_KV_ID_EXTENDED_DATA,4,2 ## @CSR1212_KV_ID_EXTENDED_DATA
	.comm	_CSR1212_KV_ID_EXTENDED_KEY_SPECIFIER_ID,4,2 ## @CSR1212_KV_ID_EXTENDED_KEY_SPECIFIER_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_csr1212_associate_keyval       ; -- Begin function csr1212_associate_keyval
	.p2align	2
_csr1212_associate_keyval:              ; @csr1212_associate_keyval
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	mov	w0, #1
	cbz	x20, LBB0_7
; %bb.1:
	cbz	x19, LBB0_7
; %bb.2:
	ldr	w8, [x20, #8]
Lloh0:
	adrp	x9, _CSR1212_KV_ID_DESCRIPTOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CSR1212_KV_ID_DESCRIPTOR@GOTPAGEOFF]
Lloh2:
	ldr	w12, [x9]
	cmp	w8, w12
	b.eq	LBB0_6
; %bb.3:
Lloh3:
	adrp	x10, _CSR1212_KV_ID_DEPENDENT_INFO@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CSR1212_KV_ID_DEPENDENT_INFO@GOTPAGEOFF]
	ldr	w9, [x19, #8]
Lloh5:
	ldr	w13, [x10]
Lloh6:
	adrp	x10, _CSR1212_KV_ID_EXTENDED_KEY@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CSR1212_KV_ID_EXTENDED_KEY@GOTPAGEOFF]
Lloh8:
	adrp	x11, _CSR1212_KV_ID_EXTENDED_DATA@GOTPAGE
Lloh9:
	ldr	x11, [x11, _CSR1212_KV_ID_EXTENDED_DATA@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	ldr	w11, [x11]
	cmp	w9, w12
	ccmp	w9, w13, #4, ne
	ccmp	w9, w10, #4, ne
	ccmp	w9, w11, #4, ne
	b.eq	LBB0_5
; %bb.4:
	cmp	w9, #48
	b.lt	LBB0_6
LBB0_5:
	cmp	w8, w10
	ccmp	w9, w11, #4, eq
	cset	w13, eq
	cmp	w9, w10
Lloh12:
	adrp	x12, _CSR1212_KV_ID_EXTENDED_KEY_SPECIFIER_ID@GOTPAGE
Lloh13:
	ldr	x12, [x12, _CSR1212_KV_ID_EXTENDED_KEY_SPECIFIER_ID@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	ccmp	w8, w12, #0, ne
	ccmp	w13, #0, #4, ne
	b.ne	LBB0_10
LBB0_6:
	mov	w0, #1
LBB0_7:
	bl	_BUG_ON
	ldr	x0, [x20]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_csr1212_release_keyval
LBB0_9:
	mov	x0, x19
	bl	_csr1212_keep_keyval
	str	x19, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	cmp	w8, w10
	cset	w13, ne
	cmp	w9, w11
	cset	w11, ne
	cmp	w9, w10
	ccmp	w8, w12, #4, eq
	cset	w8, ne
	orr	w9, w8, w11
	cmp	w9, #0
	csel	w0, w8, w13, ne
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CSR1212_KV_ID_DESCRIPTOR,4,2   ; @CSR1212_KV_ID_DESCRIPTOR
	.comm	_CSR1212_KV_ID_DEPENDENT_INFO,4,2 ; @CSR1212_KV_ID_DEPENDENT_INFO
	.comm	_CSR1212_KV_ID_EXTENDED_KEY,4,2 ; @CSR1212_KV_ID_EXTENDED_KEY
	.comm	_CSR1212_KV_ID_EXTENDED_DATA,4,2 ; @CSR1212_KV_ID_EXTENDED_DATA
	.comm	_CSR1212_KV_ID_EXTENDED_KEY_SPECIFIER_ID,4,2 ; @CSR1212_KV_ID_EXTENDED_KEY_SPECIFIER_ID
.subsections_via_symbols
