	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xfrm_register_mode             ## -- Begin function xfrm_register_mode
	.p2align	4, 0x90
_xfrm_register_mode:                    ## @xfrm_register_mode
	.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	%esi, %ebx
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	_XFRM_MODE_MAX@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setae	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movl	%ebx, %edi
	callq	_xfrm_state_lock_afinfo
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EAFNOSUPPORT@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	movq	8(%r14), %r12
	movq	(%r15), %rax
	cmpq	$0, (%r12,%rax,8)
	je	LBB0_7
## %bb.6:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_7:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	(%r14), %edi
	callq	_try_module_get
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	%r14, 8(%r15)
	movq	(%r15), %rax
	movq	%r15, (%r12,%rax,8)
	xorl	%ebx, %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_xfrm_state_unlock_afinfo
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_XFRM_MODE_MAX,8,3              ## @XFRM_MODE_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EAFNOSUPPORT,4,2               ## @EAFNOSUPPORT
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xfrm_register_mode             ; -- Begin function xfrm_register_mode
	.p2align	2
_xfrm_register_mode:                    ; @xfrm_register_mode
	.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	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _XFRM_MODE_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XFRM_MODE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, hs
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_xfrm_state_lock_afinfo
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _EAFNOSUPPORT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAFNOSUPPORT@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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_6:
	ldr	x22, [x19, #8]
	ldr	x8, [x20]
	ldr	x8, [x22, x8, lsl #3]
	cbz	x8, LBB0_8
; %bb.7:
Lloh7:
	adrp	x8, _EEXIST@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_8:
Lloh10:
	adrp	x8, _ENOENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	ldr	w0, [x19]
	bl	_try_module_get
	cbz	w0, LBB0_10
; %bb.9:
	mov	w21, #0
	str	x19, [x20, #8]
	ldr	x8, [x20]
	str	x20, [x22, x8, lsl #3]
	b	LBB0_11
LBB0_10:
	neg	w21, w21
LBB0_11:
	mov	x0, x19
	bl	_xfrm_state_unlock_afinfo
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_XFRM_MODE_MAX,8,3              ; @XFRM_MODE_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EAFNOSUPPORT,4,2               ; @EAFNOSUPPORT
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
