// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]libcperciva/tests/elasticarray/elasticarray_perftest.c
// Function: check_append_shrink
static int
check_append_shrink(void)
{
	INTLIST list;
	struct timeval tv0, tv1;
	double delta_append, delta_shrink, delta_combo;
	int i;

	/* Allocate list. */
	if ((list = intlist_init(0)) == NULL)
		goto err0;

	/* Append some values. */
	BENCH_START {
		if (intlist_append(list, &i, 1))
			goto err1;
	}
	BENCH_END(delta_append)

	/* Remove some values. */
	BENCH_START {
		intlist_shrink(list, 1);
	}
	BENCH_END(delta_shrink)

	/* Append and remove. */
	BENCH_START {
		if (intlist_append(list, &i, 1))
			goto err1;
		intlist_shrink(list, 1);
	}
	BENCH_END(delta_combo)

	/* Clean up. */
	intlist_free(list);

	/* Print timing results. */
	printf("# _append\t_shrink\t_append and _shrink (all in ns)\n");
	printf("%.1f\t%.1f\t%.1f\n", delta_append, delta_shrink, delta_combo);

	/* Success! */
	return (0);

err1:
	intlist_free(list);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
xorl %eax, %eax
movl %eax, %edi
callq 0x20e0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x1d50
jmp 0x20ce
leaq -0x20(%rbp), %rdi
callq 0x34d0
cmpl $0x0, %eax
je 0x1d9a
jmp 0x1d60
callq 0x1070
cmpl $0x0, (%rax)
je 0x1d85
leaq 0x230f(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x38b0
callq 0x1070
movl $0x0, (%rax)
jmp 0x1d93
leaq 0x22f4(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x3b00
jmp 0x1d95
jmp 0x20c5
movl $0x0, -0x4c(%rbp)
cmpl $0xf4240, -0x4c(%rbp)   # imm = 0xF4240
jge 0x1dd3
movq -0x10(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
movl $0x1, %edx
callq 0x2110
cmpl $0x0, %eax
je 0x1dc6
jmp 0x20c5
jmp 0x1dc8
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1da1
leaq -0x30(%rbp), %rdi
callq 0x34d0
cmpl $0x0, %eax
je 0x1e1d
jmp 0x1de3
callq 0x1070
cmpl $0x0, (%rax)
je 0x1e08
leaq 0x228c(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x38b0
callq 0x1070
movl $0x0, (%rax)
jmp 0x1e16
leaq 0x2271(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x3b00
jmp 0x1e18
jmp 0x20c5
movq -0x30(%rbp), %rax
subq -0x20(%rbp), %rax
cvtsi2sd %rax, %xmm1
movq -0x28(%rbp), %rax
subq -0x18(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x2239(%rip), %xmm2     # 0x4078
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x2221(%rip), %xmm1     # 0x4070
mulsd %xmm1, %xmm0
movsd 0x220d(%rip), %xmm1     # 0x4068
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x34d0
cmpl $0x0, %eax
je 0x1eae
jmp 0x1e74
callq 0x1070
cmpl $0x0, (%rax)
je 0x1e99
leaq 0x21fb(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x38b0
callq 0x1070
movl $0x0, (%rax)
jmp 0x1ea7
leaq 0x21e0(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x3b00
jmp 0x1ea9
jmp 0x20c5
movl $0x0, -0x4c(%rbp)
cmpl $0xf4240, -0x4c(%rbp)   # imm = 0xF4240
jge 0x1ed7
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2140
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1eb5
leaq -0x30(%rbp), %rdi
callq 0x34d0
cmpl $0x0, %eax
je 0x1f21
jmp 0x1ee7
callq 0x1070
cmpl $0x0, (%rax)
je 0x1f0c
leaq 0x2188(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x38b0
callq 0x1070
movl $0x0, (%rax)
jmp 0x1f1a
leaq 0x216d(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x3b00
jmp 0x1f1c
jmp 0x20c5
movq -0x30(%rbp), %rax
subq -0x20(%rbp), %rax
cvtsi2sd %rax, %xmm1
movq -0x28(%rbp), %rax
subq -0x18(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x2135(%rip), %xmm2     # 0x4078
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x211d(%rip), %xmm1     # 0x4070
mulsd %xmm1, %xmm0
movsd 0x2109(%rip), %xmm1     # 0x4068
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x34d0
cmpl $0x0, %eax
je 0x1fb2
jmp 0x1f78
callq 0x1070
cmpl $0x0, (%rax)
je 0x1f9d
leaq 0x20f7(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x38b0
callq 0x1070
movl $0x0, (%rax)
jmp 0x1fab
leaq 0x20dc(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x3b00
jmp 0x1fad
jmp 0x20c5
movl $0x0, -0x4c(%rbp)
cmpl $0xf4240, -0x4c(%rbp)   # imm = 0xF4240
jge 0x1ff7
movq -0x10(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
movl $0x1, %edx
callq 0x2110
cmpl $0x0, %eax
je 0x1fde
jmp 0x20c5
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2140
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1fb9
leaq -0x30(%rbp), %rdi
callq 0x34d0
cmpl $0x0, %eax
je 0x2041
jmp 0x2007
callq 0x1070
cmpl $0x0, (%rax)
je 0x202c
leaq 0x2068(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x38b0
callq 0x1070
movl $0x0, (%rax)
jmp 0x203a
leaq 0x204d(%rip), %rdi      # 0x4080
movb $0x0, %al
callq 0x3b00
jmp 0x203c
jmp 0x20c5
movq -0x30(%rbp), %rax
subq -0x20(%rbp), %rax
cvtsi2sd %rax, %xmm1
movq -0x28(%rbp), %rax
subq -0x18(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x2015(%rip), %xmm2     # 0x4078
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x1ffd(%rip), %xmm1     # 0x4070
mulsd %xmm1, %xmm0
movsd 0x1fe9(%rip), %xmm1     # 0x4068
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2170
leaq 0x1ff2(%rip), %rdi      # 0x408a
movb $0x0, %al
callq 0x10c0
movsd -0x38(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
movsd -0x48(%rbp), %xmm2
leaq 0x2008(%rip), %rdi      # 0x40bd
movb $0x3, %al
callq 0x10c0
movl $0x0, -0x4(%rbp)
jmp 0x20d5
movq -0x10(%rbp), %rdi
callq 0x2170
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop