; ModuleID = 'MandelbrotSimple_Kernels.bc'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

@str = private unnamed_addr constant [12 x i8] c"result: %f\0A\00", align 1

define i32 @main(i32 %argc, i8** %argv) uwtable {
entry:
  call float @kernel(float 1.500000e+00, i32 5, i32 10) nounwind noinline
  ret i32 0	
}

define float @kernel(float %scale, i32 %maxIterations, i32 %width) nounwind noinline {
entry:
  %res = fmul float 2.000000e+00, %scale
  %conv = fpext float %res to double
  %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8]* @str, i32 0, i32 0), double %conv)
  ret float %res
}

declare i32 @printf(i8*, ...)
