// File: /workspace/github_c_makefile_star2_O0/younix[P]stack/test.c
// Function: main
int
main(int argc, char*argv[])
{
	struct cstack c;
	struct istack i;
	struct fstack f;
	struct dstack d;

	char   cval = '1';
	int    ival = 1;
	float  fval = 1.0;
	double dval = 1.0;

	cstack_init(&c);
	istack_init(&i);
	fstack_init(&f);
	dstack_init(&d);

	for (int p = 0; p < BUFSIZ; p++) {
		if (cstack_push(&c, cval) == false) goto err;
		if (istack_push(&i, ival) == false) goto err;
		if (fstack_push(&f, fval) == false) goto err;
		if (dstack_push(&d, dval) == false) goto err;
	}

	if (cstack_push(&c, cval) == true) goto err;
	if (istack_push(&i, ival) == true) goto err;
	if (fstack_push(&f, fval) == true) goto err;
	if (dstack_push(&d, dval) == true) goto err;

	for (int p = 0; p < BUFSIZ; p++) {
		if (cstack_pop(&c, &cval) == false) goto err;
		if (istack_pop(&i, &ival) == false) goto err;
		if (fstack_pop(&f, &fval) == false) goto err;
		if (dstack_pop(&d, &dval) == false) goto err;

		if (cstack_push(&c, cval) == false) goto err;
		if (istack_push(&i, ival) == false) goto err;
		if (fstack_push(&f, fval) == false) goto err;
		if (dstack_push(&d, dval) == false) goto err;

		if (cstack_pop(&c, NULL) == false) goto err;
		if (istack_pop(&i, NULL) == false) goto err;
		if (fstack_pop(&f, NULL) == false) goto err;
		if (dstack_pop(&d, NULL) == false) goto err;
	}

	if (cstack_pop(&c, NULL) == true) goto err;
	if (istack_pop(&i, NULL) == true) goto err;
	if (fstack_pop(&f, NULL) == true) goto err;
	if (dstack_pop(&d, NULL) == true) goto err;

	return EXIT_SUCCESS;
 err:
	return EXIT_FAILURE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x22050, %rsp          # imm = 0x22050
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x31, -0x22031(%rbp)
movl $0x1, -0x22038(%rbp)
movss 0x9694e(%rip), %xmm0    # 0x498010
movss %xmm0, -0x2203c(%rbp)
movsd 0x96936(%rip), %xmm0    # 0x498008
movsd %xmm0, -0x22048(%rbp)
leaq -0x2018(%rbp), %rdi
callq 0x401aa0
leaq -0xa020(%rbp), %rdi
callq 0x401b80
leaq -0x12028(%rbp), %rdi
callq 0x401c60
leaq -0x22030(%rbp), %rdi
callq 0x401d40
movl $0x0, -0x2204c(%rbp)
cmpl $0x2000, -0x2204c(%rbp) # imm = 0x2000
jge 0x4017c3
leaq -0x2018(%rbp), %rdi
movsbl -0x22031(%rbp), %esi
callq 0x401ad0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x401746
jmp 0x401a82
movl -0x22038(%rbp), %esi
leaq -0xa020(%rbp), %rdi
callq 0x401bb0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x401767
jmp 0x401a82
movss -0x2203c(%rbp), %xmm0
leaq -0x12028(%rbp), %rdi
callq 0x401c90
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x40178a
jmp 0x401a82
movsd -0x22048(%rbp), %xmm0
leaq -0x22030(%rbp), %rdi
callq 0x401d70
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4017ad
jmp 0x401a82
jmp 0x4017af
movl -0x2204c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2204c(%rbp)
jmp 0x401714
leaq -0x2018(%rbp), %rdi
movsbl -0x22031(%rbp), %esi
callq 0x401ad0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x4017e5
jmp 0x401a82
movl -0x22038(%rbp), %esi
leaq -0xa020(%rbp), %rdi
callq 0x401bb0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x401806
jmp 0x401a82
movss -0x2203c(%rbp), %xmm0
leaq -0x12028(%rbp), %rdi
callq 0x401c90
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x401829
jmp 0x401a82
movsd -0x22048(%rbp), %xmm0
leaq -0x22030(%rbp), %rdi
callq 0x401d70
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x40184c
jmp 0x401a82
movl $0x0, -0x22050(%rbp)
cmpl $0x2000, -0x22050(%rbp) # imm = 0x2000
jge 0x401a09
leaq -0x2018(%rbp), %rdi
leaq -0x22031(%rbp), %rsi
callq 0x401b20
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x401888
jmp 0x401a82
leaq -0xa020(%rbp), %rdi
leaq -0x22038(%rbp), %rsi
callq 0x401c00
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4018aa
jmp 0x401a82
leaq -0x12028(%rbp), %rdi
leaq -0x2203c(%rbp), %rsi
callq 0x401ce0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4018cc
jmp 0x401a82
leaq -0x22030(%rbp), %rdi
leaq -0x22048(%rbp), %rsi
callq 0x401dc0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4018ee
jmp 0x401a82
leaq -0x2018(%rbp), %rdi
movsbl -0x22031(%rbp), %esi
callq 0x401ad0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x401910
jmp 0x401a82
movl -0x22038(%rbp), %esi
leaq -0xa020(%rbp), %rdi
callq 0x401bb0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x401931
jmp 0x401a82
movss -0x2203c(%rbp), %xmm0
leaq -0x12028(%rbp), %rdi
callq 0x401c90
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x401954
jmp 0x401a82
movsd -0x22048(%rbp), %xmm0
leaq -0x22030(%rbp), %rdi
callq 0x401d70
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x401977
jmp 0x401a82
leaq -0x2018(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x401b20
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x401996
jmp 0x401a82
leaq -0xa020(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x401c00
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4019b5
jmp 0x401a82
leaq -0x12028(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x401ce0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4019d4
jmp 0x401a82
leaq -0x22030(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x401dc0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4019f3
jmp 0x401a82
jmp 0x4019f5
movl -0x22050(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x22050(%rbp)
jmp 0x401856
leaq -0x2018(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x401b20
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x401a25
jmp 0x401a82
leaq -0xa020(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x401c00
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x401a41
jmp 0x401a82
leaq -0x12028(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x401ce0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x401a5d
jmp 0x401a82
leaq -0x22030(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x401dc0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x401a79
jmp 0x401a82
movl $0x0, -0x4(%rbp)
jmp 0x401a89
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x22050, %rsp          # imm = 0x22050
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop