// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/tests/nc-server/main.c
// Function: main
int
main(int argc, char ** argv)
{
	struct nc_cookie cookie;
	struct nc_cookie * C = &cookie;
	const char * sockname;
	const char * filename;

	WARNP_INIT;

	/* Parse command-line arguments. */
	if (argc < 3) {
		fprintf(stderr, "usage: %s ADDRESS FILENAME [ECHO_BPS]\n",
		    argv[0]);
		goto err0;
	}
	sockname = argv[1];
	filename = argv[2];
	if (argc > 3) {
		/* Allow up to 1 MB per second of echoing. */
		if (PARSENUM(&C->bps, argv[3], 0, 1000000)) {
			warnp("parsenum");
			goto err0;
		}
		if ((C->bps % 100) != 0) {
			warn0("BPS must be a multiple of 100");
			goto err0;
		}
	} else
		C->bps = 0;

	/* Open the output file; can be /dev/null. */
	if ((C->out = fopen(filename, "wb")) == NULL) {
		warnp("fopen");
		goto err0;
	}

	/* Run the server. */
	if (simple_server(sockname, MAX_CONNECTIONS, SHUTDOWN_AFTER,
	    &callback_snc_response, C)) {
		warn0("simple_server failed");
		goto err1;
	}

	/* Write the output file. */
	if (fclose(C->out) != 0) {
		warnp("fclose");
		goto err0;
	}

	/* Success! */
	exit(0);

err1:
	if (fclose(C->out))
		warnp("fclose");
err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x24a4
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x7ae0
jmp 0x24a6
cmpl $0x3, -0x8(%rbp)
jge 0x24d0
movq 0xbb45(%rip), %rax      # 0xdff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x7b7c(%rip), %rsi      # 0xa040
movb $0x0, %al
callq 0x21f0
jmp 0x27c8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
cmpl $0x3, -0x8(%rbp)
jle 0x2686
callq 0x20a0
movl $0x0, (%rax)
movq -0x28(%rbp), %rax
movq $0x1, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rax
shrq %rax
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jbe 0x256b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorps %xmm0, %xmm0
movsd 0x7ad7(%rip), %xmm1     # 0xa008
xorl %esi, %esi
callq 0x27e0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
movsd 0x7ac1(%rip), %xmm1     # 0xa010
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x2606
movq -0x28(%rbp), %rax
movq $-0x1, 0x8(%rax)
xorl %eax, %eax
testb $0x1, %al
jne 0x257f
jmp 0x25cd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
cmovbel %eax, %eax
movslq %eax, %rsi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
xorl %eax, %eax
movl $0xf4240, %ecx          # imm = 0xF4240
cmpq $0x0, %rdx
cmovbel %ecx, %eax
movslq %eax, %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x2890
movq -0x28(%rbp), %rcx
movq %rax, 0x8(%rcx)
movq %rax, -0x40(%rbp)
jmp 0x2602
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
xorl %eax, %eax
movl %eax, %esi
movl $0xf4240, %edx          # imm = 0xF4240
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x2950
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
xorl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
callq 0x20a0
cmpl $0x0, (%rax)
je 0x264c
jmp 0x2612
callq 0x20a0
cmpl $0x0, (%rax)
je 0x2637
leaq 0x7a44(%rip), %rdi      # 0xa067
movb $0x0, %al
callq 0x7ba0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2645
leaq 0x7a29(%rip), %rdi      # 0xa067
movb $0x0, %al
callq 0x7df0
jmp 0x2647
jmp 0x27c8
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
je 0x2684
jmp 0x2666
leaq 0x7a03(%rip), %rdi      # 0xa070
movb $0x0, %al
callq 0x7df0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x27c8
jmp 0x2692
movq -0x28(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x38(%rbp), %rdi
leaq 0x79f1(%rip), %rsi      # 0xa08e
callq 0x22a0
movq -0x28(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x26eb
jmp 0x26b1
callq 0x20a0
cmpl $0x0, (%rax)
je 0x26d6
leaq 0x79cf(%rip), %rdi      # 0xa091
movb $0x0, %al
callq 0x7ba0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x26e4
leaq 0x79b4(%rip), %rdi      # 0xa091
movb $0x0, %al
callq 0x7df0
jmp 0x26e6
jmp 0x27c8
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %r8
movl $0x2, %esi
movl $0x1, %edx
leaq 0x30c(%rip), %rcx       # 0x2a10
callq 0x2d00
cmpl $0x0, %eax
je 0x272b
jmp 0x2710
leaq 0x7980(%rip), %rdi      # 0xa097
movb $0x0, %al
callq 0x7df0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x277c
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x2120
cmpl $0x0, %eax
je 0x2775
jmp 0x273e
callq 0x20a0
cmpl $0x0, (%rax)
je 0x2763
leaq 0x795d(%rip), %rdi      # 0xa0ac
movb $0x0, %al
callq 0x7ba0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2771
leaq 0x7942(%rip), %rdi      # 0xa0ac
movb $0x0, %al
callq 0x7df0
jmp 0x2773
jmp 0x27c8
xorl %edi, %edi
callq 0x22f0
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x2120
cmpl $0x0, %eax
je 0x27c6
jmp 0x278f
callq 0x20a0
cmpl $0x0, (%rax)
je 0x27b4
leaq 0x790c(%rip), %rdi      # 0xa0ac
movb $0x0, %al
callq 0x7ba0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x27c2
leaq 0x78f1(%rip), %rdi      # 0xa0ac
movb $0x0, %al
callq 0x7df0
jmp 0x27c4
jmp 0x27c6
jmp 0x27c8
movl $0x1, %edi
callq 0x22f0
nopw %cs:(%rax,%rax)