// File: /workspace/github_c_makefile_star2_O3/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 0xc03c
leal -0x4(%r12), %eax
cmpl $-0x3, %eax
ja 0x2759
movq 0x128b5(%rip), %rax     # 0x14ff0
movq (%rax), %rcx
leaq 0xc8eb(%rip), %rdi      # 0xf030
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 0xc91c(%rip), %rdi      # 0xf090
leaq 0xc91f(%rip), %rsi      # 0xf09a
leaq 0xc93a(%rip), %rcx      # 0xf0bc
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 0xc89b(%rip), %rdi      # 0xf090
leaq 0xc89e(%rip), %rsi      # 0xf09a
leaq 0xc8fe(%rip), %rcx      # 0xf101
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 0x12a38(%rip), %rax     # 0x15290
movq %rax, 0x12a31(%rip)     # 0x15290
leaq 0xcc45(%rip), %rdi      # 0xf4ab
leaq 0xc7f3(%rip), %rsi      # 0xf060
xorl %eax, %eax
callq 0x2060
leaq 0x12e01(%rip), %r15     # 0x1567c
cmpl $0x0, (%r15)
jne 0x28a3
leaq 0x12df8(%rip), %r12     # 0x15680
cmpl $0x0, (%r12)
jne 0x28db
callq 0x8728
movl %eax, (%r15)
movl $0x1, (%r12)
testl %eax, %eax
je 0x28db
leaq 0x12de2(%rip), %r12     # 0x1568c
leaq 0xc8a5(%rip), %r15      # 0xf156
cmpl $0x0, (%r12)
jne 0x291a
leaq 0x12dd1(%rip), %r13     # 0x15690
cmpl $0x0, (%r13)
jne 0x28db
callq 0x877c
movl %eax, (%r12)
movl $0x1, (%r13)
testl %eax, %eax
jne 0x291a
leaq 0x12da2(%rip), %r12     # 0x15684
leaq 0xc883(%rip), %r15      # 0xf16c
cmpl $0x0, (%r12)
jne 0x291a
leaq 0x12d91(%rip), %r13     # 0x15688
cmpl $0x0, (%r13)
jne 0x2913
callq 0x8754
movl %eax, (%r12)
movl $0x1, (%r13)
testl %eax, %eax
jne 0x291a
leaq 0xc867(%rip), %r15      # 0xf181
movq %r15, %rdi
xorl %eax, %eax
callq 0x2060
leaq 0x12d49(%rip), %r12     # 0x15674
leaq 0xc876(%rip), %r15      # 0xf1a8
cmpl $0x0, (%r12)
jne 0x2963
leaq 0x12d38(%rip), %r13     # 0x15678
cmpl $0x0, (%r13)
jne 0x295c
callq 0x8700
movl %eax, (%r12)
movl $0x1, (%r13)
testl %eax, %eax
jne 0x2963
leaq 0xc832(%rip), %r15      # 0xf195
movq %r15, %rdi
callq 0x20f0
decl %r14d
cmpl $0x6, %r14d
ja 0x2a29
leaq 0xc689(%rip), %rax      # 0xf008
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x12901(%rip), %rdx     # 0x15290
leaq 0xc692(%rip), %rdi      # 0xf028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x38a0
jmp 0x2a9d
leaq 0xc6a6(%rip), %rdi      # 0xf057
xorl %eax, %eax
callq 0xc0bc
movl $0x0, (%rbx)
movl $0x1, %edi
callq 0x2120
movq 0x128c1(%rip), %rdx     # 0x15290
leaq 0xc652(%rip), %rdi      # 0xf028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
xorl %r8d, %r8d
jmp 0x2a79
movq 0x128a1(%rip), %rdx     # 0x15290
leaq 0xc632(%rip), %rdi      # 0xf028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x31ac
jmp 0x2a9d
movq 0x1287f(%rip), %rdx     # 0x15290
leaq 0xc610(%rip), %rdi      # 0xf028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x3f44
jmp 0x2a9d
leaq 0xc64c(%rip), %rdi      # 0xf07c
xorl %eax, %eax
callq 0xc1db
jmp 0x29b8
movq 0x1284d(%rip), %rdx     # 0x15290
leaq 0xc5de(%rip), %rdi      # 0xf028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x2b44
jmp 0x2a9d
movq 0x1282e(%rip), %rdx     # 0x15290
leaq 0xc5bf(%rip), %rdi      # 0xf028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
movl $0x1, %r8d
callq 0x45f0
jmp 0x2a9d
movq 0x12809(%rip), %rdx     # 0x15290
leaq 0xc59a(%rip), %rdi      # 0xf028
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x50bc
testl %eax, %eax
jne 0x29be
xorl %edi, %edi
callq 0x2120