#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*/ measure(long *, int *, int *, int *, int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int inch, feet, yard, mile;
  long inches;
  measure(&inches, &inch, &feet, &yard, &mile);
  printf("Total value of inches is: %d\n", inches);
  printf("Value of inch is: %d\n", inch);
  printf("Value of feet is: %d\n", feet);
  printf("Value of yard is: %d\n", yard);
  printf("Value of mile is: %d\n", mile);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1040 <measure@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
mov    %rsp,%r8
call   1040 <measure@plt>
mov    0x10(%rsp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    (%rsp),%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Total value of inches is: %d\0A\00"
@.str.1 = [22 x i8] c"Value of inch is: %d\0A\00"
@.str.2 = [22 x i8] c"Value of feet is: %d\0A\00"
@.str.3 = [22 x i8] c"Value of yard is: %d\0A\00"
@.str.4 = [22 x i8] c"Value of mile is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i32 0, i32* %1
%7 = call i32 @measure(i64* %6, i32* %2, i32* %3, i32* %4, i32* %5)
%8 = load i64, i64* %6
%9 = trunc i64 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %4
%16 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %5
%18 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Total value of inches is: %d\0A\00"
@.str.1 = [22 x i8] c"Value of inch is: %d\0A\00"
@.str.2 = [22 x i8] c"Value of feet is: %d\0A\00"
@.str.3 = [22 x i8] c"Value of yard is: %d\0A\00"
@.str.4 = [22 x i8] c"Value of mile is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i64* %5 to i8*
%11 = call i32 @measure(i64* %5, i32* %1, i32* %2, i32* %3, i32* %4)
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %1
%16 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %2
%18 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %3
%20 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %4
%22 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %21)
ret i32 0
}