#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 /*<<< orphan*/ scanf(char *, char *);
scalar_t__ strcmp(char *, char *);
int main(void) {
  char x[15];
  char str[15] = "admin123";
  printf("Enter the username: ");
  scanf("%s", x);
  if (strcmp(x, str) == 0) {
    printf("Correct.\n");
  } else {
    printf("Wrong.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x22(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0x1a(%rbp)
mov    0xeb2(%rip),%ax
mov    %ax,-0x16(%rbp)
mov    0xeaa(%rip),%al
mov    %al,-0x14(%rbp)
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
lea    -0x13(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x13(%rbp),%rdi
lea    -0x22(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11ab <main+0x7b>
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
jmp    11b7 <main+0x87>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x3332316e696d6461,%rax
31 32 33
mov    %rax,(%rsp)
movq   $0x33,0x7(%rsp)
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb5(%rip),%rdi
lea    0x11(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
lea    0xe9d(%rip),%rax
lea    0xe8f(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [15 x i8] c"admin123\00\00\00\00\00\00\00"
@.str = [21 x i8] c"Enter the username: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [10 x i8] c"Correct.\0A\00"
@.str.3 = [8 x i8] c"Wrong.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i8]
%3 = alloca [15 x i8]
store i32 0, i32* %1
%4 = bitcast [15 x i8]* %3 to i8*
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%10 = call i64 @strcmp(i8* %8, i8* %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %16
14: ; preds = %0
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [15 x i8] c"admin123\00\00\00\00\00\00\00"
@.str = [21 x i8] c"Enter the username: \00"
@.str.1 = [3 x i8] c"%s\00"
@str = [7 x i8] c"Wrong.\00"
@str.4 = [9 x i8] c"Correct.\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = alloca [15 x i8]
%3 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = call i64 @strcmp(i8* %3, i8* %4)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}