#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*/ free(char *);
char *getAmount();
char *getCreditCard();
char *getEmail();
char *getExprDate();
char *getName();
char *getZip();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("############################################\n");
  printf("# Welcome to the Stratux Payment Processor #\n");
  printf("############################################\n\n");
  char *name = getName();
  char *card = getCreditCard();
  char *expiration = getExprDate();
  char *zip = getZip();
  char *amount = getAmount();
  char *email = getEmail();
  printf("\n##################OUTPUT#################\n\n");
  printf("Name: %s", name);
  printf("Credit Card: %s", card);
  printf("Expiration Date: %s\n", expiration);
  printf("Zip Code: %s", zip);
  printf("Purchase Amount: %s", amount);
  printf("Email Address: %s", email);
  free(name);
  free(card);
  free(expiration);
  free(zip);
  free(amount);
  free(email);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   10a0 <getName@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1070 <getCreditCard@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1080 <getExprDate@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <getZip@plt>
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1050 <getAmount@plt>
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   1090 <getEmail@plt>
mov    %rax,-0x38(%rbp)
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x30(%rbp),%rsi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x38(%rbp),%rsi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebf(%rip),%rdi
call   1050 <puts@plt>
lea    0xee0(%rip),%rdi
call   1050 <puts@plt>
lea    0xf01(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   10b0 <getName@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1080 <getCreditCard@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1090 <getExprDate@plt>
mov    %rax,%r12
xor    %eax,%eax
call   1040 <getZip@plt>
mov    %rax,%r13
xor    %eax,%eax
call   1060 <getAmount@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   10a0 <getEmail@plt>
mov    %rax,%rbp
lea    0xee7(%rip),%rdi
call   1050 <puts@plt>
lea    0xdf2(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xdea(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xde9(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xded(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xde9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xdec(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [46 x i8] c"############################################\0A\00"
@.str.1 = [46 x i8] c"# Welcome to the Stratux Payment Processor #\0A\00"
@.str.2 = [47 x i8] c"############################################\0A\0A\00"
@.str.3 = [45 x i8] c"\0A##################OUTPUT#################\0A\0A\00"
@.str.4 = [9 x i8] c"Name: %s\00"
@.str.5 = [16 x i8] c"Credit Card: %s\00"
@.str.6 = [21 x i8] c"Expiration Date: %s\0A\00"
@.str.7 = [13 x i8] c"Zip Code: %s\00"
@.str.8 = [20 x i8] c"Purchase Amount: %s\00"
@.str.9 = [18 x i8] c"Email Address: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%11 = call i8* (...) @getName()
store i8* %11, i8** %2
%12 = call i8* (...) @getCreditCard()
store i8* %12, i8** %3
%13 = call i8* (...) @getExprDate()
store i8* %13, i8** %4
%14 = call i8* (...) @getZip()
store i8* %14, i8** %5
%15 = call i8* (...) @getAmount()
store i8* %15, i8** %6
%16 = call i8* (...) @getEmail()
store i8* %16, i8** %7
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
%18 = load i8*, i8** %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %18)
%20 = load i8*, i8** %3
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* %20)
%22 = load i8*, i8** %4
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* %22)
%24 = load i8*, i8** %5
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* %24)
%26 = load i8*, i8** %6
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i8* %26)
%28 = load i8*, i8** %7
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i8* %28)
%30 = load i8*, i8** %2
%31 = call i32 @free(i8* %30)
%32 = load i8*, i8** %3
%33 = call i32 @free(i8* %32)
%34 = load i8*, i8** %4
%35 = call i32 @free(i8* %34)
%36 = load i8*, i8** %5
%37 = call i32 @free(i8* %36)
%38 = load i8*, i8** %6
%39 = call i32 @free(i8* %38)
%40 = load i8*, i8** %7
%41 = call i32 @free(i8* %40)
ret i32 0
}

LLVM IR (-O2):
@.str.4 = [9 x i8] c"Name: %s\00"
@.str.5 = [16 x i8] c"Credit Card: %s\00"
@.str.6 = [21 x i8] c"Expiration Date: %s\0A\00"
@.str.7 = [13 x i8] c"Zip Code: %s\00"
@.str.8 = [20 x i8] c"Purchase Amount: %s\00"
@.str.9 = [18 x i8] c"Email Address: %s\00"
@str = [45 x i8] c"############################################\00"
@str.10 = [45 x i8] c"# Welcome to the Stratux Payment Processor #\00"
@str.11 = [46 x i8] c"############################################\0A\00"
@str.12 = [44 x i8] c"\0A##################OUTPUT#################\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.10, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.11, i64 0, i64 0))
%4 = tail call i8* (...) @getName()
%5 = tail call i8* (...) @getCreditCard()
%6 = tail call i8* (...) @getExprDate()
%7 = tail call i8* (...) @getZip()
%8 = tail call i8* (...) @getAmount()
%9 = tail call i8* (...) @getEmail()
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.12, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %4)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* %5)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* %6)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* %7)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i8* %8)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i8* %9)
%17 = tail call i32 @free(i8* %4)
%18 = tail call i32 @free(i8* %5)
%19 = tail call i32 @free(i8* %6)
%20 = tail call i32 @free(i8* %7)
%21 = tail call i32 @free(i8* %8)
%22 = tail call i32 @free(i8* %9)
ret i32 0
}