// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/ssa.c
// Function: is_promotable
static inline bool is_promotable(struct symbol *type)
{
	struct symbol *member;
	int bf_seen;
	int nbr;

	if (type->type == SYM_NODE)
		type = type->ctype.base_type;
	switch (type->type) {
	case SYM_ENUM:
	case SYM_BITFIELD:
	case SYM_PTR:
	case SYM_RESTRICT:	// OK, always integer types
		return 1;
	case SYM_STRUCT:
		// we allow a single scalar field
		// but a run of bitfields count for 1
		// (and packed bifields are excluded).
		if (type->packed)
			return 0;
		nbr = 0;
		bf_seen = 0;
		FOR_EACH_PTR(type->symbol_list, member) {
			if (is_bitfield_type(member)) {
				if (bf_seen)
					continue;
				bf_seen = 1;
			} else {
				bf_seen = 0;
			}
			if (!is_scalar_type(member))
				return 0;
			if (nbr++)
				return 0;
		} END_FOR_EACH_PTR(member);
		if (bf_seen && (type->bit_size > long_ctype.bit_size))
			return 0;
		return 1;
	case SYM_UNION:
		// FIXME: should be like struct but has problem
		//        when used with/for type cohercion
		// -----> OK if only same sized integral types
		FOR_EACH_PTR(type->symbol_list, member) {
			if (member->bit_size != type->bit_size)
				return 0;
			if (!is_integral_type(member))
				return 0;
		} END_FOR_EACH_PTR(member);
		return 1;
	default:
		break;
	}
	if (type->ctype.base_type == &int_type)
		return 1;
	if (type->ctype.base_type == &fp_type)
		return 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x3, %eax
jne 0x3e518
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x60(%rbp)
subl $0x4, %eax
je 0x3e563
jmp 0x3e529
movl -0x60(%rbp), %eax
subl $0x7, %eax
je 0x3e56c
jmp 0x3e533
movl -0x60(%rbp), %eax
subl $0x8, %eax
je 0x3e6ba
jmp 0x3e541
movl -0x60(%rbp), %eax
subl $0x9, %eax
je 0x3e563
jmp 0x3e54b
movl -0x60(%rbp), %eax
subl $0xb, %eax
je 0x3e563
jmp 0x3e555
movl -0x60(%rbp), %eax
subl $0xd, %eax
jne 0x3e788
jmp 0x3e563
movb $0x1, -0x1(%rbp)
jmp 0x3e7bc
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
shrl $0x15, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3e587
movb $0x0, -0x1(%rbp)
jmp 0x3e7bc
movl $0x0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x3e5c0
jmp 0x3e68f
jmp 0x3e5c2
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x30(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x3e677
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x3e611
cmpq $0x0, -0x18(%rbp)
jne 0x3e611
jmp 0x3e669
movq -0x18(%rbp), %rdi
callq 0x3e980
cmpl $0xb, %eax
jne 0x3e630
cmpl $0x0, -0x1c(%rbp)
je 0x3e627
jmp 0x3e669
movl $0x1, -0x1c(%rbp)
jmp 0x3e637
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3e9d0
cmpl $0x0, %eax
jne 0x3e64e
movb $0x0, -0x1(%rbp)
jmp 0x3e7bc
movl -0x20(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x20(%rbp)
cmpl $0x0, %eax
je 0x3e667
movb $0x0, -0x1(%rbp)
jmp 0x3e7bc
jmp 0x3e669
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3e5c9
jmp 0x3e679
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq -0x28(%rbp), %rax
jne 0x3e5c2
cmpl $0x0, -0x1c(%rbp)
je 0x3e6b1
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
leaq 0x53715(%rip), %rcx     # 0x91db8
cmpl 0x50(%rcx), %eax
jle 0x3e6b1
movb $0x0, -0x1(%rbp)
jmp 0x3e7bc
movb $0x1, -0x1(%rbp)
jmp 0x3e7bc
jmp 0x3e6bc
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x3e6e7
jmp 0x3e782
jmp 0x3e6e9
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x50(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x3e76a
movq -0x50(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x50(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x3e734
cmpq $0x0, -0x18(%rbp)
jne 0x3e734
jmp 0x3e75f
movq -0x18(%rbp), %rax
movl 0x50(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x50(%rcx), %eax
je 0x3e74a
movb $0x0, -0x1(%rbp)
jmp 0x3e7bc
movq -0x18(%rbp), %rdi
callq 0x3ea80
testb $0x1, %al
jne 0x3e75d
movb $0x0, -0x1(%rbp)
jmp 0x3e7bc
jmp 0x3e75f
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x3e6f0
jmp 0x3e76c
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq -0x48(%rbp), %rax
jne 0x3e6e9
movb $0x1, -0x1(%rbp)
jmp 0x3e7bc
jmp 0x3e78a
movq -0x10(%rbp), %rax
leaq 0x52ac3(%rip), %rcx     # 0x91258
cmpq %rcx, 0x60(%rax)
jne 0x3e7a1
movb $0x1, -0x1(%rbp)
jmp 0x3e7bc
movq -0x10(%rbp), %rax
leaq 0x52b8c(%rip), %rcx     # 0x91338
cmpq %rcx, 0x60(%rax)
jne 0x3e7b8
movb $0x1, -0x1(%rbp)
jmp 0x3e7bc
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)