	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function recv_msg
_recv_msg:                              ## @recv_msg
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	48(%rdi), %r15
	leaq	-32(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	movq	(%rbx), %rax
	movq	40(%rbx), %rcx
	movl	(%rcx,%rax,8), %eax
	addl	%eax, -32(%rbp)
	movq	_HDRSIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rcx
	callq	_read_timed
	movl	$-1, %r14d
	cmpl	$-1, %eax
	je	LBB0_14
## %bb.1:
	movl	32(%rbx), %esi
	movl	84(%rbx), %edi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_generr
	jmp	LBB0_14
LBB0_3:
	movq	24(%rbx), %rcx
	movq	48(%rbx), %rdx
	cmpq	%rcx, %rdx
	jne	LBB0_4
## %bb.7:
	movl	80(%rbx), %edi
	callq	_ntohl
	movq	_BODYSIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jle	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_9:
	movq	8(%rbx), %rcx
	movq	56(%rbx), %rdx
	incq	%rcx
	movq	%rcx, 8(%rbx)
	cmpq	%rcx, %rdx
	jne	LBB0_10
## %bb.11:
	movq	72(%rbx), %rsi
	leaq	-32(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_read_timed
	cmpl	$-1, %eax
	je	LBB0_14
## %bb.12:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_crypt_msg
	movq	_TAC_SINGLE_CONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	testl	%eax, 64(%rbx)
	jne	LBB0_14
## %bb.13:
	movq	$0, 16(%rbx)
	jmp	LBB0_14
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
LBB0_5:
	movq	%rbx, %rdi
LBB0_6:
	xorl	%eax, %eax
	callq	_generr
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDRSIZE,8,3                    ## @HDRSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid session ID in received message"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid type in received message (got %u, expected %u)"

	.comm	_BODYSIZE,8,3                   ## @BODYSIZE
L_.str.2:                               ## @.str.2
	.asciz	"Received message too large (%u > %u)"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid sequence number in received message (got %u, expected %u)"

	.comm	_TAC_SINGLE_CONNECT,4,2         ## @TAC_SINGLE_CONNECT
	.no_dead_strip	_recv_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function recv_msg
_recv_msg:                              ; @recv_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	add	x20, x0, #48
	add	x0, sp, #24
	mov	x1, #0
	bl	_gettimeofday
	ldr	x8, [x19, #40]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w9, [sp, #24]
	add	w8, w9, w8
	str	w8, [sp, #24]
Lloh0:
	adrp	x8, _HDRSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDRSIZE@GOTPAGEOFF]
Lloh2:
	ldr	x2, [x8]
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x20
	bl	_read_timed
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.1:
	ldr	w0, [x19, #84]
	ldr	w1, [x19, #32]
	mov	w2, #4
	bl	_memcmp
	cbz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_12
LBB0_3:
	ldr	x8, [x19, #48]
	ldr	x9, [x19, #24]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	w0, [x19, #80]
	bl	_ntohl
	mov	x2, x0
Lloh5:
	adrp	x8, _BODYSIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BODYSIZE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_7
; %bb.5:
	stp	x2, x8, [sp]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_6:
	stp	x8, x9, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_7:
	ldr	x8, [x19, #56]
	ldr	x9, [x19, #8]
	add	x9, x9, #1
	str	x9, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.8:
	ldr	x1, [x19, #72]
	add	x3, sp, #24
	mov	x0, x19
	bl	_read_timed
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.9:
	mov	x0, x19
	mov	x1, x20
	bl	_crypt_msg
	ldr	w8, [x19, #64]
Lloh12:
	adrp	x9, _TAC_SINGLE_CONNECT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TAC_SINGLE_CONNECT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.10:
	mov	w0, #0
	b	LBB0_13
LBB0_11:
	stp	x8, x9, [sp]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_12:
	mov	x0, x19
	bl	_generr
	mov	w0, #-1
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_14:
	mov	w0, #0
	str	xzr, [x19, #16]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_HDRSIZE,8,3                    ; @HDRSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid session ID in received message"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid type in received message (got %u, expected %u)"

	.comm	_BODYSIZE,8,3                   ; @BODYSIZE
l_.str.2:                               ; @.str.2
	.asciz	"Received message too large (%u > %u)"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid sequence number in received message (got %u, expected %u)"

	.comm	_TAC_SINGLE_CONNECT,4,2         ; @TAC_SINGLE_CONNECT
	.no_dead_strip	_recv_msg
.subsections_via_symbols
