	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_auth_calculate_hmac       ## -- Begin function sctp_auth_calculate_hmac
	.p2align	4, 0x90
_sctp_auth_calculate_hmac:              ## @sctp_auth_calculate_hmac
	.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	%ecx, %r15d
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r14
	movl	12(%rdx), %edi
	callq	_ntohs
	movq	%rax, %r12
	movl	8(%rbx), %edi
	callq	_ntohs
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpq	(%r14), %r12
	jne	LBB0_2
## %bb.1:
	movq	16(%r14), %r15
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_2:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_sctp_auth_get_shkey
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	%r15d, %edx
	callq	_sctp_auth_asoc_create_secret
	movq	%rax, %r15
	xorl	%r12d, %r12d
	testq	%rax, %rax
	setne	%al
	je	LBB0_9
## %bb.4:
	movb	%al, %r12b
LBB0_5:
	movq	%r13, %rdi
	callq	_skb_tail_pointer
	subl	%ebx, %eax
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_sg_init_one
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %edi
	movl	%edi, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	(%rbx), %rbx
	movq	8(%r15), %rsi
	movl	(%r15), %edx
	callq	_crypto_hash_setkey
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	testl	%r12d, %r12d
	je	LBB0_9
LBB0_8:
	movq	%r15, %rdi
	callq	_sctp_auth_key_put
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	-48(%rbp), %edx
	leaq	-72(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rcx
	callq	_crypto_hash_digest
	testl	%r12d, %r12d
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_auth_calculate_hmac       ; -- Begin function sctp_auth_calculate_hmac
	.p2align	2
_sctp_auth_calculate_hmac:              ; @sctp_auth_calculate_hmac
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x3
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	ldr	w0, [x2, #12]
	bl	_ntohs
	mov	x24, x0
	ldr	w0, [x19, #8]
	bl	_ntohs
	mov	x22, x0
	ldr	x8, [x20]
	cmp	x24, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w24, #0
	ldr	x21, [x20, #16]
	b	LBB0_5
LBB0_2:
	mov	x0, x20
	mov	x1, x24
	bl	_sctp_auth_get_shkey
	cbz	x0, LBB0_8
; %bb.3:
	mov	x1, x0
	mov	x0, x20
	mov	x2, x21
	bl	_sctp_auth_asoc_create_secret
	cmp	x0, #0
	cset	w24, ne
	cbz	x0, LBB0_8
; %bb.4:
	mov	x21, x0
LBB0_5:
	mov	x0, x23
	bl	_skb_tail_pointer
	sub	w2, w0, w19
	add	x0, sp, #24
	mov	x1, x19
	bl	_sg_init_one
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	w0, [x8, x22, lsl #2]
	str	w0, [sp, #8]
	str	xzr, [sp, #16]
	ldr	x19, [x19]
	ldr	x1, [x21, #8]
	ldr	w2, [x21]
	bl	_crypto_hash_setkey
	cbz	x0, LBB0_9
; %bb.6:
	cbz	w24, LBB0_8
LBB0_7:
	mov	x0, x21
	bl	_sctp_auth_key_put
LBB0_8:
	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
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	w2, [sp, #24]
	add	x0, sp, #8
	add	x1, sp, #24
	mov	x3, x19
	bl	_crypto_hash_digest
	cbnz	w24, LBB0_7
	b	LBB0_8
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
