#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*/ getSinValue(int, float *, float *, float *, float *, int,
                               int);
int /*<<< orphan*/ setMotorRelativePosition(int, int);
void turnLeftRelative(int t, int gain, int speed) {
  float i, j, k, l;
  float coef_left = 0.50;
  float coef_right = 0.50;
  getSinValue(t, &i, &j, &k, &l, gain, speed);
  setMotorRelativePosition(4, (int)i);
  setMotorRelativePosition(16, (int)i);
  setMotorRelativePosition(9, (int)i);
  setMotorRelativePosition(15, (int)j);
  setMotorRelativePosition(10, (int)j);
  setMotorRelativePosition(3, (int)j);
  setMotorRelativePosition(14, (int)(k * -coef_left));
  setMotorRelativePosition(7, (int)-(k * 1.1 * coef_left));
  setMotorRelativePosition(2, (int)(k * -coef_left));
  setMotorRelativePosition(13, (int)(-l * coef_right));
  setMotorRelativePosition(1, (int)(-l * coef_right));
  setMotorRelativePosition(8, (int)(l * 1.1 * -coef_right));
}


x86 assembly (clang, -O0):
<turnLeftRelative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movss  0xecf(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xec2(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
mov    %eax,(%rsp)
call   1030 <getSinValue@plt>
cvttss2si -0x10(%rbp),%esi
mov    $0x4,%edi
call   1040 <setMotorRelativePosition@plt>
cvttss2si -0x10(%rbp),%esi
mov    $0x10,%edi
call   1040 <setMotorRelativePosition@plt>
cvttss2si -0x10(%rbp),%esi
mov    $0x9,%edi
call   1040 <setMotorRelativePosition@plt>
cvttss2si -0x14(%rbp),%esi
mov    $0xf,%edi
call   1040 <setMotorRelativePosition@plt>
cvttss2si -0x14(%rbp),%esi
mov    $0xa,%edi
call   1040 <setMotorRelativePosition@plt>
cvttss2si -0x14(%rbp),%esi
mov    $0x3,%edi
call   1040 <setMotorRelativePosition@plt>
movss  -0x18(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0xe,%edi
call   1040 <setMotorRelativePosition@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdff(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
cvttsd2si %xmm0,%esi
mov    $0x7,%edi
call   1040 <setMotorRelativePosition@plt>
movss  -0x18(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <setMotorRelativePosition@plt>
movss  -0x1c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  -0x24(%rbp),%xmm0
cvttss2si %xmm0,%esi
mov    $0xd,%edi
call   1040 <setMotorRelativePosition@plt>
movss  -0x1c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  -0x24(%rbp),%xmm0
cvttss2si %xmm0,%esi
mov    $0x1,%edi
call   1040 <setMotorRelativePosition@plt>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd45(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0x24(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
mov    $0x8,%edi
call   1040 <setMotorRelativePosition@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turnLeftRelative>:
sub    $0x18,%rsp
mov    %esi,%r9d
mov    %edx,(%rsp)
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1030 <getSinValue@plt>
cvttss2si 0x14(%rsp),%esi
mov    $0x4,%edi
call   1040 <setMotorRelativePosition@plt>
cvttss2si 0x14(%rsp),%esi
mov    $0x10,%edi
call   1040 <setMotorRelativePosition@plt>
cvttss2si 0x14(%rsp),%esi
mov    $0x9,%edi
call   1040 <setMotorRelativePosition@plt>
cvttss2si 0x10(%rsp),%esi
mov    $0xf,%edi
call   1040 <setMotorRelativePosition@plt>
cvttss2si 0x10(%rsp),%esi
mov    $0xa,%edi
call   1040 <setMotorRelativePosition@plt>
cvttss2si 0x10(%rsp),%esi
mov    $0x3,%edi
call   1040 <setMotorRelativePosition@plt>
movss  0xc(%rsp),%xmm0
mulss  0xe4f(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    $0xe,%edi
call   1040 <setMotorRelativePosition@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe37(%rip),%xmm0
mulsd  0xe37(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x7,%edi
call   1040 <setMotorRelativePosition@plt>
movss  0xc(%rsp),%xmm0
mulss  0xe0b(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <setMotorRelativePosition@plt>
movss  0x8(%rsp),%xmm0
mulss  0xdef(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    $0xd,%edi
call   1040 <setMotorRelativePosition@plt>
movss  0xdd9(%rip),%xmm0
mulss  0x8(%rsp),%xmm0
cvttss2si %xmm0,%esi
mov    $0x1,%edi
call   1040 <setMotorRelativePosition@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xdbb(%rip),%xmm0
mulsd  0xdbb(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x8,%edi
call   1040 <setMotorRelativePosition@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @turnLeftRelative(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store float 5.000000e-01, float* %11
store float 5.000000e-01, float* %12
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @getSinValue(i32 %13, float* %7, float* %8, float* %9, float* %10, i32 %14, i32 %15)
%17 = load float, float* %7
%18 = fptosi float %17 to i32
%19 = call i32 @setMotorRelativePosition(i32 4, i32 %18)
%20 = load float, float* %7
%21 = fptosi float %20 to i32
%22 = call i32 @setMotorRelativePosition(i32 16, i32 %21)
%23 = load float, float* %7
%24 = fptosi float %23 to i32
%25 = call i32 @setMotorRelativePosition(i32 9, i32 %24)
%26 = load float, float* %8
%27 = fptosi float %26 to i32
%28 = call i32 @setMotorRelativePosition(i32 15, i32 %27)
%29 = load float, float* %8
%30 = fptosi float %29 to i32
%31 = call i32 @setMotorRelativePosition(i32 10, i32 %30)
%32 = load float, float* %8
%33 = fptosi float %32 to i32
%34 = call i32 @setMotorRelativePosition(i32 3, i32 %33)
%35 = load float, float* %9
%36 = load float, float* %11
%37 = fneg float %36
%38 = fmul float %35, %37
%39 = fptosi float %38 to i32
%40 = call i32 @setMotorRelativePosition(i32 14, i32 %39)
%41 = load float, float* %9
%42 = fpext float %41 to double
%43 = fmul double %42, 1.100000e+00
%44 = load float, float* %11
%45 = fpext float %44 to double
%46 = fmul double %43, %45
%47 = fneg double %46
%48 = fptosi double %47 to i32
%49 = call i32 @setMotorRelativePosition(i32 7, i32 %48)
%50 = load float, float* %9
%51 = load float, float* %11
%52 = fneg float %51
%53 = fmul float %50, %52
%54 = fptosi float %53 to i32
%55 = call i32 @setMotorRelativePosition(i32 2, i32 %54)
%56 = load float, float* %10
%57 = fneg float %56
%58 = load float, float* %12
%59 = fmul float %57, %58
%60 = fptosi float %59 to i32
%61 = call i32 @setMotorRelativePosition(i32 13, i32 %60)
%62 = load float, float* %10
%63 = fneg float %62
%64 = load float, float* %12
%65 = fmul float %63, %64
%66 = fptosi float %65 to i32
%67 = call i32 @setMotorRelativePosition(i32 1, i32 %66)
%68 = load float, float* %10
%69 = fpext float %68 to double
%70 = fmul double %69, 1.100000e+00
%71 = load float, float* %12
%72 = fneg float %71
%73 = fpext float %72 to double
%74 = fmul double %70, %73
%75 = fptosi double %74 to i32
%76 = call i32 @setMotorRelativePosition(i32 8, i32 %75)
ret void
}

LLVM IR (-O2):
define void @turnLeftRelative(i32 %0, i32 %1, i32 %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = bitcast float* %4 to i8*
%9 = bitcast float* %5 to i8*
%10 = bitcast float* %6 to i8*
%11 = bitcast float* %7 to i8*
%12 = call i32 @getSinValue(i32 %0, float* %4, float* %5, float* %6, float* %7, i32 %1, i32 %2)
%13 = load float, float* %4
%14 = fptosi float %13 to i32
%15 = call i32 @setMotorRelativePosition(i32 4, i32 %14)
%16 = load float, float* %4
%17 = fptosi float %16 to i32
%18 = call i32 @setMotorRelativePosition(i32 16, i32 %17)
%19 = load float, float* %4
%20 = fptosi float %19 to i32
%21 = call i32 @setMotorRelativePosition(i32 9, i32 %20)
%22 = load float, float* %5
%23 = fptosi float %22 to i32
%24 = call i32 @setMotorRelativePosition(i32 15, i32 %23)
%25 = load float, float* %5
%26 = fptosi float %25 to i32
%27 = call i32 @setMotorRelativePosition(i32 10, i32 %26)
%28 = load float, float* %5
%29 = fptosi float %28 to i32
%30 = call i32 @setMotorRelativePosition(i32 3, i32 %29)
%31 = load float, float* %6
%32 = fmul float %31, -5.000000e-01
%33 = fptosi float %32 to i32
%34 = call i32 @setMotorRelativePosition(i32 14, i32 %33)
%35 = load float, float* %6
%36 = fpext float %35 to double
%37 = fmul double %36, 1.100000e+00
%38 = fmul double %37, -5.000000e-01
%39 = fptosi double %38 to i32
%40 = call i32 @setMotorRelativePosition(i32 7, i32 %39)
%41 = load float, float* %6
%42 = fmul float %41, -5.000000e-01
%43 = fptosi float %42 to i32
%44 = call i32 @setMotorRelativePosition(i32 2, i32 %43)
%45 = load float, float* %7
%46 = fmul float %45, -5.000000e-01
%47 = fptosi float %46 to i32
%48 = call i32 @setMotorRelativePosition(i32 13, i32 %47)
%49 = load float, float* %7
%50 = fmul float %49, -5.000000e-01
%51 = fptosi float %50 to i32
%52 = call i32 @setMotorRelativePosition(i32 1, i32 %51)
%53 = load float, float* %7
%54 = fpext float %53 to double
%55 = fmul double %54, 1.100000e+00
%56 = fmul double %55, -5.000000e-01
%57 = fptosi double %56 to i32
%58 = call i32 @setMotorRelativePosition(i32 8, i32 %57)
ret void
}