#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ sleep(int);
scalar_t__ strlen(char *);
int main() {
  char *content[] = {"管理员登陆", "添加用户", "删除用户", "修改用户",
                     "修改密码",   "删除密码", "备份密码", "管理员退出"};
  char **c = content;
  printf("%s\n", *content);
  printf("%s\n", *(content + 1));
  printf("%s\n", content[0]);
  printf("%d\n", (int)strlen(content[0]));
  int i;
  for (i = 0; i < 8; ++i) {
    printf("%s ------%s \n", *(content + i), *(c + i));
  }
  while (i++) {
    if (i == 100)
      break;
    printf("%d --->  %s \n", i, *(c + rand() % 8));
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0x2c76(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%rsi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x50(%rbp),%rsi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x5c(%rbp)
cmpl   $0x8,-0x5c(%rbp)
jge    120d <main+0xbd>
movslq -0x5c(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rsi
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    11d2 <main+0x82>
jmp    1212 <main+0xc2>
mov    -0x5c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x5c(%rbp)
cmp    $0x0,%eax
je     127d <main+0x12d>
cmpl   $0x64,-0x5c(%rbp)
jne    1235 <main+0xe5>
jmp    127d <main+0x12d>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    $0x0,%al
call   1070 <rand@plt>
mov    -0x6c(%rbp),%esi
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x68(%rbp),%rax
movslq %edx,%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
jmp    1212 <main+0xc2>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xeb4(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%r15
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeed(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe71(%rip),%rdx
mov    %rbx,%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe6a(%rip),%rdx
mov    %rbx,%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe63(%rip),%rdx
mov    %rbx,%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe5c(%rip),%rdx
mov    %rbx,%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe55(%rip),%rdx
mov    %rbx,%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe4e(%rip),%rdx
mov    %rbx,%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%ebx
lea    0xe67(%rip),%r15
lea    0xe50(%rip),%r14
xor    %eax,%eax
call   1060 <rand@plt>
lea    0x7(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffff8,%ecx
sub    %ecx,%eax
cltq
movslq (%r15,%rax,4),%rdx
add    %r15,%rdx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1230 <main+0xf0>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [16 x i8] c"\E7\AE\A1\E7\90\86\E5\91\98\E7\99\BB\E9\99\86\00"
@.str.1 = [13 x i8] c"\E6\B7\BB\E5\8A\A0\E7\94\A8\E6\88\B7\00"
@.str.2 = [13 x i8] c"\E5\88\A0\E9\99\A4\E7\94\A8\E6\88\B7\00"
@.str.3 = [13 x i8] c"\E4\BF\AE\E6\94\B9\E7\94\A8\E6\88\B7\00"
@.str.4 = [13 x i8] c"\E4\BF\AE\E6\94\B9\E5\AF\86\E7\A0\81\00"
@.str.5 = [13 x i8] c"\E5\88\A0\E9\99\A4\E5\AF\86\E7\A0\81\00"
@.str.6 = [13 x i8] c"\E5\A4\87\E4\BB\BD\E5\AF\86\E7\A0\81\00"
@.str.7 = [16 x i8] c"\E7\AE\A1\E7\90\86\E5\91\98\E9\80\80\E5\87\BA\00"
@__const.main.content = [8 x i8*] [i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i32 0, i32 0)]
@.str.8 = [4 x i8] c"%s\0A\00"
@.str.9 = [4 x i8] c"%d\0A\00"
@.str.10 = [14 x i8] c"%s ------%s \0A\00"
@.str.11 = [14 x i8] c"%d ---> %s \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8*]
%3 = alloca i8**
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [8 x i8*]* %2 to i8*
%6 = getelementptr inbounds [8 x i8*], [8 x i8*]* %2, i64 0, i64 0
store i8** %6, i8*** %3
%7 = getelementptr inbounds [8 x i8*], [8 x i8*]* %2, i64 0, i64 0
%8 = load i8*, i8** %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [8 x i8*], [8 x i8*]* %2, i64 0, i64 0
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [8 x i8*], [8 x i8*]* %2, i64 0, i64 0
%15 = load i8*, i8** %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [8 x i8*], [8 x i8*]* %2, i64 0, i64 0
%18 = load i8*, i8** %17
%19 = call i64 @strlen(i8* %18)
%20 = trunc i64 %19 to i32
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %20)
store i32 0, i32* %4
br label %22
22: ; preds = %37, %0
%23 = load i32, i32* %4
%24 = icmp slt i32 %23, 8
br i1 %24, label %25, label %40
25: ; preds = %22
%26 = getelementptr inbounds [8 x i8*], [8 x i8*]* %2, i64 0, i64 0
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8*, i8** %26, i64 %28
%30 = load i8*, i8** %29
%31 = load i8**, i8*** %3
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %31, i64 %33
%35 = load i8*, i8** %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* %30, i8* %35)
br label %37
37: ; preds = %25
%38 = load i32, i32* %4
%39 = add nsw i32 %38, 1
store i32 %39, i32* %4
br label %22
40: ; preds = %22
br label %41
41: ; preds = %49, %40
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
%44 = icmp ne i32 %42, 0
br i1 %44, label %45, label %59
45: ; preds = %41
%46 = load i32, i32* %4
%47 = icmp eq i32 %46, 100
br i1 %47, label %48, label %49
48: ; preds = %45
br label %59
49: ; preds = %45
%50 = load i32, i32* %4
%51 = load i8**, i8*** %3
%52 = call i32 (...) @rand()
%53 = srem i32 %52, 8
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i8*, i8** %51, i64 %54
%56 = load i8*, i8** %55
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %50, i8* %56)
%58 = call i32 @sleep(i32 1)
br label %41
59: ; preds = %48, %41
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"\E7\AE\A1\E7\90\86\E5\91\98\E7\99\BB\E9\99\86\00"
@.str.1 = [13 x i8] c"\E6\B7\BB\E5\8A\A0\E7\94\A8\E6\88\B7\00"
@.str.2 = [13 x i8] c"\E5\88\A0\E9\99\A4\E7\94\A8\E6\88\B7\00"
@.str.3 = [13 x i8] c"\E4\BF\AE\E6\94\B9\E7\94\A8\E6\88\B7\00"
@.str.4 = [13 x i8] c"\E4\BF\AE\E6\94\B9\E5\AF\86\E7\A0\81\00"
@.str.5 = [13 x i8] c"\E5\88\A0\E9\99\A4\E5\AF\86\E7\A0\81\00"
@.str.6 = [13 x i8] c"\E5\A4\87\E4\BB\BD\E5\AF\86\E7\A0\81\00"
@.str.7 = [16 x i8] c"\E7\AE\A1\E7\90\86\E5\91\98\E9\80\80\E5\87\BA\00"
@reltable.main = [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.1 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.2 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.3 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.4 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.5 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.6 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.7 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32)]
@.str.9 = [4 x i8] c"%d\0A\00"
@.str.10 = [14 x i8] c"%s ------%s \0A\00"
@.str.11 = [14 x i8] c"%d ---> %s \0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 15)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
br label %13
13: ; preds = %0, %13
%14 = phi i32 [ %22, %13 ], [ 9, %0 ]
%15 = tail call i32 (...) @rand()
%16 = srem i32 %15, 8
%17 = sext i32 %16 to i64
%18 = shl i64 %17, 2
%19 = call i8* @llvm.load.relative.i64(i8* bitcast ([8 x i32]* @reltable.main to i8*), i64 %18)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %14, i8* %19)
%21 = tail call i32 @sleep(i32 1)
%22 = add nuw nsw i32 %14, 1
%23 = icmp eq i32 %22, 100
br i1 %23, label %24, label %13
24: ; preds = %13
ret i32 0
}