#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int x0;
  int y0;
  int x1;
  int color;
  int /*<<< orphan*/ cmd;
};
typedef TYPE_1__ osd_cmd_t;

/* Variables and functions */
int /*<<< orphan*/ OSD_FillRow;
int /*<<< orphan*/ OSD_SEND_CMD;
int ioctl(int, int /*<<< orphan*/, TYPE_1__ *);
int OSDFillRow(int dev, int x, int y, int x1, int color) {
  osd_cmd_t dc;
  dc.cmd = OSD_FillRow;
  dc.x0 = x;
  dc.y0 = y;
  dc.x1 = x1;
  dc.color = color;
  return ioctl(dev, OSD_SEND_CMD, &dc);
}


x86 assembly (clang, -O0):
<OSDFillRow>:
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    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
lea    -0x28(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSDFillRow>:
sub    $0x18,%rsp
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
mov    %esi,(%rsp)
mov    %edx,0x4(%rsp)
mov    %ecx,0x8(%rsp)
mov    %r8d,0xc(%rsp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32, i32, i32, i32 }
@OSD_FillRow = global i32 0
@OSD_SEND_CMD = global i32 0
define i32 @OSDFillRow(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.TYPE_3__
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* @OSD_FillRow
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 4
store i32 %12, i32* %13
%14 = load i32, i32* %7
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 0
store i32 %14, i32* %15
%16 = load i32, i32* %8
%17 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 1
store i32 %16, i32* %17
%18 = load i32, i32* %9
%19 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 2
store i32 %18, i32* %19
%20 = load i32, i32* %10
%21 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 3
store i32 %20, i32* %21
%22 = load i32, i32* %6
%23 = load i32, i32* @OSD_SEND_CMD
%24 = call i32 @ioctl(i32 %22, i32 %23, %struct.TYPE_3__* %11)
ret i32 %24
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32, i32, i32, i32 }
@OSD_FillRow = global i32 0
@OSD_SEND_CMD = global i32 0
define i32 @OSDFillRow(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.TYPE_3__
%7 = bitcast %struct.TYPE_3__* %6 to i8*
%8 = load i32, i32* @OSD_FillRow
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i64 0, i32 4
store i32 %8, i32* %9
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i64 0, i32 0
store i32 %1, i32* %10
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i64 0, i32 1
store i32 %2, i32* %11
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i64 0, i32 2
store i32 %3, i32* %12
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i64 0, i32 3
store i32 %4, i32* %13
%14 = load i32, i32* @OSD_SEND_CMD
%15 = call i32 @ioctl(i32 %0, i32 %14, %struct.TYPE_3__* %6)
ret i32 %15
}