// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]rbtree/test/bitmap.c
// Function: add_row
static int add_row(draw_state_t *st, int rowindex, dlitem_t *item)
{
	if (st->rowcount <= rowindex) {
		dllist_t *rows;
		int i;
		rows = malloc((rowindex + 1) * sizeof(dllist_t));
		if (rows == NULL)
			return -1;
		for (i = 0; i < st->rowcount; i++) {
			dllist_init(rows + i);
			dllist_add_list_to_tail(rows + i, st->rows + i);
		}
		for (; i <= rowindex; i++) {
			dllist_init(rows + i);
		}
		free(st->rows);
		st->rows = rows;
		st->rowcount = rowindex + 1;
	}
	dllist_add(st->rows + rowindex, item);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
cmpl -0x14(%rbp), %eax
jg 0x3ee8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x4, %rdi
callq 0x10f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x3cac
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3f63
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x3e66
jmp 0x3cc5
movq -0x28(%rbp), %rcx
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x3d0a
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x3e01
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x3e56
jmp 0x3e58
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3cb3
jmp 0x3e68
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0x3ec2
jmp 0x3e72
movq -0x28(%rbp), %rcx
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x3eb7
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3e68
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x1030
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x3eea
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x14(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)