#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 *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char applicant_name[40], nf_facutly_name[40];
  printf("Please enter name of the applicant: ");
  scanf("%s", applicant_name);
  printf("Do they want to be the NF faculty? (Y/N)\n");
  char choice = 'y';
  if (choice == 'y')
    strcpy(nf_facutly_name, applicant_name);
  printf("You are now the facutly for Network Fundamentals\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xecf(%rip),%rdi
call   1050 <scanf@plt>
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
movb   $0x79,-0x61(%rbp)
movsbl -0x61(%rbp),%eax
cmp    $0x79,%eax
jne    1185 <main+0x55>
lea    -0x60(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <strcpy@plt>
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0xeb4(%rip),%rdi
call   1050 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x30(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
lea    0xebc(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Please enter name of the applicant: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [42 x i8] c"Do they want to be the NF faculty? (Y/N)\0A\00"
@.str.3 = [50 x i8] c"You are now the facutly for Network Fundamentals\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [40 x i8]
%3 = alloca [40 x i8]
%4 = alloca i8
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [40 x i8], [40 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 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
store i8 121, i8* %4
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 121
br i1 %11, label %12, label %16
12: ; preds = %0
%13 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%15 = call i32 @strcpy(i8* %13, i8* %14)
br label %16
16: ; preds = %12, %0
%17 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@.str = [37 x i8] c"Please enter name of the applicant: \00"
@.str.1 = [3 x i8] c"%s\00"
@str = [41 x i8] c"Do they want to be the NF faculty? (Y/N)\00"
@str.4 = [49 x i8] c"You are now the facutly for Network Fundamentals\00"
define i32 @main() {
%1 = alloca [40 x i8]
%2 = alloca [40 x i8]
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 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 i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%8 = call i32 @strcpy(i8* %4, i8* %3)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}