#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 uint8_t;
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
uint64_t permuted_choice_2(uint32_t C, uint32_t D) {
  static const unsigned char pc_2[48] = {
      14, 17, 11, 24, 1,  5,  3,  28, 15, 6,  21, 10, 23, 19, 12, 4,
      26, 8,  16, 7,  27, 20, 13, 2,  41, 52, 31, 37, 47, 55, 30, 40,
      51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32,
  };
  uint64_t CD_mask = 0x80000000000000;
  uint64_t pc2_mask = 0x800000000000;
  uint64_t round_key = 0;
  uint64_t CD = 0;
  uint8_t i;
  CD = ((CD | C) << 28) | D;
  for (i = 0; i < 48; i++) {
    CD &(CD_mask >> pc_2[i] - 1) ? round_key |= (pc2_mask >> i) : 0;
  }
  return round_key;
}


x86 assembly (clang, -O0):
<permuted_choice_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
or     -0x4(%rbp),%eax
shl    $0x1c,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x30,-0x1c(%rbp)
jge    1193 <permuted_choice_2+0x93>
mov    -0x18(%rbp),%eax
mov    -0xc(%rbp),%edx
movslq -0x1c(%rbp),%rsi
lea    0xea9(%rip),%rcx
movzbl (%rcx,%rsi,1),%ecx
sub    $0x1,%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1180 <permuted_choice_2+0x80>
mov    -0x10(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sar    %cl,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1185 <permuted_choice_2+0x85>
jmp    1185 <permuted_choice_2+0x85>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113c <permuted_choice_2+0x3c>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<permuted_choice_2>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@permuted_choice_2.pc_2 = internal constant [48 x i8] c"\0E\11\0B\18\01\05\03\1C\0F\06\15\0A\17\13\0C\04\1A\08\10\07\1B\14\0D\02)4\1F%/7\1E(3-!0,1'8\225.*2$\1D "
define i32 @permuted_choice_2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
%10 = load i32, i32* %8
%11 = load i32, i32* %3
%12 = or i32 %10, %11
%13 = shl i32 %12, 28
%14 = load i32, i32* %4
%15 = or i32 %13, %14
store i32 %15, i32* %8
store i32 0, i32* %9
br label %16
16: ; preds = %40, %2
%17 = load i32, i32* %9
%18 = icmp slt i32 %17, 48
br i1 %18, label %19, label %43
19: ; preds = %16
%20 = load i32, i32* %8
%21 = load i32, i32* %5
%22 = load i32, i32* %9
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [48 x i8], [48 x i8]* @permuted_choice_2.pc_2, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = sub nsw i32 %26, 1
%28 = ashr i32 %21, %27
%29 = and i32 %20, %28
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %37
31: ; preds = %19
%32 = load i32, i32* %6
%33 = load i32, i32* %9
%34 = ashr i32 %32, %33
%35 = load i32, i32* %7
%36 = or i32 %35, %34
store i32 %36, i32* %7
br label %38
37: ; preds = %19
br label %38
38: ; preds = %37, %31
%39 = phi i32 [ %36, %31 ], [ 0, %37 ]
br label %40
40: ; preds = %38
%41 = load i32, i32* %9
%42 = add nsw i32 %41, 1
store i32 %42, i32* %9
br label %16
43: ; preds = %16
%44 = load i32, i32* %7
ret i32 %44
}

LLVM IR (-O2):
define i32 @permuted_choice_2(i32 %0, i32 %1) {
ret i32 0
}