#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*/ port_out(unsigned int, int);
int /*<<< orphan*/ timing_uPause(int);
void stv5730_write0bit(unsigned int port, unsigned int flags) {
  timing_uPause(400);
  port_out(port, 0x08 + flags);
  timing_uPause(400);
  port_out(port, 0x08 + 0x04 + flags);
  timing_uPause(400);
  port_out(port, 0x04 + flags);
  timing_uPause(400);
  port_out(port, 0x08 + 0x04 + flags);
  timing_uPause(400);
  port_out(port, 0x08 + flags);
}


x86 assembly (clang, -O0):
<stv5730_write0bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x190,%edi
call   1030 <timing_uPause@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x8,%esi
call   1040 <port_out@plt>
mov    $0x190,%edi
call   1030 <timing_uPause@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0xc,%esi
call   1040 <port_out@plt>
mov    $0x190,%edi
call   1030 <timing_uPause@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x4,%esi
call   1040 <port_out@plt>
mov    $0x190,%edi
call   1030 <timing_uPause@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0xc,%esi
call   1040 <port_out@plt>
mov    $0x190,%edi
call   1030 <timing_uPause@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x8,%esi
call   1040 <port_out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stv5730_write0bit>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x190,%edi
call   1030 <timing_uPause@plt>
lea    0x8(%rbp),%r14d
mov    %ebx,%edi
mov    %r14d,%esi
call   1040 <port_out@plt>
mov    $0x190,%edi
call   1030 <timing_uPause@plt>
lea    0xc(%rbp),%r15d
mov    %ebx,%edi
mov    %r15d,%esi
call   1040 <port_out@plt>
mov    $0x190,%edi
call   1030 <timing_uPause@plt>
add    $0x4,%ebp
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <port_out@plt>
mov    $0x190,%edi
call   1030 <timing_uPause@plt>
mov    %ebx,%edi
mov    %r15d,%esi
call   1040 <port_out@plt>
mov    $0x190,%edi
call   1030 <timing_uPause@plt>
mov    %ebx,%edi
mov    %r14d,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <port_out@plt>

LLVM IR (-O0):
define void @stv5730_write0bit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @timing_uPause(i32 400)
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add i32 8, %7
%9 = call i32 @port_out(i32 %6, i32 %8)
%10 = call i32 @timing_uPause(i32 400)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = add i32 12, %12
%14 = call i32 @port_out(i32 %11, i32 %13)
%15 = call i32 @timing_uPause(i32 400)
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = add i32 4, %17
%19 = call i32 @port_out(i32 %16, i32 %18)
%20 = call i32 @timing_uPause(i32 400)
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = add i32 12, %22
%24 = call i32 @port_out(i32 %21, i32 %23)
%25 = call i32 @timing_uPause(i32 400)
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = add i32 8, %27
%29 = call i32 @port_out(i32 %26, i32 %28)
ret void
}

LLVM IR (-O2):
define void @stv5730_write0bit(i32 %0, i32 %1) {
%3 = tail call i32 @timing_uPause(i32 400)
%4 = add i32 %1, 8
%5 = tail call i32 @port_out(i32 %0, i32 %4)
%6 = tail call i32 @timing_uPause(i32 400)
%7 = add i32 %1, 12
%8 = tail call i32 @port_out(i32 %0, i32 %7)
%9 = tail call i32 @timing_uPause(i32 400)
%10 = add i32 %1, 4
%11 = tail call i32 @port_out(i32 %0, i32 %10)
%12 = tail call i32 @timing_uPause(i32 400)
%13 = tail call i32 @port_out(i32 %0, i32 %7)
%14 = tail call i32 @timing_uPause(i32 400)
%15 = tail call i32 @port_out(i32 %0, i32 %4)
ret void
}