#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*/ setled(unsigned char, unsigned char, int /*<<< orphan*/);
clearsym(unsigned char row, unsigned char col) {
  unsigned char r, c;
  row *= 11;
  col *= 11;
  for (r = 0; r < 10; r++) {
    for (c = 0; c < 10; c++) {
      setled(row + r, col + c, 0);
    }
  }
}


x86 assembly (clang, -O0):
<clearsym>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movzbl -0x5(%rbp),%eax
imul   $0xb,%eax,%eax
mov    %al,-0x5(%rbp)
movzbl -0x6(%rbp),%eax
imul   $0xb,%eax,%eax
mov    %al,-0x6(%rbp)
movb   $0x0,-0x7(%rbp)
movzbl -0x7(%rbp),%eax
cmp    $0xa,%eax
jge    119c <clearsym+0x8c>
movb   $0x0,-0x8(%rbp)
movzbl -0x8(%rbp),%eax
cmp    $0xa,%eax
jge    118a <clearsym+0x7a>
movzbl -0x5(%rbp),%eax
movzbl -0x7(%rbp),%ecx
add    %ecx,%eax
mov    %al,%cl
movzbl -0x6(%rbp),%eax
movzbl -0x8(%rbp),%edx
add    %edx,%eax
xor    %edx,%edx
movzbl %cl,%edi
movzbl %al,%esi
call   1030 <setled@plt>
mov    -0x8(%rbp),%al
add    $0x1,%al
mov    %al,-0x8(%rbp)
jmp    114d <clearsym+0x3d>
jmp    118f <clearsym+0x7f>
mov    -0x7(%rbp),%al
add    $0x1,%al
mov    %al,-0x7(%rbp)
jmp    113c <clearsym+0x2c>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearsym>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    (%rdi,%rdi,4),%eax
lea    (%rdi,%rax,2),%eax
mov    %rax,0x20(%rsp)
lea    (%rsi,%rsi,4),%eax
lea    (%rsi,%rax,2),%eax
lea    0x1(%rax),%r8d
lea    0x2(%rax),%r9d
lea    0x3(%rax),%r10d
lea    0x4(%rax),%r11d
lea    0x5(%rax),%ebx
lea    0x6(%rax),%ecx
lea    0x7(%rax),%edx
lea    0x8(%rax),%esi
xor    %ebp,%ebp
movzbl %al,%edi
mov    %edi,0x1c(%rsp)
add    $0x9,%al
movzbl %r8b,%edi
mov    %edi,0x18(%rsp)
movzbl %r9b,%edi
mov    %edi,0x14(%rsp)
movzbl %r10b,%edi
mov    %edi,0x10(%rsp)
movzbl %r11b,%edi
mov    %edi,0xc(%rsp)
movzbl %bl,%edi
mov    %edi,0x8(%rsp)
movzbl %cl,%r14d
movzbl %dl,%r15d
movzbl %sil,%r12d
movzbl %al,%r13d
nopl   (%rax)
mov    0x20(%rsp),%rax
add    %ebp,%eax
movzbl %al,%ebx
mov    %ebx,%edi
mov    0x1c(%rsp),%esi
xor    %edx,%edx
call   1030 <setled@plt>
mov    %ebx,%edi
mov    0x18(%rsp),%esi
xor    %edx,%edx
call   1030 <setled@plt>
mov    %ebx,%edi
mov    0x14(%rsp),%esi
xor    %edx,%edx
call   1030 <setled@plt>
mov    %ebx,%edi
mov    0x10(%rsp),%esi
xor    %edx,%edx
call   1030 <setled@plt>
mov    %ebx,%edi
mov    0xc(%rsp),%esi
xor    %edx,%edx
call   1030 <setled@plt>
mov    %ebx,%edi
mov    0x8(%rsp),%esi
xor    %edx,%edx
call   1030 <setled@plt>
mov    %ebx,%edi
mov    %r14d,%esi
xor    %edx,%edx
call   1030 <setled@plt>
mov    %ebx,%edi
mov    %r15d,%esi
xor    %edx,%edx
call   1030 <setled@plt>
mov    %ebx,%edi
mov    %r12d,%esi
xor    %edx,%edx
call   1030 <setled@plt>
mov    %ebx,%edi
mov    %r13d,%esi
xor    %edx,%edx
call   1030 <setled@plt>
add    $0x1,%bpl
cmp    $0xa,%bpl
jne    1190 <clearsym+0x80>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @clearsym(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = mul nsw i32 %9, 11
%11 = trunc i32 %10 to i8
store i8 %11, i8* %4
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = mul nsw i32 %13, 11
%15 = trunc i32 %14 to i8
store i8 %15, i8* %5
store i8 0, i8* %6
br label %16
16: ; preds = %43, %2
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = icmp slt i32 %18, 10
br i1 %19, label %20, label %46
20: ; preds = %16
store i8 0, i8* %7
br label %21
21: ; preds = %39, %20
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = icmp slt i32 %23, 10
br i1 %24, label %25, label %42
25: ; preds = %21
%26 = load i8, i8* %4
%27 = zext i8 %26 to i32
%28 = load i8, i8* %6
%29 = zext i8 %28 to i32
%30 = add nsw i32 %27, %29
%31 = trunc i32 %30 to i8
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = load i8, i8* %7
%35 = zext i8 %34 to i32
%36 = add nsw i32 %33, %35
%37 = trunc i32 %36 to i8
%38 = call i32 @setled(i8 zeroext %31, i8 zeroext %37, i32 0)
br label %39
39: ; preds = %25
%40 = load i8, i8* %7
%41 = add i8 %40, 1
store i8 %41, i8* %7
br label %21
42: ; preds = %21
br label %43
43: ; preds = %42
%44 = load i8, i8* %6
%45 = add i8 %44, 1
store i8 %45, i8* %6
br label %16
46: ; preds = %16
%47 = load i32, i32* %3
ret i32 %47
}

LLVM IR (-O2):
define i32 @clearsym(i8 zeroext %0, i8 zeroext %1) {
%3 = mul i8 %0, 11
%4 = mul i8 %1, 11
%5 = add i8 %4, 1
%6 = add i8 %4, 2
%7 = add i8 %4, 3
%8 = add i8 %4, 4
%9 = add i8 %4, 5
%10 = add i8 %4, 6
%11 = add i8 %4, 7
%12 = add i8 %4, 8
%13 = add i8 %4, 9
br label %14
14: ; preds = %2, %14
%15 = phi i8 [ 0, %2 ], [ %27, %14 ]
%16 = add i8 %15, %3
%17 = tail call i32 @setled(i8 zeroext %16, i8 zeroext %4, i32 0)
%18 = tail call i32 @setled(i8 zeroext %16, i8 zeroext %5, i32 0)
%19 = tail call i32 @setled(i8 zeroext %16, i8 zeroext %6, i32 0)
%20 = tail call i32 @setled(i8 zeroext %16, i8 zeroext %7, i32 0)
%21 = tail call i32 @setled(i8 zeroext %16, i8 zeroext %8, i32 0)
%22 = tail call i32 @setled(i8 zeroext %16, i8 zeroext %9, i32 0)
%23 = tail call i32 @setled(i8 zeroext %16, i8 zeroext %10, i32 0)
%24 = tail call i32 @setled(i8 zeroext %16, i8 zeroext %11, i32 0)
%25 = tail call i32 @setled(i8 zeroext %16, i8 zeroext %12, i32 0)
%26 = tail call i32 @setled(i8 zeroext %16, i8 zeroext %13, i32 0)
%27 = add nuw nsw i8 %15, 1
%28 = icmp eq i8 %27, 10
br i1 %28, label %29, label %14
29: ; preds = %14
ret i32 undef
}