// File: /workspace/github_c_makefile_star2_O0/ShinyaKato[P]skcc/preprocess.c
// Function: primary_expression
int primary_expression(struct pp_node **node) {
  if((*node)->token->type == PP_NUM) {
    int value = 0;
    int base = 10;
    unsigned char *s = (*node)->token->text->head;
    for(int i = 0; i < (*node)->token->text->size; i++) {
      char c = s[i];
      if(i == 0 && c == '0') {
        base = 8;
      }
      if(i == 1 && (c == 'x' || c == 'X') && base == 8) {
        base = 16;
        break;
      }
      if(c == 'l' || c == 'L') break;
      if(base == 10) {
        if('0' <= c && c <= '9') {
          value = value * 10 + (c - '0');
        } else {
          error("invalid integer constant: \"%s\"\n", (*node)->token->text->head);
        }
      } else if(base == 8) {
        if('0' <= c && c <= '7') {
          value = value * 8 + (c - '0');
        } else {
          error("invalid integer constant: \"%s\"\n", (*node)->token->text->head);
        }
      } else if(base == 16) {
        if('0' <= c && c <= '9') {
          value = value * 16 + (c - '0');
        } else if('a' <= c && c <= 'f') {
          value = value * 16 + (c - 'a' + 10);
        } else if('A' <= c && c <= 'F') {
          value = value * 16 + (c - 'A' + 10);
        } else {
          error("invalid integer constant: \"%s\"\n", (*node)->token->text->head);
        }
      }
    }
    *node = (*node)->next;
    return value;
  } else if((*node)->token->type == PP_CHAR) {
    int value = (*node)->token->text->head[0];
    *node = (*node)->next;
    return value;
  } else if((*node)->token->type == PP_LPAREN) {
    *node = (*node)->next;
    int value = conditional_expression(node);
    *node = (*node)->next;
    return value;
  }
  error("invalid integer constant expression: %s\n", (*node)->token->text->head);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
cmpl $0x2, (%rax)
jne 0x7259
movl $0x0, -0x14(%rbp)
movl $0xa, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jge 0x723c
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x25(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x7067
movsbl -0x25(%rbp), %eax
cmpl $0x30, %eax
jne 0x7067
movl $0x8, -0x18(%rbp)
cmpl $0x1, -0x24(%rbp)
jne 0x7091
movsbl -0x25(%rbp), %eax
cmpl $0x78, %eax
je 0x707f
movsbl -0x25(%rbp), %eax
cmpl $0x58, %eax
jne 0x7091
cmpl $0x8, -0x18(%rbp)
jne 0x7091
movl $0x10, -0x18(%rbp)
jmp 0x723c
movsbl -0x25(%rbp), %eax
cmpl $0x6c, %eax
je 0x70a3
movsbl -0x25(%rbp), %eax
cmpl $0x4c, %eax
jne 0x70a8
jmp 0x723c
cmpl $0xa, -0x18(%rbp)
jne 0x7106
movsbl -0x25(%rbp), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x70d6
movsbl -0x25(%rbp), %eax
cmpl $0x39, %eax
jg 0x70d6
imull $0xa, -0x14(%rbp), %eax
movsbl -0x25(%rbp), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x7101
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rcx
leaq 0x38d1(%rip), %rdi      # 0xa9bf
movl $0x244, %esi            # imm = 0x244
leaq 0x3957(%rip), %rdx      # 0xaa51
movb $0x0, %al
callq 0x1280
jmp 0x722c
cmpl $0x8, -0x18(%rbp)
jne 0x7166
movsbl -0x25(%rbp), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x7136
movsbl -0x25(%rbp), %eax
cmpl $0x37, %eax
jg 0x7136
movl -0x14(%rbp), %eax
shll $0x3, %eax
movsbl -0x25(%rbp), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x7161
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rcx
leaq 0x3871(%rip), %rdi      # 0xa9bf
movl $0x24a, %esi            # imm = 0x24A
leaq 0x38f7(%rip), %rdx      # 0xaa51
movb $0x0, %al
callq 0x1280
jmp 0x722a
cmpl $0x10, -0x18(%rbp)
jne 0x7228
movsbl -0x25(%rbp), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x719d
movsbl -0x25(%rbp), %eax
cmpl $0x39, %eax
jg 0x719d
movl -0x14(%rbp), %eax
shll $0x4, %eax
movsbl -0x25(%rbp), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x7226
movsbl -0x25(%rbp), %ecx
movl $0x61, %eax
cmpl %ecx, %eax
jg 0x71ca
movsbl -0x25(%rbp), %eax
cmpl $0x66, %eax
jg 0x71ca
movl -0x14(%rbp), %eax
shll $0x4, %eax
movsbl -0x25(%rbp), %ecx
subl $0x61, %ecx
addl $0xa, %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x7224
movsbl -0x25(%rbp), %ecx
movl $0x41, %eax
cmpl %ecx, %eax
jg 0x71f7
movsbl -0x25(%rbp), %eax
cmpl $0x46, %eax
jg 0x71f7
movl -0x14(%rbp), %eax
shll $0x4, %eax
movsbl -0x25(%rbp), %ecx
subl $0x41, %ecx
addl $0xa, %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x7222
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rcx
leaq 0x37b0(%rip), %rdi      # 0xa9bf
movl $0x254, %esi            # imm = 0x254
leaq 0x3836(%rip), %rdx      # 0xaa51
movb $0x0, %al
callq 0x1280
jmp 0x7224
jmp 0x7226
jmp 0x7228
jmp 0x722a
jmp 0x722c
jmp 0x722e
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7029
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x730f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
cmpl $0x3, (%rax)
jne 0x7299
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x730f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
cmpl $0x7, (%rax)
jne 0x72e0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x7320
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x730f
jmp 0x72e2
jmp 0x72e4
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rcx
leaq 0x36c3(%rip), %rdi      # 0xa9bf
movl $0x264, %esi            # imm = 0x264
leaq 0x3769(%rip), %rdx      # 0xaa71
movb $0x0, %al
callq 0x1280
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)