#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 */
double atof(char *);
int atoi(char *);
int /*<<< orphan*/ closebmp();
int /*<<< orphan*/ newbmp(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putpixel(int, int, int);
int /*<<< orphan*/ savebmp(char *);
int main(int argc, char **argv) {
  if (argc > 1) {
    int w = atoi(argv[1]);
    int h = atoi(argv[2]);
    int x, y;
    int color;
    newbmp(w, h);
    int maxIterations = atoi(argv[3]);
    double pr, pi;
    double newRe, newIm, oldRe, oldIm;
    double zoom = atof(argv[4]);
    double moveX = atof(argv[5]);
    double moveY = atof(argv[6]);
    for (x = 0; x < w; x++)
      for (y = 0; y < h; y++) {
        pr = 1.5 * (x - w / 2.0) / (0.5 * zoom * w) + moveX;
        pi = (y - h / 2.0) / (0.5 * zoom * h) + moveY;
        newRe = newIm = oldRe = oldIm = 0.0;
        int i;
        for (i = 0; i < maxIterations; i++) {
          oldRe = newRe;
          oldIm = newIm;
          newRe = oldRe * oldRe - oldIm * oldIm + pr;
          newIm = 2.0 * oldRe * oldIm + pi;
          if ((newRe * newRe + newIm * newIm) > 4.0)
            break;
        }
        color = i;
        if (color < maxIterations / 3) {
          putpixel(y, x,
                   ((((color % 255) & 0xFF) << 16) + (((0) & 0xFF) << 8) +
                    ((0) & 0xFF)));
        } else if ((color > (maxIterations / 3)) &&
                   (color < (2 * maxIterations / 3))) {
          putpixel(y, x,
                   ((((100) & 0xFF) << 16) + (((color % 255) & 0xFF) << 8) +
                    ((0) & 0xFF)));
        } else {
          putpixel(y, x,
                   ((((200) & 0xFF) << 16) + (((250) & 0xFF) << 8) +
                    ((color % 255) & 0xFF)));
        }
      }
    savebmp(argv[7]);
    closebmp();
  } else {
    printf("Mandelbrot without parameters Xsize Ysize Iterations..\n\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    14c0 <main+0x350>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1050 <newbmp@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14a7 <main+0x337>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1494 <main+0x324>
cvtsi2sdl -0x1c(%rbp),%xmm1
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xdcc(%rip),%xmm2
divsd  %xmm2,%xmm0
subsd  %xmm0,%xmm1
movsd  0xdc4(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xda8(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
cvtsi2sdl -0x14(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
cvtsi2sdl -0x20(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
movsd  0xd82(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  0xd6a(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
cvtsi2sdl -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    13a0 <main+0x230>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xcca(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xc9a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    138d <main+0x21d>
jmp    13a0 <main+0x230>
jmp    1392 <main+0x222>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    12d9 <main+0x169>
mov    -0x74(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x28(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x78(%rbp),%eax
cmp    %ecx,%eax
jge    13ee <main+0x27e>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x24(%rbp),%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
and    $0xff,%edx
shl    $0x10,%edx
add    $0x0,%edx
add    $0x0,%edx
call   1040 <putpixel@plt>
jmp    1481 <main+0x311>
mov    -0x24(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x28(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x7c(%rbp),%eax
cmp    %ecx,%eax
jle    145a <main+0x2ea>
mov    -0x24(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x28(%rbp),%eax
shl    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x80(%rbp),%eax
cmp    %ecx,%eax
jge    145a <main+0x2ea>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x24(%rbp),%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
and    $0xff,%edx
shl    $0x8,%edx
add    $0x640000,%edx
add    $0x0,%edx
call   1040 <putpixel@plt>
jmp    147c <main+0x30c>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x24(%rbp),%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
and    $0xff,%edx
add    $0xc8fa00,%edx
call   1040 <putpixel@plt>
jmp    1481 <main+0x311>
jmp    1486 <main+0x316>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    121e <main+0xae>
jmp    1499 <main+0x329>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    120b <main+0x9b>
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rdi
call   1080 <savebmp@plt>
mov    $0x0,%al
call   1070 <closebmp@plt>
jmp    14cc <main+0x35c>
lea    0xb59(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
cmp    $0x2,%edi
jl     13fb <main+0x28b>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1090 <atoi@plt>
mov    %eax,%r14d
mov    0x10(%rbx),%rdi
call   1090 <atoi@plt>
mov    %eax,%r12d
mov    %r14d,%edi
mov    %eax,%esi
call   1060 <newbmp@plt>
mov    0x18(%rbx),%rdi
call   1090 <atoi@plt>
mov    %eax,%ebp
mov    0x28(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x30(%rsp)
mov    %rbx,0x18(%rsp)
mov    0x30(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x50(%rsp)
mov    %r14d,0xc(%rsp)
test   %r14d,%r14d
jle    1409 <main+0x299>
mov    0x18(%rsp),%rax
mov    0x20(%rax),%rdi
call   1040 <atof@plt>
cvtsi2sdl 0xc(%rsp),%xmm2
movsd  0xdfc(%rip),%xmm3
mulsd  %xmm3,%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x20(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %r12d,%xmm1
mulsd  %xmm3,%xmm2
movsd  %xmm2,0x28(%rsp)
mulsd  %xmm1,%xmm3
movsd  %xmm3,0x40(%rsp)
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x48(%rsp)
movslq %ebp,%rax
imul   $0x55555556,%rax,%r14
mov    %r14,%rcx
shr    $0x3f,%rcx
shr    $0x20,%r14
add    %ecx,%r14d
add    %eax,%eax
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
shr    $0x20,%rcx
add    %eax,%ecx
mov    %rcx,0x38(%rsp)
xor    %r13d,%r13d
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xd8a(%rip),%xmm5
mov    $0x80808081,%r15d
jmp    12b3 <main+0x143>
xchg   %ax,%ax
movsd  0x10(%rsp),%xmm0
addsd  0xd7a(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
add    $0x1,%r13d
cmp    0xc(%rsp),%r13d
je     1409 <main+0x299>
test   %r12d,%r12d
jle    1290 <main+0x120>
movsd  0x10(%rsp),%xmm6
subsd  0x28(%rsp),%xmm6
mulsd  0xd3c(%rip),%xmm6
divsd  0x20(%rsp),%xmm6
addsd  0x30(%rsp),%xmm6
xor    %ebx,%ebx
xorpd  %xmm7,%xmm7
movsd  %xmm6,0x58(%rsp)
jmp    1336 <main+0x1c6>
cs nopw 0x0(%rax,%rax,1)
imul   %r15,%rdx
shr    $0x27,%rdx
mov    %edx,%ecx
shl    $0x8,%ecx
sub    %ecx,%edx
add    %eax,%edx
shl    $0x10,%edx
mov    %ebx,%edi
mov    %r13d,%esi
call   1050 <putpixel@plt>
movsd  0x60(%rsp),%xmm7
addsd  0xcfc(%rip),%xmm7
add    $0x1,%ebx
cmp    %r12d,%ebx
movsd  0xce6(%rip),%xmm5
movsd  0x58(%rsp),%xmm6
je     1290 <main+0x120>
mov    $0x0,%eax
test   %ebp,%ebp
jle    13a7 <main+0x237>
movapd %xmm7,%xmm0
subsd  0x40(%rsp),%xmm0
divsd  0x48(%rsp),%xmm0
addsd  0x50(%rsp),%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
xorpd  %xmm2,%xmm2
nop
movapd %xmm1,%xmm3
movapd %xmm2,%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm1,%xmm1
subsd  %xmm4,%xmm1
addsd  %xmm6,%xmm1
addsd  %xmm3,%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm1,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
ucomisd %xmm5,%xmm4
ja     13a7 <main+0x237>
add    $0x1,%eax
cmp    %eax,%ebp
jne    1360 <main+0x1f0>
mov    %ebp,%eax
cmp    %r14d,%eax
movsd  %xmm7,0x60(%rsp)
mov    %eax,%edx
jl     12f0 <main+0x180>
imul   %r15,%rdx
shr    $0x27,%rdx
mov    %edx,%ecx
shl    $0x8,%ecx
sub    %ecx,%edx
add    %eax,%edx
cmp    %r14d,%eax
jle    13f0 <main+0x280>
cmp    0x38(%rsp),%eax
jge    13f0 <main+0x280>
shl    $0x8,%edx
or     $0x640000,%edx
jmp    1304 <main+0x194>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
or     $0xc8fa00,%edx
jmp    1304 <main+0x194>
lea    0xc1e(%rip),%rdi
call   1030 <puts@plt>
jmp    141e <main+0x2ae>
mov    0x18(%rsp),%rax
mov    0x38(%rax),%rdi
call   1080 <savebmp@plt>
xor    %eax,%eax
call   1070 <closebmp@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [57 x i8] c"Mandelbrot without parameters Xsize Ysize Iterations..\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%22 = load i32, i32* %4
%23 = icmp sgt i32 %22, 1
br i1 %23, label %24, label %184
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @atoi(i8* %27)
store i32 %28, i32* %6
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 2
%31 = load i8*, i8** %30
%32 = call i32 @atoi(i8* %31)
store i32 %32, i32* %7
%33 = load i32, i32* %6
%34 = load i32, i32* %7
%35 = call i32 @newbmp(i32 %33, i32 %34)
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 3
%38 = load i8*, i8** %37
%39 = call i32 @atoi(i8* %38)
store i32 %39, i32* %11
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 4
%42 = load i8*, i8** %41
%43 = call double @atof(i8* %42)
store double %43, double* %18
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 5
%46 = load i8*, i8** %45
%47 = call double @atof(i8* %46)
store double %47, double* %19
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 6
%50 = load i8*, i8** %49
%51 = call double @atof(i8* %50)
store double %51, double* %20
store i32 0, i32* %8
br label %52
52: ; preds = %175, %24
%53 = load i32, i32* %8
%54 = load i32, i32* %6
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %178
56: ; preds = %52
store i32 0, i32* %9
br label %57
57: ; preds = %171, %56
%58 = load i32, i32* %9
%59 = load i32, i32* %7
%60 = icmp slt i32 %58, %59
br i1 %60, label %61, label %174
61: ; preds = %57
%62 = load i32, i32* %8
%63 = sitofp i32 %62 to double
%64 = load i32, i32* %6
%65 = sitofp i32 %64 to double
%66 = fdiv double %65, 2.000000e+00
%67 = fsub double %63, %66
%68 = fmul double 1.500000e+00, %67
%69 = load double, double* %18
%70 = fmul double 5.000000e-01, %69
%71 = load i32, i32* %6
%72 = sitofp i32 %71 to double
%73 = fmul double %70, %72
%74 = fdiv double %68, %73
%75 = load double, double* %19
%76 = fadd double %74, %75
store double %76, double* %12
%77 = load i32, i32* %9
%78 = sitofp i32 %77 to double
%79 = load i32, i32* %7
%80 = sitofp i32 %79 to double
%81 = fdiv double %80, 2.000000e+00
%82 = fsub double %78, %81
%83 = load double, double* %18
%84 = fmul double 5.000000e-01, %83
%85 = load i32, i32* %7
%86 = sitofp i32 %85 to double
%87 = fmul double %84, %86
%88 = fdiv double %82, %87
%89 = load double, double* %20
%90 = fadd double %88, %89
store double %90, double* %13
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %15
store double 0.000000e+00, double* %14
store i32 0, i32* %21
br label %91
91: ; preds = %121, %61
%92 = load i32, i32* %21
%93 = load i32, i32* %11
%94 = icmp slt i32 %92, %93
br i1 %94, label %95, label %124
95: ; preds = %91
%96 = load double, double* %14
store double %96, double* %16
%97 = load double, double* %15
store double %97, double* %17
%98 = load double, double* %16
%99 = load double, double* %16
%100 = load double, double* %17
%101 = load double, double* %17
%102 = fmul double %100, %101
%103 = fneg double %102
%104 = call double @llvm.fmuladd.f64(double %98, double %99, double %103)
%105 = load double, double* %12
%106 = fadd double %104, %105
store double %106, double* %14
%107 = load double, double* %16
%108 = fmul double 2.000000e+00, %107
%109 = load double, double* %17
%110 = load double, double* %13
%111 = call double @llvm.fmuladd.f64(double %108, double %109, double %110)
store double %111, double* %15
%112 = load double, double* %14
%113 = load double, double* %14
%114 = load double, double* %15
%115 = load double, double* %15
%116 = fmul double %114, %115
%117 = call double @llvm.fmuladd.f64(double %112, double %113, double %116)
%118 = fcmp ogt double %117, 4.000000e+00
br i1 %118, label %119, label %120
119: ; preds = %95
br label %124
120: ; preds = %95
br label %121
121: ; preds = %120
%122 = load i32, i32* %21
%123 = add nsw i32 %122, 1
store i32 %123, i32* %21
br label %91
124: ; preds = %119, %91
%125 = load i32, i32* %21
store i32 %125, i32* %10
%126 = load i32, i32* %10
%127 = load i32, i32* %11
%128 = sdiv i32 %127, 3
%129 = icmp slt i32 %126, %128
br i1 %129, label %130, label %140
130: ; preds = %124
%131 = load i32, i32* %9
%132 = load i32, i32* %8
%133 = load i32, i32* %10
%134 = srem i32 %133, 255
%135 = and i32 %134, 255
%136 = shl i32 %135, 16
%137 = add nsw i32 %136, 0
%138 = add nsw i32 %137, 0
%139 = call i32 @putpixel(i32 %131, i32 %132, i32 %138)
br label %170
140: ; preds = %124
%141 = load i32, i32* %10
%142 = load i32, i32* %11
%143 = sdiv i32 %142, 3
%144 = icmp sgt i32 %141, %143
br i1 %144, label %145, label %161
145: ; preds = %140
%146 = load i32, i32* %10
%147 = load i32, i32* %11
%148 = mul nsw i32 2, %147
%149 = sdiv i32 %148, 3
%150 = icmp slt i32 %146, %149
br i1 %150, label %151, label %161
151: ; preds = %145
%152 = load i32, i32* %9
%153 = load i32, i32* %8
%154 = load i32, i32* %10
%155 = srem i32 %154, 255
%156 = and i32 %155, 255
%157 = shl i32 %156, 8
%158 = add nsw i32 6553600, %157
%159 = add nsw i32 %158, 0
%160 = call i32 @putpixel(i32 %152, i32 %153, i32 %159)
br label %169
161: ; preds = %145, %140
%162 = load i32, i32* %9
%163 = load i32, i32* %8
%164 = load i32, i32* %10
%165 = srem i32 %164, 255
%166 = and i32 %165, 255
%167 = add nsw i32 13171200, %166
%168 = call i32 @putpixel(i32 %162, i32 %163, i32 %167)
br label %169
169: ; preds = %161, %151
br label %170
170: ; preds = %169, %130
br label %171
171: ; preds = %170
%172 = load i32, i32* %9
%173 = add nsw i32 %172, 1
store i32 %173, i32* %9
br label %57
174: ; preds = %57
br label %175
175: ; preds = %174
%176 = load i32, i32* %8
%177 = add nsw i32 %176, 1
store i32 %177, i32* %8
br label %52
178: ; preds = %52
%179 = load i8**, i8*** %5
%180 = getelementptr inbounds i8*, i8** %179, i64 7
%181 = load i8*, i8** %180
%182 = call i32 @savebmp(i8* %181)
%183 = call i32 (...) @closebmp()
br label %186
184: ; preds = %2
%185 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
br label %186
186: ; preds = %184, %178
ret i32 0
}

LLVM IR (-O2):
@str = [56 x i8] c"Mandelbrot without parameters Xsize Ysize Iterations..\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %98
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 @newbmp(i32 %7, i32 %10)
%12 = getelementptr inbounds i8*, i8** %1, i64 3
%13 = load i8*, i8** %12
%14 = tail call i32 @atoi(i8* %13)
%15 = getelementptr inbounds i8*, i8** %1, i64 5
%16 = load i8*, i8** %15
%17 = tail call double @atof(i8* %16)
%18 = getelementptr inbounds i8*, i8** %1, i64 6
%19 = load i8*, i8** %18
%20 = tail call double @atof(i8* %19)
%21 = icmp sgt i32 %7, 0
br i1 %21, label %22, label %93
22: ; preds = %4
%23 = getelementptr inbounds i8*, i8** %1, i64 4
%24 = load i8*, i8** %23
%25 = tail call double @atof(i8* %24)
%26 = icmp sgt i32 %10, 0
%27 = sitofp i32 %7 to double
%28 = fmul double %27, 5.000000e-01
%29 = fmul double %25, 5.000000e-01
%30 = fmul double %29, %27
%31 = sitofp i32 %10 to double
%32 = fmul double %31, 5.000000e-01
%33 = fmul double %29, %31
%34 = icmp sgt i32 %14, 0
%35 = sdiv i32 %14, 3
%36 = shl nsw i32 %14, 1
%37 = sdiv i32 %36, 3
br label %38
38: ; preds = %22, %90
%39 = phi i32 [ 0, %22 ], [ %91, %90 ]
br i1 %26, label %40, label %90
40: ; preds = %38
%41 = sitofp i32 %39 to double
%42 = fsub double %41, %28
%43 = fmul double %42, 1.500000e+00
%44 = fdiv double %43, %30
%45 = fadd double %17, %44
br label %46
46: ; preds = %40, %85
%47 = phi i32 [ 0, %40 ], [ %88, %85 ]
%48 = sitofp i32 %47 to double
%49 = fsub double %48, %32
%50 = fdiv double %49, %33
%51 = fadd double %20, %50
br i1 %34, label %52, label %68
52: ; preds = %46, %65
%53 = phi i32 [ %66, %65 ], [ 0, %46 ]
%54 = phi double [ %59, %65 ], [ 0.000000e+00, %46 ]
%55 = phi double [ %61, %65 ], [ 0.000000e+00, %46 ]
%56 = fneg double %55
%57 = fmul double %55, %56
%58 = tail call double @llvm.fmuladd.f64(double %54, double %54, double %57)
%59 = fadd double %45, %58
%60 = fmul double %54, 2.000000e+00
%61 = tail call double @llvm.fmuladd.f64(double %60, double %55, double %51)
%62 = fmul double %61, %61
%63 = tail call double @llvm.fmuladd.f64(double %59, double %59, double %62)
%64 = fcmp ogt double %63, 4.000000e+00
br i1 %64, label %68, label %65
65: ; preds = %52
%66 = add nuw nsw i32 %53, 1
%67 = icmp eq i32 %66, %14
br i1 %67, label %68, label %52
68: ; preds = %65, %52, %46
%69 = phi i32 [ 0, %46 ], [ %53, %52 ], [ %14, %65 ]
%70 = icmp slt i32 %69, %35
br i1 %70, label %71, label %75
71: ; preds = %68
%72 = urem i32 %69, 255
%73 = shl nuw nsw i32 %72, 16
%74 = and i32 %73, 16711680
br label %85
75: ; preds = %68
%76 = icmp sgt i32 %69, %35
%77 = icmp slt i32 %69, %37
%78 = select i1 %76, i1 %77, i1 false
%79 = urem i32 %69, 255
br i1 %78, label %80, label %83
80: ; preds = %75
%81 = shl nuw nsw i32 %79, 8
%82 = or i32 %81, 6553600
br label %85
83: ; preds = %75
%84 = or i32 %79, 13171200
br label %85
85: ; preds = %80, %83, %71
%86 = phi i32 [ %82, %80 ], [ %84, %83 ], [ %74, %71 ]
%87 = tail call i32 @putpixel(i32 %47, i32 %39, i32 %86)
%88 = add nuw nsw i32 %47, 1
%89 = icmp eq i32 %88, %10
br i1 %89, label %90, label %46
90: ; preds = %85, %38
%91 = add nuw nsw i32 %39, 1
%92 = icmp eq i32 %91, %7
br i1 %92, label %93, label %38
93: ; preds = %90, %4
%94 = getelementptr inbounds i8*, i8** %1, i64 7
%95 = load i8*, i8** %94
%96 = tail call i32 @savebmp(i8* %95)
%97 = tail call i32 (...) @closebmp()
br label %100
98: ; preds = %2
%99 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
br label %100
100: ; preds = %98, %93
ret i32 0
}