#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) {
  if (ar == 0)
    ar = 1.0;
  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)
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1162 <mreza+0x42>
jp     1162 <mreza+0x42>
movss  0xea3(%rip),%xmm0
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
mov    %r8d,%r14d
mov    %ecx,%ebx
mov    %edx,%r15d
mov    %esi,%r12d
mov    %rdi,%rbp
xorps  %xmm2,%xmm2
cmpeqss %xmm0,%xmm2
movss  0xeb6(%rip),%xmm1
andps  %xmm2,%xmm1
andnps %xmm0,%xmm2
orps   %xmm1,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,(%rsp)
mov    $0x1,%r9d
call   1030 <hlines@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %ebx,%xmm1
movaps (%rsp),%xmm0
divss  %xmm0,%xmm1
cvttss2si %xmm1,%ecx
mov    %rbp,%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 float, float* %12
%14 = fcmp oeq float %13, 0.000000e+00
br i1 %14, label %15, label %16
15: ; preds = %6
store float 1.000000e+00, float* %12
br label %16
16: ; preds = %15, %6
%17 = load i8*, i8** %7
%18 = load i32, i32* %8
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = load i32, i32* %11
%22 = load float, float* %12
%23 = call i32 @hlines(i8* %17, i32 %18, i32 %19, i32 %20, i32 %21, float %22, i32 1)
%24 = load i8*, i8** %7
%25 = load i32, i32* %8
%26 = load i32, i32* %9
%27 = load i32, i32* %10
%28 = sitofp i32 %27 to float
%29 = load float, float* %12
%30 = fdiv float %28, %29
%31 = fptosi float %30 to i32
%32 = load i32, i32* %11
%33 = load float, float* %12
%34 = call i32 @vlines(i8* %24, i32 %25, i32 %26, i32 %31, i32 %32, float %33, i32 0)
ret void
}

LLVM IR (-O2):
define void @mreza(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, float %5) {
%7 = fcmp oeq float %5, 0.000000e+00
%8 = select i1 %7, float 1.000000e+00, float %5
%9 = tail call i32 @hlines(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, float %8, i32 1)
%10 = sitofp i32 %3 to float
%11 = fdiv float %10, %8
%12 = fptosi float %11 to i32
%13 = tail call i32 @vlines(i8* %0, i32 %1, i32 %2, i32 %12, i32 %4, float %8, i32 0)
ret void
}