#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 */
typedef int /*<<< orphan*/ c;
typedef int /*<<< orphan*/ b;
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int __builtin_clrsb(int);
int __builtin_clrsbl(long);
int __builtin_clrsbll(long long);
int /*<<< orphan*/ link_error();
void bar(int a, long b, long long c) {
  if (__builtin_clrsb(a) < 0 || __builtin_clrsb(a) > ((int)sizeof(a) * 8 - 1))
    link_error();
  if (__builtin_clrsbl(b) < 0 || __builtin_clrsbl(b) > ((int)sizeof(b) * 8 - 1))
    link_error();
  if (__builtin_clrsbll(c) < 0 ||
      __builtin_clrsbll(c) > ((int)sizeof(c) * 8 - 1))
    link_error();
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
cmp    $0x0,%eax
cmovl  %ecx,%eax
bsr    %eax,%eax
mov    $0x3f,%ecx
cmove  %ecx,%eax
xor    $0x1f,%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jl     1173 <bar+0x63>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
cmp    $0x0,%eax
cmovl  %ecx,%eax
bsr    %eax,%eax
mov    $0x3f,%ecx
cmove  %ecx,%eax
xor    $0x1f,%eax
sub    $0x1,%eax
cmp    $0x1f,%eax
jle    117a <bar+0x6a>
mov    $0x0,%al
call   1030 <link_error@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
xor    $0xffffffffffffffff,%rcx
cmp    $0x0,%rax
cmovl  %rcx,%rax
bsr    %rax,%rax
mov    $0x7f,%ecx
cmove  %rcx,%rax
xor    $0x3f,%rax
sub    $0x1,%rax
cmp    $0x0,%eax
jl     11dc <bar+0xcc>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
xor    $0xffffffffffffffff,%rcx
cmp    $0x0,%rax
cmovl  %rcx,%rax
bsr    %rax,%rax
mov    $0x7f,%ecx
cmove  %rcx,%rax
xor    $0x3f,%rax
sub    $0x1,%rax
cmp    $0x3f,%eax
jle    11e3 <bar+0xd3>
mov    $0x0,%al
call   1030 <link_error@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
xor    $0xffffffffffffffff,%rcx
cmp    $0x0,%rax
cmovl  %rcx,%rax
bsr    %rax,%rax
mov    $0x7f,%ecx
cmove  %rcx,%rax
xor    $0x3f,%rax
sub    $0x1,%rax
cmp    $0x0,%eax
jl     1245 <bar+0x135>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
xor    $0xffffffffffffffff,%rcx
cmp    $0x0,%rax
cmovl  %rcx,%rax
bsr    %rax,%rax
mov    $0x7f,%ecx
cmove  %rcx,%rax
xor    $0x3f,%rax
sub    $0x1,%rax
cmp    $0x3f,%eax
jle    124c <bar+0x13c>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
ret

LLVM IR (-O0):
define void @bar(i32 %0, i64 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
store i32 %0, i32* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
%9 = xor i32 %7, -1
%10 = select i1 %8, i32 %9, i32 %7
%11 = call i32 @llvm.ctlz.i32(i32 %10, i1 false)
%12 = sub i32 %11, 1
%13 = icmp slt i32 %12, 0
br i1 %13, label %22, label %14
14: ; preds = %3
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 0
%17 = xor i32 %15, -1
%18 = select i1 %16, i32 %17, i32 %15
%19 = call i32 @llvm.ctlz.i32(i32 %18, i1 false)
%20 = sub i32 %19, 1
%21 = icmp sgt i32 %20, 31
br i1 %21, label %22, label %24
22: ; preds = %14, %3
%23 = call i32 (...) @link_error()
br label %24
24: ; preds = %22, %14
%25 = load i64, i64* %5
%26 = icmp slt i64 %25, 0
%27 = xor i64 %25, -1
%28 = select i1 %26, i64 %27, i64 %25
%29 = call i64 @llvm.ctlz.i64(i64 %28, i1 false)
%30 = sub i64 %29, 1
%31 = trunc i64 %30 to i32
%32 = icmp slt i32 %31, 0
br i1 %32, label %42, label %33
33: ; preds = %24
%34 = load i64, i64* %5
%35 = icmp slt i64 %34, 0
%36 = xor i64 %34, -1
%37 = select i1 %35, i64 %36, i64 %34
%38 = call i64 @llvm.ctlz.i64(i64 %37, i1 false)
%39 = sub i64 %38, 1
%40 = trunc i64 %39 to i32
%41 = icmp sgt i32 %40, 63
br i1 %41, label %42, label %44
42: ; preds = %33, %24
%43 = call i32 (...) @link_error()
br label %44
44: ; preds = %42, %33
%45 = load i64, i64* %6
%46 = icmp slt i64 %45, 0
%47 = xor i64 %45, -1
%48 = select i1 %46, i64 %47, i64 %45
%49 = call i64 @llvm.ctlz.i64(i64 %48, i1 false)
%50 = sub i64 %49, 1
%51 = trunc i64 %50 to i32
%52 = icmp slt i32 %51, 0
br i1 %52, label %62, label %53
53: ; preds = %44
%54 = load i64, i64* %6
%55 = icmp slt i64 %54, 0
%56 = xor i64 %54, -1
%57 = select i1 %55, i64 %56, i64 %54
%58 = call i64 @llvm.ctlz.i64(i64 %57, i1 false)
%59 = sub i64 %58, 1
%60 = trunc i64 %59 to i32
%61 = icmp sgt i32 %60, 63
br i1 %61, label %62, label %64
62: ; preds = %53, %44
%63 = call i32 (...) @link_error()
br label %64
64: ; preds = %62, %53
ret void
}

LLVM IR (-O2):
define void @bar(i32 %0, i64 %1, i64 %2) {
ret void
}