#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*/ esperar();
int main(void) {
  volatile unsigned char *puerto_b = (unsigned char *)0x25;
  volatile unsigned char *ddr_b = (unsigned char *)0x24;
  *puerto_b = *puerto_b & (~(0x20));
  *(ddr_b) = *(ddr_b) | ((0x20));
  while (1) {
    *puerto_b = *puerto_b | (0x20);
    esperar();
    *puerto_b = *puerto_b & (~(0x20));
    esperar();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x25,%eax
mov    %rax,-0x10(%rbp)
mov    $0x24,%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
movzbl %al,%eax
and    $0xffffffdf,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
movzbl %al,%eax
or     $0x20,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
movzbl %al,%eax
or     $0x20,%eax
mov    %eax,-0x20(%rbp)
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    $0x0,%al
call   1030 <esperar@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
movzbl %al,%eax
and    $0xffffffdf,%eax
mov    %eax,-0x1c(%rbp)
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    $0x0,%al
call   1030 <esperar@plt>
jmp    1159 <main+0x49>

x86 assembly (clang, -O2):
<main>:
push   %rax
andb   $0xdf,0x25
df
orb    $0x20,0x24
20
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
orb    $0x20,0x25
20
xor    %eax,%eax
call   1030 <esperar@plt>
andb   $0xdf,0x25
df
xor    %eax,%eax
call   1030 <esperar@plt>
jmp    1130 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* inttoptr (i64 37 to i8*), i8** %2
store i8* inttoptr (i64 36 to i8*), i8** %3
%4 = load i8*, i8** %2
%5 = load volatile i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, -33
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %2
store volatile i8 %8, i8* %9
%10 = load i8*, i8** %3
%11 = load volatile i8, i8* %10
%12 = zext i8 %11 to i32
%13 = or i32 %12, 32
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
store volatile i8 %14, i8* %15
br label %16
16: ; preds = %0, %16
%17 = load i8*, i8** %2
%18 = load volatile i8, i8* %17
%19 = zext i8 %18 to i32
%20 = or i32 %19, 32
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %2
store volatile i8 %21, i8* %22
%23 = call i32 (...) @esperar()
%24 = load i8*, i8** %2
%25 = load volatile i8, i8* %24
%26 = zext i8 %25 to i32
%27 = and i32 %26, -33
%28 = trunc i32 %27 to i8
%29 = load i8*, i8** %2
store volatile i8 %28, i8* %29
%30 = call i32 (...) @esperar()
br label %16
}

LLVM IR (-O2):
define i32 @main() {
%1 = load volatile i8, i8* inttoptr (i64 37 to i8*)
%2 = and i8 %1, -33
store volatile i8 %2, i8* inttoptr (i64 37 to i8*)
%3 = load volatile i8, i8* inttoptr (i64 36 to i8*)
%4 = or i8 %3, 32
store volatile i8 %4, i8* inttoptr (i64 36 to i8*)
br label %5
5: ; preds = %5, %0
%6 = load volatile i8, i8* inttoptr (i64 37 to i8*)
%7 = or i8 %6, 32
store volatile i8 %7, i8* inttoptr (i64 37 to i8*)
%8 = tail call i32 (...) @esperar()
%9 = load volatile i8, i8* inttoptr (i64 37 to i8*)
%10 = and i8 %9, -33
store volatile i8 %10, i8* inttoptr (i64 37 to i8*)
%11 = tail call i32 (...) @esperar()
br label %5
}