#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*/ SendMessages(char *, char *, char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
void Auth() {
  char username[20];
  char password[20];
  printf("Username: ");
  scanf("%s", username);
  printf("Password: ");
  scanf("%s", password);
  char operation[] = "AUTH";
  char key[] = "Password";
  SendMessages(operation, username, key, password);
}


x86 assembly (clang, -O0):
<Auth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1050 <scanf@plt>
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1050 <scanf@plt>
mov    0xea3(%rip),%eax
mov    %eax,-0x45(%rbp)
mov    0xe9e(%rip),%al
mov    %al,-0x41(%rbp)
mov    0xe95(%rip),%rax
mov    %rax,-0x4e(%rbp)
mov    0xe93(%rip),%al
mov    %al,-0x46(%rbp)
lea    -0x45(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x4e(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   1030 <SendMessages@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Auth>:
push   %r15
push   %r14
push   %rbx
sub    $0x60,%rsp
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xebf(%rip),%rbx
lea    0x40(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
lea    0x20(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
movb   $0x0,0xc(%rsp)
movl   $0x48545541,0x8(%rsp)
48
movabs $0x64726f7773736150,%rax
6f 72 64
mov    %rax,0x10(%rsp)
movb   $0x0,0x18(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rdx
mov    %r14,%rsi
mov    %r15,%rcx
call   1030 <SendMessages@plt>
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Username: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [11 x i8] c"Password: \00"
@__const.Auth.operation = [5 x i8] c"AUTH\00"
@__const.Auth.key = [9 x i8] c"Password\00"
define void @Auth() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = alloca [5 x i8]
%4 = alloca [9 x i8]
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %1, 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 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = bitcast [5 x i8]* %3 to i8*
%12 = bitcast [9 x i8]* %4 to i8*
%13 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%15 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%17 = call i32 @SendMessages(i8* %13, i8* %14, i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Username: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [11 x i8] c"Password: \00"
@__const.Auth.operation = [5 x i8] c"AUTH\00"
@__const.Auth.key = [9 x i8] c"Password\00"
define void @Auth() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = alloca [5 x i8]
%4 = alloca [9 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 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%13 = call i32 @SendMessages(i8* %11, i8* %5, i8* %12, i8* %6)
ret void
}