#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*/ delay(int);
int /*<<< orphan*/ delayMicroseconds(int);
int /*<<< orphan*/ geriGit(int);
int /*<<< orphan*/ ileriGit(int);
int /*<<< orphan*/ motorKontrol(int, int);
void taktik1(int sagSensorDeger, int solSensorDeger, int ortaSensorDeger,
             int sagKenarDeger, int solKenarDeger, int motorHizi) {
  if (solKenarDeger > 300 && sagKenarDeger > 300) {
    if (ortaSensorDeger < 100) {
      ileriGit(motorHizi);
      delay(400);
    } else if (solSensorDeger < 150) {
      motorKontrol(0, motorHizi);
      delay(1);
    } else if (sagSensorDeger < 150) {
      motorKontrol(motorHizi, 0);
      delay(1);
    } else {
      motorKontrol(-150, 150);
      delayMicroseconds(100);
    }
  } else {
    geriGit(motorHizi);
    delay(750);
    motorKontrol(0, 0);
    delayMicroseconds(50);
    ileriGit(motorHizi);
    delay(150);
  }
}


x86 assembly (clang, -O0):
<taktik1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
cmpl   $0x12c,-0x14(%rbp)
jle    121b <taktik1+0xcb>
cmpl   $0x12c,-0x10(%rbp)
jle    121b <taktik1+0xcb>
cmpl   $0x64,-0xc(%rbp)
jge    11a7 <taktik1+0x57>
mov    -0x18(%rbp),%edi
call   1070 <ileriGit@plt>
mov    $0x190,%edi
call   1050 <delay@plt>
jmp    1216 <taktik1+0xc6>
cmpl   $0x96,-0x8(%rbp)
jge    11cd <taktik1+0x7d>
mov    -0x18(%rbp),%esi
xor    %edi,%edi
call   1040 <motorKontrol@plt>
mov    $0x1,%edi
call   1050 <delay@plt>
jmp    1211 <taktik1+0xc1>
cmpl   $0x96,-0x4(%rbp)
jge    11f3 <taktik1+0xa3>
mov    -0x18(%rbp),%edi
xor    %esi,%esi
call   1040 <motorKontrol@plt>
mov    $0x1,%edi
call   1050 <delay@plt>
jmp    120c <taktik1+0xbc>
mov    $0xffffff6a,%edi
mov    $0x96,%esi
call   1040 <motorKontrol@plt>
mov    $0x64,%edi
call   1030 <delayMicroseconds@plt>
jmp    1211 <taktik1+0xc1>
jmp    1216 <taktik1+0xc6>
jmp    1252 <taktik1+0x102>
mov    -0x18(%rbp),%edi
call   1060 <geriGit@plt>
mov    $0x2ee,%edi
call   1050 <delay@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <motorKontrol@plt>
mov    $0x32,%edi
call   1030 <delayMicroseconds@plt>
mov    -0x18(%rbp),%edi
call   1070 <ileriGit@plt>
mov    $0x96,%edi
call   1050 <delay@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<taktik1>:
push   %rbx
mov    %r9d,%ebx
cmp    $0x12d,%ecx
jl     117c <taktik1+0x2c>
cmp    $0x12d,%r8d
jl     117c <taktik1+0x2c>
cmp    $0x63,%edx
jg     11b2 <taktik1+0x62>
mov    %ebx,%edi
call   1070 <ileriGit@plt>
mov    $0x190,%edi
pop    %rbx
jmp    1050 <delay@plt>
mov    %ebx,%edi
call   1060 <geriGit@plt>
mov    $0x2ee,%edi
call   1050 <delay@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <motorKontrol@plt>
mov    $0x32,%edi
call   1030 <delayMicroseconds@plt>
mov    %ebx,%edi
call   1070 <ileriGit@plt>
mov    $0x96,%edi
pop    %rbx
jmp    1050 <delay@plt>
cmp    $0x95,%esi
jg     11c0 <taktik1+0x70>
xor    %edi,%edi
mov    %ebx,%esi
jmp    11cc <taktik1+0x7c>
cmp    $0x95,%edi
jg     11dc <taktik1+0x8c>
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <motorKontrol@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1050 <delay@plt>
mov    $0xffffff6a,%edi
mov    $0x96,%esi
call   1040 <motorKontrol@plt>
mov    $0x64,%edi
pop    %rbx
jmp    1030 <delayMicroseconds@plt>

LLVM IR (-O0):
define void @taktik1(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %11
%14 = icmp sgt i32 %13, 300
br i1 %14, label %15, label %45
15: ; preds = %6
%16 = load i32, i32* %10
%17 = icmp sgt i32 %16, 300
br i1 %17, label %18, label %45
18: ; preds = %15
%19 = load i32, i32* %9
%20 = icmp slt i32 %19, 100
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = load i32, i32* %12
%23 = call i32 @ileriGit(i32 %22)
%24 = call i32 @delay(i32 400)
br label %44
25: ; preds = %18
%26 = load i32, i32* %8
%27 = icmp slt i32 %26, 150
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = load i32, i32* %12
%30 = call i32 @motorKontrol(i32 0, i32 %29)
%31 = call i32 @delay(i32 1)
br label %43
32: ; preds = %25
%33 = load i32, i32* %7
%34 = icmp slt i32 %33, 150
br i1 %34, label %35, label %39
35: ; preds = %32
%36 = load i32, i32* %12
%37 = call i32 @motorKontrol(i32 %36, i32 0)
%38 = call i32 @delay(i32 1)
br label %42
39: ; preds = %32
%40 = call i32 @motorKontrol(i32 -150, i32 150)
%41 = call i32 @delayMicroseconds(i32 100)
br label %42
42: ; preds = %39, %35
br label %43
43: ; preds = %42, %28
br label %44
44: ; preds = %43, %21
br label %54
45: ; preds = %15, %6
%46 = load i32, i32* %12
%47 = call i32 @geriGit(i32 %46)
%48 = call i32 @delay(i32 750)
%49 = call i32 @motorKontrol(i32 0, i32 0)
%50 = call i32 @delayMicroseconds(i32 50)
%51 = load i32, i32* %12
%52 = call i32 @ileriGit(i32 %51)
%53 = call i32 @delay(i32 150)
br label %54
54: ; preds = %45, %44
ret void
}

LLVM IR (-O2):
define void @taktik1(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp sgt i32 %4, 300
%8 = icmp sgt i32 %3, 300
%9 = and i1 %8, %7
br i1 %9, label %10, label %28
10: ; preds = %6
%11 = icmp slt i32 %2, 100
br i1 %11, label %12, label %15
12: ; preds = %10
%13 = tail call i32 @ileriGit(i32 %5)
%14 = tail call i32 @delay(i32 400)
br label %35
15: ; preds = %10
%16 = icmp slt i32 %1, 150
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = tail call i32 @motorKontrol(i32 0, i32 %5)
%19 = tail call i32 @delay(i32 1)
br label %35
20: ; preds = %15
%21 = icmp slt i32 %0, 150
br i1 %21, label %22, label %25
22: ; preds = %20
%23 = tail call i32 @motorKontrol(i32 %5, i32 0)
%24 = tail call i32 @delay(i32 1)
br label %35
25: ; preds = %20
%26 = tail call i32 @motorKontrol(i32 -150, i32 150)
%27 = tail call i32 @delayMicroseconds(i32 100)
br label %35
28: ; preds = %6
%29 = tail call i32 @geriGit(i32 %5)
%30 = tail call i32 @delay(i32 750)
%31 = tail call i32 @motorKontrol(i32 0, i32 0)
%32 = tail call i32 @delayMicroseconds(i32 50)
%33 = tail call i32 @ileriGit(i32 %5)
%34 = tail call i32 @delay(i32 150)
br label %35
35: ; preds = %12, %22, %25, %17, %28
ret void
}