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

/* Variables and functions */
int /*<<< orphan*/ drawLine(int, int, int, int);
void drawM(uint32_t row, uint32_t column) {
  uint32_t baseX = 112 + (column * 133);
  uint32_t baseY = 34 + (row * 116);
  drawLine(baseX + 10, baseY + 106, baseX + 10, baseY + 10);
  drawLine(baseX + 10, baseY + 10, baseX + 66, baseY + 106);
  drawLine(baseX + 66, baseY + 106, baseX + 123, baseY + 10);
  drawLine(baseX + 123, baseY + 10, baseX + 123, baseY + 106);
}


x86 assembly (clang, -O0):
<drawM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x85,-0x8(%rbp),%eax
add    $0x70,%eax
mov    %eax,-0xc(%rbp)
imul   $0x74,-0x4(%rbp),%eax
add    $0x22,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
add    $0xa,%edi
mov    -0x10(%rbp),%esi
add    $0x6a,%esi
mov    -0xc(%rbp),%edx
add    $0xa,%edx
mov    -0x10(%rbp),%ecx
add    $0xa,%ecx
call   1030 <drawLine@plt>
mov    -0xc(%rbp),%edi
add    $0xa,%edi
mov    -0x10(%rbp),%esi
add    $0xa,%esi
mov    -0xc(%rbp),%edx
add    $0x42,%edx
mov    -0x10(%rbp),%ecx
add    $0x6a,%ecx
call   1030 <drawLine@plt>
mov    -0xc(%rbp),%edi
add    $0x42,%edi
mov    -0x10(%rbp),%esi
add    $0x6a,%esi
mov    -0xc(%rbp),%edx
add    $0x7b,%edx
mov    -0x10(%rbp),%ecx
add    $0xa,%ecx
call   1030 <drawLine@plt>
mov    -0xc(%rbp),%edi
add    $0x7b,%edi
mov    -0x10(%rbp),%esi
add    $0xa,%esi
mov    -0xc(%rbp),%edx
add    $0x7b,%edx
mov    -0x10(%rbp),%ecx
add    $0x6a,%ecx
call   1030 <drawLine@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawM>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
imul   $0x85,%esi,%r14d
imul   $0x74,%edi,%ebx
lea    0x7a(%r14),%ebp
lea    0x8c(%rbx),%r15d
add    $0x2c,%ebx
mov    %ebp,%edi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1030 <drawLine@plt>
lea    0xb2(%r14),%r12d
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r12d,%edx
mov    %r15d,%ecx
call   1030 <drawLine@plt>
add    $0xeb,%r14d
mov    %r12d,%edi
mov    %r15d,%esi
mov    %r14d,%edx
mov    %ebx,%ecx
call   1030 <drawLine@plt>
mov    %r14d,%edi
mov    %ebx,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <drawLine@plt>

LLVM IR (-O0):
define void @drawM(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* %4
%8 = mul nsw i32 %7, 133
%9 = add nsw i32 112, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = mul nsw i32 %10, 116
%12 = add nsw i32 34, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 10
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 106
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 10
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 10
%21 = call i32 @drawLine(i32 %14, i32 %16, i32 %18, i32 %20)
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 10
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 10
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 66
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 106
%30 = call i32 @drawLine(i32 %23, i32 %25, i32 %27, i32 %29)
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 66
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 106
%35 = load i32, i32* %5
%36 = add nsw i32 %35, 123
%37 = load i32, i32* %6
%38 = add nsw i32 %37, 10
%39 = call i32 @drawLine(i32 %32, i32 %34, i32 %36, i32 %38)
%40 = load i32, i32* %5
%41 = add nsw i32 %40, 123
%42 = load i32, i32* %6
%43 = add nsw i32 %42, 10
%44 = load i32, i32* %5
%45 = add nsw i32 %44, 123
%46 = load i32, i32* %6
%47 = add nsw i32 %46, 106
%48 = call i32 @drawLine(i32 %41, i32 %43, i32 %45, i32 %47)
ret void
}

LLVM IR (-O2):
define void @drawM(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, 133
%4 = mul nsw i32 %0, 116
%5 = add nsw i32 %3, 122
%6 = add nsw i32 %4, 140
%7 = add nsw i32 %4, 44
%8 = tail call i32 @drawLine(i32 %5, i32 %6, i32 %5, i32 %7)
%9 = add nsw i32 %3, 178
%10 = tail call i32 @drawLine(i32 %5, i32 %7, i32 %9, i32 %6)
%11 = add nsw i32 %3, 235
%12 = tail call i32 @drawLine(i32 %9, i32 %6, i32 %11, i32 %7)
%13 = tail call i32 @drawLine(i32 %11, i32 %7, i32 %11, i32 %6)
ret void
}