; ModuleID = './WMath.cpp' target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8-i64:8:8-f32:8:8-f64:8:8-n8" target triple = "avr" define void @_Z10randomSeedj(i16 %seed) #0 { entry: %cmp = icmp eq i16 %seed, 0 br i1 %cmp, label %if.end, label %if.then if.then: ; preds = %entry %conv = zext i16 %seed to i32 tail call void @srandom(i32 %conv) br label %if.end if.end: ; preds = %entry, %if.then ret void } declare void @srandom(i32) #0 define i32 @_Z6randoml(i32 %howbig) #0 { entry: %cmp = icmp eq i32 %howbig, 0 br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry %call = tail call i32 @random() %rem = srem i32 %call, %howbig br label %return return: ; preds = %entry, %if.end %retval.0 = phi i32 [ %rem, %if.end ], [ 0, %entry ] ret i32 %retval.0 } declare i32 @random() #0 define i32 @_Z6randomll(i32 %howsmall, i32 %howbig) #0 { entry: %cmp = icmp sgt i32 %howbig, %howsmall br i1 %cmp, label %if.end, label %return if.end: ; preds = %entry %cmp.i = icmp eq i32 %howbig, %howsmall br i1 %cmp.i, label %_Z6randoml.exit, label %if.end.i if.end.i: ; preds = %if.end %sub = sub nsw i32 %howbig, %howsmall %call.i = tail call i32 @random() %rem.i = srem i32 %call.i, %sub br label %_Z6randoml.exit _Z6randoml.exit: ; preds = %if.end, %if.end.i %retval.0.i = phi i32 [ %rem.i, %if.end.i ], [ 0, %if.end ] %add = add nsw i32 %retval.0.i, %howsmall br label %return return: ; preds = %entry, %_Z6randoml.exit %retval.0 = phi i32 [ %add, %_Z6randoml.exit ], [ %howsmall, %entry ] ret i32 %retval.0 } ; Function Attrs: nounwind readnone define i32 @_Z3maplllll(i32 %x, i32 %in_min, i32 %in_max, i32 %out_min, i32 %out_max) #1 { entry: %sub = sub nsw i32 %x, %in_min %sub1 = sub nsw i32 %out_max, %out_min %mul = mul nsw i32 %sub1, %sub %sub2 = sub nsw i32 %in_max, %in_min %div = sdiv i32 %mul, %sub2 %add = add nsw i32 %div, %out_min ret i32 %add } ; Function Attrs: nounwind readnone define i16 @_Z8makeWordj(i16 %w) #1 { entry: ret i16 %w } ; Function Attrs: nounwind readnone define i16 @_Z8makeWordhh(i8 zeroext %h, i8 zeroext %l) #1 { entry: %conv = zext i8 %h to i16 %shl = shl nuw i16 %conv, 8 %conv1 = zext i8 %l to i16 %or = or i16 %shl, %conv1 ret i16 %or } attributes #0 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="atmega328p" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { nounwind readnone "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="atmega328p" "unsafe-fp-math"="false" "use-soft-float"="false" } !llvm.ident = !{!0} !0 = !{!"clang version 3.7.0 (https://github.com/llvm-mirror/clang.git 287e62c84a1ccd74fbca46bfc13e364e314d4b41) (https://github.com/llvm-mirror/llvm.git aaab572fc38b4438e769e2fd6b91963be11db7b2)"}