#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 unsigned int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ D8Led_symbol(int);
int /*<<< orphan*/ Delay(int);
int /*<<< orphan*/ push_debug(unsigned int, unsigned int);
void mostrar_error_8led(uint8_t error, uint32_t dir_causante) {
  push_debug((unsigned int)0xDEB5 + error, (unsigned int)dir_causante);
  uint8_t mostrar_error = 0;
  uint32_t codigo;
  if (error == 0) {
    codigo = 0x1;
  } else if (error == 1) {
    codigo = 0x2;
  } else {
    codigo = 0x3;
  }
  while (1) {
    if (mostrar_error == 0) {
      D8Led_symbol(0xE);
      mostrar_error = 1;
    } else if (mostrar_error == 1) {
      D8Led_symbol(codigo);
      mostrar_error = 2;
    } else {
      D8Led_symbol(0x10);
      mostrar_error = 0;
    }
    Delay(10000);
  }
}


x86 assembly (clang, -O0):
<mostrar_error_8led>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    $0xdeb5,%edi
mov    -0x8(%rbp),%esi
call   1040 <push_debug@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    116c <mostrar_error_8led+0x3c>
movl   $0x1,-0x10(%rbp)
jmp    118e <mostrar_error_8led+0x5e>
cmpl   $0x1,-0x4(%rbp)
jne    1182 <mostrar_error_8led+0x52>
movl   $0x2,-0x10(%rbp)
jmp    1189 <mostrar_error_8led+0x59>
movl   $0x3,-0x10(%rbp)
jmp    118e <mostrar_error_8led+0x5e>
jmp    1193 <mostrar_error_8led+0x63>
cmpl   $0x0,-0xc(%rbp)
jne    11b3 <mostrar_error_8led+0x83>
mov    $0xe,%edi
call   1050 <D8Led_symbol@plt>
movl   $0x1,-0xc(%rbp)
jmp    11e7 <mostrar_error_8led+0xb7>
cmpl   $0x1,-0xc(%rbp)
jne    11d1 <mostrar_error_8led+0xa1>
mov    -0x10(%rbp),%edi
call   1050 <D8Led_symbol@plt>
movl   $0x2,-0xc(%rbp)
jmp    11e2 <mostrar_error_8led+0xb2>
mov    $0x10,%edi
call   1050 <D8Led_symbol@plt>
movl   $0x0,-0xc(%rbp)
jmp    11e7 <mostrar_error_8led+0xb7>
mov    $0x2710,%edi
call   1030 <Delay@plt>
jmp    1193 <mostrar_error_8led+0x63>

x86 assembly (clang, -O2):
<mostrar_error_8led>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xdeb5(%rbx),%edi
call   1040 <push_debug@plt>
xor    %ebp,%ebp
cmp    $0x1,%ebx
sete   %bpl
xor    $0x3,%ebp
test   %ebx,%ebx
mov    $0x1,%eax
cmove  %eax,%ebp
xor    %ebx,%ebx
jmp    1176 <mostrar_error_8led+0x46>
nopw   0x0(%rax,%rax,1)
xor    %ebx,%ebx
mov    $0x10,%edi
call   1050 <D8Led_symbol@plt>
mov    $0x2710,%edi
call   1030 <Delay@plt>
test   %ebx,%ebx
je     1190 <mostrar_error_8led+0x60>
cmp    $0x1,%ebx
jne    1160 <mostrar_error_8led+0x30>
mov    $0x2,%ebx
mov    %ebp,%edi
jmp    1167 <mostrar_error_8led+0x37>
nopl   0x0(%rax,%rax,1)
mov    $0xe,%edi
mov    $0x1,%ebx
jmp    1167 <mostrar_error_8led+0x37>

LLVM IR (-O0):
define void @mostrar_error_8led(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = add i32 57013, %7
%9 = load i32, i32* %4
%10 = call i32 @push_debug(i32 %8, i32 %9)
store i32 0, i32* %5
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 1, i32* %6
br label %20
14: ; preds = %2
%15 = load i32, i32* %3
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 2, i32* %6
br label %19
18: ; preds = %14
store i32 3, i32* %6
br label %19
19: ; preds = %18, %17
br label %20
20: ; preds = %19, %13
br label %21
21: ; preds = %20, %35
%22 = load i32, i32* %5
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @D8Led_symbol(i32 14)
store i32 1, i32* %5
br label %35
26: ; preds = %21
%27 = load i32, i32* %5
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i32, i32* %6
%31 = call i32 @D8Led_symbol(i32 %30)
store i32 2, i32* %5
br label %34
32: ; preds = %26
%33 = call i32 @D8Led_symbol(i32 16)
store i32 0, i32* %5
br label %34
34: ; preds = %32, %29
br label %35
35: ; preds = %34, %24
%36 = call i32 @Delay(i32 10000)
br label %21
}

LLVM IR (-O2):
define void @mostrar_error_8led(i32 %0, i32 %1) {
%3 = add i32 %0, 57013
%4 = tail call i32 @push_debug(i32 %3, i32 %1)
%5 = icmp eq i32 %0, 1
%6 = select i1 %5, i32 2, i32 3
%7 = icmp eq i32 %0, 0
%8 = select i1 %7, i32 1, i32 %6
br label %9
9: ; preds = %13, %2
%10 = phi i32 [ 0, %2 ], [ %15, %13 ]
switch i32 %10, label %12 [
i32 0, label %13
i32 1, label %11
]
11: ; preds = %9
br label %13
12: ; preds = %9
br label %13
13: ; preds = %9, %11, %12
%14 = phi i32 [ %8, %11 ], [ 16, %12 ], [ 14, %9 ]
%15 = phi i32 [ 2, %11 ], [ 0, %12 ], [ 1, %9 ]
%16 = tail call i32 @D8Led_symbol(i32 %14)
%17 = tail call i32 @Delay(i32 10000)
br label %9
}