	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sctp_gen_sack
_sctp_gen_sack:                         ## @sctp_gen_sack
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	24(%rdi), %r13
	testl	%esi, %esi
	je	LBB0_1
LBB0_4:
	movl	$1, 8(%r15)
LBB0_5:
	leaq	16(%r15), %rbx
	movq	%rbx, %rdi
	callq	_sctp_tsnmap_get_ctsn
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_sctp_tsnmap_get_max_tsn_seen
	cmpq	%r12, %rax
	jne	LBB0_6
## %bb.9:
	cmpl	$0, 8(%r15)
	jne	LBB0_7
## %bb.10:
	movl	12(%r15), %eax
	incl	%eax
	movl	%eax, 12(%r15)
	testq	%r13, %r13
	je	LBB0_14
## %bb.11:
	movl	4(%r13), %ecx
	decl	%ecx
	cmpl	%ecx, %eax
	jl	LBB0_13
## %bb.12:
	movl	$1, 8(%r15)
LBB0_13:
	movl	8(%r13), %eax
	jmp	LBB0_17
LBB0_6:
	movl	$1, 8(%r15)
LBB0_7:
	movl	32(%r15), %eax
	movl	%eax, 36(%r15)
	movq	%r15, %rdi
	callq	_sctp_make_sack
	testq	%rax, %rax
	je	LBB0_19
## %bb.8:
	movq	$0, 8(%r15)
	movq	_SCTP_CMD_REPLY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	%rax, %rdi
	callq	_SCTP_CHUNK
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_sctp_add_cmd_sf
	movq	_SCTP_CMD_TIMER_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SCTP_EVENT_TIMEOUT_SACK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	jmp	LBB0_18
LBB0_1:
	movq	_SPP_SACKDELAY_DISABLE@GOTPCREL(%rip), %rax
	testq	%r13, %r13
	je	LBB0_2
## %bb.3:
	movl	(%rax), %eax
	testl	%eax, (%r13)
	jne	LBB0_4
	jmp	LBB0_5
LBB0_19:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_2:
	movl	(%rax), %eax
	testl	%eax, (%r15)
	jne	LBB0_4
	jmp	LBB0_5
LBB0_14:
	movl	4(%r15), %ecx
	decl	%ecx
	cmpl	%ecx, %eax
	jl	LBB0_16
## %bb.15:
	movl	$1, 8(%r15)
LBB0_16:
	movl	40(%r15), %eax
LBB0_17:
	movq	48(%r15), %rcx
	movq	_SCTP_EVENT_TIMEOUT_SACK@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
	movl	%eax, (%rcx,%rdi,4)
	movq	_SCTP_CMD_TIMER_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_18:
	callq	_SCTP_TO
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_sctp_add_cmd_sf
	xorl	%eax, %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPP_SACKDELAY_DISABLE,4,2      ## @SPP_SACKDELAY_DISABLE
	.comm	_SCTP_EVENT_TIMEOUT_SACK,8,3    ## @SCTP_EVENT_TIMEOUT_SACK
	.comm	_SCTP_CMD_TIMER_RESTART,4,2     ## @SCTP_CMD_TIMER_RESTART
	.comm	_SCTP_CMD_REPLY,4,2             ## @SCTP_CMD_REPLY
	.comm	_SCTP_CMD_TIMER_STOP,4,2        ## @SCTP_CMD_TIMER_STOP
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sctp_gen_sack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sctp_gen_sack
_sctp_gen_sack:                         ; @sctp_gen_sack
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x2
	mov	x20, x0
	ldr	x23, [x0, #24]
	cbnz	w1, LBB0_5
; %bb.1:
	cbz	x23, LBB0_3
; %bb.2:
	ldr	w8, [x23]
	b	LBB0_4
LBB0_3:
	ldr	w8, [x20]
LBB0_4:
Lloh0:
	adrp	x9, _SPP_SACKDELAY_DISABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPP_SACKDELAY_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_5:
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_6:
	add	x21, x20, #16
	mov	x0, x21
	bl	_sctp_tsnmap_get_ctsn
	mov	x22, x0
	mov	x0, x21
	bl	_sctp_tsnmap_get_max_tsn_seen
	cmp	x0, x22
	b.ne	LBB0_12
; %bb.7:
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_13
; %bb.8:
	ldr	w8, [x20, #12]
	add	w8, w8, #1
	str	w8, [x20, #12]
	cbz	x23, LBB0_16
; %bb.9:
	ldr	w9, [x23, #4]
	sub	w9, w9, #1
	cmp	w8, w9
	b.lt	LBB0_11
; %bb.10:
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_11:
	ldr	w8, [x23, #8]
	b	LBB0_19
LBB0_12:
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_13:
	ldr	w8, [x20, #32]
	str	w8, [x20, #36]
	mov	x0, x20
	bl	_sctp_make_sack
	cbz	x0, LBB0_15
; %bb.14:
	str	xzr, [x20, #8]
Lloh3:
	adrp	x8, _SCTP_CMD_REPLY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCTP_CMD_REPLY@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	bl	_SCTP_CHUNK
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_sctp_add_cmd_sf
Lloh6:
	adrp	x8, _SCTP_CMD_TIMER_STOP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SCTP_CMD_TIMER_STOP@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
Lloh9:
	adrp	x8, _SCTP_EVENT_TIMEOUT_SACK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SCTP_EVENT_TIMEOUT_SACK@GOTPAGEOFF]
Lloh11:
	ldr	x0, [x8]
	b	LBB0_20
LBB0_15:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_16:
	ldr	w9, [x20, #4]
	sub	w9, w9, #1
	cmp	w8, w9
	b.lt	LBB0_18
; %bb.17:
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_18:
	ldr	w8, [x20, #40]
LBB0_19:
	ldr	x9, [x20, #48]
Lloh15:
	adrp	x10, _SCTP_EVENT_TIMEOUT_SACK@GOTPAGE
Lloh16:
	ldr	x10, [x10, _SCTP_EVENT_TIMEOUT_SACK@GOTPAGEOFF]
Lloh17:
	ldr	x0, [x10]
	str	w8, [x9, x0, lsl #2]
Lloh18:
	adrp	x8, _SCTP_CMD_TIMER_RESTART@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SCTP_CMD_TIMER_RESTART@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
LBB0_20:
	bl	_SCTP_TO
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_sctp_add_cmd_sf
	mov	w0, #0
LBB0_21:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SPP_SACKDELAY_DISABLE,4,2      ; @SPP_SACKDELAY_DISABLE
	.comm	_SCTP_EVENT_TIMEOUT_SACK,8,3    ; @SCTP_EVENT_TIMEOUT_SACK
	.comm	_SCTP_CMD_TIMER_RESTART,4,2     ; @SCTP_CMD_TIMER_RESTART
	.comm	_SCTP_CMD_REPLY,4,2             ; @SCTP_CMD_REPLY
	.comm	_SCTP_CMD_TIMER_STOP,4,2        ; @SCTP_CMD_TIMER_STOP
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sctp_gen_sack
.subsections_via_symbols
