#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 */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void Delay10ms(uint32_t count) {
  uint32_t volatile time;
  while (count > 0) {
    time = 7272;
    while (time) {
      time--;
    }
    count--;
  }
}


x86 assembly (clang, -O0):
<Delay10ms>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    114b <Delay10ms+0x4b>
movq   $0x1c68,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    $0x0,%rax
je     113a <Delay10ms+0x3a>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    111b <Delay10ms+0x1b>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <Delay10ms+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Delay10ms>:
test   %rdi,%rdi
jle    1138 <Delay10ms+0x38>
mov    %rdi,%rax
test   $0x1,%dil
je     1132 <Delay10ms+0x32>
movq   $0x1c68,-0x8(%rsp)
cmpq   $0x0,-0x8(%rsp)
je     112e <Delay10ms+0x2e>
nop
addq   $0xffffffffffffffff,-0x8(%rsp)
cmpq   $0x0,-0x8(%rsp)
jne    1120 <Delay10ms+0x20>
lea    -0x1(%rdi),%rax
cmp    $0x1,%rdi
jne    114d <Delay10ms+0x4d>
ret
nopl   0x0(%rax)
lea    -0x2(%rax),%rcx
cmp    $0x2,%rax
mov    %rcx,%rax
jle    1138 <Delay10ms+0x38>
movq   $0x1c68,-0x8(%rsp)
cmpq   $0x0,-0x8(%rsp)
je     116e <Delay10ms+0x6e>
xchg   %ax,%ax
addq   $0xffffffffffffffff,-0x8(%rsp)
cmpq   $0x0,-0x8(%rsp)
jne    1160 <Delay10ms+0x60>
movq   $0x1c68,-0x8(%rsp)
cmpq   $0x0,-0x8(%rsp)
je     1140 <Delay10ms+0x40>
nop
addq   $0xffffffffffffffff,-0x8(%rsp)
cmpq   $0x0,-0x8(%rsp)
jne    1180 <Delay10ms+0x80>
jmp    1140 <Delay10ms+0x40>

LLVM IR (-O0):
define void @Delay10ms(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
br label %4
4: ; preds = %14, %1
%5 = load i64, i64* %2
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %4
store volatile i64 7272, i64* %3
br label %8
8: ; preds = %11, %7
%9 = load volatile i64, i64* %3
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load volatile i64, i64* %3
%13 = add nsw i64 %12, -1
store volatile i64 %13, i64* %3
br label %8
14: ; preds = %8
%15 = load i64, i64* %2
%16 = add nsw i64 %15, -1
store i64 %16, i64* %2
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @Delay10ms(i64 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = icmp sgt i64 %0, 0
br i1 %4, label %5, label %41
5: ; preds = %1
%6 = and i64 %0, 1
%7 = icmp eq i64 %6, 0
br i1 %7, label %18, label %8
8: ; preds = %5
store volatile i64 7272, i64* %2
%9 = load volatile i64, i64* %2
%10 = icmp eq i64 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %8, %11
%12 = load volatile i64, i64* %2
%13 = add nsw i64 %12, -1
store volatile i64 %13, i64* %2
%14 = load volatile i64, i64* %2
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %11
16: ; preds = %11, %8
%17 = add nsw i64 %0, -1
br label %18
18: ; preds = %16, %5
%19 = phi i64 [ %0, %5 ], [ %17, %16 ]
%20 = icmp eq i64 %0, 1
br i1 %20, label %41, label %21
21: ; preds = %18, %38
%22 = phi i64 [ %39, %38 ], [ %19, %18 ]
store volatile i64 7272, i64* %2
%23 = load volatile i64, i64* %2
%24 = icmp eq i64 %23, 0
br i1 %24, label %30, label %25
25: ; preds = %21, %25
%26 = load volatile i64, i64* %2
%27 = add nsw i64 %26, -1
store volatile i64 %27, i64* %2
%28 = load volatile i64, i64* %2
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %25
30: ; preds = %25, %21
store volatile i64 7272, i64* %2
%31 = load volatile i64, i64* %2
%32 = icmp eq i64 %31, 0
br i1 %32, label %38, label %33
33: ; preds = %30, %33
%34 = load volatile i64, i64* %2
%35 = add nsw i64 %34, -1
store volatile i64 %35, i64* %2
%36 = load volatile i64, i64* %2
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %33
38: ; preds = %33, %30
%39 = add nsw i64 %22, -2
%40 = icmp sgt i64 %22, 2
br i1 %40, label %21, label %41
41: ; preds = %18, %38, %1
ret void
}