// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/builtin.c
// Function: expand_warning
static int expand_warning(struct expression *expr, int cost)
{
	struct expression *arg;
	struct expression_list *arglist = expr->args;

	FOR_EACH_PTR (arglist, arg) {
		/*
		 * Constant strings get printed out as a warning. By the
		 * time we get here, the EXPR_STRING has been fully 
		 * evaluated, so by now it's an anonymous symbol with a
		 * string initializer.
		 *
		 * Just for the heck of it, allow any constant string
		 * symbol.
		 */
		if (arg->type == EXPR_SYMBOL) {
			struct symbol *sym = arg->symbol;
			if (sym->initializer && sym->initializer->type == EXPR_STRING) {
				struct string *string = sym->initializer->string;
				warning(expr->pos, "%*s", string->length-1, string->data);
			}
			continue;
		}

		/*
		 * Any other argument is a conditional. If it's
		 * non-constant, or it is false, we exit and do
		 * not print any warning.
		 */
		if (arg->type != EXPR_VALUE)
			goto out;
		if (!arg->value)
			goto out;
	} END_FOR_EACH_PTR(arg);
out:
	expr->type = EXPR_VALUE;
	expr->value = 1;
	expr->taint = 0;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %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 0x4846f
jmp 0x4858d
jmp 0x48471
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 0x48575
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 0x484c3
cmpq $0x0, -0x18(%rbp)
jne 0x484c3
jmp 0x48567
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x3, %eax
jne 0x48546
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
je 0x48544
movq -0x48(%rbp), %rax
movq 0xb0(%rax), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x2, %eax
jne 0x48544
movq -0x48(%rbp), %rax
movq 0xb0(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq -0x50(%rbp), %rcx
movl (%rcx), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
subl $0x1, %edx
movq -0x50(%rbp), %rcx
addq $0x4, %rcx
movq 0x8(%rax), %rdi
leaq 0x22dbd(%rip), %rsi     # 0x6b2fa
movb $0x0, %al
callq 0x16d80
jmp 0x48567
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x1, %eax
je 0x48558
jmp 0x4858f
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x48565
jmp 0x4858f
jmp 0x48567
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x48478
jmp 0x48577
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq -0x28(%rbp), %rax
jne 0x48471
jmp 0x4858f
movq -0x8(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
orl $0x1, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq $0x1, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nop