#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*/ displaySumSmallest(int, int, int, int);
int /*<<< orphan*/ printf(char *);
int main() {
  double t1 = 16.3, t2 = 98.23, t3 = 32.1, n1 = -3.2, n2 = 5.55;
  printf("Simple Function Example 4\n\n");
  displaySumSmallest(t1, t2, t3, n1);
  displaySumSmallest(1.2, 4.5, -2.2, -10.1);
  displaySumSmallest(n1, n1, n1, n2);
  displaySumSmallest(n1 + n2, 3.2, t3 - t2, 0.123);
  displaySumSmallest(4, 3, 2, 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed4(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xebf(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe95(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
cvttsd2si -0x10(%rbp),%edi
cvttsd2si -0x18(%rbp),%esi
cvttsd2si -0x20(%rbp),%edx
cvttsd2si -0x28(%rbp),%ecx
call   1030 <displaySumSmallest@plt>
mov    $0x1,%edi
mov    $0x4,%esi
mov    $0xfffffffe,%edx
mov    $0xfffffff6,%ecx
call   1030 <displaySumSmallest@plt>
cvttsd2si -0x28(%rbp),%edi
cvttsd2si -0x28(%rbp),%esi
cvttsd2si -0x28(%rbp),%edx
cvttsd2si -0x30(%rbp),%ecx
call   1030 <displaySumSmallest@plt>
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%edi
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edx
mov    $0x3,%esi
xor    %ecx,%ecx
call   1030 <displaySumSmallest@plt>
mov    $0x4,%edi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <displaySumSmallest@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x10,%edi
mov    $0x62,%esi
mov    $0x20,%edx
mov    $0xfffffffd,%ecx
call   1040 <displaySumSmallest@plt>
mov    $0x1,%edi
mov    $0x4,%esi
mov    $0xfffffffe,%edx
mov    $0xfffffff6,%ecx
call   1040 <displaySumSmallest@plt>
mov    $0xfffffffd,%edi
mov    $0xfffffffd,%esi
mov    $0xfffffffd,%edx
mov    $0x5,%ecx
call   1040 <displaySumSmallest@plt>
mov    $0x2,%edi
mov    $0x3,%esi
mov    $0xffffffbe,%edx
xor    %ecx,%ecx
call   1040 <displaySumSmallest@plt>
mov    $0x4,%edi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1040 <displaySumSmallest@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Simple Function Example 4\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
store double 1.630000e+01, double* %2
store double 9.823000e+01, double* %3
store double 3.210000e+01, double* %4
store double -3.200000e+00, double* %5
store double 5.550000e+00, double* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = load double, double* %2
%9 = fptosi double %8 to i32
%10 = load double, double* %3
%11 = fptosi double %10 to i32
%12 = load double, double* %4
%13 = fptosi double %12 to i32
%14 = load double, double* %5
%15 = fptosi double %14 to i32
%16 = call i32 @displaySumSmallest(i32 %9, i32 %11, i32 %13, i32 %15)
%17 = call i32 @displaySumSmallest(i32 1, i32 4, i32 -2, i32 -10)
%18 = load double, double* %5
%19 = fptosi double %18 to i32
%20 = load double, double* %5
%21 = fptosi double %20 to i32
%22 = load double, double* %5
%23 = fptosi double %22 to i32
%24 = load double, double* %6
%25 = fptosi double %24 to i32
%26 = call i32 @displaySumSmallest(i32 %19, i32 %21, i32 %23, i32 %25)
%27 = load double, double* %5
%28 = load double, double* %6
%29 = fadd double %27, %28
%30 = fptosi double %29 to i32
%31 = load double, double* %4
%32 = load double, double* %3
%33 = fsub double %31, %32
%34 = fptosi double %33 to i32
%35 = call i32 @displaySumSmallest(i32 %30, i32 3, i32 %34, i32 0)
%36 = call i32 @displaySumSmallest(i32 4, i32 3, i32 2, i32 1)
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"Simple Function Example 4\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @displaySumSmallest(i32 16, i32 98, i32 32, i32 -3)
%3 = tail call i32 @displaySumSmallest(i32 1, i32 4, i32 -2, i32 -10)
%4 = tail call i32 @displaySumSmallest(i32 -3, i32 -3, i32 -3, i32 5)
%5 = tail call i32 @displaySumSmallest(i32 2, i32 3, i32 -66, i32 0)
%6 = tail call i32 @displaySumSmallest(i32 4, i32 3, i32 2, i32 1)
ret i32 0
}