#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*/ *strstr(char *, char *);
int url_havpri2(char word[]) {
  if ((strstr((word + 7), ".se/") != NULL) ||
      (strstr((word + 7), ".dk/") != NULL) ||
      (strstr((word + 7), ".uo.uk/") != NULL) ||
      (strstr((word + 7), ".com/") != NULL)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<url_havpri2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x7,%rdi
lea    0xed5(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
jne    1194 <url_havpri2+0x84>
mov    -0x10(%rbp),%rdi
add    $0x7,%rdi
lea    0xebc(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
jne    1194 <url_havpri2+0x84>
mov    -0x10(%rbp),%rdi
add    $0x7,%rdi
lea    0xea3(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
jne    1194 <url_havpri2+0x84>
mov    -0x10(%rbp),%rdi
add    $0x7,%rdi
lea    0xe8d(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     11a0 <url_havpri2+0x90>
movl   $0x1,-0x4(%rbp)
jmp    11a7 <url_havpri2+0x97>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<url_havpri2>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
add    $0x7,%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strstr@plt>
mov    $0x1,%ebp
test   %rax,%rax
jne    1173 <url_havpri2+0x63>
lea    0xecb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strstr@plt>
test   %rax,%rax
jne    1173 <url_havpri2+0x63>
lea    0xebc(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strstr@plt>
test   %rax,%rax
jne    1173 <url_havpri2+0x63>
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strstr@plt>
xor    %ebp,%ebp
test   %rax,%rax
setne  %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c".se/\00"
@.str.1 = [5 x i8] c".dk/\00"
@.str.2 = [8 x i8] c".uo.uk/\00"
@.str.3 = [6 x i8] c".com/\00"
define i32 @url_havpri2(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 7
%6 = call i32* @strstr(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i32* %6, null
br i1 %7, label %23, label %8
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 7
%11 = call i32* @strstr(i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp ne i32* %11, null
br i1 %12, label %23, label %13
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 7
%16 = call i32* @strstr(i8* %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%17 = icmp ne i32* %16, null
br i1 %17, label %23, label %18
18: ; preds = %13
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i64 7
%21 = call i32* @strstr(i8* %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%22 = icmp ne i32* %21, null
br i1 %22, label %23, label %24
23: ; preds = %18, %13, %8, %1
store i32 1, i32* %2
br label %25
24: ; preds = %18
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
@.str = [5 x i8] c".se/\00"
@.str.1 = [5 x i8] c".dk/\00"
@.str.2 = [8 x i8] c".uo.uk/\00"
@.str.3 = [6 x i8] c".com/\00"
define i32 @url_havpri2(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 7
%3 = tail call i32* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %15
5: ; preds = %1
%6 = tail call i32* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = tail call i32* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = tail call i32* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%13 = icmp ne i32* %12, null
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %11, %1, %5, %8
%16 = phi i32 [ 1, %8 ], [ 1, %5 ], [ 1, %1 ], [ %14, %11 ]
ret i32 %16
}