#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 */
typedef int /*<<< orphan*/ ulong;
struct in_addr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ inet_addr(char *);
char *inet_ntoa(struct in_addr);
int /*<<< orphan*/ memcpy(struct in_addr *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ printf(char *, char *, ...);
int main(int argc, char *argv[]) {
  struct in_addr addr1, addr2;
  ulong l1, l2;
  l1 = inet_addr("192.168.0.74");
  l2 = inet_addr("211.100.21.179");
  memcpy(&addr1, &l1, 4);
  memcpy(&addr2, &l2, 4);
  printf("%s : %s\n", inet_ntoa(addr1), inet_ntoa(addr2));
  printf("%s\n", inet_ntoa(addr1));
  printf("%s\n", inet_ntoa(addr2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
call   1050 <inet_addr@plt>
mov    %eax,-0x24(%rbp)
lea    0xea1(%rip),%rdi
call   1050 <inet_addr@plt>
mov    %eax,-0x28(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x4,%edx
call   1060 <memcpy@plt>
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x4,%edx
call   1060 <memcpy@plt>
mov    -0x18(%rbp),%edi
call   1030 <inet_ntoa@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%edi
call   1030 <inet_ntoa@plt>
mov    -0x30(%rbp),%rsi
mov    %rax,%rdx
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%edi
call   1030 <inet_ntoa@plt>
mov    %rax,%rsi
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%edi
call   1030 <inet_ntoa@plt>
mov    %rax,%rsi
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xeb4(%rip),%rdi
call   1050 <inet_addr@plt>
mov    %eax,0x1c(%rsp)
lea    0xeb1(%rip),%rdi
call   1050 <inet_addr@plt>
mov    %eax,0x18(%rsp)
lea    0x10(%rsp),%rdi
lea    0x1c(%rsp),%rsi
mov    $0x4,%edx
call   1060 <memcpy@plt>
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
mov    $0x4,%edx
call   1060 <memcpy@plt>
mov    0x10(%rsp),%edi
call   1030 <inet_ntoa@plt>
mov    %rax,%rbx
mov    0x8(%rsp),%edi
call   1030 <inet_ntoa@plt>
lea    0xe73(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%edi
call   1030 <inet_ntoa@plt>
lea    0xe5b(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%edi
call   1030 <inet_ntoa@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@.str = [13 x i8] c"192.168.0.74\00"
@.str.1 = [15 x i8] c"211.100.21.179\00"
@.str.2 = [9 x i8] c"%s : %s\0A\00"
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.in_addr
%7 = alloca %struct.in_addr
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 @inet_addr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 %10, i32* %8
%11 = call i32 @inet_addr(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
store i32 %11, i32* %9
%12 = call i32 @memcpy(%struct.in_addr* %6, i32* %8, i32 4)
%13 = call i32 @memcpy(%struct.in_addr* %7, i32* %9, i32 4)
%14 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %6, i32 0, i32 0
%15 = load i32, i32* %14
%16 = call i8* @inet_ntoa(i32 %15)
%17 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %7, i32 0, i32 0
%18 = load i32, i32* %17
%19 = call i8* @inet_ntoa(i32 %18)
%20 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %16, i8* %19)
%21 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %6, i32 0, i32 0
%22 = load i32, i32* %21
%23 = call i8* @inet_ntoa(i32 %22)
%24 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %23)
%25 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %7, i32 0, i32 0
%26 = load i32, i32* %25
%27 = call i8* @inet_ntoa(i32 %26)
%28 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %27)
ret i32 0
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@.str = [13 x i8] c"192.168.0.74\00"
@.str.1 = [15 x i8] c"211.100.21.179\00"
@.str.2 = [9 x i8] c"%s : %s\0A\00"
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.in_addr
%4 = alloca %struct.in_addr
%5 = alloca i32
%6 = alloca i32
%7 = bitcast %struct.in_addr* %3 to i8*
%8 = bitcast %struct.in_addr* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = bitcast i32* %6 to i8*
%11 = tail call i32 @inet_addr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 %11, i32* %5
%12 = tail call i32 @inet_addr(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
store i32 %12, i32* %6
%13 = call i32 @memcpy(%struct.in_addr* %3, i32* %5, i32 4)
%14 = call i32 @memcpy(%struct.in_addr* %4, i32* %6, i32 4)
%15 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i64 0, i32 0
%16 = load i32, i32* %15
%17 = call i8* @inet_ntoa(i32 %16)
%18 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %4, i64 0, i32 0
%19 = load i32, i32* %18
%20 = call i8* @inet_ntoa(i32 %19)
%21 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %17, i8* %20)
%22 = load i32, i32* %15
%23 = call i8* @inet_ntoa(i32 %22)
%24 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %23)
%25 = load i32, i32* %18
%26 = call i8* @inet_ntoa(i32 %25)
%27 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %26)
ret i32 0
}