#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*/ __ASM(char *);
void delay() {
  unsigned int i;
  for (i = 0; i < 20; i++) {
    __ASM("nop");
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x14,-0x4(%rbp)
jae    1143 <delay+0x33>
lea    0xed0(%rip),%rdi
call   1030 <__ASM@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <delay+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
call   1030 <__ASM@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <__ASM@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"nop\00"
define void @delay() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp ult i32 %3, 20
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"nop\00"
define void @delay() {
%1 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%14 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%15 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%16 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%17 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%18 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%19 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%20 = tail call i32 @__ASM(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}