#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 userlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ UpdateAccess(struct userlist *, char const *);
int /*<<< orphan*/ msgreply(struct userlist *, char const *, char *);
int /*<<< orphan*/ msguser(struct userlist *, char *);
scalar_t__ strcaseeq(char const *, char *);
int msg_identify(const char *replyto, struct userlist *user, const char *data) {
  if (strcaseeq(data, "help")) {
    msgreply(user, replyto, "Useage: identify <password>");
    return (0);
  }
  UpdateAccess(user, data);
  msguser(user, "Identification complete");
  return (0);
}


x86 assembly (clang, -O0):
<msg_identify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xea1(%rip),%rsi
call   1060 <strcaseeq@plt>
cmp    $0x0,%rax
je     118e <msg_identify+0x4e>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe88(%rip),%rdx
call   1050 <msgreply@plt>
movl   $0x0,-0x4(%rbp)
jmp    11b2 <msg_identify+0x72>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <UpdateAccess@plt>
mov    -0x18(%rbp),%rdi
lea    0xe7b(%rip),%rsi
call   1030 <msguser@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_identify>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xeab(%rip),%rsi
mov    %rdx,%rdi
call   1060 <strcaseeq@plt>
test   %rax,%rax
je     1176 <msg_identify+0x36>
lea    0xe9c(%rip),%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <msgreply@plt>
jmp    1190 <msg_identify+0x50>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <UpdateAccess@plt>
lea    0xe99(%rip),%rsi
mov    %r14,%rdi
call   1030 <msguser@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.userlist = type { i32 }
@.str = [5 x i8] c"help\00"
@.str.1 = [28 x i8] c"Useage: identify <password>\00"
@.str.2 = [24 x i8] c"Identification complete\00"
define i32 @msg_identify(i8* %0, %struct.userlist* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.userlist*
%7 = alloca i8*
store i8* %0, i8** %5
store %struct.userlist* %1, %struct.userlist** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %7
%9 = call i64 @strcaseeq(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %3
%12 = load %struct.userlist*, %struct.userlist** %6
%13 = load i8*, i8** %5
%14 = call i32 @msgreply(%struct.userlist* %12, i8* %13, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %4
br label %21
15: ; preds = %3
%16 = load %struct.userlist*, %struct.userlist** %6
%17 = load i8*, i8** %7
%18 = call i32 @UpdateAccess(%struct.userlist* %16, i8* %17)
%19 = load %struct.userlist*, %struct.userlist** %6
%20 = call i32 @msguser(%struct.userlist* %19, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %4
br label %21
21: ; preds = %15, %11
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
%struct.userlist = type { i32 }
@.str = [5 x i8] c"help\00"
@.str.1 = [28 x i8] c"Useage: identify <password>\00"
@.str.2 = [24 x i8] c"Identification complete\00"
define i32 @msg_identify(i8* %0, %struct.userlist* %1, i8* %2) {
%4 = tail call i64 @strcaseeq(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @msgreply(%struct.userlist* %1, i8* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %11
8: ; preds = %3
%9 = tail call i32 @UpdateAccess(%struct.userlist* %1, i8* %2)
%10 = tail call i32 @msguser(%struct.userlist* %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %8, %6
ret i32 0
}