#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 */
double abs(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char const *argv[]) {
  int car_one_speed = 60;
  int car_two_speed = 90;
  double dist_speed = abs(car_two_speed - car_one_speed);
  int dist;
  scanf("%d", &dist);
  int time_to_dist = (dist / dist_speed) * 60;
  printf("%d minutos\n", time_to_dist);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3c,-0x14(%rbp)
movl   $0x5a,-0x18(%rbp)
mov    -0x18(%rbp),%edi
sub    -0x14(%rbp),%edi
call   1030 <abs@plt>
movsd  %xmm0,-0x20(%rbp)
lea    0xe9d(%rip),%rdi
lea    -0x24(%rbp),%rsi
call   1050 <scanf@plt>
cvtsi2sdl -0x24(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  0xe7a(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%esi
lea    0xe70(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    $0x1e,%edi
call   1030 <abs@plt>
movsd  %xmm0,0x10(%rsp)
lea    0xebd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0xc(%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
mulsd  0xe94(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 60, i32* %6
store i32 90, i32* %7
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = sub nsw i32 %11, %12
%14 = call double @abs(i32 %13)
store double %14, double* %8
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%16 = load i32, i32* %9
%17 = sitofp i32 %16 to double
%18 = load double, double* %8
%19 = fdiv double %17, %18
%20 = fmul double %19, 6.000000e+01
%21 = fptosi double %20 to i32
store i32 %21, i32* %10
%22 = load i32, i32* %10
%23 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = tail call double @abs(i32 30)
%5 = bitcast i32* %3 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = fdiv double %8, %4
%10 = fmul double %9, 6.000000e+01
%11 = fptosi double %10 to i32
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}