#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 ifreq {
  int ifr_mtu;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void do_exit(int x, short int line) {
  struct ifreq ifr;
  fprintf(stderr, "\n\nEthStatus-v%s - %s", "0.4a",
          "Gabriel Montenegro / Christoph Haas");
  fprintf(stdout, "\n %d \n", ifr.ifr_mtu);
  fprintf(stdout, "Exiting...\n\n");
  exit(0);
}


x86 assembly (clang, -O0):
<do_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
lea    0xebe(%rip),%rsi
lea    0xecc(%rip),%rdx
lea    0xeca(%rip),%rcx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%edx
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<do_exit>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xedd(%rip),%rdx
lea    0xedb(%rip),%rcx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e8b(%rip),%rbx
mov    (%rbx),%edi
lea    0xee8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
%struct.ifreq = type { i32 }
@stderr = global i32 0
@.str = [21 x i8] c"\0A\0AEthStatus-v%s - %s\00"
@.str.1 = [5 x i8] c"0.4a\00"
@.str.2 = [36 x i8] c"Gabriel Montenegro / Christoph Haas\00"
@stdout = global i32 0
@.str.3 = [7 x i8] c"\0A %d \0A\00"
@.str.4 = [13 x i8] c"Exiting...\0A\0A\00"
define void @do_exit(i32 %0, i16 signext %1) {
%3 = alloca i32
%4 = alloca i16
%5 = alloca %struct.ifreq
store i32 %0, i32* %3
store i16 %1, i16* %4
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %5, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @stdout
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"\0A\0AEthStatus-v%s - %s\00"
@.str.1 = [5 x i8] c"0.4a\00"
@.str.2 = [36 x i8] c"Gabriel Montenegro / Christoph Haas\00"
@stdout = global i32 0
@.str.3 = [7 x i8] c"\0A %d \0A\00"
@.str.4 = [13 x i8] c"Exiting...\0A\0A\00"
define void @do_exit(i32 %0, i16 signext %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 undef)
%7 = load i32, i32* @stdout
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%9 = tail call i32 @exit(i32 0)
unreachable
}