#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 */
scalar_t__ _irc_queue_init(int /*<<< orphan*/);
int client(int, int, char *, int, char *, char *, char *);
int irc_client(int sid, char *addr, int port, char *nick, char *username,
               char *realname) {
  if (_irc_queue_init(0) != 0)
    return -1;
  return client(sid, 1, addr, port, nick, username, realname);
}


x86 assembly (clang, -O0):
<irc_client>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %edi,%edi
call   1030 <_irc_queue_init@plt>
cmp    $0x0,%rax
je     115b <irc_client+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1182 <irc_client+0x62>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rax
mov    $0x1,%esi
mov    %rax,(%rsp)
call   1040 <client@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_client>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%rbp
mov    %r8,%r14
mov    %rcx,%r15
mov    %edx,%r12d
mov    %rsi,%r13
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <_irc_queue_init@plt>
test   %rax,%rax
je     114f <irc_client+0x2f>
mov    $0xffffffff,%eax
jmp    116b <irc_client+0x4b>
mov    %rbp,(%rsp)
mov    %ebx,%edi
mov    $0x1,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15,%r8
mov    %r14,%r9
call   1040 <client@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @irc_client(i32 %0, i8* %1, i32 %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
store i32 %0, i32* %8
store i8* %1, i8** %9
store i32 %2, i32* %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%14 = call i64 @_irc_queue_init(i32 0)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %6
store i32 -1, i32* %7
br label %25
17: ; preds = %6
%18 = load i32, i32* %8
%19 = load i8*, i8** %9
%20 = load i32, i32* %10
%21 = load i8*, i8** %11
%22 = load i8*, i8** %12
%23 = load i8*, i8** %13
%24 = call i32 @client(i32 %18, i32 1, i8* %19, i32 %20, i8* %21, i8* %22, i8* %23)
store i32 %24, i32* %7
br label %25
25: ; preds = %17, %16
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @irc_client(i32 %0, i8* %1, i32 %2, i8* %3, i8* %4, i8* %5) {
%7 = tail call i64 @_irc_queue_init(i32 0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @client(i32 %0, i32 1, i8* %1, i32 %2, i8* %3, i8* %4, i8* %5)
br label %11
11: ; preds = %6, %9
%12 = phi i32 [ %10, %9 ], [ -1, %6 ]
ret i32 %12
}