#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*/ JTAG_DELAY();
int /*<<< orphan*/ JTAG_Reset();
int /*<<< orphan*/ JTAG_SET(int);
void JTAG_RunTestldleState(void) {
  JTAG_Reset();
  JTAG_SET((1 << 3) | 0 | 0);
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | (1 << 2));
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | 0);
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | (1 << 2));
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | 0);
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | (1 << 2));
  JTAG_DELAY();
}


x86 assembly (clang, -O0):
<JTAG_RunTestldleState>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <JTAG_Reset@plt>
mov    $0x8,%edi
call   1050 <JTAG_SET@plt>
mov    $0x0,%al
call   1030 <JTAG_DELAY@plt>
mov    $0xc,%edi
call   1050 <JTAG_SET@plt>
mov    $0x0,%al
call   1030 <JTAG_DELAY@plt>
mov    $0x8,%edi
call   1050 <JTAG_SET@plt>
mov    $0x0,%al
call   1030 <JTAG_DELAY@plt>
mov    $0xc,%edi
call   1050 <JTAG_SET@plt>
mov    $0x0,%al
call   1030 <JTAG_DELAY@plt>
mov    $0x8,%edi
call   1050 <JTAG_SET@plt>
mov    $0x0,%al
call   1030 <JTAG_DELAY@plt>
mov    $0xc,%edi
call   1050 <JTAG_SET@plt>
mov    $0x0,%al
call   1030 <JTAG_DELAY@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<JTAG_RunTestldleState>:
push   %rax
xor    %eax,%eax
call   1040 <JTAG_Reset@plt>
mov    $0x8,%edi
call   1050 <JTAG_SET@plt>
xor    %eax,%eax
call   1030 <JTAG_DELAY@plt>
mov    $0xc,%edi
call   1050 <JTAG_SET@plt>
xor    %eax,%eax
call   1030 <JTAG_DELAY@plt>
mov    $0x8,%edi
call   1050 <JTAG_SET@plt>
xor    %eax,%eax
call   1030 <JTAG_DELAY@plt>
mov    $0xc,%edi
call   1050 <JTAG_SET@plt>
xor    %eax,%eax
call   1030 <JTAG_DELAY@plt>
mov    $0x8,%edi
call   1050 <JTAG_SET@plt>
xor    %eax,%eax
call   1030 <JTAG_DELAY@plt>
mov    $0xc,%edi
call   1050 <JTAG_SET@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <JTAG_DELAY@plt>

LLVM IR (-O0):
define void @JTAG_RunTestldleState() {
%1 = call i32 (...) @JTAG_Reset()
%2 = call i32 @JTAG_SET(i32 8)
%3 = call i32 (...) @JTAG_DELAY()
%4 = call i32 @JTAG_SET(i32 12)
%5 = call i32 (...) @JTAG_DELAY()
%6 = call i32 @JTAG_SET(i32 8)
%7 = call i32 (...) @JTAG_DELAY()
%8 = call i32 @JTAG_SET(i32 12)
%9 = call i32 (...) @JTAG_DELAY()
%10 = call i32 @JTAG_SET(i32 8)
%11 = call i32 (...) @JTAG_DELAY()
%12 = call i32 @JTAG_SET(i32 12)
%13 = call i32 (...) @JTAG_DELAY()
ret void
}

LLVM IR (-O2):
define void @JTAG_RunTestldleState() {
%1 = tail call i32 (...) @JTAG_Reset()
%2 = tail call i32 @JTAG_SET(i32 8)
%3 = tail call i32 (...) @JTAG_DELAY()
%4 = tail call i32 @JTAG_SET(i32 12)
%5 = tail call i32 (...) @JTAG_DELAY()
%6 = tail call i32 @JTAG_SET(i32 8)
%7 = tail call i32 (...) @JTAG_DELAY()
%8 = tail call i32 @JTAG_SET(i32 12)
%9 = tail call i32 (...) @JTAG_DELAY()
%10 = tail call i32 @JTAG_SET(i32 8)
%11 = tail call i32 (...) @JTAG_DELAY()
%12 = tail call i32 @JTAG_SET(i32 12)
%13 = tail call i32 (...) @JTAG_DELAY()
ret void
}