#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 arp_ListenProbeSockfdBind(char *, int);
int arp_ListenProbeSockfdOptSet(int, char *);
int arp_ListenProbeSocketParamSet(int iSockfd, char *sNetcardname, char *sIP) {
  int iRet = 0;
  iRet = arp_ListenProbeSockfdOptSet((iSockfd), sNetcardname);
  if (iRet != 0) {
    return iRet;
  }
  iRet = arp_ListenProbeSockfdBind(sIP, (iSockfd));
  if (iRet != 0) {
    return iRet;
  }
  return iRet;
}


x86 assembly (clang, -O0):
<arp_ListenProbeSocketParamSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <arp_ListenProbeSockfdOptSet@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     115e <arp_ListenProbeSocketParamSet+0x3e>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1188 <arp_ListenProbeSocketParamSet+0x68>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <arp_ListenProbeSockfdBind@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1182 <arp_ListenProbeSocketParamSet+0x62>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1188 <arp_ListenProbeSocketParamSet+0x68>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arp_ListenProbeSocketParamSet>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %edi,%ebp
call   1030 <arp_ListenProbeSockfdOptSet@plt>
test   %eax,%eax
je     1138 <arp_ListenProbeSocketParamSet+0x18>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <arp_ListenProbeSockfdBind@plt>

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

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