• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3#ifdef __clang__
4#pragma clang diagnostic ignored "-Wall"
5#endif
6using namespace metal;
7struct Uniforms {
8    half4 colorGreen;
9    half4 colorRed;
10    half unknownInput;
11};
12struct Inputs {
13};
14struct Outputs {
15    half4 sk_FragColor [[color(0)]];
16};
17bool return_on_both_sides_b(Uniforms _uniforms) {
18    if (_uniforms.unknownInput == 1.0h) return true; else return true;
19}
20bool for_inside_body_b() {
21    for (int x = 0;x <= 10; ++x) {
22        return true;
23    }
24}
25bool after_for_body_b() {
26    for (int x = 0;x <= 10; ++x) {
27    }
28    return true;
29}
30bool for_with_double_sided_conditional_return_b(Uniforms _uniforms) {
31    for (int x = 0;x <= 10; ++x) {
32        if (_uniforms.unknownInput == 1.0h) return true; else return true;
33    }
34}
35bool if_else_chain_b(Uniforms _uniforms) {
36    if (_uniforms.unknownInput == 1.0h) return true; else if (_uniforms.unknownInput == 2.0h) return false; else if (_uniforms.unknownInput == 3.0h) return true; else if (_uniforms.unknownInput == 4.0h) return false; else return true;
37}
38fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
39    Outputs _out;
40    (void)_out;
41    _out.sk_FragColor = ((((true && return_on_both_sides_b(_uniforms)) && for_inside_body_b()) && after_for_body_b()) && for_with_double_sided_conditional_return_b(_uniforms)) && if_else_chain_b(_uniforms) ? _uniforms.colorGreen : _uniforms.colorRed;
42    return _out;
43}
44