// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x262c
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x142d0
jmp 0x262e
cmpl $0x2, -0x8(%rbp)
jl 0x263a
cmpl $0x3, -0x8(%rbp)
jle 0x265c
movq 0x1c9af(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
leaq 0x15a05(%rip), %rsi     # 0x18050
movb $0x0, %al
callq 0x2420
movl $0x1, %edi
callq 0x2110
callq 0x2340
movl $0x0, (%rax)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jle 0x26a9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movsd 0x15977(%rip), %xmm0    # 0x18008
movsd 0x15977(%rip), %xmm1    # 0x18010
xorl %esi, %esi
callq 0x2a60
cvttsd2si %xmm0, %eax
movl %eax, -0x14(%rbp)
jmp 0x2725
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movb $0x1, %al
testb $0x1, %al
jne 0x26b8
jmp 0x26f9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovlel %ecx, %eax
movslq %eax, %rsi
movl -0x14(%rbp), %edx
xorl %eax, %eax
movl $0x7, %ecx
cmpl $0x0, %edx
cmovlel %ecx, %eax
movslq %eax, %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x2b10
movl %eax, -0x14(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x2722
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x14(%rbp), %rcx
movl $0x1, %esi
movl $0x7, %edx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x2bd0
movl %eax, -0x14(%rbp)
xorl %eax, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
callq 0x2340
cmpl $0x0, (%rax)
je 0x276b
jmp 0x2731
callq 0x2340
cmpl $0x0, (%rax)
je 0x2756
leaq 0x15935(%rip), %rdi     # 0x18077
movb $0x0, %al
callq 0x14390
callq 0x2340
movl $0x0, (%rax)
jmp 0x2764
leaq 0x1591a(%rip), %rdi     # 0x18077
movb $0x0, %al
callq 0x145e0
jmp 0x2766
jmp 0x2a49
cmpl $0x3, -0x8(%rbp)
jne 0x28c6
callq 0x2340
movl $0x0, (%rax)
movq $0x1, -0x20(%rbp)
movq -0x20(%rbp), %rax
shrq %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jbe 0x27e7
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movsd 0x1585f(%rip), %xmm0    # 0x18008
movsd 0x15867(%rip), %xmm1    # 0x18018
xorl %esi, %esi
callq 0x2a60
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x15851(%rip), %xmm1    # 0x18020
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x286d
movq $-0x1, -0x20(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x27f7
jmp 0x283e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovbel %ecx, %eax
movslq %eax, %rsi
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cmpq $0x0, %rdx
cmovbel %ecx, %eax
movslq %eax, %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x2b10
movq %rax, -0x20(%rbp)
movq %rax, -0x30(%rbp)
jmp 0x2869
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rcx
movl $0x1, %esi
movl $0x3e8, %edx            # imm = 0x3E8
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x2bd0
movq %rax, -0x20(%rbp)
xorl %eax, %eax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
callq 0x2340
cmpl $0x0, (%rax)
je 0x28b3
jmp 0x2879
callq 0x2340
cmpl $0x0, (%rax)
je 0x289e
leaq 0x157ed(%rip), %rdi     # 0x18077
movb $0x0, %al
callq 0x14390
callq 0x2340
movl $0x0, (%rax)
jmp 0x28ac
leaq 0x157d2(%rip), %rdi     # 0x18077
movb $0x0, %al
callq 0x145e0
jmp 0x28ae
jmp 0x2a49
movq -0x20(%rbp), %rax
imulq 0x1c9b1(%rip), %rax     # 0x1f270
movq %rax, 0x1c9aa(%rip)     # 0x1f270
leaq 0x157b3(%rip), %rdi     # 0x18080
callq 0x2c90
movl -0x14(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x6, %eax
ja 0x2a25
movq -0x38(%rbp), %rax
leaq 0x15737(%rip), %rcx     # 0x18028
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x1c96f(%rip), %rdx     # 0x1f270
leaq 0x15740(%rip), %rdi     # 0x18048
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x3490
cmpl $0x0, %eax
je 0x2921
jmp 0x2a49
jmp 0x2a42
movq 0x1c943(%rip), %rdx     # 0x1f270
leaq 0x15714(%rip), %rdi     # 0x18048
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x2ff0
cmpl $0x0, %eax
je 0x294d
jmp 0x2a49
jmp 0x2a42
movq 0x1c917(%rip), %rdx     # 0x1f270
leaq 0x156e8(%rip), %rdi     # 0x18048
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x3190
cmpl $0x0, %eax
je 0x2979
jmp 0x2a49
jmp 0x2a42
movq 0x1c8eb(%rip), %rdx     # 0x1f270
leaq 0x156bc(%rip), %rdi     # 0x18048
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x3720
cmpl $0x0, %eax
je 0x29a5
jmp 0x2a49
jmp 0x2a42
movq 0x1c8bf(%rip), %rdx     # 0x1f270
leaq 0x15690(%rip), %rdi     # 0x18048
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
xorl %r8d, %r8d
callq 0x3920
cmpl $0x0, %eax
je 0x29d1
jmp 0x2a49
jmp 0x2a42
movq 0x1c896(%rip), %rdx     # 0x1f270
leaq 0x15667(%rip), %rdi     # 0x18048
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
movl $0x1, %r8d
callq 0x3920
cmpl $0x0, %eax
je 0x29fd
jmp 0x2a49
jmp 0x2a42
movq 0x1c86a(%rip), %rdx     # 0x1f270
leaq 0x1563b(%rip), %rdi     # 0x18048
movl $0x1, %esi
movl $0x989680, %ecx         # imm = 0x989680
callq 0x4330
cmpl $0x0, %eax
je 0x2a23
jmp 0x2a49
jmp 0x2a42
jmp 0x2a27
leaq 0x1566e(%rip), %rdi     # 0x1809c
movb $0x0, %al
callq 0x145e0
callq 0x2340
movl $0x0, (%rax)
jmp 0x2a49
xorl %edi, %edi
callq 0x2110
movl $0x1, %edi
callq 0x2110
nopw %cs:(%rax,%rax)