#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(int);
int /*<<< orphan*/ itob(int, int, int *);
int /*<<< orphan*/ itobInterruptor(int, int, int *);
int /*<<< orphan*/ pinMode(int, int);
int /*<<< orphan*/ scheduler_realtime();
int /*<<< orphan*/ scheduler_standard();
int /*<<< orphan*/ transmit(int, int, int *, int *);
int dioSend(int pin, int sender, int interruptor, int value) {
  int bit2[26] = {};
  int bit2Interruptor[4] = {};
  scheduler_realtime();
  pinMode(pin, 1);
  itob(sender, 26, bit2);
  itobInterruptor(interruptor, 4, bit2Interruptor);
  int i;
  for (i = 0; i < 5; i++) {
    transmit(pin, value, bit2, bit2Interruptor);
    delay(10);
  }
  scheduler_standard();
}


x86 assembly (clang, -O0):
<dioSend>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x68,%edx
call   1050 <memset@plt>
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <memset@plt>
mov    $0x0,%al
call   1060 <scheduler_realtime@plt>
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   10a0 <pinMode@plt>
mov    -0xc(%rbp),%edi
lea    -0x80(%rbp),%rdx
mov    $0x1a,%esi
call   1080 <itob@plt>
mov    -0x10(%rbp),%edi
lea    -0x90(%rbp),%rdx
mov    $0x4,%esi
call   1030 <itobInterruptor@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0x5,-0x94(%rbp)
jge    123e <dioSend+0xbe>
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
lea    -0x80(%rbp),%rdx
lea    -0x90(%rbp),%rcx
call   1090 <transmit@plt>
mov    $0xa,%edi
call   1070 <delay@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    11fd <dioSend+0x7d>
mov    $0x0,%al
call   1040 <scheduler_standard@plt>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dioSend>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x80,%rsp
mov    %ecx,%ebx
mov    %edx,%r12d
mov    %esi,%r15d
mov    %edi,%ebp
xorps  %xmm0,%xmm0
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x70(%rsp)
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <scheduler_realtime@plt>
mov    %ebp,%edi
mov    $0x1,%esi
call   1090 <pinMode@plt>
lea    0x10(%rsp),%r14
mov    %r15d,%edi
mov    $0x1a,%esi
mov    %r14,%rdx
call   1070 <itob@plt>
mov    %rsp,%r15
mov    %r12d,%edi
mov    $0x4,%esi
mov    %r15,%rdx
call   1030 <itobInterruptor@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14,%rdx
mov    %r15,%rcx
call   1080 <transmit@plt>
mov    $0xa,%edi
call   1060 <delay@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14,%rdx
mov    %r15,%rcx
call   1080 <transmit@plt>
mov    $0xa,%edi
call   1060 <delay@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14,%rdx
mov    %r15,%rcx
call   1080 <transmit@plt>
mov    $0xa,%edi
call   1060 <delay@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14,%rdx
mov    %r15,%rcx
call   1080 <transmit@plt>
mov    $0xa,%edi
call   1060 <delay@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14,%rdx
mov    %r15,%rcx
call   1080 <transmit@plt>
mov    $0xa,%edi
call   1060 <delay@plt>
xor    %eax,%eax
call   1040 <scheduler_standard@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @dioSend(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [26 x i32]
%11 = alloca [4 x i32]
%12 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%13 = bitcast [26 x i32]* %10 to i8*
%14 = bitcast [4 x i32]* %11 to i8*
%15 = call i32 (...) @scheduler_realtime()
%16 = load i32, i32* %6
%17 = call i32 @pinMode(i32 %16, i32 1)
%18 = load i32, i32* %7
%19 = getelementptr inbounds [26 x i32], [26 x i32]* %10, i64 0, i64 0
%20 = call i32 @itob(i32 %18, i32 26, i32* %19)
%21 = load i32, i32* %8
%22 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
%23 = call i32 @itobInterruptor(i32 %21, i32 4, i32* %22)
store i32 0, i32* %12
br label %24
24: ; preds = %34, %4
%25 = load i32, i32* %12
%26 = icmp slt i32 %25, 5
br i1 %26, label %27, label %37
27: ; preds = %24
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = getelementptr inbounds [26 x i32], [26 x i32]* %10, i64 0, i64 0
%31 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
%32 = call i32 @transmit(i32 %28, i32 %29, i32* %30, i32* %31)
%33 = call i32 @delay(i32 10)
br label %34
34: ; preds = %27
%35 = load i32, i32* %12
%36 = add nsw i32 %35, 1
store i32 %36, i32* %12
br label %24
37: ; preds = %24
%38 = call i32 (...) @scheduler_standard()
%39 = load i32, i32* %5
ret i32 %39
}

LLVM IR (-O2):
define i32 @dioSend(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [26 x i32]
%6 = alloca [4 x i32]
%7 = bitcast [26 x i32]* %5 to i8*
%8 = bitcast [4 x i32]* %6 to i8*
%9 = tail call i32 (...) @scheduler_realtime()
%10 = tail call i32 @pinMode(i32 %0, i32 1)
%11 = getelementptr inbounds [26 x i32], [26 x i32]* %5, i64 0, i64 0
%12 = call i32 @itob(i32 %1, i32 26, i32* %11)
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%14 = call i32 @itobInterruptor(i32 %2, i32 4, i32* %13)
%15 = call i32 @transmit(i32 %0, i32 %3, i32* %11, i32* %13)
%16 = call i32 @delay(i32 10)
%17 = call i32 @transmit(i32 %0, i32 %3, i32* %11, i32* %13)
%18 = call i32 @delay(i32 10)
%19 = call i32 @transmit(i32 %0, i32 %3, i32* %11, i32* %13)
%20 = call i32 @delay(i32 10)
%21 = call i32 @transmit(i32 %0, i32 %3, i32* %11, i32* %13)
%22 = call i32 @delay(i32 10)
%23 = call i32 @transmit(i32 %0, i32 %3, i32* %11, i32* %13)
%24 = call i32 @delay(i32 10)
%25 = call i32 (...) @scheduler_standard()
ret i32 undef
}