#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*/ EXIT_FAILURE;
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ _debug(char *, int, int /*<<< orphan*/, char *,
                          char const *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *strrchr(char *, char);
void die_most_horribly_from_openssl_error(const char *func) {
  _debug((strrchr("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/LeonKendy/Wifi/refs/heads/"
                  "master/src/https_common.c",
                  '/')
              ? strrchr("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/LeonKendy/"
                        "Wifi/refs/heads/master/src/https_common.c",
                        '/') +
                    1
              : "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/LeonKendy/Wifi/refs/heads/"
                "master/src/https_common.c"),
         17, LOG_ERR, "%s failed:\n", func);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<die_most_horribly_from_openssl_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
cmp    $0x0,%rax
je     1175 <die_most_horribly_from_openssl_error+0x45>
lea    0xea2(%rip),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1185 <die_most_horribly_from_openssl_error+0x55>
lea    0xe84(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1185 <die_most_horribly_from_openssl_error+0x55>
mov    -0x10(%rbp),%rdi
mov    0x2e40(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%r8
mov    $0x11,%esi
lea    0xeec(%rip),%rcx
call   1040 <_debug@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die_most_horribly_from_openssl_error>:
push   %rax
mov    %rdi,%r8
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
lea    0xf4b(%rip),%rdi
lea    0xf53(%rip),%rcx
mov    $0x11,%esi
call   1030 <_debug@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LeonKendy/Wifi/refs/heads/master/src/https_common.c\00"
@LOG_ERR = global i32 0
@.str.1 = [12 x i8] c"%s failed:\0A\00"
@EXIT_FAILURE = global i32 0
define void @die_most_horribly_from_openssl_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i8* @strrchr(i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str, i64 0, i64 0), i8 signext 47)
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i8* @strrchr(i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str, i64 0, i64 0), i8 signext 47)
%7 = getelementptr inbounds i8, i8* %6, i64 1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i8* [ %7, %5 ], [ getelementptr inbounds ([142 x i8], [142 x i8]* @.str, i64 0, i64 0), %8 ]
%11 = load i32, i32* @LOG_ERR
%12 = load i8*, i8** %2
%13 = call i32 @_debug(i8* %10, i32 17, i32 %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
}

LLVM IR (-O2):
@.str = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LeonKendy/Wifi/refs/heads/master/src/https_common.c\00"
@LOG_ERR = global i32 0
@.str.1 = [12 x i8] c"%s failed:\0A\00"
@EXIT_FAILURE = global i32 0
define void @die_most_horribly_from_openssl_error(i8* %0) {
%2 = load i32, i32* @LOG_ERR
%3 = tail call i32 @_debug(i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str, i64 0, i64 127), i32 17, i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}