#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 */
bool *in_binary(int n, bool *binary) {
  int i;
  for (i = 0; i < 32; i++) {
    binary[32 - 1 - i] = (n & (1 << i)) != 0;
  }
  return binary;
}


x86 assembly (clang, -O0):
<in_binary>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jge    1158 <in_binary+0x58>
mov    -0x4(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%edx
mov    -0x10(%rbp),%rax
mov    $0x1f,%ecx
sub    -0x14(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <in_binary+0x12>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_binary>:
mov    %rsi,%rax
movd   %edi,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqa %xmm0,%xmm1
psrld  $0x1,%xmm1
movdqa %xmm0,%xmm2
punpcklqdq %xmm1,%xmm2
movdqa %xmm0,%xmm1
psrld  $0x3,%xmm1
movdqa %xmm0,%xmm3
psrld  $0x2,%xmm3
punpckhqdq %xmm1,%xmm3
shufps $0x33,%xmm2,%xmm3
movaps 0xec2(%rip),%xmm1
andps  %xmm1,%xmm3
movups %xmm3,0x70(%rsi)
movdqa %xmm0,%xmm2
psrld  $0x5,%xmm2
movdqa %xmm0,%xmm3
psrld  $0x4,%xmm3
punpcklqdq %xmm2,%xmm3
movdqa %xmm0,%xmm2
psrld  $0x7,%xmm2
movdqa %xmm0,%xmm4
psrld  $0x6,%xmm4
punpckhqdq %xmm2,%xmm4
shufps $0x33,%xmm3,%xmm4
andps  %xmm1,%xmm4
movups %xmm4,0x60(%rsi)
movdqa %xmm0,%xmm2
psrld  $0x9,%xmm2
movdqa %xmm0,%xmm3
psrld  $0x8,%xmm3
punpcklqdq %xmm2,%xmm3
movdqa %xmm0,%xmm2
psrld  $0xb,%xmm2
movdqa %xmm0,%xmm4
psrld  $0xa,%xmm4
punpckhqdq %xmm2,%xmm4
shufps $0x33,%xmm3,%xmm4
andps  %xmm1,%xmm4
movups %xmm4,0x50(%rsi)
movdqa %xmm0,%xmm2
psrld  $0xd,%xmm2
movdqa %xmm0,%xmm3
psrld  $0xc,%xmm3
punpcklqdq %xmm2,%xmm3
movdqa %xmm0,%xmm2
psrld  $0xf,%xmm2
movdqa %xmm0,%xmm4
psrld  $0xe,%xmm4
punpckhqdq %xmm2,%xmm4
shufps $0x33,%xmm3,%xmm4
andps  %xmm1,%xmm4
movups %xmm4,0x40(%rsi)
movdqa %xmm0,%xmm2
psrld  $0x11,%xmm2
movdqa %xmm0,%xmm3
psrld  $0x10,%xmm3
punpcklqdq %xmm2,%xmm3
movdqa %xmm0,%xmm2
psrld  $0x13,%xmm2
movdqa %xmm0,%xmm4
psrld  $0x12,%xmm4
punpckhqdq %xmm2,%xmm4
shufps $0x33,%xmm3,%xmm4
andps  %xmm1,%xmm4
movups %xmm4,0x30(%rsi)
movdqa %xmm0,%xmm2
psrld  $0x15,%xmm2
movdqa %xmm0,%xmm3
psrld  $0x14,%xmm3
punpcklqdq %xmm2,%xmm3
movdqa %xmm0,%xmm2
psrld  $0x17,%xmm2
movdqa %xmm0,%xmm4
psrld  $0x16,%xmm4
punpckhqdq %xmm2,%xmm4
shufps $0x33,%xmm3,%xmm4
andps  %xmm1,%xmm4
movups %xmm4,0x20(%rsi)
movdqa %xmm0,%xmm2
psrld  $0x19,%xmm2
movdqa %xmm0,%xmm3
psrld  $0x18,%xmm3
punpcklqdq %xmm2,%xmm3
movdqa %xmm0,%xmm2
psrld  $0x1b,%xmm2
movdqa %xmm0,%xmm4
psrld  $0x1a,%xmm4
punpckhqdq %xmm2,%xmm4
shufps $0x33,%xmm3,%xmm4
andps  %xmm1,%xmm4
movups %xmm4,0x10(%rsi)
movdqa %xmm0,%xmm2
psrld  $0x1d,%xmm2
movdqa %xmm0,%xmm3
psrld  $0x1c,%xmm3
punpcklqdq %xmm2,%xmm3
movdqa %xmm0,%xmm2
psrld  $0x1f,%xmm2
psrld  $0x1e,%xmm0
punpckhqdq %xmm2,%xmm0
shufps $0x33,%xmm3,%xmm0
andps  %xmm1,%xmm0
movups %xmm0,(%rsi)
ret

LLVM IR (-O0):
define i32* @in_binary(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 32
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = shl i32 1, %11
%13 = and i32 %10, %12
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i32
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = sub nsw i32 31, %17
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %16, i64 %19
store i32 %15, i32* %20
br label %21
21: ; preds = %9
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %6
%25 = load i32*, i32** %4
ret i32* %25
}

LLVM IR (-O2):
define i32* @in_binary(i32 %0, i32* returned writeonly %1) {
%3 = insertelement <4 x i32> poison, i32 %0, i64 0
%4 = shufflevector <4 x i32> %3, <4 x i32> poison, <4 x i32> zeroinitializer
%5 = lshr <4 x i32> %4, <i32 0, i32 1, i32 2, i32 3>
%6 = and <4 x i32> %5, <i32 1, i32 1, i32 1, i32 1>
%7 = shufflevector <4 x i32> %6, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%8 = getelementptr inbounds i32, i32* %1, i64 28
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> %7, <4 x i32>* %9
%10 = lshr <4 x i32> %4, <i32 4, i32 5, i32 6, i32 7>
%11 = and <4 x i32> %10, <i32 1, i32 1, i32 1, i32 1>
%12 = shufflevector <4 x i32> %11, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%13 = getelementptr inbounds i32, i32* %1, i64 24
%14 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> %12, <4 x i32>* %14
%15 = lshr <4 x i32> %4, <i32 8, i32 9, i32 10, i32 11>
%16 = and <4 x i32> %15, <i32 1, i32 1, i32 1, i32 1>
%17 = shufflevector <4 x i32> %16, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%18 = getelementptr inbounds i32, i32* %1, i64 20
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> %17, <4 x i32>* %19
%20 = lshr <4 x i32> %4, <i32 12, i32 13, i32 14, i32 15>
%21 = and <4 x i32> %20, <i32 1, i32 1, i32 1, i32 1>
%22 = shufflevector <4 x i32> %21, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%23 = getelementptr inbounds i32, i32* %1, i64 16
%24 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> %22, <4 x i32>* %24
%25 = lshr <4 x i32> %4, <i32 16, i32 17, i32 18, i32 19>
%26 = and <4 x i32> %25, <i32 1, i32 1, i32 1, i32 1>
%27 = shufflevector <4 x i32> %26, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%28 = getelementptr inbounds i32, i32* %1, i64 12
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> %27, <4 x i32>* %29
%30 = lshr <4 x i32> %4, <i32 20, i32 21, i32 22, i32 23>
%31 = and <4 x i32> %30, <i32 1, i32 1, i32 1, i32 1>
%32 = shufflevector <4 x i32> %31, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%33 = getelementptr inbounds i32, i32* %1, i64 8
%34 = bitcast i32* %33 to <4 x i32>*
store <4 x i32> %32, <4 x i32>* %34
%35 = lshr <4 x i32> %4, <i32 24, i32 25, i32 26, i32 27>
%36 = and <4 x i32> %35, <i32 1, i32 1, i32 1, i32 1>
%37 = shufflevector <4 x i32> %36, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%38 = getelementptr inbounds i32, i32* %1, i64 4
%39 = bitcast i32* %38 to <4 x i32>*
store <4 x i32> %37, <4 x i32>* %39
%40 = lshr <4 x i32> %4, <i32 28, i32 29, i32 30, i32 31>
%41 = and <4 x i32> %40, <i32 1, i32 1, i32 1, i32 1>
%42 = shufflevector <4 x i32> %41, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%43 = bitcast i32* %1 to <4 x i32>*
store <4 x i32> %42, <4 x i32>* %43
ret i32* %1
}