#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 */
scalar_t__ pct(int);
int noway() {
  int msg;
  msg = 14;
  if (pct(50))
    msg = 110;
  if (pct(33))
    msg = 147;
  if (pct(25))
    msg = 250;
  if (pct(20))
    msg = 262;
  if (pct(17))
    msg = 25;
  if (pct(14))
    msg = 345;
  if (pct(12))
    msg = 346;
  return (msg);
}


x86 assembly (clang, -O0):
<noway>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xe,-0x4(%rbp)
mov    $0x32,%edi
call   1030 <pct@plt>
cmp    $0x0,%rax
je     113a <noway+0x2a>
movl   $0x6e,-0x4(%rbp)
mov    $0x21,%edi
call   1030 <pct@plt>
cmp    $0x0,%rax
je     1155 <noway+0x45>
movl   $0x93,-0x4(%rbp)
mov    $0x19,%edi
call   1030 <pct@plt>
cmp    $0x0,%rax
je     1170 <noway+0x60>
movl   $0xfa,-0x4(%rbp)
mov    $0x14,%edi
call   1030 <pct@plt>
cmp    $0x0,%rax
je     118b <noway+0x7b>
movl   $0x106,-0x4(%rbp)
mov    $0x11,%edi
call   1030 <pct@plt>
cmp    $0x0,%rax
je     11a6 <noway+0x96>
movl   $0x19,-0x4(%rbp)
mov    $0xe,%edi
call   1030 <pct@plt>
cmp    $0x0,%rax
je     11c1 <noway+0xb1>
movl   $0x159,-0x4(%rbp)
mov    $0xc,%edi
call   1030 <pct@plt>
cmp    $0x0,%rax
je     11dc <noway+0xcc>
movl   $0x15a,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<noway>:
push   %rbp
push   %r14
push   %rbx
mov    $0x32,%edi
call   1030 <pct@plt>
test   %rax,%rax
mov    $0xe,%eax
mov    $0x6e,%ebx
cmove  %eax,%ebx
mov    $0x21,%edi
call   1030 <pct@plt>
test   %rax,%rax
mov    $0x93,%ebp
cmove  %ebx,%ebp
mov    $0x19,%r14d
mov    $0x19,%edi
call   1030 <pct@plt>
test   %rax,%rax
mov    $0xfa,%ebx
cmove  %ebp,%ebx
mov    $0x14,%edi
call   1030 <pct@plt>
test   %rax,%rax
mov    $0x106,%ebp
cmove  %ebx,%ebp
mov    $0x11,%edi
call   1030 <pct@plt>
test   %rax,%rax
cmovne %r14d,%ebp
mov    $0xe,%edi
call   1030 <pct@plt>
test   %rax,%rax
mov    $0x159,%ebx
cmove  %ebp,%ebx
mov    $0xc,%edi
call   1030 <pct@plt>
test   %rax,%rax
mov    $0x15a,%eax
cmove  %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @noway() {
%1 = alloca i32
store i32 14, i32* %1
%2 = call i64 @pct(i32 50)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 110, i32* %1
br label %5
5: ; preds = %4, %0
%6 = call i64 @pct(i32 33)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 147, i32* %1
br label %9
9: ; preds = %8, %5
%10 = call i64 @pct(i32 25)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 250, i32* %1
br label %13
13: ; preds = %12, %9
%14 = call i64 @pct(i32 20)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 262, i32* %1
br label %17
17: ; preds = %16, %13
%18 = call i64 @pct(i32 17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 25, i32* %1
br label %21
21: ; preds = %20, %17
%22 = call i64 @pct(i32 14)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %21
store i32 345, i32* %1
br label %25
25: ; preds = %24, %21
%26 = call i64 @pct(i32 12)
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %25
store i32 346, i32* %1
br label %29
29: ; preds = %28, %25
%30 = load i32, i32* %1
ret i32 %30
}

LLVM IR (-O2):
define i32 @noway() {
%1 = tail call i64 @pct(i32 50)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i32 14, i32 110
%4 = tail call i64 @pct(i32 33)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 %3, i32 147
%7 = tail call i64 @pct(i32 25)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i32 %6, i32 250
%10 = tail call i64 @pct(i32 20)
%11 = icmp eq i64 %10, 0
%12 = select i1 %11, i32 %9, i32 262
%13 = tail call i64 @pct(i32 17)
%14 = icmp eq i64 %13, 0
%15 = select i1 %14, i32 %12, i32 25
%16 = tail call i64 @pct(i32 14)
%17 = icmp eq i64 %16, 0
%18 = select i1 %17, i32 %15, i32 345
%19 = tail call i64 @pct(i32 12)
%20 = icmp eq i64 %19, 0
%21 = select i1 %20, i32 %18, i32 346
ret i32 %21
}