#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*/ Calc_Time(int *, int *, int *, int);
int Calc_FedEx(int Size, int *Days, int *Hrs, int *Mins) {
  int Total_Time = 0;
  if (*Hrs <= 18)
    *Days = 1;
  else
    *Days = 2;
  Total_Time = (10 * 60) + 30;
  Total_Time += (24 - *Hrs) * 60;
  Total_Time += (*Days - 1) * (24 * 60);
  Calc_Time(Days, Hrs, Mins, Total_Time);
  return Total_Time;
}


x86 assembly (clang, -O0):
<Calc_FedEx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%rax
cmpl   $0x12,(%rax)
jg     114a <Calc_FedEx+0x3a>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    1154 <Calc_FedEx+0x44>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
movl   $0x276,-0x24(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x18,%eax
sub    (%rcx),%eax
imul   $0x3c,%eax,%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
imul   $0x5a0,%eax,%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
call   1030 <Calc_Time@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Calc_FedEx>:
push   %rbx
xor    %eax,%eax
cmpl   $0x13,(%rdx)
mov    %rsi,%rdi
setl   %al
mov    $0x2,%esi
sub    %eax,%esi
mov    %esi,(%rdi)
mov    $0x18,%eax
sub    (%rdx),%eax
imul   $0x3c,%eax,%eax
imul   $0x5a0,%esi,%esi
lea    (%rsi,%rax,1),%ebx
add    $0xfffffcd6,%ebx
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %ebx,%ecx
call   1030 <Calc_Time@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Calc_FedEx(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
store i32 0, i32* %9
%10 = load i32*, i32** %7
%11 = load i32, i32* %10
%12 = icmp sle i32 %11, 18
br i1 %12, label %13, label %15
13: ; preds = %4
%14 = load i32*, i32** %6
store i32 1, i32* %14
br label %17
15: ; preds = %4
%16 = load i32*, i32** %6
store i32 2, i32* %16
br label %17
17: ; preds = %15, %13
store i32 630, i32* %9
%18 = load i32*, i32** %7
%19 = load i32, i32* %18
%20 = sub nsw i32 24, %19
%21 = mul nsw i32 %20, 60
%22 = load i32, i32* %9
%23 = add nsw i32 %22, %21
store i32 %23, i32* %9
%24 = load i32*, i32** %6
%25 = load i32, i32* %24
%26 = sub nsw i32 %25, 1
%27 = mul nsw i32 %26, 1440
%28 = load i32, i32* %9
%29 = add nsw i32 %28, %27
store i32 %29, i32* %9
%30 = load i32*, i32** %6
%31 = load i32*, i32** %7
%32 = load i32*, i32** %8
%33 = load i32, i32* %9
%34 = call i32 @Calc_Time(i32* %30, i32* %31, i32* %32, i32 %33)
%35 = load i32, i32* %9
ret i32 %35
}

LLVM IR (-O2):
define i32 @Calc_FedEx(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 19
%7 = select i1 %6, i32 1, i32 2
store i32 %7, i32* %1
%8 = load i32, i32* %2
%9 = sub nsw i32 24, %8
%10 = mul nsw i32 %9, 60
%11 = mul nuw nsw i32 %7, 1440
%12 = add nsw i32 %11, -810
%13 = add i32 %12, %10
%14 = tail call i32 @Calc_Time(i32* %1, i32* %2, i32* %3, i32 %13)
ret i32 %13
}