#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*/ assemble(int, char *, float, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  char name[21];
  int empID;
  float hours;
  char timeCard[51];
  printf("\nPlease enter floating number ");
  scanf("%f", &hours);
  printf("\nPlease enter an integer ");
  scanf("%d", &empID);
  printf("Please enter the characTer:");
  scanf("%s", name);
  assemble(empID, name, hours, timeCard);
  printf("\n\nAfter assembling the input data for a single string");
  puts(timeCard);
  printf("\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
movss  -0x28(%rbp),%xmm0
lea    -0x60(%rbp),%rdx
call   1050 <assemble@plt>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
lea    0xec5(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0xc(%rsp),%edi
movss  0x8(%rsp),%xmm0
lea    0x30(%rsp),%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <assemble@plt>
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"\0APlease enter floating number \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [26 x i8] c"\0APlease enter an integer \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [28 x i8] c"Please enter the characTer:\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [54 x i8] c"\0A\0AAfter assembling the input data for a single string\00"
@.str.7 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [21 x i8]
%3 = alloca i32
%4 = alloca float
%5 = alloca [51 x i8]
store i32 0, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%10 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%11 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %11)
%13 = load i32, i32* %3
%14 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%15 = load float, float* %4
%16 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 0
%17 = call i32 @assemble(i32 %13, i8* %14, float %15, i8* %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0))
%19 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 0
%20 = call i32 @puts(i8* %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"\0APlease enter floating number \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [26 x i8] c"\0APlease enter an integer \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [28 x i8] c"Please enter the characTer:\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [54 x i8] c"\0A\0AAfter assembling the input data for a single string\00"
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca [21 x i8]
%2 = alloca i32
%3 = alloca float
%4 = alloca [51 x i8]
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%6 = bitcast i32* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = getelementptr inbounds [51 x i8], [51 x i8]* %4, i64 0, i64 0
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%13 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %5)
%15 = load i32, i32* %2
%16 = load float, float* %3
%17 = call i32 @assemble(i32 %15, i8* %5, float %16, i8* %8)
%18 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0))
%19 = call i32 @puts(i8* %8)
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}