#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(int);
char *env_get(char const *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *,
                           unsigned long long, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char const *);
void doit(const char *d0, const char *d) {
  char *s;
  s = env_get(d0);
  if (!s) {
    if (d)
      do {
        fprintf(stderr, "%s:%llu: %s\n",
                ("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/janmojzis/tinyssh/refs/"
                 "heads/master/tinyssh-tests/envtest.c"),
                (unsigned long long)(26), (("env_get failure")));
        fflush(stderr);
        _exit(111);
      } while (0);
    ;
    return;
  }
  if (!s)
    do {
      fprintf(stderr, "%s:%llu: %s\n",
              ("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/janmojzis/tinyssh/refs/heads/"
               "master/tinyssh-tests/envtest.c"),
              (unsigned long long)(30), (("env_get failure")));
      fflush(stderr);
      _exit(111);
    } while (0);
  ;
  if (strcmp(s, d))
    do {
      fprintf(stderr, "%s:%llu: %s\n",
              ("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/janmojzis/tinyssh/refs/heads/"
               "master/tinyssh-tests/envtest.c"),
              (unsigned long long)(31), (("env_get failure")));
      fflush(stderr);
      _exit(111);
    } while (0);
  ;
  return;
}


x86 assembly (clang, -O0):
<doit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <env_get@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11cd <doit+0x7d>
cmpq   $0x0,-0x10(%rbp)
je     11c8 <doit+0x78>
jmp    1188 <doit+0x38>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
lea    0xe68(%rip),%rsi
lea    0xe6e(%rip),%rdx
mov    $0x1a,%ecx
lea    0xef8(%rip),%r8
call   1050 <fprintf@plt>
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    $0x6f,%edi
call   1030 <_exit@plt>
jmp    127e <doit+0x12e>
cmpq   $0x0,-0x18(%rbp)
jne    121d <doit+0xcd>
jmp    11dd <doit+0x8d>
mov    0x2dfc(%rip),%rax
mov    (%rax),%edi
lea    0xe13(%rip),%rsi
lea    0xe19(%rip),%rdx
mov    $0x1e,%ecx
lea    0xea3(%rip),%r8
call   1050 <fprintf@plt>
mov    0x2dd4(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    $0x6f,%edi
call   1030 <_exit@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1279 <doit+0x129>
jmp    1239 <doit+0xe9>
mov    0x2da0(%rip),%rax
mov    (%rax),%edi
lea    0xdb7(%rip),%rsi
lea    0xdbd(%rip),%rdx
mov    $0x1f,%ecx
lea    0xe47(%rip),%r8
call   1050 <fprintf@plt>
mov    0x2d78(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    $0x6f,%edi
call   1030 <_exit@plt>
jmp    127e <doit+0x12e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doit>:
push   %rbx
mov    %rsi,%rbx
call   1070 <env_get@plt>
test   %rax,%rax
je     1193 <doit+0x43>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1198 <doit+0x48>
mov    0x2e6b(%rip),%rbx
mov    (%rbx),%edi
lea    0xe82(%rip),%rsi
lea    0xe88(%rip),%rdx
lea    0xf17(%rip),%r8
mov    $0x1f,%ecx
jmp    11bd <doit+0x6d>
test   %rbx,%rbx
jne    119a <doit+0x4a>
pop    %rbx
ret
mov    0x2e3f(%rip),%rbx
mov    (%rbx),%edi
lea    0xe56(%rip),%rsi
lea    0xe5c(%rip),%rdx
lea    0xeeb(%rip),%r8
mov    $0x1a,%ecx
call   1050 <fprintf@plt>
mov    (%rbx),%edi
call   1060 <fflush@plt>
mov    $0x6f,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"%s:%llu: %s\0A\00"
@.str.1 = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/janmojzis/tinyssh/refs/heads/master/tinyssh-tests/envtest.c\00"
@.str.2 = [16 x i8] c"env_get failure\00"
define void @doit(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @env_get(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %22, label %10
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %21
13: ; preds = %10
br label %14
14: ; preds = %13
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.1, i64 0, i64 0), i64 26, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 @fflush(i32 %17)
%19 = call i32 @_exit(i32 111)
unreachable
20: ; No predecessors!
br label %21
21: ; preds = %20, %10
br label %47
22: ; preds = %2
%23 = load i8*, i8** %5
%24 = icmp ne i8* %23, null
br i1 %24, label %33, label %25
25: ; preds = %22
br label %26
26: ; preds = %25
%27 = load i32, i32* @stderr
%28 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.1, i64 0, i64 0), i64 30, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%29 = load i32, i32* @stderr
%30 = call i32 @fflush(i32 %29)
%31 = call i32 @_exit(i32 111)
unreachable
32: ; No predecessors!
br label %33
33: ; preds = %32, %22
%34 = load i8*, i8** %5
%35 = load i8*, i8** %4
%36 = call i64 @strcmp(i8* %34, i8* %35)
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %46
38: ; preds = %33
br label %39
39: ; preds = %38
%40 = load i32, i32* @stderr
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.1, i64 0, i64 0), i64 31, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%42 = load i32, i32* @stderr
%43 = call i32 @fflush(i32 %42)
%44 = call i32 @_exit(i32 111)
unreachable
45: ; No predecessors!
br label %46
46: ; preds = %45, %33
br label %47
47: ; preds = %46, %21
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"%s:%llu: %s\0A\00"
@.str.1 = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/janmojzis/tinyssh/refs/heads/master/tinyssh-tests/envtest.c\00"
@.str.2 = [16 x i8] c"env_get failure\00"
define void @doit(i8* %0, i8* %1) {
%3 = tail call i8* @env_get(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = icmp eq i8* %1, null
br i1 %6, label %22, label %7
7: ; preds = %5
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.1, i64 0, i64 0), i64 26, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 @fflush(i32 %10)
%12 = tail call i32 @_exit(i32 111)
unreachable
13: ; preds = %2
%14 = tail call i64 @strcmp(i8* %3, i8* %1)
%15 = icmp eq i64 %14, 0
br i1 %15, label %22, label %16
16: ; preds = %13
%17 = load i32, i32* @stderr
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.1, i64 0, i64 0), i64 31, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = tail call i32 @fflush(i32 %19)
%21 = tail call i32 @_exit(i32 111)
unreachable
22: ; preds = %13, %5
ret void
}