//
// Generated by Microsoft (R) HLSL Shader Compiler 9.26.952.2844
//
// Parameters:
//
//   sampler2D HemiCubeSampler;
//
//
// Registers:
//
//   Name            Reg   Size
//   --------------- ----- ----
//   HemiCubeSampler s0       1
//

    ps_3_0
    def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.1756894116e-42 // 839
    def c0, -0.5, 0, 1, -2
    def c1, 2, 9.99999975e-006, 1, -1
    def c2, 0.5, 0.00048828125, 0.001953125, 0
    def c3, 0.25, 1, -0.25, 2
    def c4, 0.75, 1, 0.25, 1.25
    def c5, 0.25, -1, 1.25, 1
    dcl_texcoord v0.xy
    dcl_2d s0
    add r0.xy, c0.x, v0
    add r0.zw, r0.xyxy, r0.xyxy
    dp2add r1.z, r0.zwzw, r0.zwzw, c0.y
    dp2add r0.z, r0.zwzw, -r0.zwzw, c0.z
    mad r0.xy, r0, c1.x, c1.y
    dp2add r0.w, r0, r0, c0.y
    rsq r0.w, r0.w
    mul r2.xy, r0, r0.w
    mad r1.xy, v0, -c0.w, -c0.z
    mov r2.z, c0.z
    cmp r0.xyz, r0.z, r1, r2
    add r0.x, r0.x, r0.x
    add r0.zw, r0.z, c1
    rcp r0.z, r0.z
    mul r1.yw, r0.xxzy, r0.z
    add r1.z, r1.w, r1.w
    mul r1.x, r0.w, r0.z
    max r0.x, r1_abs.y, r1_abs.z
    max r2.x, -r1.x, r0.x
    mad r0.xy, r0.w, -r0.z, -r1_abs.yzzw
    cmp r0.y, r0.y, c0.z, c0.y
    cmp r0.x, r0.x, r0.y, c0.y
    if_ne r0.x, -r0.x
      rcp r0.x, r2.x
      mul r0.xy, r1.yzzw, r0.x
      mad r2.yz, r0.xxyw, c3.xxyw, c3.xxyw
      mad r3.zw, r2.xyyz, c2.x, c2.xyyz
      mov r3, r3.zwzw
      mov r2.yz, c0.xzyw
      mov r4.xy, c0.yzzw
    else
      if_ge r1_abs.y, r1_abs.z
        rcp r2.w, r2.x
        mul r0, r1.xzxw, r2.w
        cmp r4.xy, -r1.y, c0.zyzw, c0.yzzw
        mov r5, c3
        mad r5, r0, r5, c4.xyxy
        mad r3, r5, c2.x, c2.yzyz
        mov r2.yz, r4.xxyw
      else
        rcp r5.z, r2.x
        mul r0.xy, r1.yxzw, r5.z
        cmp r4.xy, -r1.w, c0.yzzw, c0.zyzw
        mov r5.y, c0.z
        mul r1.yz, r1.xyxw, r5
        mul r1.x, r5.z, r1.y
        mad r0.zw, r1.xyxz, c5.xyxy, c5
        mad r3.xy, r0.zwzw, c2.x, c2.yzzw
        mad r0.zw, r0.xyxy, c4.xyzy, c4.xywy
        mad r3.zw, r0, c2.x, c2.xyyz
        mov r2.yz, r4.xxyw
      endif
    endif
    texld r1, r3, s0
    dp2add r0.z, r1, r2.yzzw, c0.y
    texld r1, r3.zwzw, s0
    dp2add r0.w, r1, r4, c0.y
    dp2add r0.x, r0, r0, c0.z
    rsq r0.x, r0.x
    rcp r0.x, r0.x
    mul oC0.xy, r0.zwzw, r0.x
    mov oC0.zw, c0.xyyz

// approximately 72 instruction slots used (2 texture, 70 arithmetic)
