#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 */
char *strstr(char const *, char const *);
int log_are_strs_in_line(const char **find_str_arr[], const char *line) {
  int i2c_drvr = 0;
  if (!find_str_arr)
    return 1;
  for (; find_str_arr[i2c_drvr]; ++i2c_drvr) {
    const char *found_str = line;
    int i = 0;
    bool all_found = true;
    for (; find_str_arr[i2c_drvr][i]; ++i) {
      found_str = strstr(found_str, find_str_arr[i2c_drvr][i]);
      if (!found_str) {
        all_found = false;
        break;
      }
    }
    if (all_found)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<log_are_strs_in_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113e <log_are_strs_in_line+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1202 <log_are_strs_in_line+0xf2>
jmp    1143 <log_are_strs_in_line+0x33>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     11fb <log_are_strs_in_line+0xeb>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     11d2 <log_are_strs_in_line+0xc2>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    11bf <log_are_strs_in_line+0xaf>
movl   $0x0,-0x30(%rbp)
jmp    11d2 <log_are_strs_in_line+0xc2>
jmp    11c4 <log_are_strs_in_line+0xb4>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    116c <log_are_strs_in_line+0x5c>
cmpl   $0x0,-0x30(%rbp)
je     11e8 <log_are_strs_in_line+0xd8>
movl   $0x1,-0x4(%rbp)
jmp    1202 <log_are_strs_in_line+0xf2>
jmp    11ed <log_are_strs_in_line+0xdd>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1143 <log_are_strs_in_line+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_are_strs_in_line>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1172 <log_are_strs_in_line+0x62>
mov    %rdi,%r15
mov    (%rdi),%rbx
test   %rbx,%rbx
je     1179 <log_are_strs_in_line+0x69>
mov    %rsi,%r14
xor    %r12d,%r12d
mov    (%rbx),%rsi
test   %rsi,%rsi
je     1172 <log_are_strs_in_line+0x62>
add    $0x8,%rbx
mov    %r14,%rax
nopl   (%rax)
mov    %rax,%rdi
call   1030 <strstr@plt>
test   %rax,%rax
je     1160 <log_are_strs_in_line+0x50>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1140 <log_are_strs_in_line+0x30>
jmp    1172 <log_are_strs_in_line+0x62>
nopl   0x0(%rax,%rax,1)
mov    0x8(%r15,%r12,8),%rbx
add    $0x1,%r12
xor    %eax,%eax
test   %rbx,%rbx
jne    112e <log_are_strs_in_line+0x1e>
jmp    117b <log_are_strs_in_line+0x6b>
mov    $0x1,%eax
jmp    117b <log_are_strs_in_line+0x6b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @log_are_strs_in_line(i8*** %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8***
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i8*** %0, i8**** %4
store i8* %1, i8** %5
store i32 0, i32* %6
%10 = load i8***, i8**** %4
%11 = icmp ne i8*** %10, null
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 1, i32* %3
br label %62
13: ; preds = %2
br label %14
14: ; preds = %58, %13
%15 = load i8***, i8**** %4
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8**, i8*** %15, i64 %17
%19 = load i8**, i8*** %18
%20 = icmp ne i8** %19, null
br i1 %20, label %21, label %61
21: ; preds = %14
%22 = load i8*, i8** %5
store i8* %22, i8** %7
store i32 0, i32* %8
store i32 1, i32* %9
br label %23
23: ; preds = %50, %21
%24 = load i8***, i8**** %4
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8**, i8*** %24, i64 %26
%28 = load i8**, i8*** %27
%29 = load i32, i32* %8
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8*, i8** %28, i64 %30
%32 = load i8*, i8** %31
%33 = icmp ne i8* %32, null
br i1 %33, label %34, label %53
34: ; preds = %23
%35 = load i8*, i8** %7
%36 = load i8***, i8**** %4
%37 = load i32, i32* %6
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8**, i8*** %36, i64 %38
%40 = load i8**, i8*** %39
%41 = load i32, i32* %8
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8*, i8** %40, i64 %42
%44 = load i8*, i8** %43
%45 = call i8* @strstr(i8* %35, i8* %44)
store i8* %45, i8** %7
%46 = load i8*, i8** %7
%47 = icmp ne i8* %46, null
br i1 %47, label %49, label %48
48: ; preds = %34
store i32 0, i32* %9
br label %53
49: ; preds = %34
br label %50
50: ; preds = %49
%51 = load i32, i32* %8
%52 = add nsw i32 %51, 1
store i32 %52, i32* %8
br label %23
53: ; preds = %48, %23
%54 = load i32, i32* %9
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %57
56: ; preds = %53
store i32 1, i32* %3
br label %62
57: ; preds = %53
br label %58
58: ; preds = %57
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
store i32 %60, i32* %6
br label %14
61: ; preds = %14
store i32 0, i32* %3
br label %62
62: ; preds = %61, %56, %12
%63 = load i32, i32* %3
ret i32 %63
}

LLVM IR (-O2):
define i32 @log_are_strs_in_line(i8*** %0, i8* %1) {
%3 = icmp eq i8*** %0, null
br i1 %3, label %28, label %4
4: ; preds = %2
%5 = load i8**, i8*** %0
%6 = icmp eq i8** %5, null
br i1 %6, label %28, label %7
7: ; preds = %4, %23
%8 = phi i64 [ %24, %23 ], [ 0, %4 ]
%9 = phi i8** [ %26, %23 ], [ %5, %4 ]
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %28, label %16
12: ; preds = %16
%13 = getelementptr inbounds i8*, i8** %9, i64 %22
%14 = load i8*, i8** %13
%15 = icmp eq i8* %14, null
br i1 %15, label %28, label %16
16: ; preds = %7, %12
%17 = phi i64 [ %22, %12 ], [ 0, %7 ]
%18 = phi i8* [ %14, %12 ], [ %10, %7 ]
%19 = phi i8* [ %20, %12 ], [ %1, %7 ]
%20 = tail call i8* @strstr(i8* dereferenceable(1) %19, i8* %18)
%21 = icmp eq i8* %20, null
%22 = add nuw i64 %17, 1
br i1 %21, label %23, label %12
23: ; preds = %16
%24 = add nuw i64 %8, 1
%25 = getelementptr inbounds i8**, i8*** %0, i64 %24
%26 = load i8**, i8*** %25
%27 = icmp eq i8** %26, null
br i1 %27, label %28, label %7
28: ; preds = %23, %7, %12, %4, %2
%29 = phi i32 [ 1, %2 ], [ 0, %4 ], [ 1, %12 ], [ 1, %7 ], [ 0, %23 ]
ret i32 %29
}