	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_send_cmd
_handle_send_cmd:                       ## @handle_send_cmd
	.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
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_EAD_ENC_DATA
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_ead_decrypt_message
	movl	%eax, %ebx
	addl	$-16, %ebx
	xorl	%r12d, %r12d
	testl	%ebx, %ebx
	jle	LBB0_25
## %bb.1:
	movl	12(%r14), %edi
	callq	_ntohs
	movl	%eax, %r13d
	movl	8(%r14), %edi
	callq	_ntohs
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	leaq	-76(%rbp), %rdi
	callq	_FD_ZERO
	movq	(%r14), %rax
	movl	%ebx, %ecx
	movq	$0, (%rax,%rcx,8)
	cmpl	$129, %r13d
	je	LBB0_9
## %bb.2:
	cmpl	$128, %r13d
	jne	LBB0_25
## %bb.3:
	leaq	-56(%rbp), %rdi
	callq	_pipe
	testl	%eax, %eax
	js	LBB0_25
## %bb.4:
	movl	-56(%rbp), %ebx
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_fcntl
	orl	%eax, %r13d
	movl	%ebx, %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_fcntl
	movq	_child_pending@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	je	LBB0_5
## %bb.15:
	jle	LBB0_25
## %bb.16:
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	-52(%rbp), %edi
	callq	_close
	movl	-72(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	jne	LBB0_18
## %bb.17:
	movq	_EAD_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_18:
	movq	_pktbuf@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_cmd_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_EAD_ENC_DATA
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	-128(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	leaq	-96(%rbp), %rdi
	movq	%r13, %rsi
	movl	$16, %edx
	callq	_memcpy
	movq	_PCAP_TIMEOUT@GOTPCREL(%rip), %rax
	imull	$1000, (%rax), %eax             ## imm = 0x3E8
	movl	%eax, -112(%rbp)
	movq	$0, -104(%rbp)
	movslq	%ebx, %r14
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rbx)
	movl	-56(%rbp), %edi
	movq	%rbx, %r13
	leaq	-76(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_FD_SET
	movl	-56(%rbp), %edi
	incl	%edi
	movq	%rbx, %rsi
	movq	%r13, %rbx
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	leaq	-112(%rbp), %r8
	callq	_select
	movl	$0, %r13d
	testl	%eax, %eax
	jle	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	-56(%rbp), %edi
	movl	4(%rbx), %esi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_read
	movl	%eax, %r13d
	testl	%eax, %eax
	movl	$0, %eax
	cmovlel	%eax, %r13d
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	_child_pending@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%r13d, %eax
	je	LBB0_14
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	(%r12), %edi
	callq	_ntohl
	movl	$3, %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	movl	%eax, %ecx
	movl	%r14d, %r8d
	callq	_DEBUG
	addl	$8, %r13d
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_ead_encrypt_message
	movq	%r15, %rdi
	callq	_ead_send_packet_clone
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	movq	-120(%rbp), %rax
	addq	%r14, %rax
	cmpq	%rax, -88(%rbp)
	jl	LBB0_19
## %bb.23:
	movq	_child_pending@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_14
## %bb.24:
	movq	_SIGKILL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_kill
	xorl	%r12d, %r12d
	jmp	LBB0_25
LBB0_9:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	je	LBB0_10
## %bb.12:
	jle	LBB0_25
## %bb.13:
	movq	_pktbuf@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_cmd_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_EAD_ENC_DATA
	movq	%rax, %rbx
LBB0_14:
	movl	$1, (%rbx)
	movq	%r12, %rdi
	movl	$8, %esi
	callq	_ead_encrypt_message
	movl	$1, %r12d
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	movl	%r12d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
LBB0_10:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	testl	%eax, %eax
	jle	LBB0_8
## %bb.11:
	movl	%eax, %ebx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_dup2
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_dup2
	movl	%ebx, %edi
	jmp	LBB0_7
LBB0_5:
	movl	-56(%rbp), %edi
	callq	_close
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	testl	%eax, %eax
	jle	LBB0_8
## %bb.6:
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_dup2
	movl	-52(%rbp), %edi
	movl	$1, %esi
	callq	_dup2
	movl	-52(%rbp), %edi
LBB0_7:
	movl	$2, %esi
	callq	_dup2
LBB0_8:
	movq	(%r14), %rdi
	callq	_system
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.comm	_child_pending,4,2              ## @child_pending
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/null"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_EAD_CMD_TIMEOUT,4,2            ## @EAD_CMD_TIMEOUT
	.comm	_pktbuf,8,3                     ## @pktbuf
	.comm	_cmd_data,4,2                   ## @cmd_data
	.comm	_PCAP_TIMEOUT,4,2               ## @PCAP_TIMEOUT
L_.str.1:                               ## @.str.1
	.asciz	"Sending %d bytes of console data, type=%d, timeout=%d\n"

	.comm	_SIGKILL,4,2                    ## @SIGKILL
	.comm	_cmd,8,3                        ## @cmd
	.no_dead_strip	_handle_send_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_send_cmd
_handle_send_cmd:                       ; @handle_send_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #72]
	bl	_EAD_ENC_DATA
	mov	x20, x0
	mov	x0, x19
	bl	_ead_decrypt_message
	sub	w23, w0, #16
	cmp	w23, #1
	b.lt	LBB0_18
; %bb.1:
	ldr	w0, [x20, #12]
	bl	_ntohs
	mov	x21, x0
	ldr	w0, [x20, #8]
	bl	_ntohs
	mov	x22, x0
	add	x0, sp, #12
	bl	_FD_ZERO
	ldr	x8, [x20]
	str	xzr, [x8, w23, uxtw #3]
	cmp	w21, #129
	b.eq	LBB0_14
; %bb.2:
	cmp	w21, #128
	b.ne	LBB0_18
; %bb.3:
	add	x0, sp, #64
	bl	_pipe
	tbnz	w0, #31, LBB0_18
; %bb.4:
	ldr	w21, [sp, #64]
Lloh3:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
Lloh9:
	adrp	x8, _F_GETFL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _F_GETFL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_fcntl
	orr	w8, w0, w24
	str	x8, [sp]
	mov	x0, x21
	mov	x1, x23
	bl	_fcntl
Lloh12:
	adrp	x26, _child_pending@GOTPAGE
Lloh13:
	ldr	x26, [x26, _child_pending@GOTPAGEOFF]
	mov	w8, #1
	str	w8, [x26]
	bl	_fork
	cbz	w0, LBB0_24
; %bb.5:
	mov	x21, x0
	cmp	w0, #0
	b.le	LBB0_18
; %bb.6:
	ldr	w0, [sp, #68]
	bl	_close
Lloh14:
	adrp	x8, _EAD_CMD_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EAD_CMD_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w22, #0
	csel	w23, w8, w22, eq
Lloh17:
	adrp	x8, _pktbuf@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pktbuf@GOTPAGEOFF]
Lloh19:
	ldr	x20, [x8]
Lloh20:
	adrp	x8, _cmd_data@GOTPAGE
Lloh21:
	ldr	x8, [x8, _cmd_data@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_EAD_ENC_DATA
	mov	x22, x0
	add	x0, sp, #32
	mov	x1, #0
	bl	_gettimeofday
	add	x0, sp, #16
	add	x1, sp, #32
	mov	w2, #16
	bl	_memcpy
Lloh23:
	adrp	x8, _PCAP_TIMEOUT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PCAP_TIMEOUT@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	mov	w9, #1000
	mul	w8, w8, w9
	str	w8, [sp, #48]
	str	xzr, [sp, #56]
	sxtw	x23, w23
Lloh26:
	adrp	x24, l_.str.1@PAGE
Lloh27:
	add	x24, x24, l_.str.1@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x22]
	ldr	w0, [sp, #64]
	add	x1, sp, #12
	bl	_FD_SET
	ldr	w8, [sp, #64]
	add	w0, w8, #1
	add	x1, sp, #12
	add	x4, sp, #48
	mov	x2, #0
	mov	x3, #0
	bl	_select
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [sp, #64]
	ldr	w1, [x22, #4]
	mov	w2, #1024
	bl	_read
	cmp	w0, #0
	csel	w25, w0, wzr, gt
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w25, #0
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x26]
	orr	w8, w25, w8
	cbz	w8, LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x20]
	bl	_ntohl
	mov	x3, x0
	mov	w0, #3
	mov	x1, x24
	mov	x2, x25
	mov	x4, x23
	bl	_DEBUG
	add	w1, w25, #8
	mov	x0, x20
	bl	_ead_encrypt_message
	mov	x0, x19
	bl	_ead_send_packet_clone
	add	x0, sp, #16
	mov	x1, #0
	bl	_gettimeofday
	ldr	x8, [sp, #24]
	ldr	x9, [sp, #40]
	add	x9, x9, x23
	cmp	x8, x9
	b.lt	LBB0_7
; %bb.12:
	ldr	w8, [x26]
	cbz	w8, LBB0_17
; %bb.13:
Lloh28:
	adrp	x8, _SIGKILL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SIGKILL@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kill
	b	LBB0_18
LBB0_14:
	bl	_fork
	cbz	w0, LBB0_22
; %bb.15:
	cmp	w0, #1
	b.lt	LBB0_18
; %bb.16:
Lloh31:
	adrp	x8, _pktbuf@GOTPAGE
Lloh32:
	ldr	x8, [x8, _pktbuf@GOTPAGEOFF]
Lloh33:
	ldr	x20, [x8]
Lloh34:
	adrp	x8, _cmd_data@GOTPAGE
Lloh35:
	ldr	x8, [x8, _cmd_data@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_EAD_ENC_DATA
	mov	x22, x0
LBB0_17:
	mov	w19, #1
	str	w19, [x22]
	mov	x0, x20
	mov	w1, #8
	bl	_ead_encrypt_message
	b	LBB0_19
LBB0_18:
	mov	w19, #0
LBB0_19:
	ldr	x8, [sp, #72]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_21:
	bl	___stack_chk_fail
LBB0_22:
Lloh40:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x0, l_.str@PAGE
Lloh44:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	cmp	w0, #1
	b.lt	LBB0_27
; %bb.23:
	mov	x19, x0
	mov	w1, #0
	bl	_dup2
	mov	x0, x19
	mov	w1, #1
	bl	_dup2
	mov	x0, x19
	b	LBB0_26
LBB0_24:
	ldr	w0, [sp, #64]
	bl	_close
Lloh45:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh46:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
Lloh48:
	adrp	x0, l_.str@PAGE
Lloh49:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	cmp	w0, #1
	b.lt	LBB0_27
; %bb.25:
	mov	w1, #0
	bl	_dup2
	ldr	w0, [sp, #68]
	mov	w1, #1
	bl	_dup2
	ldr	w0, [sp, #68]
LBB0_26:
	mov	w1, #2
	bl	_dup2
LBB0_27:
	ldr	x0, [x20]
	bl	_system
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.comm	_child_pending,4,2              ; @child_pending
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/null"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_EAD_CMD_TIMEOUT,4,2            ; @EAD_CMD_TIMEOUT
	.comm	_pktbuf,8,3                     ; @pktbuf
	.comm	_cmd_data,4,2                   ; @cmd_data
	.comm	_PCAP_TIMEOUT,4,2               ; @PCAP_TIMEOUT
l_.str.1:                               ; @.str.1
	.asciz	"Sending %d bytes of console data, type=%d, timeout=%d\n"

	.comm	_SIGKILL,4,2                    ; @SIGKILL
	.comm	_cmd,8,3                        ; @cmd
	.no_dead_strip	_handle_send_cmd
.subsections_via_symbols
