#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*/ debug_writereg(int, int);
int /*<<< orphan*/ printf(char *);
void debug_newbit(void) {
  printf("Debugging NEW bit\r\n");
  debug_writereg(0x004, 0x01);
  debug_writereg(0x104, 0x02);
  debug_writereg(0x105, 0x00);
  debug_writereg(0x004, 0x03);
  debug_writereg(0x104, 0x04);
  debug_writereg(0x105, 0x01);
  debug_writereg(0x004, 0x05);
  debug_writereg(0x104, 0x06);
  debug_writereg(0x105, 0x00);
  debug_writereg(0x004, 0x07);
  debug_writereg(0x104, 0x08);
}


x86 assembly (clang, -O0):
<debug_newbit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <debug_writereg@plt>
mov    $0x104,%edi
mov    $0x2,%esi
call   1030 <debug_writereg@plt>
mov    $0x105,%edi
xor    %esi,%esi
call   1030 <debug_writereg@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1030 <debug_writereg@plt>
mov    $0x104,%edi
mov    $0x4,%esi
call   1030 <debug_writereg@plt>
mov    $0x105,%edi
mov    $0x1,%esi
call   1030 <debug_writereg@plt>
mov    $0x4,%edi
mov    $0x5,%esi
call   1030 <debug_writereg@plt>
mov    $0x104,%edi
mov    $0x6,%esi
call   1030 <debug_writereg@plt>
mov    $0x105,%edi
xor    %esi,%esi
call   1030 <debug_writereg@plt>
mov    $0x4,%edi
mov    $0x7,%esi
call   1030 <debug_writereg@plt>
mov    $0x104,%edi
mov    $0x8,%esi
call   1030 <debug_writereg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_newbit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x4,%edi
mov    $0x1,%esi
call   1040 <debug_writereg@plt>
mov    $0x104,%edi
mov    $0x2,%esi
call   1040 <debug_writereg@plt>
mov    $0x105,%edi
xor    %esi,%esi
call   1040 <debug_writereg@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <debug_writereg@plt>
mov    $0x104,%edi
mov    $0x4,%esi
call   1040 <debug_writereg@plt>
mov    $0x105,%edi
mov    $0x1,%esi
call   1040 <debug_writereg@plt>
mov    $0x4,%edi
mov    $0x5,%esi
call   1040 <debug_writereg@plt>
mov    $0x104,%edi
mov    $0x6,%esi
call   1040 <debug_writereg@plt>
mov    $0x105,%edi
xor    %esi,%esi
call   1040 <debug_writereg@plt>
mov    $0x4,%edi
mov    $0x7,%esi
call   1040 <debug_writereg@plt>
mov    $0x104,%edi
mov    $0x8,%esi
pop    %rax
jmp    1040 <debug_writereg@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Debugging NEW bit\0D\0A\00"
define void @debug_newbit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @debug_writereg(i32 4, i32 1)
%3 = call i32 @debug_writereg(i32 260, i32 2)
%4 = call i32 @debug_writereg(i32 261, i32 0)
%5 = call i32 @debug_writereg(i32 4, i32 3)
%6 = call i32 @debug_writereg(i32 260, i32 4)
%7 = call i32 @debug_writereg(i32 261, i32 1)
%8 = call i32 @debug_writereg(i32 4, i32 5)
%9 = call i32 @debug_writereg(i32 260, i32 6)
%10 = call i32 @debug_writereg(i32 261, i32 0)
%11 = call i32 @debug_writereg(i32 4, i32 7)
%12 = call i32 @debug_writereg(i32 260, i32 8)
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"Debugging NEW bit\0D\00"
define void @debug_newbit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @debug_writereg(i32 4, i32 1)
%3 = tail call i32 @debug_writereg(i32 260, i32 2)
%4 = tail call i32 @debug_writereg(i32 261, i32 0)
%5 = tail call i32 @debug_writereg(i32 4, i32 3)
%6 = tail call i32 @debug_writereg(i32 260, i32 4)
%7 = tail call i32 @debug_writereg(i32 261, i32 1)
%8 = tail call i32 @debug_writereg(i32 4, i32 5)
%9 = tail call i32 @debug_writereg(i32 260, i32 6)
%10 = tail call i32 @debug_writereg(i32 261, i32 0)
%11 = tail call i32 @debug_writereg(i32 4, i32 7)
%12 = tail call i32 @debug_writereg(i32 260, i32 8)
ret void
}