#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 abs(int);
int /*<<< orphan*/ drive(int, int, int);
void driveWithLogic(int speedForward, int speedTurn, int speedStrafe,
                    float forwardMultiplier, float turnMultiplier,
                    float strafeMultiplier) {
  int multipliedSpeedForward = speedForward;
  int multipliedSpeedTurn = speedTurn;
  int multipliedSpeedStrafe = speedStrafe;
  if (abs(multipliedSpeedForward) <= 15)
    multipliedSpeedForward = 0;
  if (abs(multipliedSpeedTurn) <= 15)
    multipliedSpeedTurn = 0;
  if (abs(multipliedSpeedStrafe) <= 15)
    multipliedSpeedStrafe = 0;
  drive(multipliedSpeedForward, multipliedSpeedTurn, multipliedSpeedStrafe);
}


x86 assembly (clang, -O0):
<driveWithLogic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movss  %xmm0,-0x10(%rbp)
movss  %xmm1,-0x14(%rbp)
movss  %xmm2,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <abs@plt>
cmp    $0xf,%eax
jg     116a <driveWithLogic+0x4a>
movl   $0x0,-0x1c(%rbp)
mov    -0x20(%rbp),%edi
call   1030 <abs@plt>
cmp    $0xf,%eax
jg     1182 <driveWithLogic+0x62>
movl   $0x0,-0x20(%rbp)
mov    -0x24(%rbp),%edi
call   1030 <abs@plt>
cmp    $0xf,%eax
jg     119a <driveWithLogic+0x7a>
movl   $0x0,-0x24(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1040 <drive@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<driveWithLogic>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
xor    %ecx,%ecx
cmp    $0x10,%eax
cmovb  %ecx,%edi
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
cmp    $0x10,%eax
cmovb  %ecx,%esi
mov    %edx,%eax
neg    %eax
cmovs  %edx,%eax
cmp    $0x10,%eax
cmovb  %ecx,%edx
jmp    1030 <drive@plt>

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

LLVM IR (-O2):
define void @driveWithLogic(i32 %0, i32 %1, i32 %2, float %3, float %4, float %5) {
%7 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%8 = icmp ult i32 %7, 16
%9 = select i1 %8, i32 0, i32 %0
%10 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%11 = icmp ult i32 %10, 16
%12 = select i1 %11, i32 0, i32 %1
%13 = tail call i32 @llvm.abs.i32(i32 %2, i1 true)
%14 = icmp ult i32 %13, 16
%15 = select i1 %14, i32 0, i32 %2
%16 = tail call i32 @drive(i32 %9, i32 %12, i32 %15)
ret void
}