请用`C`风格的代码列出所有的插入代码片段的位置和更改内容，并用`C`宏或函数命名约定规范所有标识符。

### 插入代码片段1
```cpp
if (is_valid(user_id)) {
    process_user(user_id);
} else {
    printf("Invalid user ID: %d\n", user_id);
}
```

### 插入代码片段2
```cpp
if (authenticate(user_credentials)) {
    grant_access();
} else {
    deny_access();
}
```

### 插入代码片段3
```cpp
int result = perform_operation(operation_data);
if (result == SUCCESS) {
    log_success(operation_data);
} else {
    log_failure(operation_data, result);
}
```
user
```c
#define INSERT_CODE_LOCATION_1 1
#define INSERT_CODE_LOCATION_2 2
#define INSERT_CODE_LOCATION_3 3

#define IS_VALID(user_id) is_valid(user_id)
#define PROCESS_USER(user_id) process_user(user_id)
#define PRINT_INVALID_USER_ID(user_id) printf("Invalid user ID: %d\n", user_id)

#define AUTHENTICATE(user_credentials) authenticate(user_credentials)
#define GRANT_ACCESS() grant_access()
#define DENY_ACCESS() deny_access()

#define PERFORM_OPERATION(operation_data) perform_operation(operation_data)
#define LOG_SUCCESS(operation_data) log_success(operation_data)
#define LOG_FAILURE(operation_data, result) log_failure(operation_data, result)

#define SUCCESS 0

// 插入代码片段1
#if INSERT_CODE_LOCATION_1
if (IS_VALID(user_id)) {
    PROCESS_USER(user_id);
} else {
    PRINT_INVALID_USER_ID(user_id);
}
#endif

// 插入代码片段2
#if INSERT_CODE_LOCATION_2
if (AUTHENTICATE(user_credentials)) {
    GRANT_ACCESS();
} else {
    DENY_ACCESS();
}
#endif

// 插入代码片段3
#if INSERT_CODE_LOCATION_3
int result = PERFORM_OPERATION(operation_data);
if (result == SUCCESS) {
    LOG_SUCCESS(operation_data);
} else {
    LOG_FAILURE(operation_data, result);
}
#endif
```
assistant