	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function recv_termination_ack
_recv_termination_ack:                  ## @recv_termination_ack
	.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
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_TERMINATION_MSG_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	testl	%r15d, %r15d
	jle	LBB0_5
## %bb.1:
	movq	_ctx@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movl	(%rax,%rcx,4), %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rax
	leaq	(%r14,%rax), %rsi
	subl	%eax, %r15d
	movl	%r12d, %edi
	movl	%r15d, %edx
	callq	_read
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	%eax, %ebx
	movl	(%r13), %r15d
	cmpl	%ebx, %r15d
	jg	LBB0_3
LBB0_5:
	movq	_TERMINATION_MSG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_8:
	movl	$1, %eax
	jmp	LBB0_9
LBB0_6:
	xorl	%eax, %eax
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%ebx, %edi
	callq	_recv_termination_ack.cold.1
	jmp	LBB0_8
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function recv_termination_ack.cold.1
_recv_termination_ack.cold.1:           ## @recv_termination_ack.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_perror
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TERMINATION_MSG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TERMINATION_MSG_SIZE,4,2       ## @TERMINATION_MSG_SIZE
	.comm	_ctx,8,3                        ## @ctx
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"client read"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"%d/%d: Couldn't read remote termination ack\n"

	.comm	_TERMINATION_MSG,4,2            ## @TERMINATION_MSG
L_.str.2:                               ## @.str.2
	.asciz	"Invalid termination ack was accepted\n"

	.no_dead_strip	_recv_termination_ack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function recv_termination_ack
_recv_termination_ack:                  ; @recv_termination_ack
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x22, _TERMINATION_MSG_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _TERMINATION_MSG_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x19, x9, x10
	mov	sp, x19
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w20, #0
Lloh7:
	adrp	x9, _ctx@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ctx@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	ldr	w21, [x9, w0, sxtw #2]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x19, w20, sxtw
	sub	w2, w8, w20
	mov	x0, x21
	bl	_read
	tbnz	w0, #31, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x22]
	add	w20, w0, w20
	cmp	w8, w20
	b.gt	LBB0_2
LBB0_4:
Lloh10:
	adrp	x8, _TERMINATION_MSG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TERMINATION_MSG@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_strcmp
	cbz	x0, LBB0_7
; %bb.5:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
LBB0_6:
	mov	w0, #1
LBB0_7:
	ldur	x8, [x29, #-40]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.8:
	sub	sp, x29, #32
	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_9:
	mov	x0, x20
	bl	_recv_termination_ack.cold.1
	b	LBB0_6
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function recv_termination_ack.cold.1
_recv_termination_ack.cold.1:           ; @recv_termination_ack.cold.1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x8, _TERMINATION_MSG_SIZE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TERMINATION_MSG_SIZE@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	stp	x19, x8, [sp]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_TERMINATION_MSG_SIZE,4,2       ; @TERMINATION_MSG_SIZE
	.comm	_ctx,8,3                        ; @ctx
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"client read"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"%d/%d: Couldn't read remote termination ack\n"

	.comm	_TERMINATION_MSG,4,2            ; @TERMINATION_MSG
l_.str.2:                               ; @.str.2
	.asciz	"Invalid termination ack was accepted\n"

	.no_dead_strip	_recv_termination_ack
.subsections_via_symbols
