#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 */
void *hex2data(int, char const *);
int /*<<< orphan*/ sendBytetoMo(char);
void eval_send_gen_message(const char in[]) {
  int si = hex2data(2, in);
  int i;
  for (i = 0; i < si; i++) {
    char me = hex2data(2, in + 2 + 2 * i);
    sendBytetoMo(me);
  };
}


x86 assembly (clang, -O0):
<eval_send_gen_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x2,%edi
call   1030 <hex2data@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1187 <eval_send_gen_message+0x67>
mov    -0x8(%rbp),%rsi
add    $0x2,%rsi
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
cltq
add    %rax,%rsi
mov    $0x2,%edi
call   1030 <hex2data@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%edi
call   1040 <sendBytetoMo@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <eval_send_gen_message+0x24>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_send_gen_message>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x2,%edi
mov    %r14,%rsi
call   1030 <hex2data@plt>
test   %eax,%eax
jle    115f <eval_send_gen_message+0x3f>
add    $0x2,%r14
mov    %eax,%ebx
xchg   %ax,%ax
mov    $0x2,%edi
mov    %r14,%rsi
call   1030 <hex2data@plt>
movsbl %al,%edi
call   1040 <sendBytetoMo@plt>
add    $0x2,%r14
add    $0xffffffffffffffff,%rbx
jne    1140 <eval_send_gen_message+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @eval_send_gen_message(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @hex2data(i32 2, i8* %6)
%8 = ptrtoint i8* %7 to i32
store i32 %8, i32* %3
store i32 0, i32* %4
br label %9
9: ; preds = %24, %1
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %27
13: ; preds = %9
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i32, i32* %4
%17 = mul nsw i32 2, %16
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
%20 = call i8* @hex2data(i32 2, i8* %19)
%21 = ptrtoint i8* %20 to i8
store i8 %21, i8* %5
%22 = load i8, i8* %5
%23 = call i32 @sendBytetoMo(i8 signext %22)
br label %24
24: ; preds = %13
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %9
27: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @eval_send_gen_message(i8* %0) {
%2 = tail call i8* @hex2data(i32 2, i8* %0)
%3 = ptrtoint i8* %2 to i64
%4 = trunc i64 %3 to i32
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %19
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = and i64 %3, 4294967295
br label %9
9: ; preds = %6, %9
%10 = phi i64 [ 0, %6 ], [ %17, %9 ]
%11 = shl nuw nsw i64 %10, 1
%12 = getelementptr inbounds i8, i8* %7, i64 %11
%13 = tail call i8* @hex2data(i32 2, i8* %12)
%14 = ptrtoint i8* %13 to i64
%15 = trunc i64 %14 to i8
%16 = tail call i32 @sendBytetoMo(i8 signext %15)
%17 = add nuw nsw i64 %10, 1
%18 = icmp eq i64 %17, %8
br i1 %18, label %19, label %9
19: ; preds = %9, %1
ret void
}