// File: /workspace/github_c_makefile_star2_O2/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 0x260a
callq 0x94e0
leal -0x4(%r12), %eax
cmpl $-0x3, %eax
ja 0x2635
movq 0xf9d5(%rip), %rax      # 0x11ff0
movq (%rax), %rcx
leaq 0x9a0b(%rip), %rdi      # 0xc030
pushq $0x26
popq %rsi
pushq $0x1
popq %rdx
callq 0x2430
jmp 0x2883
callq 0x2370
andl $0x0, (%rax)
movq 0x8(%r15), %r13
testq %r13, %r13
jne 0x2665
leaq 0x9a43(%rip), %rdi      # 0xc090
leaq 0x9a46(%rip), %rsi      # 0xc09a
leaq 0x9a61(%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
pushq $0x16
popq %rax
cmpq %r13, %rcx
je 0x269f
cmpb $0x0, (%rcx)
jne 0x269f
movq %r14, %rax
addq $-0x8, %rax
cmpq $-0x8, %rax
ja 0x26a1
pushq $0x22
popq %rax
xorl %r14d, %r14d
movl %eax, (%rbx)
cmpl $0x0, (%rbx)
jne 0x2872
cmpl $0x3, %r12d
jne 0x2729
andl $0x0, (%rbx)
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x26db
leaq 0x99cd(%rip), %rdi      # 0xc090
leaq 0x99d0(%rip), %rsi      # 0xc09a
leaq 0x9a30(%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
pushq $0x16
popq %rcx
cmpq %r15, %rdx
je 0x270f
cmpb $0x0, (%rdx)
jne 0x270f
movq $-0x3e9, %rcx           # imm = 0xFC17
leaq (%rax,%rcx), %rdx
cmpq %rcx, %rdx
ja 0x2711
pushq $0x22
popq %rcx
movl %ecx, (%rbx)
cmpl $0x0, (%rbx)
jne 0x2872
imulq 0xfb6e(%rip), %rax      # 0x12290
movq %rax, 0xfb67(%rip)      # 0x12290
leaq 0x9ccd(%rip), %rdi      # 0xc3fd
leaq 0x9929(%rip), %rsi      # 0xc060
xorl %eax, %eax
callq 0x2060
leaq 0xff37(%rip), %r15      # 0x1267c
cmpl $0x0, (%r15)
jne 0x276d
leaq 0xff2e(%rip), %r12      # 0x12680
cmpl $0x0, (%r12)
jne 0x27a5
callq 0x6150
movl %eax, (%r15)
movl $0x1, (%r12)
testl %eax, %eax
je 0x27a5
leaq 0xff18(%rip), %r12      # 0x1268c
leaq 0x99db(%rip), %r15      # 0xc156
cmpl $0x0, (%r12)
jne 0x27e4
leaq 0xff07(%rip), %r13      # 0x12690
cmpl $0x0, (%r13)
jne 0x27a5
callq 0x61a0
movl %eax, (%r12)
movl $0x1, (%r13)
testl %eax, %eax
jne 0x27e4
leaq 0xfed8(%rip), %r12      # 0x12684
leaq 0x99b9(%rip), %r15      # 0xc16c
cmpl $0x0, (%r12)
jne 0x27e4
leaq 0xfec7(%rip), %r13      # 0x12688
cmpl $0x0, (%r13)
jne 0x27dd
callq 0x6178
movl %eax, (%r12)
movl $0x1, (%r13)
testl %eax, %eax
jne 0x27e4
leaq 0x999d(%rip), %r15      # 0xc181
movq %r15, %rdi
xorl %eax, %eax
callq 0x2060
leaq 0xfe7f(%rip), %r12      # 0x12674
leaq 0x99ac(%rip), %r15      # 0xc1a8
cmpl $0x0, (%r12)
jne 0x282d
leaq 0xfe6e(%rip), %r13      # 0x12678
cmpl $0x0, (%r13)
jne 0x2826
callq 0x6128
movl %eax, (%r12)
movl $0x1, (%r13)
testl %eax, %eax
jne 0x282d
leaq 0x9968(%rip), %r15      # 0xc195
movq %r15, %rdi
callq 0x20f0
decl %r14d
cmpl $0x6, %r14d
ja 0x28e6
leaq 0x97bf(%rip), %rax      # 0xc008
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0xfa37(%rip), %rdx      # 0x12290
leaq 0x97c8(%rip), %rdi      # 0xc028
pushq $0x1
popq %rsi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x2c84
jmp 0x294f
leaq 0x97de(%rip), %rdi      # 0xc057
xorl %eax, %eax
callq 0x955d
andl $0x0, (%rbx)
pushq $0x1
popq %rdi
callq 0x2120
movq 0xf9fe(%rip), %rdx      # 0x12290
leaq 0x978f(%rip), %rdi      # 0xc028
pushq $0x1
popq %rsi
movl $0x989680, %ecx         # imm = 0x989680
xorl %r8d, %r8d
jmp 0x292d
movq 0xf9e0(%rip), %rdx      # 0x12290
leaq 0x9771(%rip), %rdi      # 0xc028
pushq $0x1
popq %rsi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x2af8
jmp 0x294f
movq 0xf9c0(%rip), %rdx      # 0x12290
leaq 0x9751(%rip), %rdi      # 0xc028
pushq $0x1
popq %rsi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x2dc4
jmp 0x294f
leaq 0x978f(%rip), %rdi      # 0xc07c
xorl %eax, %eax
callq 0x96ec
jmp 0x2880
movq 0xf993(%rip), %rdx      # 0x12290
leaq 0x9724(%rip), %rdi      # 0xc028
pushq $0x1
popq %rsi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x29f4
jmp 0x294f
movq 0xf976(%rip), %rdx      # 0x12290
leaq 0x9707(%rip), %rdi      # 0xc028
pushq $0x1
popq %rsi
pushq $0x1
popq %r8
movl $0x989680, %ecx         # imm = 0x989680
callq 0x2f00
jmp 0x294f
movq 0xf955(%rip), %rdx      # 0x12290
leaq 0x96e6(%rip), %rdi      # 0xc028
pushq $0x1
popq %rsi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x341c
testl %eax, %eax
jne 0x2883
xorl %edi, %edi
callq 0x2120
nop