#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*/ __cl_env();
int /*<<< orphan*/ __cl_log(char *);
int /*<<< orphan*/ __cl_print(char *, char *, int);
void __cl_setup_once_impl() {
  do {
    if (!__cl_env()) {
      __cl_print("\x1B[1m"
                 "\x1B[3"
                 "3"
                 "m"
                 "[ERROR] "
                 "\x1B[0m"
                 "Detecting call to cl_log() from outside the scope "
                 "of a SPEC at %s:%d\n\n",
                 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/pyrated/chlorine/refs/"
                 "heads/master/tests.c",
                 9);
      return;
    }
    __cl_log("You won't see this message, rather an [ERROR] in the output.");
  } while (0);
}


x86 assembly (clang, -O0):
<__cl_setup_once_impl>:
push   %rbp
mov    %rsp,%rbp
jmp    1139 <__cl_setup_once_impl+0x9>
mov    $0x0,%al
call   1030 <__cl_env@plt>
cmp    $0x0,%eax
jne    1166 <__cl_setup_once_impl+0x36>
lea    0xeb0(%rip),%rdi
lea    0xf05(%rip),%rsi
mov    $0x9,%edx
call   1050 <__cl_print@plt>
jmp    1172 <__cl_setup_once_impl+0x42>
lea    0xf74(%rip),%rdi
call   1040 <__cl_log@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cl_setup_once_impl>:
push   %rax
xor    %eax,%eax
call   1030 <__cl_env@plt>
test   %eax,%eax
je     1149 <__cl_setup_once_impl+0x19>
lea    0xf9e(%rip),%rdi
pop    %rax
jmp    1040 <__cl_log@plt>
lea    0xeb0(%rip),%rdi
lea    0xf05(%rip),%rsi
mov    $0x9,%edx
pop    %rax
jmp    1050 <__cl_print@plt>

LLVM IR (-O0):
@.str = [92 x i8] c"\1B[1m\1B[33m[ERROR] \1B[0mDetecting call to cl_log() from outside the scope of a SPEC at %s:%d\0A\0A\00"
@.str.1 = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pyrated/chlorine/refs/heads/master/tests.c\00"
@.str.2 = [61 x i8] c"You won't see this message, rather an [ERROR] in the output.\00"
define void @__cl_setup_once_impl() {
br label %1
1: ; preds = %0
%2 = call i32 (...) @__cl_env()
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = call i32 @__cl_print(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 9)
br label %8
6: ; preds = %1
%7 = call i32 @__cl_log(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %4, %6
ret void
}

LLVM IR (-O2):
@.str = [92 x i8] c"\1B[1m\1B[33m[ERROR] \1B[0mDetecting call to cl_log() from outside the scope of a SPEC at %s:%d\0A\0A\00"
@.str.1 = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pyrated/chlorine/refs/heads/master/tests.c\00"
@.str.2 = [61 x i8] c"You won't see this message, rather an [ERROR] in the output.\00"
define void @__cl_setup_once_impl() {
%1 = tail call i32 (...) @__cl_env()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @__cl_print(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 9)
br label %7
5: ; preds = %0
%6 = tail call i32 @__cl_log(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %3, %5
ret void
}