#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);
int dhcp_add_dev(char *, char *);
int dhcp_add_entry(char *, char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int err;
  err = dhcp_add_dev(NULL, NULL);
  assert(err != 0);
  err = dhcp_add_dev("eucadev3", "192.168.3.1");
  assert(err == 0);
  err = dhcp_add_dev("eucadev4", "192.168.4.1");
  assert(err == 0);
  err = dhcp_add_entry(NULL, NULL);
  assert(err != 0);
  err = dhcp_add_entry("aa:bb:00:00:00:00", "127.0.0.0");
  assert(err == 0);
  printf("all tests passed\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1030 <dhcp_add_dev@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xe83(%rip),%rdi
lea    0xe85(%rip),%rsi
call   1030 <dhcp_add_dev@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xe71(%rip),%rdi
lea    0xe73(%rip),%rsi
call   1030 <dhcp_add_dev@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1050 <dhcp_add_entry@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xe3f(%rip),%rdi
lea    0xe4a(%rip),%rsi
call   1050 <dhcp_add_entry@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xe34(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <dhcp_add_dev@plt>
xor    %edi,%edi
test   %eax,%eax
setne  %dil
call   1060 <assert@plt>
lea    0xea2(%rip),%rdi
lea    0xea4(%rip),%rsi
call   1030 <dhcp_add_dev@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
lea    0xe97(%rip),%rdi
lea    0xe99(%rip),%rsi
call   1030 <dhcp_add_dev@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <dhcp_add_entry@plt>
xor    %edi,%edi
test   %eax,%eax
setne  %dil
call   1060 <assert@plt>
lea    0xe76(%rip),%rdi
lea    0xe81(%rip),%rsi
call   1050 <dhcp_add_entry@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
lea    0xe72(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"eucadev3\00"
@.str.1 = [12 x i8] c"192.168.3.1\00"
@.str.2 = [9 x i8] c"eucadev4\00"
@.str.3 = [12 x i8] c"192.168.4.1\00"
@.str.4 = [18 x i8] c"aa:bb:00:00:00:00\00"
@.str.5 = [10 x i8] c"127.0.0.0\00"
@.str.6 = [18 x i8] c"all tests passed\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @dhcp_add_dev(i8* null, i8* null)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = call i32 @dhcp_add_dev(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = call i32 @dhcp_add_dev(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = icmp eq i32 %18, 0
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = call i32 @dhcp_add_entry(i8* null, i8* null)
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = icmp ne i32 %23, 0
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = call i32 @dhcp_add_entry(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
store i32 %27, i32* %6
%28 = load i32, i32* %6
%29 = icmp eq i32 %28, 0
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"eucadev3\00"
@.str.1 = [12 x i8] c"192.168.3.1\00"
@.str.2 = [9 x i8] c"eucadev4\00"
@.str.3 = [12 x i8] c"192.168.4.1\00"
@.str.4 = [18 x i8] c"aa:bb:00:00:00:00\00"
@.str.5 = [10 x i8] c"127.0.0.0\00"
@str = [17 x i8] c"all tests passed\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @dhcp_add_dev(i8* null, i8* null)
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @dhcp_add_dev(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @dhcp_add_dev(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
%14 = tail call i32 @assert(i32 %13)
%15 = tail call i32 @dhcp_add_entry(i8* null, i8* null)
%16 = icmp ne i32 %15, 0
%17 = zext i1 %16 to i32
%18 = tail call i32 @assert(i32 %17)
%19 = tail call i32 @dhcp_add_entry(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%20 = icmp eq i32 %19, 0
%21 = zext i1 %20 to i32
%22 = tail call i32 @assert(i32 %21)
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}