	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xfrm_alloc_spi                 ## -- Begin function xfrm_alloc_spi
	.p2align	4, 0x90
_xfrm_alloc_spi:                        ## @xfrm_alloc_spi
	.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
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_xs_net
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_htonl
	movq	%rax, %r12
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	movl	%r13d, %edi
	callq	_htonl
	movq	%rax, %r13
	movl	52(%r15), %ebx
	andl	48(%r15), %ebx
	movq	%r15, %rdi
	callq	_spin_lock_bh
	movq	40(%r15), %rax
	movq	_XFRM_STATE_DEAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.1:
	cmpq	$0, 24(%r15)
	movl	$0, %r14d
	je	LBB0_2
LBB0_15:
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%r14d, %r14d
	movq	_ENOENT@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	cmpq	%r13, %r12
	jne	LBB0_3
## %bb.7:
	leaq	32(%r15), %rdx
	movl	8(%r15), %r9d
	movl	16(%r15), %r8d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movq	%r12, %rcx
	callq	_xfrm_state_lookup_with_mark
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rax, %rdi
	callq	_xfrm_state_put
	jmp	LBB0_15
LBB0_3:
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	subl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	incl	%ebx
	je	LBB0_15
## %bb.4:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	leaq	32(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_net_random
	cltd
	movl	%ebx, %r14d
	idivl	%ebx
	movl	%edx, %r13d
	addl	-48(%rbp), %r13d                ## 4-byte Folded Reload
	movl	%r13d, %edi
	callq	_htonl
	movl	8(%r15), %r9d
	movl	16(%r15), %r8d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, %rcx
	callq	_xfrm_state_lookup_with_mark
	testq	%rax, %rax
	je	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rdi
	callq	_xfrm_state_put
	decl	%r12d
	movl	%r14d, %ebx
	jne	LBB0_5
## %bb.11:
	movq	24(%r15), %r12
	jmp	LBB0_12
LBB0_9:
	movq	%r12, 24(%r15)
	jmp	LBB0_13
LBB0_6:
	movl	%r13d, %edi
	callq	_htonl
	movq	%rax, %r12
	movq	%rax, 24(%r15)
LBB0_12:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_13:
	testq	%r12, %r12
	je	LBB0_15
## %bb.14:
	movq	_xfrm_state_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	leaq	32(%r15), %rsi
	movq	24(%r15), %rdx
	movl	8(%r15), %r8d
	movl	16(%r15), %ecx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_xfrm_spi_hash
	leaq	4(%r15), %rdi
	movl	%eax, %esi
	addq	(%rbx), %rsi
	callq	_hlist_add_head
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	xorl	%r14d, %r14d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_XFRM_STATE_DEAD,8,3            ## @XFRM_STATE_DEAD
	.comm	_xfrm_state_lock,4,2            ## @xfrm_state_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xfrm_alloc_spi                 ; -- Begin function xfrm_alloc_spi
	.p2align	2
_xfrm_alloc_spi:                        ; @xfrm_alloc_spi
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x2
	mov	x22, x1
	mov	x19, x0
	bl	_xs_net
	mov	x20, x0
Lloh0:
	adrp	x21, _ENOENT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ENOENT@GOTPAGEOFF]
	ldr	w23, [x21]
	mov	x0, x22
	bl	_htonl
	mov	x24, x0
	mov	x0, x25
	bl	_htonl
	mov	x26, x0
	ldp	w27, w28, [x19, #48]
	mov	x0, x19
	bl	_spin_lock_bh
	ldr	x8, [x19, #40]
Lloh2:
	adrp	x9, _XFRM_STATE_DEAD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _XFRM_STATE_DEAD@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	neg	w21, w23
	b	LBB0_4
LBB0_2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_5
LBB0_3:
	mov	w21, #0
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	and	w23, w28, w27
	ldr	w8, [x21]
	neg	w21, w8
	cmp	x24, x26
	b.ne	LBB0_8
; %bb.6:
	add	x2, x19, #32
	ldr	w4, [x19, #16]
	ldr	w5, [x19, #8]
	mov	x0, x20
	mov	x1, x23
	mov	x3, x24
	bl	_xfrm_state_lookup_with_mark
	cbz	x0, LBB0_13
; %bb.7:
	bl	_xfrm_state_put
	b	LBB0_4
LBB0_8:
	sub	w8, w25, w22
	adds	w26, w8, #1
	b.hs	LBB0_4
; %bb.9:
	add	x24, x19, #32
	mov	x27, x26
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	bl	_net_random
	sdiv	w8, w0, w26
	msub	w8, w8, w26, w0
	add	w25, w8, w22
	mov	x0, x25
	bl	_htonl
	mov	x3, x0
	ldr	w4, [x19, #16]
	ldr	w5, [x19, #8]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x24
	bl	_xfrm_state_lookup_with_mark
	cbz	x0, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	bl	_xfrm_state_put
	subs	w27, w27, #1
	b.ne	LBB0_10
; %bb.12:
	ldr	x24, [x19, #24]
	cbnz	x24, LBB0_15
	b	LBB0_4
LBB0_13:
	str	x24, [x19, #24]
	cbnz	x24, LBB0_15
	b	LBB0_4
LBB0_14:
	mov	x0, x25
	bl	_htonl
	mov	x24, x0
	str	x0, [x19, #24]
	cbz	x24, LBB0_4
LBB0_15:
Lloh5:
	adrp	x21, _xfrm_state_lock@GOTPAGE
Lloh6:
	ldr	x21, [x21, _xfrm_state_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_spin_lock_bh
	add	x1, x19, #32
	ldr	x2, [x19, #24]
	ldr	w3, [x19, #16]
	ldr	w4, [x19, #8]
	mov	x0, x20
	bl	_xfrm_spi_hash
	add	x8, x19, #4
	ldr	x9, [x20]
	add	x1, x9, w0, uxtw
	mov	x0, x8
	bl	_hlist_add_head
	mov	x0, x21
	bl	_spin_unlock_bh
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_XFRM_STATE_DEAD,8,3            ; @XFRM_STATE_DEAD
	.comm	_xfrm_state_lock,4,2            ; @xfrm_state_lock
.subsections_via_symbols
