#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*/ cap1166_polarity(unsigned int);
void led_polarities(int s0, int s1, int s2, int s3, int s4, int s5) {
  unsigned int l;
  l = s0 & 0x01;
  l |= (s1 & 0x01) << 1;
  l |= (s2 & 0x01) << 2;
  l |= (s3 & 0x01) << 3;
  l |= (s4 & 0x01) << 4;
  l |= (s5 & 0x01) << 5;
  cap1166_polarity(l);
}


x86 assembly (clang, -O0):
<led_polarities>:
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)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
shl    $0x1,%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
shl    $0x2,%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    $0x1,%eax
shl    $0x3,%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
and    $0x1,%eax
shl    $0x4,%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    $0x1,%eax
shl    $0x5,%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <cap1166_polarity@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_polarities>:
and    $0x1,%edi
and    $0x1,%esi
lea    (%rdi,%rsi,2),%eax
and    $0x1,%edx
lea    (%rax,%rdx,4),%eax
and    $0x1,%ecx
lea    (%rax,%rcx,8),%edi
shl    $0x4,%r8d
and    $0x10,%r8d
or     %r8d,%edi
shl    $0x5,%r9d
and    $0x20,%r9d
or     %r9d,%edi
jmp    1030 <cap1166_polarity@plt>

LLVM IR (-O0):
define void @led_polarities(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
%13 = 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
%14 = load i32, i32* %7
%15 = and i32 %14, 1
store i32 %15, i32* %13
%16 = load i32, i32* %8
%17 = and i32 %16, 1
%18 = shl i32 %17, 1
%19 = load i32, i32* %13
%20 = or i32 %19, %18
store i32 %20, i32* %13
%21 = load i32, i32* %9
%22 = and i32 %21, 1
%23 = shl i32 %22, 2
%24 = load i32, i32* %13
%25 = or i32 %24, %23
store i32 %25, i32* %13
%26 = load i32, i32* %10
%27 = and i32 %26, 1
%28 = shl i32 %27, 3
%29 = load i32, i32* %13
%30 = or i32 %29, %28
store i32 %30, i32* %13
%31 = load i32, i32* %11
%32 = and i32 %31, 1
%33 = shl i32 %32, 4
%34 = load i32, i32* %13
%35 = or i32 %34, %33
store i32 %35, i32* %13
%36 = load i32, i32* %12
%37 = and i32 %36, 1
%38 = shl i32 %37, 5
%39 = load i32, i32* %13
%40 = or i32 %39, %38
store i32 %40, i32* %13
%41 = load i32, i32* %13
%42 = call i32 @cap1166_polarity(i32 %41)
ret void
}

LLVM IR (-O2):
define void @led_polarities(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = and i32 %0, 1
%8 = shl i32 %1, 1
%9 = and i32 %8, 2
%10 = or i32 %9, %7
%11 = shl i32 %2, 2
%12 = and i32 %11, 4
%13 = or i32 %10, %12
%14 = shl i32 %3, 3
%15 = and i32 %14, 8
%16 = or i32 %13, %15
%17 = shl i32 %4, 4
%18 = and i32 %17, 16
%19 = or i32 %16, %18
%20 = shl i32 %5, 5
%21 = and i32 %20, 32
%22 = or i32 %19, %21
%23 = tail call i32 @cap1166_polarity(i32 %22)
ret void
}