#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 */
struct in_addr {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  void *sin_port;
  int /*<<< orphan*/ sin_family;
  struct in_addr sin_addr;
};
struct sockaddr {
  int dummy;
};
struct linger {
  int dummy;
};
struct hostent {
  int /*<<< orphan*/ h_addrtype;
  scalar_t__ *h_addr_list;
};

/* Variables and functions */
scalar_t__ EINTR;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ MSG_PEEK;
int /*<<< orphan*/ PF_INET;
int PF_UNSPEC;
int SOCK_DGRAM;
int SOCK_STREAM;
int accept(int, struct sockaddr *, int *);
scalar_t__ errno;
struct hostent *gethostbyname(char *);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
void *htons(int);
int /*<<< orphan*/ memset(struct sockaddr_in *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int recvfrom(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int *);
int dsm_server_accept(int s, int type, int port, int broadcast, char *gaddr,
                      int *msglen, char **buf, int maxlen) {
  int s2;
  struct hostent *hp;
  int prot, len, on = 1;
  struct linger l;
  struct sockaddr_in laddr, *saddr;
  printf("here\n");
  if (gaddr == NULL) {
    memset(&laddr, 0, sizeof(struct sockaddr_in));
    laddr.sin_family = PF_INET;
    laddr.sin_addr.s_addr = htonl(INADDR_ANY);
    laddr.sin_port = htons(port);
    saddr = &laddr;
  } else {
    if (!(hp = gethostbyname(gaddr))) {
      perror("gethostbyname");
      return (0);
    }
    saddr->sin_addr = *(struct in_addr *)*hp->h_addr_list;
    saddr->sin_family = hp->h_addrtype;
    saddr->sin_port = htons(port);
  }
  prot = (type == SOCK_DGRAM ? 0 : PF_UNSPEC);
  *msglen = 0;
  if (type == SOCK_DGRAM) {
    len = sizeof(struct sockaddr_in);
    while ((*msglen = recvfrom(s, *buf, maxlen, MSG_PEEK,
                               (struct sockaddr *)saddr, &len)) == -1)
      if (errno != EINTR) {
        *msglen = 0;
        perror("recvfrom error");
        return (0);
      }
  } else if (type == SOCK_STREAM) {
    *buf = NULL;
    len = sizeof(struct sockaddr_in);
    while ((s2 = accept(s, (struct sockaddr *)saddr, &len)) < 0)
      printf("here\n");
    if (errno != EINTR) {
      return (0);
    }
    return (s2);
  }
  return (s);
}


x86 assembly (clang, -O0):
<dsm_server_accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x1,-0x44(%rbp)
lea    0xe4f(%rip),%rdi
call   1040 <printf@plt>
cmpq   $0x0,-0x20(%rbp)
jne    1207 <dsm_server_accept+0x87>
lea    -0x58(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1060 <memset@plt>
mov    0x2dd8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x50(%rbp)
mov    0x2dfc(%rip),%rax
mov    (%rax),%edi
call   1050 <htonl@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <htons@plt>
mov    %rax,-0x58(%rbp)
lea    -0x58(%rbp),%rax
mov    %rax,-0x60(%rbp)
jmp    1269 <dsm_server_accept+0xe9>
mov    -0x20(%rbp),%rdi
call   1070 <gethostbyname@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    1236 <dsm_server_accept+0xb6>
lea    0xde1(%rip),%rdi
call   1090 <perror@plt>
movl   $0x0,-0x4(%rbp)
jmp    13bf <dsm_server_accept+0x23f>
mov    -0x60(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    0x8(%rcx),%rcx
mov    (%rcx),%rcx
mov    (%rcx),%ecx
mov    %ecx,0xc(%rax)
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
mov    -0x60(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x10(%rbp),%edi
call   1030 <htons@plt>
mov    %rax,%rcx
mov    -0x60(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
mov    0x2d5d(%rip),%rcx
cmp    (%rcx),%eax
jne    1285 <dsm_server_accept+0x105>
xor    %eax,%eax
mov    %eax,-0x64(%rbp)
jmp    1291 <dsm_server_accept+0x111>
mov    0x2d5c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x0,(%rax)
mov    -0xc(%rbp),%eax
mov    0x2d25(%rip),%rcx
cmp    (%rcx),%eax
jne    1332 <dsm_server_accept+0x1b2>
movl   $0x10,-0x40(%rbp)
mov    -0x8(%rbp),%edi
mov    0x10(%rbp),%rax
mov    (%rax),%rsi
mov    0x18(%rbp),%edx
mov    0x2d0a(%rip),%rax
mov    (%rax),%ecx
mov    -0x60(%rbp),%r8
lea    -0x40(%rbp),%r9
call   1080 <recvfrom@plt>
mov    -0x28(%rbp),%rcx
mov    %eax,(%rcx)
cmp    $0xffffffff,%eax
jne    132d <dsm_server_accept+0x1ad>
mov    0x2cc5(%rip),%rax
mov    (%rax),%rax
mov    0x2cab(%rip),%rcx
cmp    (%rcx),%rax
je     1328 <dsm_server_accept+0x1a8>
mov    -0x28(%rbp),%rax
movl   $0x0,(%rax)
lea    0xcfd(%rip),%rdi
call   1090 <perror@plt>
movl   $0x0,-0x4(%rbp)
jmp    13bf <dsm_server_accept+0x23f>
jmp    12ba <dsm_server_accept+0x13a>
jmp    13b9 <dsm_server_accept+0x239>
mov    -0xc(%rbp),%eax
mov    0x2c84(%rip),%rcx
cmp    (%rcx),%eax
jne    13b4 <dsm_server_accept+0x234>
mov    0x10(%rbp),%rax
movq   $0x0,(%rax)
movl   $0x10,-0x40(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x60(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   10a0 <accept@plt>
mov    %eax,-0x2c(%rbp)
cmp    $0x0,%eax
jge    1383 <dsm_server_accept+0x203>
lea    0xc87(%rip),%rdi
call   1040 <printf@plt>
jmp    1356 <dsm_server_accept+0x1d6>
mov    0x2c2e(%rip),%rax
mov    (%rax),%rax
mov    0x2c14(%rip),%rcx
cmp    (%rcx),%rax
je     13a9 <dsm_server_accept+0x229>
movl   $0x0,-0x4(%rbp)
jmp    13bf <dsm_server_accept+0x23f>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    13bf <dsm_server_accept+0x23f>
jmp    13b9 <dsm_server_accept+0x239>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dsm_server_accept>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,%rbx
mov    %r8,%r12
mov    %edx,%r15d
mov    %esi,%r14d
mov    %edi,%ebp
lea    0xe7a(%rip),%rdi
call   1030 <puts@plt>
test   %r12,%r12
jne    12f4 <dsm_server_accept+0x174>
lea    0x8(%rsp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1060 <memset@plt>
mov    0x2def(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
call   1050 <htonl@plt>
mov    %eax,0x14(%rsp)
mov    %r15d,%edi
call   1040 <htons@plt>
mov    %rax,0x8(%rsp)
movl   $0x0,(%rbx)
mov    0x2ddd(%rip),%rax
cmp    %r14d,(%rax)
jne    1268 <dsm_server_accept+0xe8>
movl   $0x10,0x4(%rsp)
lea    0x8(%rsp),%r15
lea    0x4(%rsp),%r13
mov    0x2da7(%rip),%r12
mov    0x2d90(%rip),%r14
mov    0x50(%rsp),%rax
mov    (%rax),%rsi
mov    0x2db1(%rip),%rax
mov    (%rax),%ecx
mov    %ebp,%edi
mov    0x58(%rsp),%edx
mov    %r15,%r8
mov    %r13,%r9
call   1080 <recvfrom@plt>
mov    %eax,(%rbx)
cmp    $0xffffffff,%eax
jne    130a <dsm_server_accept+0x18a>
mov    (%r12),%rax
cmp    (%r14),%rax
je     1220 <dsm_server_accept+0xa0>
movl   $0x0,(%rbx)
lea    0xdab(%rip),%rdi
jmp    1303 <dsm_server_accept+0x183>
mov    0x2d59(%rip),%rax
cmp    %r14d,(%rax)
jne    130a <dsm_server_accept+0x18a>
mov    0x50(%rsp),%rax
movq   $0x0,(%rax)
movl   $0x10,0x4(%rsp)
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
mov    %ebp,%edi
call   10a0 <accept@plt>
test   %eax,%eax
jns    12d9 <dsm_server_accept+0x159>
lea    0xd75(%rip),%r14
lea    0x8(%rsp),%r15
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %ebp,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
call   10a0 <accept@plt>
test   %eax,%eax
js     12c0 <dsm_server_accept+0x140>
mov    0x2ce0(%rip),%rcx
mov    (%rcx),%rcx
mov    0x2cc6(%rip),%rdx
xor    %ebp,%ebp
cmp    (%rdx),%rcx
cmove  %eax,%ebp
jmp    130a <dsm_server_accept+0x18a>
mov    %r12,%rdi
call   1070 <gethostbyname@plt>
lea    0xcfd(%rip),%rdi
call   1090 <perror@plt>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.hostent = type { i32, i64* }
%struct.linger = type { i32 }
%struct.sockaddr_in = type { i8*, i32, %struct.in_addr }
%struct.in_addr = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [6 x i8] c"here\0A\00"
@PF_INET = global i32 0
@INADDR_ANY = global i32 0
@.str.1 = [14 x i8] c"gethostbyname\00"
@SOCK_DGRAM = global i32 0
@PF_UNSPEC = global i32 0
@MSG_PEEK = global i32 0
@errno = global i64 0
@EINTR = global i64 0
@.str.2 = [15 x i8] c"recvfrom error\00"
@SOCK_STREAM = global i32 0
define i32 @dsm_server_accept(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i32* %5, i8** %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32*
%16 = alloca i8**
%17 = alloca i32
%18 = alloca i32
%19 = alloca %struct.hostent*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca %struct.linger
%24 = alloca %struct.sockaddr_in
%25 = alloca %struct.sockaddr_in*
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i8* %4, i8** %14
store i32* %5, i32** %15
store i8** %6, i8*** %16
store i32 %7, i32* %17
store i32 1, i32* %22
%26 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%27 = load i8*, i8** %14
%28 = icmp eq i8* %27, null
br i1 %28, label %29, label %40
29: ; preds = %8
%30 = call i32 @memset(%struct.sockaddr_in* %24, i32 0, i32 16)
%31 = load i32, i32* @PF_INET
%32 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %24, i32 0, i32 1
store i32 %31, i32* %32
%33 = load i32, i32* @INADDR_ANY
%34 = call i32 @htonl(i32 %33)
%35 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %24, i32 0, i32 2
%36 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %35, i32 0, i32 0
store i32 %34, i32* %36
%37 = load i32, i32* %12
%38 = call i8* @htons(i32 %37)
%39 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %24, i32 0, i32 0
store i8* %38, i8** %39
store %struct.sockaddr_in* %24, %struct.sockaddr_in** %25
br label %65
40: ; preds = %8
%41 = load i8*, i8** %14
%42 = call %struct.hostent* @gethostbyname(i8* %41)
store %struct.hostent* %42, %struct.hostent** %19
%43 = icmp ne %struct.hostent* %42, null
br i1 %43, label %46, label %44
44: ; preds = %40
%45 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %9
br label %123
46: ; preds = %40
%47 = load %struct.sockaddr_in*, %struct.sockaddr_in** %25
%48 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %47, i32 0, i32 2
%49 = load %struct.hostent*, %struct.hostent** %19
%50 = getelementptr inbounds %struct.hostent, %struct.hostent* %49, i32 0, i32 1
%51 = load i64*, i64** %50
%52 = load i64, i64* %51
%53 = inttoptr i64 %52 to %struct.in_addr*
%54 = bitcast %struct.in_addr* %48 to i8*
%55 = bitcast %struct.in_addr* %53 to i8*
%56 = load %struct.hostent*, %struct.hostent** %19
%57 = getelementptr inbounds %struct.hostent, %struct.hostent* %56, i32 0, i32 0
%58 = load i32, i32* %57
%59 = load %struct.sockaddr_in*, %struct.sockaddr_in** %25
%60 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %59, i32 0, i32 1
store i32 %58, i32* %60
%61 = load i32, i32* %12
%62 = call i8* @htons(i32 %61)
%63 = load %struct.sockaddr_in*, %struct.sockaddr_in** %25
%64 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %63, i32 0, i32 0
store i8* %62, i8** %64
br label %65
65: ; preds = %46, %29
%66 = load i32, i32* %11
%67 = load i32, i32* @SOCK_DGRAM
%68 = icmp eq i32 %66, %67
br i1 %68, label %69, label %70
69: ; preds = %65
br label %72
70: ; preds = %65
%71 = load i32, i32* @PF_UNSPEC
br label %72
72: ; preds = %70, %69
%73 = phi i32 [ 0, %69 ], [ %71, %70 ]
store i32 %73, i32* %20
%74 = load i32*, i32** %15
store i32 0, i32* %74
%75 = load i32, i32* %11
%76 = load i32, i32* @SOCK_DGRAM
%77 = icmp eq i32 %75, %76
br i1 %77, label %78, label %99
78: ; preds = %72
store i32 16, i32* %21
br label %79
79: ; preds = %97, %78
%80 = load i32, i32* %10
%81 = load i8**, i8*** %16
%82 = load i8*, i8** %81
%83 = load i32, i32* %17
%84 = load i32, i32* @MSG_PEEK
%85 = load %struct.sockaddr_in*, %struct.sockaddr_in** %25
%86 = bitcast %struct.sockaddr_in* %85 to %struct.sockaddr*
%87 = call i32 @recvfrom(i32 %80, i8* %82, i32 %83, i32 %84, %struct.sockaddr* %86, i32* %21)
%88 = load i32*, i32** %15
store i32 %87, i32* %88
%89 = icmp eq i32 %87, -1
br i1 %89, label %90, label %98
90: ; preds = %79
%91 = load i64, i64* @errno
%92 = load i64, i64* @EINTR
%93 = icmp ne i64 %91, %92
br i1 %93, label %94, label %97
94: ; preds = %90
%95 = load i32*, i32** %15
store i32 0, i32* %95
%96 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %9
br label %123
97: ; preds = %90
br label %79
98: ; preds = %79
br label %121
99: ; preds = %72
%100 = load i32, i32* %11
%101 = load i32, i32* @SOCK_STREAM
%102 = icmp eq i32 %100, %101
br i1 %102, label %103, label %120
103: ; preds = %99
%104 = load i8**, i8*** %16
store i8* null, i8** %104
store i32 16, i32* %21
br label %105
105: ; preds = %111, %103
%106 = load i32, i32* %10
%107 = load %struct.sockaddr_in*, %struct.sockaddr_in** %25
%108 = bitcast %struct.sockaddr_in* %107 to %struct.sockaddr*
%109 = call i32 @accept(i32 %106, %struct.sockaddr* %108, i32* %21)
store i32 %109, i32* %18
%110 = icmp slt i32 %109, 0
br i1 %110, label %111, label %113
111: ; preds = %105
%112 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %105
113: ; preds = %105
%114 = load i64, i64* @errno
%115 = load i64, i64* @EINTR
%116 = icmp ne i64 %114, %115
br i1 %116, label %117, label %118
117: ; preds = %113
store i32 0, i32* %9
br label %123
118: ; preds = %113
%119 = load i32, i32* %18
store i32 %119, i32* %9
br label %123
120: ; preds = %99
br label %121
121: ; preds = %120, %98
%122 = load i32, i32* %10
store i32 %122, i32* %9
br label %123
123: ; preds = %121, %118, %117, %94, %44
%124 = load i32, i32* %9
ret i32 %124
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i8*, i32, %struct.in_addr }
%struct.in_addr = type { i32 }
%struct.hostent = type { i32, i64* }
%struct.sockaddr = type { i32 }
@PF_INET = global i32 0
@INADDR_ANY = global i32 0
@.str.1 = [14 x i8] c"gethostbyname\00"
@SOCK_DGRAM = global i32 0
@PF_UNSPEC = global i32 0
@MSG_PEEK = global i32 0
@errno = global i64 0
@EINTR = global i64 0
@.str.2 = [15 x i8] c"recvfrom error\00"
@SOCK_STREAM = global i32 0
@str.3 = [5 x i8] c"here\00"
define i32 @dsm_server_accept(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i32* nocapture writeonly %5, i8** nocapture %6, i32 %7) {
%9 = alloca i32
%10 = alloca %struct.sockaddr_in
%11 = bitcast i32* %9 to i8*
%12 = bitcast %struct.sockaddr_in* %10 to i8*
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.3, i64 0, i64 0))
%14 = icmp eq i8* %4, null
br i1 %14, label %15, label %26
15: ; preds = %8
%16 = call i32 @memset(%struct.sockaddr_in* %10, i32 0, i32 16)
%17 = load i32, i32* @PF_INET
%18 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i64 0, i32 1
store i32 %17, i32* %18
%19 = load i32, i32* @INADDR_ANY
%20 = call i32 @htonl(i32 %19)
%21 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i64 0, i32 2, i32 0
store i32 %20, i32* %21
%22 = call i8* @htons(i32 %2)
%23 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i64 0, i32 0
store i8* %22, i8** %23
store i32 0, i32* %5
%24 = load i32, i32* @SOCK_DGRAM
%25 = icmp eq i32 %24, %1
br i1 %25, label %30, label %43
26: ; preds = %8
%27 = tail call %struct.hostent* @gethostbyname(i8* %4)
%28 = icmp eq %struct.hostent* %27, null
tail call void @llvm.assume(i1 %28)
%29 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %60
30: ; preds = %15
store i32 16, i32* %9
%31 = bitcast %struct.sockaddr_in* %10 to %struct.sockaddr*
br label %32
32: ; preds = %37, %30
%33 = load i8*, i8** %6
%34 = load i32, i32* @MSG_PEEK
%35 = call i32 @recvfrom(i32 %0, i8* %33, i32 %7, i32 %34, %struct.sockaddr* %31, i32* %9)
store i32 %35, i32* %5
%36 = icmp eq i32 %35, -1
br i1 %36, label %37, label %60
37: ; preds = %32
%38 = load i64, i64* @errno
%39 = load i64, i64* @EINTR
%40 = icmp eq i64 %38, %39
br i1 %40, label %32, label %41
41: ; preds = %37
store i32 0, i32* %5
%42 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %60
43: ; preds = %15
%44 = load i32, i32* @SOCK_STREAM
%45 = icmp eq i32 %44, %1
br i1 %45, label %46, label %60
46: ; preds = %43
store i8* null, i8** %6
store i32 16, i32* %9
%47 = bitcast %struct.sockaddr_in* %10 to %struct.sockaddr*
%48 = call i32 @accept(i32 %0, %struct.sockaddr* %47, i32* %9)
%49 = icmp slt i32 %48, 0
br i1 %49, label %50, label %54
50: ; preds = %46, %50
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.3, i64 0, i64 0))
%52 = call i32 @accept(i32 %0, %struct.sockaddr* %47, i32* %9)
%53 = icmp slt i32 %52, 0
br i1 %53, label %50, label %54
54: ; preds = %50, %46
%55 = phi i32 [ %48, %46 ], [ %52, %50 ]
%56 = load i64, i64* @errno
%57 = load i64, i64* @EINTR
%58 = icmp eq i64 %56, %57
%59 = select i1 %58, i32 %55, i32 0
br label %60
60: ; preds = %32, %43, %54, %41, %26
%61 = phi i32 [ 0, %41 ], [ 0, %26 ], [ %59, %54 ], [ %0, %43 ], [ %0, %32 ]
ret i32 %61
}