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