#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 main() {
  char status;
  printf("\nHello Sales person, please enter your status selection:\nUse s for "
         "Senior sales, or j for Junior sales --> ");
  scanf("%c", &status);
  printf("character entered: %c\n", status);
  if ((status == 's') || (status == 'S')) {
    printf("\nYou have indicated that you are a Senior sales professional, "
           "\nyour salary is $%d\n",
           800);
  } else {
    printf("\nYou have indicated that you are a Junior sales professional, "
           "\nyour salary is $%d\n",
           375);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf28(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%esi
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x73,%eax
je     1179 <main+0x59>
movsbl -0x5(%rbp),%eax
cmp    $0x53,%eax
jne    1191 <main+0x71>
lea    0xf06(%rip),%rdi
mov    $0x320,%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a4 <main+0x84>
lea    0xf41(%rip),%rdi
mov    $0x177,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf36(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
movsbl 0x7(%rsp),%esi
lea    0xf23(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x7(%rsp),%al
and    $0xdf,%al
cmp    $0x53,%al
jne    116b <main+0x4b>
lea    0xf22(%rip),%rdi
mov    $0x320,%esi
jmp    1177 <main+0x57>
lea    0xf67(%rip),%rdi
mov    $0x177,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [108 x i8] c"\0AHello Sales person, please enter your status selection:\0AUse s for Senior sales, or j for Junior sales --> \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [23 x i8] c"character entered: %c\0A\00"
@.str.3 = [83 x i8] c"\0AYou have indicated that you are a Senior sales professional, \0Ayour salary is $%d\0A\00"
@.str.4 = [83 x i8] c"\0AYou have indicated that you are a Junior sales professional, \0Ayour salary is $%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 115
br i1 %10, label %15, label %11
11: ; preds = %0
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 83
br i1 %14, label %15, label %17
15: ; preds = %11, %0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.3, i64 0, i64 0), i32 800)
br label %19
17: ; preds = %11
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.4, i64 0, i64 0), i32 375)
br label %19
19: ; preds = %17, %15
ret i32 0
}

LLVM IR (-O2):
@.str = [108 x i8] c"\0AHello Sales person, please enter your status selection:\0AUse s for Senior sales, or j for Junior sales --> \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [23 x i8] c"character entered: %c\0A\00"
@.str.3 = [83 x i8] c"\0AYou have indicated that you are a Senior sales professional, \0Ayour salary is $%d\0A\00"
@.str.4 = [83 x i8] c"\0AYou have indicated that you are a Junior sales professional, \0Ayour salary is $%d\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i8, i8* %1
%8 = and i8 %7, -33
%9 = icmp eq i8 %8, 83
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @.str.3, i64 0, i64 0), i32 800)
br label %14
12: ; preds = %0
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @.str.4, i64 0, i64 0), i32 375)
br label %14
14: ; preds = %12, %10
ret i32 0
}