#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ show();
scalar_t__ strcmp(char *, char *);
void register1() {
  char m[20] = {'s', 's', 's', '\0'};
  char n[20] = {'a', 'a', 'a', '\0'};
  char s[20];
  char a[20];
  printf("please enter the name:");
  scanf("%s", s);
  printf("please enter the password:");
  scanf("%s", a);
  if (strcmp(m, s) == 0 && strcmp(n, a) == 0)
    show();
  else
    exit(0);
}


x86 assembly (clang, -O0):
<register1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0xe9e(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe9b(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe99(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xe9f(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe9a(%rip),%eax
mov    %eax,-0x30(%rbp)
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
lea    -0x60(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1060 <scanf@plt>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
lea    -0x80(%rbp),%rsi
lea    0xe7f(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    120b <register1+0xbb>
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    120b <register1+0xbb>
mov    $0x0,%al
call   1040 <show@plt>
jmp    1212 <register1+0xc2>
xor    %edi,%edi
call   1070 <exit@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<register1>:
push   %r14
push   %rbx
sub    $0x78,%rsp
mov    0xeb3(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xe98(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    0xebd(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xea2(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb6(%rip),%rbx
lea    0x60(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
lea    0x40(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0x20(%rsp),%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    11f1 <register1+0xa1>
mov    %rsp,%rdi
lea    0x40(%rsp),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    11f1 <register1+0xa1>
xor    %eax,%eax
call   1040 <show@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@__const.register1.m = <{ i8, i8, i8, [17 x i8] }> <{ i8 115, i8 115, i8 115, [17 x i8] zeroinitializer }>
@__const.register1.n = <{ i8, i8, i8, [17 x i8] }> <{ i8 97, i8 97, i8 97, [17 x i8] zeroinitializer }>
@.str = [23 x i8] c"please enter the name:\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [27 x i8] c"please enter the password:\00"
define void @register1() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = alloca [20 x i8]
%4 = alloca [20 x i8]
%5 = bitcast [20 x i8]* %1 to i8*
%6 = bitcast [20 x i8]* %2 to i8*
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%14 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%15 = call i64 @strcmp(i8* %13, i8* %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %24
17: ; preds = %0
%18 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%19 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%20 = call i64 @strcmp(i8* %18, i8* %19)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %17
%23 = call i32 (...) @show()
br label %26
24: ; preds = %17, %0
%25 = call i32 @exit(i32 0)
unreachable
26: ; preds = %22
ret void
}

LLVM IR (-O2):
@__const.register1.m = <{ i8, i8, i8, [17 x i8] }> <{ i8 115, i8 115, i8 115, [17 x i8] zeroinitializer }>
@__const.register1.n = <{ i8, i8, i8, [17 x i8] }> <{ i8 97, i8 97, i8 97, [17 x i8] zeroinitializer }>
@.str = [23 x i8] c"please enter the name:\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [27 x i8] c"please enter the password:\00"
define void @register1() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = alloca [20 x i8]
%4 = alloca [20 x i8]
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%13 = call i64 @strcmp(i8* %5, i8* %7)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %0
%16 = call i64 @strcmp(i8* %6, i8* %8)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (...) @show()
ret void
20: ; preds = %15, %0
%21 = call i32 @exit(i32 0)
unreachable
}