#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 *);
char *interrogate_user(char *ph_no) {
  printf("\n \nWelcome to the PHONE NUMBER TRANSLATOR 1.1\n");
  printf("(c) 2001 Tim Allen.\n");
  printf("Please enter the phone number you wish to probe: ");
  scanf("%"
        "100"
        "s",
        ph_no);
  printf("\n");
  return ph_no;
}


x86 assembly (clang, -O0):
<interrogate_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf1b(%rip),%rdi
call   1040 <scanf@plt>
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interrogate_user>:
push   %rbx
mov    %rdi,%rbx
lea    0xeed(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9d(%rip),%rdi
call   1050 <printf@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"\0A \0AWelcome to the PHONE NUMBER TRANSLATOR 1.1\0A\00"
@.str.1 = [21 x i8] c"(c) 2001 Tim Allen.\0A\00"
@.str.2 = [50 x i8] c"Please enter the phone number you wish to probe: \00"
@.str.3 = [6 x i8] c"%100s\00"
@.str.4 = [2 x i8] c"\0A\00"
define i8* @interrogate_user(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str.2 = [50 x i8] c"Please enter the phone number you wish to probe: \00"
@.str.3 = [6 x i8] c"%100s\00"
@str = [46 x i8] c"\0A \0AWelcome to the PHONE NUMBER TRANSLATOR 1.1\00"
@str.5 = [20 x i8] c"(c) 2001 Tim Allen.\00"
define i8* @interrogate_user(i8* returned %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%6 = tail call i32 @putchar(i32 10)
ret i8* %0
}