// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/main.c
// Function: main
int
main(int argc, char * argv[])
{
	int desired_test;
	size_t multiplier;

	WARNP_INIT;

	/* Parse command line. */
	if ((argc < 2) || (argc > 3)) {
		fprintf(stderr, "usage: test_standalone_enc NUM [MULT]\n");
		exit(1);
	}
	if (PARSENUM(&desired_test, argv[1], 1, 7)) {
		warnp("parsenum");
		goto err0;
	}
	if (argc == 3) {
		/* Multiply number of bytes by the user-supplied value. */
		if (PARSENUM(&multiplier, argv[2], 1, 1000)) {
			warnp("parsenum");
			goto err0;
		}
		nbytes_perftest *= multiplier;
	}

	/* Report what we're doing. */
	print_hardware("Testing spiped speed limits");

	/* Run the desired test. */
	switch (desired_test) {
	case 1:
		if (standalone_hmac(perfsizes, num_perf,
		    nbytes_perftest, nbytes_warmup))
			goto err0;
		break;
	case 2:
		if (standalone_aesctr(perfsizes, num_perf,
		    nbytes_perftest, nbytes_warmup))
			goto err0;
		break;
	case 3:
		if (standalone_aesctr_hmac(perfsizes, num_perf,
		    nbytes_perftest, nbytes_warmup))
			goto err0;
		break;
	case 4:
		if (standalone_pce(perfsizes, num_perf,
		    nbytes_perftest, nbytes_warmup))
			goto err0;
		break;
	case 5:
		if (standalone_transfer_noencrypt(perfsizes, num_perf,
		    nbytes_perftest, nbytes_warmup, 0))
			goto err0;
		break;
	case 6:
		if (standalone_transfer_noencrypt(perfsizes, num_perf,
		    nbytes_perftest, nbytes_warmup, 1))
			goto err0;
		break;
	case 7:
		if (standalone_pipe_socketpair_one(perfsizes, num_perf,
		    nbytes_perftest, nbytes_warmup))
			goto err0;
		break;
	default:
		warn0("invalid test number");
		goto err0;
	}

	/* Success! */
	exit(0);

err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movl %edi, %r12d
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x272a
callq 0x9f18
leal -0x4(%r12), %eax
cmpl $-0x3, %eax
ja 0x2759
movq 0xf8b5(%rip), %rax      # 0x11ff0
movq (%rax), %rcx
leaq 0x98eb(%rip), %rdi      # 0xc030
movl $0x26, %esi
movl $0x1, %edx
callq 0x2430
jmp 0x29be
callq 0x2370
movl $0x0, (%rax)
movq 0x8(%r15), %r13
testq %r13, %r13
jne 0x278c
leaq 0x991c(%rip), %rdi      # 0xc090
leaq 0x991f(%rip), %rsi      # 0xc09a
leaq 0x993a(%rip), %rcx      # 0xc0bc
movl $0xa7, %edx
callq 0x2130
movq %rax, %rbx
movq %rsp, %rbp
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x2480
movq %rax, %r14
movq (%rbp), %rcx
movl $0x16, %eax
cmpq %r13, %rcx
je 0x27ca
cmpb $0x0, (%rcx)
jne 0x27ca
movq %r14, %rax
addq $-0x8, %rax
cmpq $-0x8, %rax
ja 0x27cc
movl $0x22, %eax
xorl %r14d, %r14d
movl %eax, (%rbx)
cmpl $0x0, (%rbx)
jne 0x29aa
cmpl $0x3, %r12d
jne 0x285f
movl $0x0, (%rbx)
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x280d
leaq 0x989b(%rip), %rdi      # 0xc090
leaq 0x989e(%rip), %rsi      # 0xc09a
leaq 0x98fe(%rip), %rcx      # 0xc101
movl $0xbb, %edx
callq 0x2130
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x2040
movq (%r12), %rdx
movl $0x16, %ecx
cmpq %r15, %rdx
je 0x2845
cmpb $0x0, (%rdx)
jne 0x2845
movq $-0x3e9, %rdx           # imm = 0xFC17
leaq (%rax,%rdx), %rsi
movl $0x22, %ecx
cmpq %rdx, %rsi
ja 0x2847
movl %ecx, (%rbx)
cmpl $0x0, (%rbx)
jne 0x29aa
imulq 0xfa38(%rip), %rax      # 0x12290
movq %rax, 0xfa31(%rip)      # 0x12290
leaq 0x9b99(%rip), %rdi      # 0xc3ff
leaq 0x97f3(%rip), %rsi      # 0xc060
xorl %eax, %eax
callq 0x2060
leaq 0xfe01(%rip), %r15      # 0x1267c
cmpl $0x0, (%r15)
jne 0x28a3
leaq 0xfdf8(%rip), %r12      # 0x12680
cmpl $0x0, (%r12)
jne 0x28db
callq 0x6680
movl %eax, (%r15)
movl $0x1, (%r12)
testl %eax, %eax
je 0x28db
leaq 0xfde2(%rip), %r12      # 0x1268c
leaq 0x98a5(%rip), %r15      # 0xc156
cmpl $0x0, (%r12)
jne 0x291a
leaq 0xfdd1(%rip), %r13      # 0x12690
cmpl $0x0, (%r13)
jne 0x28db
callq 0x66d4
movl %eax, (%r12)
movl $0x1, (%r13)
testl %eax, %eax
jne 0x291a
leaq 0xfda2(%rip), %r12      # 0x12684
leaq 0x9883(%rip), %r15      # 0xc16c
cmpl $0x0, (%r12)
jne 0x291a
leaq 0xfd91(%rip), %r13      # 0x12688
cmpl $0x0, (%r13)
jne 0x2913
callq 0x66ac
movl %eax, (%r12)
movl $0x1, (%r13)
testl %eax, %eax
jne 0x291a
leaq 0x9867(%rip), %r15      # 0xc181
movq %r15, %rdi
xorl %eax, %eax
callq 0x2060
leaq 0xfd49(%rip), %r12      # 0x12674
leaq 0x9876(%rip), %r15      # 0xc1a8
cmpl $0x0, (%r12)
jne 0x2963
leaq 0xfd38(%rip), %r13      # 0x12678
cmpl $0x0, (%r13)
jne 0x295c
callq 0x6658
movl %eax, (%r12)
movl $0x1, (%r13)
testl %eax, %eax
jne 0x2963
leaq 0x9832(%rip), %r15      # 0xc195
movq %r15, %rdi
callq 0x20f0
decl %r14d
cmpl $0x6, %r14d
ja 0x2a29
leaq 0x9689(%rip), %rax      # 0xc008
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0xf901(%rip), %rdx      # 0x12290
leaq 0x9692(%rip), %rdi      # 0xc028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x2df0
jmp 0x2a9d
leaq 0x96a6(%rip), %rdi      # 0xc057
xorl %eax, %eax
callq 0x9f98
movl $0x0, (%rbx)
movl $0x1, %edi
callq 0x2120
movq 0xf8c1(%rip), %rdx      # 0x12290
leaq 0x9652(%rip), %rdi      # 0xc028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
xorl %r8d, %r8d
jmp 0x2a79
movq 0xf8a1(%rip), %rdx      # 0x12290
leaq 0x9632(%rip), %rdi      # 0xc028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x2c54
jmp 0x2a9d
movq 0xf87f(%rip), %rdx      # 0x12290
leaq 0x9610(%rip), %rdi      # 0xc028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x2f3c
jmp 0x2a9d
leaq 0x964c(%rip), %rdi      # 0xc07c
xorl %eax, %eax
callq 0xa0b7
jmp 0x29b8
movq 0xf84d(%rip), %rdx      # 0x12290
leaq 0x95de(%rip), %rdi      # 0xc028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x2b44
jmp 0x2a9d
movq 0xf82e(%rip), %rdx      # 0x12290
leaq 0x95bf(%rip), %rdi      # 0xc028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
movl $0x1, %r8d
callq 0x3088
jmp 0x2a9d
movq 0xf809(%rip), %rdx      # 0x12290
leaq 0x959a(%rip), %rdi      # 0xc028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x35f8
testl %eax, %eax
jne 0x29be
xorl %edi, %edi
callq 0x2120