	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sctp_pack_cookie
_sctp_pack_cookie:                      ## @sctp_pack_cookie
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movq	%r8, -104(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r15
	movq	%rsi, %r14
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %rax
	movl	(%rax), %edi
	callq	_ntohs
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r13), %esi
	addl	%r13d, %eax
	addl	$4, %eax
	movq	_SCTP_COOKIE_MULTIPLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	cltd
	idivl	%r12d
	subl	%edx, %r12d
	testl	%edx, %edx
	cmovel	%edx, %r12d
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	leal	(%r12,%rsi), %edi
	addl	$44, %edi
	movl	%edi, (%r15)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r13
	movq	_SCTP_PARAM_STATE_COOKIE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movl	(%r15), %edi
	callq	_htons
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%eax, (%rbx)
	movups	16(%r14), %xmm0
	movups	32(%r14), %xmm1
	movups	%xmm0, 8(%r13)
	movups	%xmm1, 24(%r13)
	leaq	24(%r13), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 8(%r13)
	movl	8(%r14), %eax
	movl	%eax, 32(%r13)
	movl	4(%r14), %eax
	movl	%eax, 28(%r13)
	callq	_do_gettimeofday
	movl	(%r14), %edi
	movl	24(%r13), %esi
	callq	_TIMEVAL_ADD
	movq	16(%r13), %r14
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rbx
	movl	(%rbx), %edi
	callq	_ntohs
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movq	16(%r13), %rbx
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_ntohs
	cltq
	leaq	(%rbx,%rax,4), %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	callq	_sctp_sk
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.2:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leal	(%r12,%rax), %r14d
	addl	$4, %r14d
	leaq	8(%r13), %rsi
	leaq	-56(%rbp), %rdi
	movl	%r14d, %edx
	callq	_sg_init_one
	movq	_SCTP_SECRET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	16(%rdx), %rax
	movq	(%rdx), %rcx
	movq	(%rax,%rcx,8), %rbx
	movl	8(%rdx), %edi
	callq	_sctp_sk
	movq	(%rax), %rdi
	movq	%rdi, -120(%rbp)
	movq	$0, -112(%rbp)
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_crypto_hash_setkey
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movl	(%r13), %ecx
	leaq	-120(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	movl	%r14d, %edx
	callq	_crypto_hash_digest
	testq	%rax, %rax
	je	LBB0_7
LBB0_4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	movq	-80(%rbp), %r15                 ## 8-byte Reload
LBB0_5:
	movl	$0, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_8:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCTP_COOKIE_MULTIPLE,4,2       ## @SCTP_COOKIE_MULTIPLE
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_SCTP_PARAM_STATE_COOKIE,4,2    ## @SCTP_PARAM_STATE_COOKIE
	.comm	_SCTP_SECRET_SIZE,4,2           ## @SCTP_SECRET_SIZE
	.no_dead_strip	_sctp_pack_cookie
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sctp_pack_cookie
_sctp_pack_cookie:                      ; @sctp_pack_cookie
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x23, x5
	mov	x24, x4
	mov	x19, x3
	mov	x25, x2
	mov	x26, x1
	mov	x22, x0
	ldr	x8, [x2]
	ldr	w0, [x8]
	bl	_ntohs
	add	w8, w23, w0
	add	w8, w8, #4
Lloh0:
	adrp	x9, _SCTP_COOKIE_MULTIPLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SCTP_COOKIE_MULTIPLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w10, w10, w9, w8
	sub	w9, w9, w10
	cmp	w10, #0
	csel	w9, wzr, w9, eq
	add	w21, w9, w8
	add	w0, w21, #40
	str	w0, [x19]
Lloh3:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x28, [x0, #8]
Lloh6:
	adrp	x8, _SCTP_PARAM_STATE_COOKIE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SCTP_PARAM_STATE_COOKIE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x0, #4]
	ldr	w0, [x19]
	bl	_htons
	str	w0, [x20]
	ldp	q1, q0, [x26, #16]
	stur	q1, [x28, #8]
	stur	q0, [x28, #24]
	add	x0, x28, #24
	str	w23, [x28, #8]
	ldur	d0, [x26, #4]
	stur	d0, [x28, #28]
	bl	_do_gettimeofday
	ldr	w0, [x26]
	ldr	w1, [x28, #24]
	bl	_TIMEVAL_ADD
	ldr	x26, [x28, #16]
	ldr	x27, [x25]
	ldr	w0, [x27]
	bl	_ntohs
	mov	x2, x0
	mov	x0, x26
	mov	x1, x27
	bl	_memcpy
	ldr	x26, [x28, #16]
	ldr	x8, [x25]
	ldr	w0, [x8]
	bl	_ntohs
	add	x0, x26, w0, sxtw #2
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
	ldr	w0, [x22, #8]
	bl	_sctp_sk
	ldr	x8, [x0]
	cbz	x8, LBB0_6
; %bb.2:
	add	x1, x28, #8
	add	x0, sp, #24
	mov	x2, x21
	bl	_sg_init_one
Lloh9:
	adrp	x8, _SCTP_SECRET_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SCTP_SECRET_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
	ldr	x8, [x22, #16]
	ldr	x9, [x22]
	ldr	x24, [x8, x9, lsl #3]
	ldr	w0, [x22, #8]
	bl	_sctp_sk
	ldr	x0, [x0]
	stp	x0, xzr, [sp, #8]
	mov	x1, x24
	mov	x2, x23
	bl	_crypto_hash_setkey
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	w3, [x28]
	add	x0, sp, #8
	add	x1, sp, #24
	mov	x2, x21
	bl	_crypto_hash_digest
	cbz	x0, LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_kfree
LBB0_5:
	mov	x20, #0
	str	wzr, [x19]
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SCTP_COOKIE_MULTIPLE,4,2       ; @SCTP_COOKIE_MULTIPLE
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_SCTP_PARAM_STATE_COOKIE,4,2    ; @SCTP_PARAM_STATE_COOKIE
	.comm	_SCTP_SECRET_SIZE,4,2           ; @SCTP_SECRET_SIZE
	.no_dead_strip	_sctp_pack_cookie
.subsections_via_symbols
