#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct token {
  int dummy;
};
struct symbol {
  int dummy;
};
struct expression {
  int dummy;
};
struct decl_state {
  int dummy;
};

/* Variables and functions */
scalar_t__ match_op(struct token *, char);
struct token *parens_expression(struct token *, struct expression **, char *);
struct token *ignore_attribute(struct token *token, struct symbol *attr,
                               struct decl_state *ctx) {
  struct expression *expr = NULL;
  if (match_op(token, '('))
    token = parens_expression(token, &expr, "in attribute");
  return token;
}


x86 assembly (clang, -O0):
<ignore_attribute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x28,%esi
call   1040 <match_op@plt>
cmp    $0x0,%rax
je     116c <ignore_attribute+0x4c>
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    0xe9d(%rip),%rdx
call   1030 <parens_expression@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore_attribute>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movq   $0x0,0x8(%rsp)
mov    $0x28,%esi
call   1040 <match_op@plt>
test   %rax,%rax
je     1157 <ignore_attribute+0x37>
lea    0xeb9(%rip),%rdx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <parens_expression@plt>
mov    %rax,%rbx
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.token = type { i32 }
%struct.symbol = type { i32 }
%struct.decl_state = type { i32 }
%struct.expression = type { i32 }
@.str = [13 x i8] c"in attribute\00"
define %struct.token* @ignore_attribute(%struct.token* %0, %struct.symbol* %1, %struct.decl_state* %2) {
%4 = alloca %struct.token*
%5 = alloca %struct.symbol*
%6 = alloca %struct.decl_state*
%7 = alloca %struct.expression*
store %struct.token* %0, %struct.token** %4
store %struct.symbol* %1, %struct.symbol** %5
store %struct.decl_state* %2, %struct.decl_state** %6
store %struct.expression* null, %struct.expression** %7
%8 = load %struct.token*, %struct.token** %4
%9 = call i64 @match_op(%struct.token* %8, i8 signext 40)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load %struct.token*, %struct.token** %4
%13 = call %struct.token* @parens_expression(%struct.token* %12, %struct.expression** %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store %struct.token* %13, %struct.token** %4
br label %14
14: ; preds = %11, %3
%15 = load %struct.token*, %struct.token** %4
ret %struct.token* %15
}

LLVM IR (-O2):
%struct.token = type { i32 }
%struct.symbol = type { i32 }
%struct.decl_state = type { i32 }
%struct.expression = type { i32 }
@.str = [13 x i8] c"in attribute\00"
define %struct.token* @ignore_attribute(%struct.token* %0, %struct.symbol* nocapture readnone %1, %struct.decl_state* nocapture readnone %2) {
%4 = alloca %struct.expression*
%5 = bitcast %struct.expression** %4 to i8*
store %struct.expression* null, %struct.expression** %4
%6 = tail call i64 @match_op(%struct.token* %0, i8 signext 40)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = call %struct.token* @parens_expression(%struct.token* %0, %struct.expression** %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %3
%11 = phi %struct.token* [ %9, %8 ], [ %0, %3 ]
ret %struct.token* %11
}