#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*/ hlines(unsigned char *, int, int, int, int, float, int);
int /*<<< orphan*/ vlines(unsigned char *, int, int, int, int, float,
                          int /*<<< orphan*/);
void mreza(unsigned char *sl, int w, int h, int size1, int size2, float ar) {
  hlines(sl, w, h, size1, size2, ar, 1);
  vlines(sl, w, h, size1 / ar, size2, ar, 0);
}


x86 assembly (clang, -O0):
<mreza>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
movss  -0x1c(%rbp),%xmm0
mov    $0x1,%r9d
call   1030 <hlines@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
cvtsi2ssl -0x14(%rbp),%xmm0
divss  -0x1c(%rbp),%xmm0
cvttss2si %xmm0,%ecx
mov    -0x18(%rbp),%r8d
movss  -0x1c(%rbp),%xmm0
xor    %r9d,%r9d
call   1040 <vlines@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mreza>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %esi,%r12d
mov    %rdi,%rbx
mov    $0x1,%r9d
call   1030 <hlines@plt>
cvtsi2ss %ebp,%xmm1
movss  0xc(%rsp),%xmm0
divss  %xmm0,%xmm1
cvttss2si %xmm1,%ecx
mov    %rbx,%rdi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %r14d,%r8d
xor    %r9d,%r9d
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <vlines@plt>

LLVM IR (-O0):
define void @mreza(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, float %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca float
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store float %5, float* %12
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load float, float* %12
%19 = call i32 @hlines(i8* %13, i32 %14, i32 %15, i32 %16, i32 %17, float %18, i32 1)
%20 = load i8*, i8** %7
%21 = load i32, i32* %8
%22 = load i32, i32* %9
%23 = load i32, i32* %10
%24 = sitofp i32 %23 to float
%25 = load float, float* %12
%26 = fdiv float %24, %25
%27 = fptosi float %26 to i32
%28 = load i32, i32* %11
%29 = load float, float* %12
%30 = call i32 @vlines(i8* %20, i32 %21, i32 %22, i32 %27, i32 %28, float %29, i32 0)
ret void
}

LLVM IR (-O2):
define void @mreza(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, float %5) {
%7 = tail call i32 @hlines(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, float %5, i32 1)
%8 = sitofp i32 %3 to float
%9 = fdiv float %8, %5
%10 = fptosi float %9 to i32
%11 = tail call i32 @vlines(i8* %0, i32 %1, i32 %2, i32 %10, i32 %4, float %5, i32 0)
ret void
}