#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 tl880_dev {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tl880_set_vip(struct tl880_dev *, int);
int /*<<< orphan*/ tl880_vpx_config(struct tl880_dev *);
int /*<<< orphan*/ tl880_write_regbits(struct tl880_dev *, int, int, int, int);
int /*<<< orphan*/ udelay(int);
void tl880_init_wintv_hd(struct tl880_dev *tl880dev) {
  tl880_write_regbits(tl880dev, 0x10198, 0xf, 8, 9);
  tl880_write_regbits(tl880dev, 0x10194, 0xf, 8, 0xff);
  tl880_write_regbits(tl880dev, 0x10190, 0xf, 8, 0xff);
  tl880_write_regbits(tl880dev, 0x10198, 0xf, 8, 9);
  tl880_write_regbits(tl880dev, 0x10190, 0x1b, 0x1a, 3);
  tl880_write_regbits(tl880dev, 0x10198, 4, 4, 1);
  udelay(1);
  tl880_write_regbits(tl880dev, 0x10194, 0xf, 0xf, 0);
  tl880_set_vip(tl880dev, 1);
  tl880_vpx_config(tl880dev);
}


x86 assembly (clang, -O0):
<tl880_init_wintv_hd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x10198,%esi
mov    $0xf,%edx
mov    $0x8,%ecx
mov    $0x9,%r8d
call   1030 <tl880_write_regbits@plt>
mov    -0x8(%rbp),%rdi
mov    $0x10194,%esi
mov    $0xf,%edx
mov    $0x8,%ecx
mov    $0xff,%r8d
call   1030 <tl880_write_regbits@plt>
mov    -0x8(%rbp),%rdi
mov    $0x10190,%esi
mov    $0xf,%edx
mov    $0x8,%ecx
mov    $0xff,%r8d
call   1030 <tl880_write_regbits@plt>
mov    -0x8(%rbp),%rdi
mov    $0x10198,%esi
mov    $0xf,%edx
mov    $0x8,%ecx
mov    $0x9,%r8d
call   1030 <tl880_write_regbits@plt>
mov    -0x8(%rbp),%rdi
mov    $0x10190,%esi
mov    $0x1b,%edx
mov    $0x1a,%ecx
mov    $0x3,%r8d
call   1030 <tl880_write_regbits@plt>
mov    -0x8(%rbp),%rdi
mov    $0x10198,%esi
mov    $0x4,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1030 <tl880_write_regbits@plt>
mov    $0x1,%edi
call   1040 <udelay@plt>
mov    -0x8(%rbp),%rdi
mov    $0x10194,%esi
mov    $0xf,%ecx
xor    %r8d,%r8d
mov    %ecx,%edx
call   1030 <tl880_write_regbits@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1060 <tl880_set_vip@plt>
mov    -0x8(%rbp),%rdi
call   1050 <tl880_vpx_config@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tl880_init_wintv_hd>:
push   %rbx
mov    %rdi,%rbx
mov    $0x10198,%esi
mov    $0xf,%edx
mov    $0x8,%ecx
mov    $0x9,%r8d
call   1030 <tl880_write_regbits@plt>
mov    %rbx,%rdi
mov    $0x10194,%esi
mov    $0xf,%edx
mov    $0x8,%ecx
mov    $0xff,%r8d
call   1030 <tl880_write_regbits@plt>
mov    %rbx,%rdi
mov    $0x10190,%esi
mov    $0xf,%edx
mov    $0x8,%ecx
mov    $0xff,%r8d
call   1030 <tl880_write_regbits@plt>
mov    %rbx,%rdi
mov    $0x10198,%esi
mov    $0xf,%edx
mov    $0x8,%ecx
mov    $0x9,%r8d
call   1030 <tl880_write_regbits@plt>
mov    %rbx,%rdi
mov    $0x10190,%esi
mov    $0x1b,%edx
mov    $0x1a,%ecx
mov    $0x3,%r8d
call   1030 <tl880_write_regbits@plt>
mov    %rbx,%rdi
mov    $0x10198,%esi
mov    $0x4,%edx
mov    $0x4,%ecx
mov    $0x1,%r8d
call   1030 <tl880_write_regbits@plt>
mov    $0x1,%edi
call   1040 <udelay@plt>
mov    %rbx,%rdi
mov    $0x10194,%esi
mov    $0xf,%edx
mov    $0xf,%ecx
xor    %r8d,%r8d
call   1030 <tl880_write_regbits@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1060 <tl880_set_vip@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <tl880_vpx_config@plt>

LLVM IR (-O0):
%struct.tl880_dev = type { i32 }
define void @tl880_init_wintv_hd(%struct.tl880_dev* %0) {
%2 = alloca %struct.tl880_dev*
store %struct.tl880_dev* %0, %struct.tl880_dev** %2
%3 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%4 = call i32 @tl880_write_regbits(%struct.tl880_dev* %3, i32 65944, i32 15, i32 8, i32 9)
%5 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%6 = call i32 @tl880_write_regbits(%struct.tl880_dev* %5, i32 65940, i32 15, i32 8, i32 255)
%7 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%8 = call i32 @tl880_write_regbits(%struct.tl880_dev* %7, i32 65936, i32 15, i32 8, i32 255)
%9 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%10 = call i32 @tl880_write_regbits(%struct.tl880_dev* %9, i32 65944, i32 15, i32 8, i32 9)
%11 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%12 = call i32 @tl880_write_regbits(%struct.tl880_dev* %11, i32 65936, i32 27, i32 26, i32 3)
%13 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%14 = call i32 @tl880_write_regbits(%struct.tl880_dev* %13, i32 65944, i32 4, i32 4, i32 1)
%15 = call i32 @udelay(i32 1)
%16 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%17 = call i32 @tl880_write_regbits(%struct.tl880_dev* %16, i32 65940, i32 15, i32 15, i32 0)
%18 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%19 = call i32 @tl880_set_vip(%struct.tl880_dev* %18, i32 1)
%20 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%21 = call i32 @tl880_vpx_config(%struct.tl880_dev* %20)
ret void
}

LLVM IR (-O2):
%struct.tl880_dev = type { i32 }
define void @tl880_init_wintv_hd(%struct.tl880_dev* %0) {
%2 = tail call i32 @tl880_write_regbits(%struct.tl880_dev* %0, i32 65944, i32 15, i32 8, i32 9)
%3 = tail call i32 @tl880_write_regbits(%struct.tl880_dev* %0, i32 65940, i32 15, i32 8, i32 255)
%4 = tail call i32 @tl880_write_regbits(%struct.tl880_dev* %0, i32 65936, i32 15, i32 8, i32 255)
%5 = tail call i32 @tl880_write_regbits(%struct.tl880_dev* %0, i32 65944, i32 15, i32 8, i32 9)
%6 = tail call i32 @tl880_write_regbits(%struct.tl880_dev* %0, i32 65936, i32 27, i32 26, i32 3)
%7 = tail call i32 @tl880_write_regbits(%struct.tl880_dev* %0, i32 65944, i32 4, i32 4, i32 1)
%8 = tail call i32 @udelay(i32 1)
%9 = tail call i32 @tl880_write_regbits(%struct.tl880_dev* %0, i32 65940, i32 15, i32 15, i32 0)
%10 = tail call i32 @tl880_set_vip(%struct.tl880_dev* %0, i32 1)
%11 = tail call i32 @tl880_vpx_config(%struct.tl880_dev* %0)
ret void
}