#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*/ McDevIf_AddPacket(int, unsigned char);
int /*<<< orphan*/ McDevIf_ExecutePacket();
int /*<<< orphan*/ McDevIf_ReadDirect(int, unsigned char *);
void FifoStop(void) {
  unsigned char bData;
  unsigned char bData2;
  McDevIf_ReadDirect(((0x00004000UL) | (unsigned long)(15)), &bData);
  McDevIf_ReadDirect(((0x00004000UL) | (unsigned long)(16)), &bData2);
  bData &= (unsigned char)~(0x02);
  McDevIf_AddPacket(((0x20000000UL) | (0x00004000UL) | (unsigned long)(15)),
                    bData);
  bData2 &= (unsigned char)~((0x0C) | (0xC0));
  McDevIf_AddPacket(((0x10000000UL) | (0x00004000UL) | (unsigned long)(16)),
                    bData2);
  McDevIf_ExecutePacket();
}


x86 assembly (clang, -O0):
<FifoStop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x400f,%edi
lea    -0x1(%rbp),%rsi
call   1030 <McDevIf_ReadDirect@plt>
mov    $0x4010,%edi
lea    -0x2(%rbp),%rsi
call   1030 <McDevIf_ReadDirect@plt>
movzbl -0x1(%rbp),%eax
and    $0xfd,%eax
mov    %al,-0x1(%rbp)
mov    $0x2000400f,%edi
movzbl -0x1(%rbp),%esi
call   1050 <McDevIf_AddPacket@plt>
movzbl -0x2(%rbp),%eax
and    $0x33,%eax
mov    %al,-0x2(%rbp)
mov    $0x10004010,%edi
movzbl -0x2(%rbp),%esi
call   1050 <McDevIf_AddPacket@plt>
mov    $0x0,%al
call   1040 <McDevIf_ExecutePacket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FifoStop>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x400f,%edi
call   1030 <McDevIf_ReadDirect@plt>
lea    0x6(%rsp),%rsi
mov    $0x4010,%edi
call   1030 <McDevIf_ReadDirect@plt>
movzbl 0x7(%rsp),%esi
and    $0xfffffffd,%esi
mov    %sil,0x7(%rsp)
mov    $0x2000400f,%edi
call   1050 <McDevIf_AddPacket@plt>
movzbl 0x6(%rsp),%esi
and    $0x33,%esi
mov    %sil,0x6(%rsp)
mov    $0x10004010,%edi
call   1050 <McDevIf_AddPacket@plt>
xor    %eax,%eax
call   1040 <McDevIf_ExecutePacket@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @FifoStop() {
%1 = alloca i8
%2 = alloca i8
%3 = call i32 @McDevIf_ReadDirect(i32 16399, i8* %1)
%4 = call i32 @McDevIf_ReadDirect(i32 16400, i8* %2)
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = and i32 %6, 253
%8 = trunc i32 %7 to i8
store i8 %8, i8* %1
%9 = load i8, i8* %1
%10 = call i32 @McDevIf_AddPacket(i32 536887311, i8 zeroext %9)
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = and i32 %12, 51
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
%15 = load i8, i8* %2
%16 = call i32 @McDevIf_AddPacket(i32 268451856, i8 zeroext %15)
%17 = call i32 (...) @McDevIf_ExecutePacket()
ret void
}

LLVM IR (-O2):
define void @FifoStop() {
%1 = alloca i8
%2 = alloca i8
%3 = call i32 @McDevIf_ReadDirect(i32 16399, i8* %1)
%4 = call i32 @McDevIf_ReadDirect(i32 16400, i8* %2)
%5 = load i8, i8* %1
%6 = and i8 %5, -3
store i8 %6, i8* %1
%7 = call i32 @McDevIf_AddPacket(i32 536887311, i8 zeroext %6)
%8 = load i8, i8* %2
%9 = and i8 %8, 51
store i8 %9, i8* %2
%10 = call i32 @McDevIf_AddPacket(i32 268451856, i8 zeroext %9)
%11 = call i32 (...) @McDevIf_ExecutePacket()
ret void
}