#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_wait_us(int);
int /*<<< orphan*/ delay_wait_us_ms(int);
void makeUseOfTimerWait(unsigned char val) {
  delay_wait_us(10);
  (*(volatile unsigned char *)((0x14) + 0x20)) |= 0x10;
  delay_wait_us(10);
  (*(volatile unsigned char *)((0x11) + 0x20)) |= 0x20;
  delay_wait_us(20);
  (*(volatile unsigned char *)((0x15) + 0x20)) &= ~0x10;
  delay_wait_us(10);
  (*(volatile unsigned char *)((0x12) + 0x20)) &= ~0x20;
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  delay_wait_us_ms(5);
  (*(volatile unsigned char *)((0x15) + 0x20)) |= val & 0x10;
  delay_wait_us(10);
  (*(volatile unsigned char *)((0x12) + 0x20)) |= val & 0x20;
  delay_wait_us(10);
}


x86 assembly (clang, -O0):
<makeUseOfTimerWait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xa,%edi
call   1030 <delay_wait_us@plt>
mov    $0x34,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x10,%eax
mov    %al,%cl
mov    $0x34,%eax
mov    %cl,(%rax)
mov    $0xa,%edi
call   1030 <delay_wait_us@plt>
mov    $0x31,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x20,%eax
mov    %al,%cl
mov    $0x31,%eax
mov    %cl,(%rax)
mov    $0x14,%edi
call   1030 <delay_wait_us@plt>
mov    $0x35,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0xffffffef,%eax
mov    %al,%cl
mov    $0x35,%eax
mov    %cl,(%rax)
mov    $0xa,%edi
call   1030 <delay_wait_us@plt>
mov    $0x32,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0xffffffdf,%eax
mov    %al,%cl
mov    $0x32,%eax
mov    %cl,(%rax)
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
movzbl -0x1(%rbp),%ecx
and    $0x10,%ecx
mov    $0x35,%eax
mov    (%rax),%al
movzbl %al,%eax
or     %ecx,%eax
mov    %al,%cl
mov    $0x35,%eax
mov    %cl,(%rax)
mov    $0xa,%edi
call   1030 <delay_wait_us@plt>
movzbl -0x1(%rbp),%ecx
and    $0x20,%ecx
mov    $0x32,%eax
mov    (%rax),%al
movzbl %al,%eax
or     %ecx,%eax
mov    %al,%cl
mov    $0x32,%eax
mov    %cl,(%rax)
mov    $0xa,%edi
call   1030 <delay_wait_us@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeUseOfTimerWait>:
push   %rbx
mov    %edi,%ebx
mov    $0xa,%edi
call   1030 <delay_wait_us@plt>
orb    $0x10,0x34
10
mov    $0xa,%edi
call   1030 <delay_wait_us@plt>
orb    $0x20,0x31
20
mov    $0x14,%edi
call   1030 <delay_wait_us@plt>
andb   $0xef,0x35
ef
mov    $0xa,%edi
call   1030 <delay_wait_us@plt>
andb   $0xdf,0x32
df
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    $0x5,%edi
call   1040 <delay_wait_us_ms@plt>
mov    %ebx,%eax
and    $0x10,%al
or     %al,0x35
mov    $0xa,%edi
call   1030 <delay_wait_us@plt>
and    $0x20,%bl
or     %bl,0x32
mov    $0xa,%edi
pop    %rbx
jmp    1030 <delay_wait_us@plt>

LLVM IR (-O0):
define void @makeUseOfTimerWait(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @delay_wait_us(i32 10)
%4 = load volatile i8, i8* inttoptr (i64 52 to i8*)
%5 = zext i8 %4 to i32
%6 = or i32 %5, 16
%7 = trunc i32 %6 to i8
store volatile i8 %7, i8* inttoptr (i64 52 to i8*)
%8 = call i32 @delay_wait_us(i32 10)
%9 = load volatile i8, i8* inttoptr (i64 49 to i8*)
%10 = zext i8 %9 to i32
%11 = or i32 %10, 32
%12 = trunc i32 %11 to i8
store volatile i8 %12, i8* inttoptr (i64 49 to i8*)
%13 = call i32 @delay_wait_us(i32 20)
%14 = load volatile i8, i8* inttoptr (i64 53 to i8*)
%15 = zext i8 %14 to i32
%16 = and i32 %15, -17
%17 = trunc i32 %16 to i8
store volatile i8 %17, i8* inttoptr (i64 53 to i8*)
%18 = call i32 @delay_wait_us(i32 10)
%19 = load volatile i8, i8* inttoptr (i64 50 to i8*)
%20 = zext i8 %19 to i32
%21 = and i32 %20, -33
%22 = trunc i32 %21 to i8
store volatile i8 %22, i8* inttoptr (i64 50 to i8*)
%23 = call i32 @delay_wait_us_ms(i32 5)
%24 = call i32 @delay_wait_us_ms(i32 5)
%25 = call i32 @delay_wait_us_ms(i32 5)
%26 = call i32 @delay_wait_us_ms(i32 5)
%27 = call i32 @delay_wait_us_ms(i32 5)
%28 = call i32 @delay_wait_us_ms(i32 5)
%29 = call i32 @delay_wait_us_ms(i32 5)
%30 = call i32 @delay_wait_us_ms(i32 5)
%31 = call i32 @delay_wait_us_ms(i32 5)
%32 = call i32 @delay_wait_us_ms(i32 5)
%33 = call i32 @delay_wait_us_ms(i32 5)
%34 = call i32 @delay_wait_us_ms(i32 5)
%35 = call i32 @delay_wait_us_ms(i32 5)
%36 = call i32 @delay_wait_us_ms(i32 5)
%37 = call i32 @delay_wait_us_ms(i32 5)
%38 = call i32 @delay_wait_us_ms(i32 5)
%39 = call i32 @delay_wait_us_ms(i32 5)
%40 = call i32 @delay_wait_us_ms(i32 5)
%41 = call i32 @delay_wait_us_ms(i32 5)
%42 = call i32 @delay_wait_us_ms(i32 5)
%43 = load i8, i8* %2
%44 = zext i8 %43 to i32
%45 = and i32 %44, 16
%46 = load volatile i8, i8* inttoptr (i64 53 to i8*)
%47 = zext i8 %46 to i32
%48 = or i32 %47, %45
%49 = trunc i32 %48 to i8
store volatile i8 %49, i8* inttoptr (i64 53 to i8*)
%50 = call i32 @delay_wait_us(i32 10)
%51 = load i8, i8* %2
%52 = zext i8 %51 to i32
%53 = and i32 %52, 32
%54 = load volatile i8, i8* inttoptr (i64 50 to i8*)
%55 = zext i8 %54 to i32
%56 = or i32 %55, %53
%57 = trunc i32 %56 to i8
store volatile i8 %57, i8* inttoptr (i64 50 to i8*)
%58 = call i32 @delay_wait_us(i32 10)
ret void
}

LLVM IR (-O2):
define void @makeUseOfTimerWait(i8 zeroext %0) {
%2 = tail call i32 @delay_wait_us(i32 10)
%3 = load volatile i8, i8* inttoptr (i64 52 to i8*)
%4 = or i8 %3, 16
store volatile i8 %4, i8* inttoptr (i64 52 to i8*)
%5 = tail call i32 @delay_wait_us(i32 10)
%6 = load volatile i8, i8* inttoptr (i64 49 to i8*)
%7 = or i8 %6, 32
store volatile i8 %7, i8* inttoptr (i64 49 to i8*)
%8 = tail call i32 @delay_wait_us(i32 20)
%9 = load volatile i8, i8* inttoptr (i64 53 to i8*)
%10 = and i8 %9, -17
store volatile i8 %10, i8* inttoptr (i64 53 to i8*)
%11 = tail call i32 @delay_wait_us(i32 10)
%12 = load volatile i8, i8* inttoptr (i64 50 to i8*)
%13 = and i8 %12, -33
store volatile i8 %13, i8* inttoptr (i64 50 to i8*)
%14 = tail call i32 @delay_wait_us_ms(i32 5)
%15 = tail call i32 @delay_wait_us_ms(i32 5)
%16 = tail call i32 @delay_wait_us_ms(i32 5)
%17 = tail call i32 @delay_wait_us_ms(i32 5)
%18 = tail call i32 @delay_wait_us_ms(i32 5)
%19 = tail call i32 @delay_wait_us_ms(i32 5)
%20 = tail call i32 @delay_wait_us_ms(i32 5)
%21 = tail call i32 @delay_wait_us_ms(i32 5)
%22 = tail call i32 @delay_wait_us_ms(i32 5)
%23 = tail call i32 @delay_wait_us_ms(i32 5)
%24 = tail call i32 @delay_wait_us_ms(i32 5)
%25 = tail call i32 @delay_wait_us_ms(i32 5)
%26 = tail call i32 @delay_wait_us_ms(i32 5)
%27 = tail call i32 @delay_wait_us_ms(i32 5)
%28 = tail call i32 @delay_wait_us_ms(i32 5)
%29 = tail call i32 @delay_wait_us_ms(i32 5)
%30 = tail call i32 @delay_wait_us_ms(i32 5)
%31 = tail call i32 @delay_wait_us_ms(i32 5)
%32 = tail call i32 @delay_wait_us_ms(i32 5)
%33 = tail call i32 @delay_wait_us_ms(i32 5)
%34 = and i8 %0, 16
%35 = load volatile i8, i8* inttoptr (i64 53 to i8*)
%36 = or i8 %35, %34
store volatile i8 %36, i8* inttoptr (i64 53 to i8*)
%37 = tail call i32 @delay_wait_us(i32 10)
%38 = and i8 %0, 32
%39 = load volatile i8, i8* inttoptr (i64 50 to i8*)
%40 = or i8 %39, %38
store volatile i8 %40, i8* inttoptr (i64 50 to i8*)
%41 = tail call i32 @delay_wait_us(i32 10)
ret void
}