#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 rc_send_esc_pulse_normalized(int, float);
int rc_send_esc_pulse_normalized_all(float input) {
  int i, ret_ch;
  int ret = 0;
  for (i = 1; i <= 8; i++) {
    ret_ch = rc_send_esc_pulse_normalized(i, input);
    if (ret_ch == -2)
      return -2;
    else if (ret_ch == -1)
      ret = -1;
  }
  return ret;
}


x86 assembly (clang, -O0):
<rc_send_esc_pulse_normalized_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jg     1184 <rc_send_esc_pulse_normalized_all+0x74>
mov    -0xc(%rbp),%edi
movss  -0x8(%rbp),%xmm0
call   1030 <rc_send_esc_pulse_normalized@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xfffffffe,-0x10(%rbp)
jne    115b <rc_send_esc_pulse_normalized_all+0x4b>
movl   $0xfffffffe,-0x4(%rbp)
jmp    118a <rc_send_esc_pulse_normalized_all+0x7a>
cmpl   $0xffffffff,-0x10(%rbp)
jne    116c <rc_send_esc_pulse_normalized_all+0x5c>
movl   $0xffffffff,-0x14(%rbp)
jmp    1171 <rc_send_esc_pulse_normalized_all+0x61>
jmp    1176 <rc_send_esc_pulse_normalized_all+0x66>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <rc_send_esc_pulse_normalized_all+0x1b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rc_send_esc_pulse_normalized_all>:
push   %rbx
sub    $0x10,%rsp
mov    $0x1,%edi
movss  %xmm0,0xc(%rsp)
call   1030 <rc_send_esc_pulse_normalized@plt>
cmp    $0xfffffffe,%eax
je     1221 <rc_send_esc_pulse_normalized_all+0x111>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
jne    113a <rc_send_esc_pulse_normalized_all+0x2a>
mov    $0xffffffff,%ebx
mov    $0x2,%edi
movss  0xc(%rsp),%xmm0
call   1030 <rc_send_esc_pulse_normalized@plt>
cmp    $0xfffffffe,%eax
je     1221 <rc_send_esc_pulse_normalized_all+0x111>
cmp    $0xffffffff,%eax
jne    115d <rc_send_esc_pulse_normalized_all+0x4d>
mov    $0xffffffff,%ebx
mov    $0x3,%edi
movss  0xc(%rsp),%xmm0
call   1030 <rc_send_esc_pulse_normalized@plt>
cmp    $0xfffffffe,%eax
je     1221 <rc_send_esc_pulse_normalized_all+0x111>
cmp    $0xffffffff,%eax
jne    1180 <rc_send_esc_pulse_normalized_all+0x70>
mov    $0xffffffff,%ebx
mov    $0x4,%edi
movss  0xc(%rsp),%xmm0
call   1030 <rc_send_esc_pulse_normalized@plt>
cmp    $0xfffffffe,%eax
je     1221 <rc_send_esc_pulse_normalized_all+0x111>
cmp    $0xffffffff,%eax
jne    11a3 <rc_send_esc_pulse_normalized_all+0x93>
mov    $0xffffffff,%ebx
mov    $0x5,%edi
movss  0xc(%rsp),%xmm0
call   1030 <rc_send_esc_pulse_normalized@plt>
cmp    $0xfffffffe,%eax
je     1221 <rc_send_esc_pulse_normalized_all+0x111>
cmp    $0xffffffff,%eax
jne    11c2 <rc_send_esc_pulse_normalized_all+0xb2>
mov    $0xffffffff,%ebx
mov    $0x6,%edi
movss  0xc(%rsp),%xmm0
call   1030 <rc_send_esc_pulse_normalized@plt>
cmp    $0xfffffffe,%eax
je     1221 <rc_send_esc_pulse_normalized_all+0x111>
cmp    $0xffffffff,%eax
jne    11e1 <rc_send_esc_pulse_normalized_all+0xd1>
mov    $0xffffffff,%ebx
mov    $0x7,%edi
movss  0xc(%rsp),%xmm0
call   1030 <rc_send_esc_pulse_normalized@plt>
cmp    $0xfffffffe,%eax
je     1221 <rc_send_esc_pulse_normalized_all+0x111>
cmp    $0xffffffff,%eax
jne    1200 <rc_send_esc_pulse_normalized_all+0xf0>
mov    $0xffffffff,%ebx
mov    $0x8,%edi
movss  0xc(%rsp),%xmm0
call   1030 <rc_send_esc_pulse_normalized@plt>
cmp    $0xfffffffe,%eax
je     1221 <rc_send_esc_pulse_normalized_all+0x111>
cmp    $0xffffffff,%eax
jne    1223 <rc_send_esc_pulse_normalized_all+0x113>
mov    $0xffffffff,%ebx
jmp    1223 <rc_send_esc_pulse_normalized_all+0x113>
mov    %eax,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rc_send_esc_pulse_normalized_all(float %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store float %0, float* %3
store i32 0, i32* %6
store i32 1, i32* %4
br label %7
7: ; preds = %23, %1
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 8
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load i32, i32* %4
%12 = load float, float* %3
%13 = call i32 @rc_send_esc_pulse_normalized(i32 %11, float %12)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = icmp eq i32 %14, -2
br i1 %15, label %16, label %17
16: ; preds = %10
store i32 -2, i32* %2
br label %28
17: ; preds = %10
%18 = load i32, i32* %5
%19 = icmp eq i32 %18, -1
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 -1, i32* %6
br label %21
21: ; preds = %20, %17
br label %22
22: ; preds = %21
br label %23
23: ; preds = %22
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %7
26: ; preds = %7
%27 = load i32, i32* %6
store i32 %27, i32* %2
br label %28
28: ; preds = %26, %16
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @rc_send_esc_pulse_normalized_all(float %0) {
%2 = tail call i32 @rc_send_esc_pulse_normalized(i32 1, float %0)
switch i32 %2, label %4 [
i32 -2, label %34
i32 -1, label %3
]
3: ; preds = %1
br label %4
4: ; preds = %1, %3
%5 = phi i32 [ -1, %3 ], [ 0, %1 ]
%6 = tail call i32 @rc_send_esc_pulse_normalized(i32 2, float %0)
switch i32 %6, label %8 [
i32 -2, label %34
i32 -1, label %7
]
7: ; preds = %4
br label %8
8: ; preds = %7, %4
%9 = phi i32 [ -1, %7 ], [ %5, %4 ]
%10 = tail call i32 @rc_send_esc_pulse_normalized(i32 3, float %0)
switch i32 %10, label %12 [
i32 -2, label %34
i32 -1, label %11
]
11: ; preds = %8
br label %12
12: ; preds = %11, %8
%13 = phi i32 [ -1, %11 ], [ %9, %8 ]
%14 = tail call i32 @rc_send_esc_pulse_normalized(i32 4, float %0)
switch i32 %14, label %16 [
i32 -2, label %34
i32 -1, label %15
]
15: ; preds = %12
br label %16
16: ; preds = %15, %12
%17 = phi i32 [ -1, %15 ], [ %13, %12 ]
%18 = tail call i32 @rc_send_esc_pulse_normalized(i32 5, float %0)
switch i32 %18, label %20 [
i32 -2, label %34
i32 -1, label %19
]
19: ; preds = %16
br label %20
20: ; preds = %19, %16
%21 = phi i32 [ -1, %19 ], [ %17, %16 ]
%22 = tail call i32 @rc_send_esc_pulse_normalized(i32 6, float %0)
switch i32 %22, label %24 [
i32 -2, label %34
i32 -1, label %23
]
23: ; preds = %20
br label %24
24: ; preds = %23, %20
%25 = phi i32 [ -1, %23 ], [ %21, %20 ]
%26 = tail call i32 @rc_send_esc_pulse_normalized(i32 7, float %0)
switch i32 %26, label %28 [
i32 -2, label %34
i32 -1, label %27
]
27: ; preds = %24
br label %28
28: ; preds = %27, %24
%29 = phi i32 [ -1, %27 ], [ %25, %24 ]
%30 = tail call i32 @rc_send_esc_pulse_normalized(i32 8, float %0)
switch i32 %30, label %32 [
i32 -2, label %34
i32 -1, label %31
]
31: ; preds = %28
br label %32
32: ; preds = %31, %28
%33 = phi i32 [ -1, %31 ], [ %29, %28 ]
br label %34
34: ; preds = %32, %28, %24, %20, %16, %12, %8, %4, %1
%35 = phi i32 [ %2, %1 ], [ %6, %4 ], [ %10, %8 ], [ %14, %12 ], [ %18, %16 ], [ %22, %20 ], [ %26, %24 ], [ %30, %28 ], [ %33, %32 ]
ret i32 %35
}