#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 uint8_t;
struct timeval {
  int member_0;
  int /*<<< orphan*/ member_1;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void set_socket_option(int socket, uint8_t ip_ttl) {
  uint8_t One = 1;
  int result;
  struct timeval timeout = {2, 0};
  fprintf(stderr, "No way to set the timeout value for incoming packets on "
                  "that platform.\n");
  fprintf(
      stderr,
      "No way to set the TTL value for leaving packets on that platform.\n");
  fprintf(stderr,
          "No way to ask for the TTL of incoming packets on that platform.\n");
  fprintf(stderr,
          "No way to ask for the TOS of incoming packets on that platform.\n");
}


x86 assembly (clang, -O0):
<set_socket_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xefb(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
lea    0xf29(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
lea    0xf55(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_socket_option>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf19(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf4e(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf81(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@__const.set_socket_option.timeout = %struct.timeval { i32 2, i32 0 }
@stderr = global i32 0
@.str = [72 x i8] c"No way to set the timeout value for incoming packets on that platform.\0A\00"
@.str.1 = [67 x i8] c"No way to set the TTL value for leaving packets on that platform.\0A\00"
@.str.2 = [65 x i8] c"No way to ask for the TTL of incoming packets on that platform.\0A\00"
@.str.3 = [65 x i8] c"No way to ask for the TOS of incoming packets on that platform.\0A\00"
define void @set_socket_option(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.timeval
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 1, i32* %5
%8 = bitcast %struct.timeval* %7 to i8*
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [72 x i8] c"No way to set the timeout value for incoming packets on that platform.\0A\00"
@.str.1 = [67 x i8] c"No way to set the TTL value for leaving packets on that platform.\0A\00"
@.str.2 = [65 x i8] c"No way to ask for the TTL of incoming packets on that platform.\0A\00"
@.str.3 = [65 x i8] c"No way to ask for the TOS of incoming packets on that platform.\0A\00"
define void @set_socket_option(i32 %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0))
ret void
}