#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*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *,
                           char *, char *, char *);
int /*<<< orphan*/ stdout;
int dump_offload(int rx, int tx, int sg, int tso, int ufo, int gso) {
  fprintf(stdout,
          "rx-checksumming: %s\n"
          "tx-checksumming: %s\n"
          "scatter-gather: %s\n"
          "tcp segmentation offload: %s\n"
          "udp fragmentation offload: %s\n"
          "generic segmentation offload: %s\n",
          rx ? "on" : "off", tx ? "on" : "off", sg ? "on" : "off",
          tso ? "on" : "off", ufo ? "on" : "off", gso ? "on" : "off");
  return 0;
}


x86 assembly (clang, -O0):
<dump_offload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
lea    0xf5c(%rip),%rdx
lea    0xf52(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x8(%rbp),%esi
lea    0xf44(%rip),%rcx
lea    0xf3a(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%rcx
mov    -0xc(%rbp),%esi
lea    0xf2c(%rip),%r8
lea    0xf22(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r8
mov    -0x10(%rbp),%esi
lea    0xf14(%rip),%r9
lea    0xf0a(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r9
mov    -0x14(%rbp),%esi
lea    0xefc(%rip),%r10
lea    0xef2(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r10
mov    -0x18(%rbp),%r11d
lea    0xee3(%rip),%rax
lea    0xed9(%rip),%rsi
cmp    $0x0,%r11d
cmovne %rsi,%rax
lea    0xe32(%rip),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_offload>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
lea    0xf7a(%rip),%r14
lea    0xf70(%rip),%rax
mov    %rax,%r10
cmove  %r14,%r10
test   %esi,%esi
mov    %rax,%r11
cmove  %r14,%r11
test   %edx,%edx
mov    %rax,%r15
cmove  %r14,%r15
test   %ecx,%ecx
mov    %rax,%rbx
cmove  %r14,%rbx
mov    0x2e8f(%rip),%rcx
test   %r8d,%r8d
mov    %rax,%r12
cmove  %r14,%r12
mov    (%rcx),%edi
test   %r9d,%r9d
cmove  %r14,%rax
lea    0xe95(%rip),%rsi
mov    %r10,%rdx
mov    %r11,%rcx
mov    %r15,%r8
mov    %rbx,%r9
push   %rax
push   %r12
call   1030 <fprintf@plt>
add    $0x10,%rsp
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [152 x i8] c"rx-checksumming: %s\0Atx-checksumming: %s\0Ascatter-gather: %s\0Atcp segmentation offload: %s\0Audp fragmentation offload: %s\0Ageneric segmentation offload: %s\0A\00"
@.str.1 = [3 x i8] c"on\00"
@.str.2 = [4 x i8] c"off\00"
define i32 @dump_offload(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* @stdout
%14 = load i32, i32* %7
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%18 = load i32, i32* %8
%19 = icmp ne i32 %18, 0
%20 = zext i1 %19 to i64
%21 = select i1 %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%22 = load i32, i32* %9
%23 = icmp ne i32 %22, 0
%24 = zext i1 %23 to i64
%25 = select i1 %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%26 = load i32, i32* %10
%27 = icmp ne i32 %26, 0
%28 = zext i1 %27 to i64
%29 = select i1 %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%30 = load i32, i32* %11
%31 = icmp ne i32 %30, 0
%32 = zext i1 %31 to i64
%33 = select i1 %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%34 = load i32, i32* %12
%35 = icmp ne i32 %34, 0
%36 = zext i1 %35 to i64
%37 = select i1 %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%38 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %21, i8* %25, i8* %29, i8* %33, i8* %37)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [152 x i8] c"rx-checksumming: %s\0Atx-checksumming: %s\0Ascatter-gather: %s\0Atcp segmentation offload: %s\0Audp fragmentation offload: %s\0Ageneric segmentation offload: %s\0A\00"
@.str.1 = [3 x i8] c"on\00"
@.str.2 = [4 x i8] c"off\00"
define i32 @dump_offload(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = load i32, i32* @stdout
%8 = icmp eq i32 %0, 0
%9 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%10 = icmp eq i32 %1, 0
%11 = select i1 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%12 = icmp eq i32 %2, 0
%13 = select i1 %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%14 = icmp eq i32 %3, 0
%15 = select i1 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%16 = icmp eq i32 %4, 0
%17 = select i1 %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%18 = icmp eq i32 %5, 0
%19 = select i1 %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%20 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %11, i8* %13, i8* %15, i8* %17, i8* %19)
ret i32 0
}