#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*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ main_loop();
int start_server(char *, char *, char *, int);
int /*<<< orphan*/ stderr;
int main(void) {
  int status = 0;
  status = start_server("0.0.0.0", "6666", "/usr/bin/aplay -f cd", 5);
  if (status != 0) {
    fprintf(stderr, "Failed to start server!\n");
    return 1;
  }
  main_loop();
  assert(0);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xea3(%rip),%rdi
lea    0xea4(%rip),%rsi
lea    0xea2(%rip),%rdx
mov    $0x5,%ecx
call   1060 <start_server@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11a3 <main+0x63>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    11b8 <main+0x78>
mov    $0x0,%al
call   1050 <main_loop@plt>
xor    %edi,%edi
call   1030 <assert@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0xeb9(%rip),%rsi
lea    0xeb7(%rip),%rdx
mov    $0x5,%ecx
call   1060 <start_server@plt>
test   %eax,%eax
je     117b <main+0x3b>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1189 <main+0x49>
xor    %eax,%eax
call   1050 <main_loop@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"0.0.0.0\00"
@.str.1 = [5 x i8] c"6666\00"
@.str.2 = [21 x i8] c"/usr/bin/aplay -f cd\00"
@stderr = global i32 0
@.str.3 = [25 x i8] c"Failed to start server!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @start_server(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 5)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %1
br label %12
9: ; preds = %0
%10 = call i32 (...) @main_loop()
%11 = call i32 @assert(i32 0)
store i32 1, i32* %1
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"0.0.0.0\00"
@.str.1 = [5 x i8] c"6666\00"
@.str.2 = [21 x i8] c"/usr/bin/aplay -f cd\00"
@stderr = global i32 0
@.str.3 = [25 x i8] c"Failed to start server!\0A\00"
define i32 @main() {
%1 = tail call i32 @start_server(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 5)
%2 = icmp eq i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %9
6: ; preds = %0
%7 = tail call i32 (...) @main_loop()
%8 = tail call i32 @assert(i32 0)
br label %9
9: ; preds = %6, %3
ret i32 1
}