#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*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *,
                           char *);
int listen(int, int);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int Listen(int fd, int backlog) {
  int ret_code;
  ret_code = listen(fd, backlog);
  if (ret_code < 0)
    do {
      fprintf(stderr, "ERROR: [%s:%d] %s: %s\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/ystk/debian-freeipmi/refs/heads/"
              "master/ipmipower/src/wrappers.c",
              179, "listen", strerror(errno));
    } while (0);
  return ret_code;
}


x86 assembly (clang, -O0):
<Listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <listen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    119f <Listen+0x6f>
jmp    115b <Listen+0x2b>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x10(%rbp),%edi
mov    %rax,%r9
lea    0xe7e(%rip),%rsi
lea    0xe8e(%rip),%rdx
mov    $0xb3,%ecx
lea    0xf1c(%rip),%r8
call   1030 <fprintf@plt>
jmp    119f <Listen+0x6f>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Listen>:
push   %rbp
push   %rbx
push   %rax
call   1040 <listen@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1179 <Listen+0x49>
mov    0x2e9b(%rip),%rax
mov    (%rax),%ebp
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xea4(%rip),%rsi
lea    0xeb4(%rip),%rdx
lea    0xf47(%rip),%r8
mov    %ebp,%edi
mov    $0xb3,%ecx
mov    %rax,%r9
call   1030 <fprintf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"ERROR: [%s:%d] %s: %s\0A\00"
@.str.1 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ystk/debian-freeipmi/refs/heads/master/ipmipower/src/wrappers.c\00"
@.str.2 = [7 x i8] c"listen\00"
@errno = global i32 0
define i32 @Listen(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @listen(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %2
br label %12
12: ; preds = %11
%13 = load i32, i32* @stderr
%14 = load i32, i32* @errno
%15 = call i8* @strerror(i32 %14)
%16 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.1, i64 0, i64 0), i32 179, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %12
br label %18
18: ; preds = %17, %2
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"ERROR: [%s:%d] %s: %s\0A\00"
@.str.1 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ystk/debian-freeipmi/refs/heads/master/ipmipower/src/wrappers.c\00"
@.str.2 = [7 x i8] c"listen\00"
@errno = global i32 0
define i32 @Listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = load i32, i32* @errno
%8 = tail call i8* @strerror(i32 %7)
%9 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.1, i64 0, i64 0), i32 179, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %5, %2
ret i32 %3
}