#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__ strncmp(char *, char *, int);
int socket_ip_ismulticast(char *address) {
  if (strncmp(address, "FF", 2) == 0 || strncmp(address, "fF", 2) == 0 ||
      strncmp(address, "Ff", 2) == 0 || strncmp(address, "ff", 2) == 0)
    return 1;
  else if (strncmp(address, "224", 3) == 0)
    return 1;
  else if (strncmp(address, "225", 3) == 0)
    return 1;
  else if (strncmp(address, "232", 3) == 0)
    return 1;
  else if (strncmp(address, "234", 3) == 0)
    return 1;
  else if (strncmp(address, "235", 3) == 0)
    return 1;
  else if (strncmp(address, "239", 3) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<socket_ip_ismulticast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1198 <socket_ip_ismulticast+0x88>
mov    -0x10(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1198 <socket_ip_ismulticast+0x88>
mov    -0x10(%rbp),%rdi
lea    0xea1(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1198 <socket_ip_ismulticast+0x88>
mov    -0x10(%rbp),%rdi
lea    0xe85(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11a4 <socket_ip_ismulticast+0x94>
movl   $0x1,-0x4(%rbp)
jmp    12cb <socket_ip_ismulticast+0x1bb>
mov    -0x10(%rbp),%rdi
lea    0xe5d(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11cf <socket_ip_ismulticast+0xbf>
movl   $0x1,-0x4(%rbp)
jmp    12cb <socket_ip_ismulticast+0x1bb>
mov    -0x10(%rbp),%rdi
lea    0xe36(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11fa <socket_ip_ismulticast+0xea>
movl   $0x1,-0x4(%rbp)
jmp    12cb <socket_ip_ismulticast+0x1bb>
mov    -0x10(%rbp),%rdi
lea    0xe0f(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1225 <socket_ip_ismulticast+0x115>
movl   $0x1,-0x4(%rbp)
jmp    12cb <socket_ip_ismulticast+0x1bb>
mov    -0x10(%rbp),%rdi
lea    0xde8(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1250 <socket_ip_ismulticast+0x140>
movl   $0x1,-0x4(%rbp)
jmp    12cb <socket_ip_ismulticast+0x1bb>
mov    -0x10(%rbp),%rdi
lea    0xdc1(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    127b <socket_ip_ismulticast+0x16b>
movl   $0x1,-0x4(%rbp)
jmp    12cb <socket_ip_ismulticast+0x1bb>
mov    -0x10(%rbp),%rdi
lea    0xd9a(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12a6 <socket_ip_ismulticast+0x196>
movl   $0x1,-0x4(%rbp)
jmp    12cb <socket_ip_ismulticast+0x1bb>
jmp    12ab <socket_ip_ismulticast+0x19b>
jmp    12b0 <socket_ip_ismulticast+0x1a0>
jmp    12b5 <socket_ip_ismulticast+0x1a5>
jmp    12ba <socket_ip_ismulticast+0x1aa>
jmp    12bf <socket_ip_ismulticast+0x1af>
jmp    12c4 <socket_ip_ismulticast+0x1b4>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_ip_ismulticast>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee3(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     122a <socket_ip_ismulticast+0x11a>
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     122a <socket_ip_ismulticast+0x11a>
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     122a <socket_ip_ismulticast+0x11a>
lea    0xe93(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     122a <socket_ip_ismulticast+0x11a>
lea    0xe79(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     122a <socket_ip_ismulticast+0x11a>
lea    0xe60(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     122a <socket_ip_ismulticast+0x11a>
lea    0xe4b(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     122a <socket_ip_ismulticast+0x11a>
lea    0xe36(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     122a <socket_ip_ismulticast+0x11a>
lea    0xe21(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     122a <socket_ip_ismulticast+0x11a>
lea    0xe0c(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"FF\00"
@.str.1 = [3 x i8] c"fF\00"
@.str.2 = [3 x i8] c"Ff\00"
@.str.3 = [3 x i8] c"ff\00"
@.str.4 = [4 x i8] c"224\00"
@.str.5 = [4 x i8] c"225\00"
@.str.6 = [4 x i8] c"232\00"
@.str.7 = [4 x i8] c"234\00"
@.str.8 = [4 x i8] c"235\00"
@.str.9 = [4 x i8] c"239\00"
define i32 @socket_ip_ismulticast(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%10 = icmp eq i64 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = call i64 @strncmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%14 = icmp eq i64 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8*, i8** %3
%17 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %15, %11, %7, %1
store i32 1, i32* %2
br label %57
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = call i64 @strncmp(i8* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %20
store i32 1, i32* %2
br label %57
25: ; preds = %20
%26 = load i8*, i8** %3
%27 = call i64 @strncmp(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 1, i32* %2
br label %57
30: ; preds = %25
%31 = load i8*, i8** %3
%32 = call i64 @strncmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %35
34: ; preds = %30
store i32 1, i32* %2
br label %57
35: ; preds = %30
%36 = load i8*, i8** %3
%37 = call i64 @strncmp(i8* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %35
store i32 1, i32* %2
br label %57
40: ; preds = %35
%41 = load i8*, i8** %3
%42 = call i64 @strncmp(i8* %41, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %45
44: ; preds = %40
store i32 1, i32* %2
br label %57
45: ; preds = %40
%46 = load i8*, i8** %3
%47 = call i64 @strncmp(i8* %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %50
49: ; preds = %45
store i32 1, i32* %2
br label %57
50: ; preds = %45
br label %51
51: ; preds = %50
br label %52
52: ; preds = %51
br label %53
53: ; preds = %52
br label %54
54: ; preds = %53
br label %55
55: ; preds = %54
br label %56
56: ; preds = %55
store i32 0, i32* %2
br label %57
57: ; preds = %56, %49, %44, %39, %34, %29, %24, %19
%58 = load i32, i32* %2
ret i32 %58
}

LLVM IR (-O2):
@.str = [3 x i8] c"FF\00"
@.str.1 = [3 x i8] c"fF\00"
@.str.2 = [3 x i8] c"Ff\00"
@.str.3 = [3 x i8] c"ff\00"
@.str.4 = [4 x i8] c"224\00"
@.str.5 = [4 x i8] c"225\00"
@.str.6 = [4 x i8] c"232\00"
@.str.7 = [4 x i8] c"234\00"
@.str.8 = [4 x i8] c"235\00"
@.str.9 = [4 x i8] c"239\00"
define i32 @socket_ip_ismulticast(i8* %0) {
%2 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = icmp eq i64 %2, 0
br i1 %3, label %32, label %4
4: ; preds = %1
%5 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %32, label %7
7: ; preds = %4
%8 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %32, label %10
10: ; preds = %7
%11 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
%12 = icmp eq i64 %11, 0
br i1 %12, label %32, label %13
13: ; preds = %10
%14 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%15 = icmp eq i64 %14, 0
br i1 %15, label %32, label %16
16: ; preds = %13
%17 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%18 = icmp eq i64 %17, 0
br i1 %18, label %32, label %19
19: ; preds = %16
%20 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%21 = icmp eq i64 %20, 0
br i1 %21, label %32, label %22
22: ; preds = %19
%23 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%24 = icmp eq i64 %23, 0
br i1 %24, label %32, label %25
25: ; preds = %22
%26 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%27 = icmp eq i64 %26, 0
br i1 %27, label %32, label %28
28: ; preds = %25
%29 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%30 = icmp eq i64 %29, 0
%31 = zext i1 %30 to i32
br label %32
32: ; preds = %28, %25, %22, %19, %16, %13, %1, %4, %7, %10
%33 = phi i32 [ 1, %10 ], [ 1, %7 ], [ 1, %4 ], [ 1, %1 ], [ 1, %13 ], [ 1, %16 ], [ 1, %19 ], [ 1, %22 ], [ 1, %25 ], [ %31, %28 ]
ret i32 %33
}