#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*/ test(char *, int);
int main(void) {
  test("255.255.255.255", 32);
  test("255.255.255.254", 31);
  test("255.255.255.252", 30);
  test("255.255.255.248", 29);
  test("255.255.255.240", 28);
  test("255.255.255.224", 27);
  test("255.255.255.192", 26);
  test("255.255.255.128", 25);
  test("255.255.255.0", 24);
  test("255.255.254.0", 23);
  test("255.255.252.0", 22);
  test("255.255.248.0", 21);
  test("255.255.240.0", 20);
  test("255.255.224.0", 19);
  test("255.255.192.0", 18);
  test("255.255.128.0", 17);
  test("255.255.0.0", 16);
  test("255.254.0.0", 15);
  test("255.252.0.0", 14);
  test("255.248.0.0", 13);
  test("255.240.0.0", 12);
  test("255.224.0.0", 11);
  test("255.192.0.0", 10);
  test("255.128.0.0", 9);
  test("255.0.0.0", 8);
  test("254.0.0.0", 7);
  test("252.0.0.0", 6);
  test("248.0.0.0", 5);
  test("240.0.0.0", 4);
  test("224.0.0.0", 3);
  test("192.0.0.0", 2);
  test("128.0.0.0", 1);
  test("0.0.0.0", 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x20,%esi
call   1030 <test@plt>
lea    0xed9(%rip),%rdi
mov    $0x1f,%esi
call   1030 <test@plt>
lea    0xed8(%rip),%rdi
mov    $0x1e,%esi
call   1030 <test@plt>
lea    0xed7(%rip),%rdi
mov    $0x1d,%esi
call   1030 <test@plt>
lea    0xed6(%rip),%rdi
mov    $0x1c,%esi
call   1030 <test@plt>
lea    0xed5(%rip),%rdi
mov    $0x1b,%esi
call   1030 <test@plt>
lea    0xed4(%rip),%rdi
mov    $0x1a,%esi
call   1030 <test@plt>
lea    0xed3(%rip),%rdi
mov    $0x19,%esi
call   1030 <test@plt>
lea    0xed2(%rip),%rdi
mov    $0x18,%esi
call   1030 <test@plt>
lea    0xecf(%rip),%rdi
mov    $0x17,%esi
call   1030 <test@plt>
lea    0xecc(%rip),%rdi
mov    $0x16,%esi
call   1030 <test@plt>
lea    0xec9(%rip),%rdi
mov    $0x15,%esi
call   1030 <test@plt>
lea    0xec6(%rip),%rdi
mov    $0x14,%esi
call   1030 <test@plt>
lea    0xec3(%rip),%rdi
mov    $0x13,%esi
call   1030 <test@plt>
lea    0xec0(%rip),%rdi
mov    $0x12,%esi
call   1030 <test@plt>
lea    0xebd(%rip),%rdi
mov    $0x11,%esi
call   1030 <test@plt>
lea    0xeba(%rip),%rdi
mov    $0x10,%esi
call   1030 <test@plt>
lea    0xeb5(%rip),%rdi
mov    $0xf,%esi
call   1030 <test@plt>
lea    0xeb0(%rip),%rdi
mov    $0xe,%esi
call   1030 <test@plt>
lea    0xeab(%rip),%rdi
mov    $0xd,%esi
call   1030 <test@plt>
lea    0xea6(%rip),%rdi
mov    $0xc,%esi
call   1030 <test@plt>
lea    0xea1(%rip),%rdi
mov    $0xb,%esi
call   1030 <test@plt>
lea    0xe9c(%rip),%rdi
mov    $0xa,%esi
call   1030 <test@plt>
lea    0xe97(%rip),%rdi
mov    $0x9,%esi
call   1030 <test@plt>
lea    0xe92(%rip),%rdi
mov    $0x8,%esi
call   1030 <test@plt>
lea    0xe8b(%rip),%rdi
mov    $0x7,%esi
call   1030 <test@plt>
lea    0xe84(%rip),%rdi
mov    $0x6,%esi
call   1030 <test@plt>
lea    0xe7d(%rip),%rdi
mov    $0x5,%esi
call   1030 <test@plt>
lea    0xe76(%rip),%rdi
mov    $0x4,%esi
call   1030 <test@plt>
lea    0xe6f(%rip),%rdi
mov    $0x3,%esi
call   1030 <test@plt>
lea    0xe68(%rip),%rdi
mov    $0x2,%esi
call   1030 <test@plt>
lea    0xe61(%rip),%rdi
mov    $0x1,%esi
call   1030 <test@plt>
lea    0xe34(%rip),%rdi
xor    %esi,%esi
call   1030 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x20,%esi
call   1030 <test@plt>
lea    0xee7(%rip),%rdi
mov    $0x1f,%esi
call   1030 <test@plt>
lea    0xee6(%rip),%rdi
mov    $0x1e,%esi
call   1030 <test@plt>
lea    0xee5(%rip),%rdi
mov    $0x1d,%esi
call   1030 <test@plt>
lea    0xee4(%rip),%rdi
mov    $0x1c,%esi
call   1030 <test@plt>
lea    0xee3(%rip),%rdi
mov    $0x1b,%esi
call   1030 <test@plt>
lea    0xee2(%rip),%rdi
mov    $0x1a,%esi
call   1030 <test@plt>
lea    0xee1(%rip),%rdi
mov    $0x19,%esi
call   1030 <test@plt>
lea    0xee0(%rip),%rdi
mov    $0x18,%esi
call   1030 <test@plt>
lea    0xedd(%rip),%rdi
mov    $0x17,%esi
call   1030 <test@plt>
lea    0xeda(%rip),%rdi
mov    $0x16,%esi
call   1030 <test@plt>
lea    0xed7(%rip),%rdi
mov    $0x15,%esi
call   1030 <test@plt>
lea    0xed4(%rip),%rdi
mov    $0x14,%esi
call   1030 <test@plt>
lea    0xed1(%rip),%rdi
mov    $0x13,%esi
call   1030 <test@plt>
lea    0xece(%rip),%rdi
mov    $0x12,%esi
call   1030 <test@plt>
lea    0xecb(%rip),%rdi
mov    $0x11,%esi
call   1030 <test@plt>
lea    0xec8(%rip),%rdi
mov    $0x10,%esi
call   1030 <test@plt>
lea    0xec3(%rip),%rdi
mov    $0xf,%esi
call   1030 <test@plt>
lea    0xebe(%rip),%rdi
mov    $0xe,%esi
call   1030 <test@plt>
lea    0xeb9(%rip),%rdi
mov    $0xd,%esi
call   1030 <test@plt>
lea    0xeb4(%rip),%rdi
mov    $0xc,%esi
call   1030 <test@plt>
lea    0xeaf(%rip),%rdi
mov    $0xb,%esi
call   1030 <test@plt>
lea    0xeaa(%rip),%rdi
mov    $0xa,%esi
call   1030 <test@plt>
lea    0xea5(%rip),%rdi
mov    $0x9,%esi
call   1030 <test@plt>
lea    0xea0(%rip),%rdi
mov    $0x8,%esi
call   1030 <test@plt>
lea    0xe99(%rip),%rdi
mov    $0x7,%esi
call   1030 <test@plt>
lea    0xe92(%rip),%rdi
mov    $0x6,%esi
call   1030 <test@plt>
lea    0xe8b(%rip),%rdi
mov    $0x5,%esi
call   1030 <test@plt>
lea    0xe84(%rip),%rdi
mov    $0x4,%esi
call   1030 <test@plt>
lea    0xe7d(%rip),%rdi
mov    $0x3,%esi
call   1030 <test@plt>
lea    0xe76(%rip),%rdi
mov    $0x2,%esi
call   1030 <test@plt>
lea    0xe6f(%rip),%rdi
mov    $0x1,%esi
call   1030 <test@plt>
lea    0xe42(%rip),%rdi
xor    %esi,%esi
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"255.255.255.255\00"
@.str.1 = [16 x i8] c"255.255.255.254\00"
@.str.2 = [16 x i8] c"255.255.255.252\00"
@.str.3 = [16 x i8] c"255.255.255.248\00"
@.str.4 = [16 x i8] c"255.255.255.240\00"
@.str.5 = [16 x i8] c"255.255.255.224\00"
@.str.6 = [16 x i8] c"255.255.255.192\00"
@.str.7 = [16 x i8] c"255.255.255.128\00"
@.str.8 = [14 x i8] c"255.255.255.0\00"
@.str.9 = [14 x i8] c"255.255.254.0\00"
@.str.10 = [14 x i8] c"255.255.252.0\00"
@.str.11 = [14 x i8] c"255.255.248.0\00"
@.str.12 = [14 x i8] c"255.255.240.0\00"
@.str.13 = [14 x i8] c"255.255.224.0\00"
@.str.14 = [14 x i8] c"255.255.192.0\00"
@.str.15 = [14 x i8] c"255.255.128.0\00"
@.str.16 = [12 x i8] c"255.255.0.0\00"
@.str.17 = [12 x i8] c"255.254.0.0\00"
@.str.18 = [12 x i8] c"255.252.0.0\00"
@.str.19 = [12 x i8] c"255.248.0.0\00"
@.str.20 = [12 x i8] c"255.240.0.0\00"
@.str.21 = [12 x i8] c"255.224.0.0\00"
@.str.22 = [12 x i8] c"255.192.0.0\00"
@.str.23 = [12 x i8] c"255.128.0.0\00"
@.str.24 = [10 x i8] c"255.0.0.0\00"
@.str.25 = [10 x i8] c"254.0.0.0\00"
@.str.26 = [10 x i8] c"252.0.0.0\00"
@.str.27 = [10 x i8] c"248.0.0.0\00"
@.str.28 = [10 x i8] c"240.0.0.0\00"
@.str.29 = [10 x i8] c"224.0.0.0\00"
@.str.30 = [10 x i8] c"192.0.0.0\00"
@.str.31 = [10 x i8] c"128.0.0.0\00"
@.str.32 = [8 x i8] c"0.0.0.0\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 32)
%3 = call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 31)
%4 = call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 30)
%5 = call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 29)
%6 = call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 28)
%7 = call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 27)
%8 = call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 26)
%9 = call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 25)
%10 = call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 24)
%11 = call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i32 23)
%12 = call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 22)
%13 = call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 21)
%14 = call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i32 20)
%15 = call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i32 19)
%16 = call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0), i32 18)
%17 = call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i32 17)
%18 = call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), i32 16)
%19 = call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 15)
%20 = call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 14)
%21 = call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i32 13)
%22 = call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), i32 12)
%23 = call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0), i32 11)
%24 = call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.22, i64 0, i64 0), i32 10)
%25 = call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.23, i64 0, i64 0), i32 9)
%26 = call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), i32 8)
%27 = call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), i32 7)
%28 = call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.26, i64 0, i64 0), i32 6)
%29 = call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.27, i64 0, i64 0), i32 5)
%30 = call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.28, i64 0, i64 0), i32 4)
%31 = call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.29, i64 0, i64 0), i32 3)
%32 = call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.30, i64 0, i64 0), i32 2)
%33 = call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.31, i64 0, i64 0), i32 1)
%34 = call i32 @test(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.32, i64 0, i64 0), i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"255.255.255.255\00"
@.str.1 = [16 x i8] c"255.255.255.254\00"
@.str.2 = [16 x i8] c"255.255.255.252\00"
@.str.3 = [16 x i8] c"255.255.255.248\00"
@.str.4 = [16 x i8] c"255.255.255.240\00"
@.str.5 = [16 x i8] c"255.255.255.224\00"
@.str.6 = [16 x i8] c"255.255.255.192\00"
@.str.7 = [16 x i8] c"255.255.255.128\00"
@.str.8 = [14 x i8] c"255.255.255.0\00"
@.str.9 = [14 x i8] c"255.255.254.0\00"
@.str.10 = [14 x i8] c"255.255.252.0\00"
@.str.11 = [14 x i8] c"255.255.248.0\00"
@.str.12 = [14 x i8] c"255.255.240.0\00"
@.str.13 = [14 x i8] c"255.255.224.0\00"
@.str.14 = [14 x i8] c"255.255.192.0\00"
@.str.15 = [14 x i8] c"255.255.128.0\00"
@.str.16 = [12 x i8] c"255.255.0.0\00"
@.str.17 = [12 x i8] c"255.254.0.0\00"
@.str.18 = [12 x i8] c"255.252.0.0\00"
@.str.19 = [12 x i8] c"255.248.0.0\00"
@.str.20 = [12 x i8] c"255.240.0.0\00"
@.str.21 = [12 x i8] c"255.224.0.0\00"
@.str.22 = [12 x i8] c"255.192.0.0\00"
@.str.23 = [12 x i8] c"255.128.0.0\00"
@.str.24 = [10 x i8] c"255.0.0.0\00"
@.str.25 = [10 x i8] c"254.0.0.0\00"
@.str.26 = [10 x i8] c"252.0.0.0\00"
@.str.27 = [10 x i8] c"248.0.0.0\00"
@.str.28 = [10 x i8] c"240.0.0.0\00"
@.str.29 = [10 x i8] c"224.0.0.0\00"
@.str.30 = [10 x i8] c"192.0.0.0\00"
@.str.31 = [10 x i8] c"128.0.0.0\00"
@.str.32 = [8 x i8] c"0.0.0.0\00"
define i32 @main() {
%1 = tail call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 32)
%2 = tail call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 31)
%3 = tail call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 30)
%4 = tail call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 29)
%5 = tail call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 28)
%6 = tail call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 27)
%7 = tail call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 26)
%8 = tail call i32 @test(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 25)
%9 = tail call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 24)
%10 = tail call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i32 23)
%11 = tail call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 22)
%12 = tail call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 21)
%13 = tail call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i32 20)
%14 = tail call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i32 19)
%15 = tail call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0), i32 18)
%16 = tail call i32 @test(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i32 17)
%17 = tail call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), i32 16)
%18 = tail call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 15)
%19 = tail call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 14)
%20 = tail call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i32 13)
%21 = tail call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), i32 12)
%22 = tail call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0), i32 11)
%23 = tail call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.22, i64 0, i64 0), i32 10)
%24 = tail call i32 @test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.23, i64 0, i64 0), i32 9)
%25 = tail call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), i32 8)
%26 = tail call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), i32 7)
%27 = tail call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.26, i64 0, i64 0), i32 6)
%28 = tail call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.27, i64 0, i64 0), i32 5)
%29 = tail call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.28, i64 0, i64 0), i32 4)
%30 = tail call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.29, i64 0, i64 0), i32 3)
%31 = tail call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.30, i64 0, i64 0), i32 2)
%32 = tail call i32 @test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.31, i64 0, i64 0), i32 1)
%33 = tail call i32 @test(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.32, i64 0, i64 0), i32 0)
ret i32 0
}