#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, unsigned char *, unsigned char *,
                         unsigned char *, unsigned char *, ...);
int /*<<< orphan*/ stdout;
int main(void) {
  struct eeprom {
    unsigned char ip[4];
    unsigned char mac[6];
  };
  struct eeprom e;
  scanf("ip = %hhu.%hhu.%hhu.%hhu\n", &e.ip[0], &e.ip[1], &e.ip[2], &e.ip[3]);
  scanf("mac = %hhx:%hhx:%hhx:%hhx:%hhx:%hhx\n", &e.mac[0], &e.mac[1],
        &e.mac[2], &e.mac[3], &e.mac[4], &e.mac[5]);
  fputs((char *)&e, stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rsi
lea    -0x10(%rbp),%rdx
add    $0x1,%rdx
lea    -0x10(%rbp),%rcx
add    $0x2,%rcx
lea    -0x10(%rbp),%r8
add    $0x3,%r8
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x10(%rbp),%rsi
add    $0x4,%rsi
lea    -0x10(%rbp),%rdx
add    $0x4,%rdx
add    $0x1,%rdx
lea    -0x10(%rbp),%rcx
add    $0x4,%rcx
add    $0x2,%rcx
lea    -0x10(%rbp),%r8
add    $0x4,%r8
add    $0x3,%r8
lea    -0x10(%rbp),%r9
add    $0x4,%r9
add    $0x4,%r9
lea    -0x10(%rbp),%rax
add    $0x4,%rax
add    $0x5,%rax
lea    0xe76(%rip),%rdi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x10(%rbp),%rdi
mov    0x2e26(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0x11(%rsp),%rdx
lea    0x12(%rsp),%rcx
lea    0x13(%rsp),%r8
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
lea    0x15(%rsp),%rdx
lea    0x16(%rsp),%rcx
lea    0x17(%rsp),%r8
lea    0x18(%rsp),%r9
lea    0x19(%rsp),%rax
mov    %rax,(%rsp)
lea    0xea7(%rip),%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.eeprom = type { [4 x i8], [6 x i8] }
@.str = [26 x i8] c"ip = %hhu.%hhu.%hhu.%hhu\0A\00"
@.str.1 = [37 x i8] c"mac = %hhx:%hhx:%hhx:%hhx:%hhx:%hhx\0A\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.eeprom
store i32 0, i32* %1
%3 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %2, i32 0, i32 0
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %2, i32 0, i32 0
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 1
%7 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %2, i32 0, i32 0
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 2
%9 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %2, i32 0, i32 0
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 3
%11 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @scanf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6, i8* %8, i8* %10)
%12 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %2, i32 0, i32 1
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 0
%14 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %2, i32 0, i32 1
%15 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 1
%16 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %2, i32 0, i32 1
%17 = getelementptr inbounds [6 x i8], [6 x i8]* %16, i64 0, i64 2
%18 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %2, i32 0, i32 1
%19 = getelementptr inbounds [6 x i8], [6 x i8]* %18, i64 0, i64 3
%20 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %2, i32 0, i32 1
%21 = getelementptr inbounds [6 x i8], [6 x i8]* %20, i64 0, i64 4
%22 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %2, i32 0, i32 1
%23 = getelementptr inbounds [6 x i8], [6 x i8]* %22, i64 0, i64 5
%24 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @scanf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %13, i8* %15, i8* %17, i8* %19, i8* %21, i8* %23)
%25 = bitcast %struct.eeprom* %2 to i8*
%26 = load i32, i32* @stdout
%27 = call i32 @fputs(i8* %25, i32 %26)
ret i32 0
}

LLVM IR (-O2):
%struct.eeprom = type { [4 x i8], [6 x i8] }
@.str = [26 x i8] c"ip = %hhu.%hhu.%hhu.%hhu\0A\00"
@.str.1 = [37 x i8] c"mac = %hhx:%hhx:%hhx:%hhx:%hhx:%hhx\0A\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca %struct.eeprom
%2 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %1, i64 0, i32 0, i64 0
%3 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %1, i64 0, i32 0, i64 1
%4 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %1, i64 0, i32 0, i64 2
%5 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %1, i64 0, i32 0, i64 3
%6 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @scanf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %4, i8* %5)
%7 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %1, i64 0, i32 1, i64 0
%8 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %1, i64 0, i32 1, i64 1
%9 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %1, i64 0, i32 1, i64 2
%10 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %1, i64 0, i32 1, i64 3
%11 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %1, i64 0, i32 1, i64 4
%12 = getelementptr inbounds %struct.eeprom, %struct.eeprom* %1, i64 0, i32 1, i64 5
%13 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @scanf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %8, i8* %9, i8* %10, i8* %11, i8* %12)
%14 = load i32, i32* @stdout
%15 = call i32 @fputs(i8* %2, i32 %14)
ret i32 0
}