#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*/ delay(int);
int /*<<< orphan*/ init_B20();
int /*<<< orphan*/ write_b20(int);
void start_shift_B20(void) {
  int m, n;
  init_B20();
  delay(54);
  write_b20(0xCC);
  delay(54);
  write_b20(0x44);
  for (n = 0; n <= 600; n++) {
    delay(120 * 38);
  }
  for (n = 0; n <= 1000; n++) {
    delay(120 * 38);
  }
}


x86 assembly (clang, -O0):
<start_shift_B20>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <init_B20@plt>
mov    $0x36,%edi
call   1030 <delay@plt>
mov    $0xcc,%edi
call   1040 <write_b20@plt>
mov    $0x36,%edi
call   1030 <delay@plt>
mov    $0x44,%edi
call   1040 <write_b20@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x258,-0x8(%rbp)
jg     1193 <start_shift_B20+0x63>
mov    $0x11d0,%edi
call   1030 <delay@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116e <start_shift_B20+0x3e>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jg     11bf <start_shift_B20+0x8f>
mov    $0x11d0,%edi
call   1030 <delay@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    119a <start_shift_B20+0x6a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_shift_B20>:
push   %rbx
xor    %eax,%eax
call   1050 <init_B20@plt>
mov    $0x36,%edi
call   1030 <delay@plt>
mov    $0xcc,%edi
call   1040 <write_b20@plt>
mov    $0x36,%edi
call   1030 <delay@plt>
mov    $0x44,%edi
call   1040 <write_b20@plt>
mov    $0x259,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x11d0,%edi
call   1030 <delay@plt>
add    $0xffffffff,%ebx
jne    1170 <start_shift_B20+0x40>
mov    $0x3e9,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x11d0,%edi
call   1030 <delay@plt>
add    $0xffffffff,%ebx
jne    1190 <start_shift_B20+0x60>
pop    %rbx
ret

LLVM IR (-O0):
define void @start_shift_B20() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @init_B20()
%4 = call i32 @delay(i32 54)
%5 = call i32 @write_b20(i32 204)
%6 = call i32 @delay(i32 54)
%7 = call i32 @write_b20(i32 68)
store i32 0, i32* %2
br label %8
8: ; preds = %13, %0
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 600
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = call i32 @delay(i32 4560)
br label %13
13: ; preds = %11
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %8
16: ; preds = %8
store i32 0, i32* %2
br label %17
17: ; preds = %22, %16
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 1000
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = call i32 @delay(i32 4560)
br label %22
22: ; preds = %20
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %17
25: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @start_shift_B20() {
%1 = tail call i32 (...) @init_B20()
%2 = tail call i32 @delay(i32 54)
%3 = tail call i32 @write_b20(i32 204)
%4 = tail call i32 @delay(i32 54)
%5 = tail call i32 @write_b20(i32 68)
br label %6
6: ; preds = %0, %6
%7 = phi i32 [ 0, %0 ], [ %9, %6 ]
%8 = tail call i32 @delay(i32 4560)
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, 601
br i1 %10, label %11, label %6
11: ; preds = %6, %11
%12 = phi i32 [ %14, %11 ], [ 0, %6 ]
%13 = tail call i32 @delay(i32 4560)
%14 = add nuw nsw i32 %12, 1
%15 = icmp eq i32 %14, 1001
br i1 %15, label %16, label %11
16: ; preds = %11
ret void
}