;
; Note: shader requires additional functionality:
;       Use native low precision
;
;
; Input signature:
;
; Name                 Index   Mask Register SysValue  Format   Used
; -------------------- ----- ------ -------- -------- ------- ------
; SV_Position              0   xyzw        0      POS   float   xy  
; TEXCOORD                 0   xy          1     NONE   float   xy  
; SV_SampleIndex           0    N/A  special   SAMPLE    uint     NO
;
;
; Output signature:
;
; Name                 Index   Mask Register SysValue  Format   Used
; -------------------- ----- ------ -------- -------- ------- ------
; SV_Target                0   xyzw        0   TARGET   float   xyzw
; SV_Target                1   x           1   TARGET    uint   x   
;
; shader hash: 6a7a213f8c8de1b3fd02e78ec23407c3
;
; Pipeline Runtime Information: 
;
; Pixel Shader
; DepthOutput=0
; SampleFrequency=1
;
;
; Input signature:
;
; Name                 Index             InterpMode DynIdx
; -------------------- ----- ---------------------- ------
; SV_Position              0          noperspective       
; TEXCOORD                 0                 linear       
; SV_SampleIndex           0        nointerpolation       
;
; Output signature:
;
; Name                 Index             InterpMode DynIdx
; -------------------- ----- ---------------------- ------
; SV_Target                0                              
; SV_Target                1                              
;
; Buffer Definitions:
;
; cbuffer 
; {
;
;   [8 x i8] (type annotation not present)
;
; }
;
;
; Resource Bindings:
;
; Name                                 Type  Format         Dim      ID      HLSL Bind  Count
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
;                                   cbuffer      NA          NA     CB0            cb0     1
;                                   sampler      NA          NA      S0             s0     1
;                                   texture     f32          2d      T0             t0     1
;
;
; ViewId state:
;
; Number of inputs: 6, outputs: 5
; Outputs dependent on ViewId: {  }
; Inputs contributing to computation of Outputs:
;   output 0 depends on inputs: { 4, 5 }
;   output 1 depends on inputs: { 4, 5 }
;   output 2 depends on inputs: { 0, 1, 4, 5 }
;
target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
target triple = "dxil-ms-dx"

%dx.types.Handle = type { i8* }
%dx.types.ResBind = type { i32, i32, i32, i8 }
%dx.types.ResourceProperties = type { i32, i32 }
%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }
%dx.types.fouri32 = type { i32, i32, i32, i32 }
%"class.Texture2D<vector<float, 4> >" = type { <4 x float>, %"class.Texture2D<vector<float, 4> >::mips_type" }
%"class.Texture2D<vector<float, 4> >::mips_type" = type { i32 }
%c = type { i32, i32 }
%struct.SamplerState = type { i32 }

define void @main() {
  %1 = call %dx.types.Handle @dx.op.createHandleFromBinding(i32 217, %dx.types.ResBind zeroinitializer, i32 0, i1 false)  ; CreateHandleFromBinding(bind,index,nonUniformIndex)
  %2 = call %dx.types.Handle @dx.op.createHandleFromBinding(i32 217, %dx.types.ResBind { i32 0, i32 0, i32 0, i8 3 }, i32 0, i1 false)  ; CreateHandleFromBinding(bind,index,nonUniformIndex)
  %3 = call %dx.types.Handle @dx.op.createHandleFromBinding(i32 217, %dx.types.ResBind { i32 0, i32 0, i32 0, i8 2 }, i32 0, i1 false)  ; CreateHandleFromBinding(bind,index,nonUniformIndex)
  %4 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %3, %dx.types.ResourceProperties { i32 13, i32 8 })  ; AnnotateHandle(res,props)  resource: CBuffer
  %5 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef)  ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
  %6 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 undef)  ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
  %7 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)  ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
  %8 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef)  ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
  %9 = call i32 @dx.op.coverage.i32(i32 91)  ; Coverage()
  %10 = call i32 @dx.op.sampleIndex.i32(i32 90)  ; SampleIndex()
  %11 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %1, %dx.types.ResourceProperties { i32 2, i32 1033 })  ; AnnotateHandle(res,props)  resource: Texture2D<4xF32>
  %12 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %2, %dx.types.ResourceProperties { i32 14, i32 0 })  ; AnnotateHandle(res,props)  resource: SamplerState
  %13 = call float @dx.op.calculateLOD.f32(i32 81, %dx.types.Handle %11, %dx.types.Handle %12, float %5, float %6, float undef, i1 true)  ; CalculateLOD(handle,sampler,coord0,coord1,coord2,clamped)
  %14 = call float @dx.op.calculateLOD.f32(i32 81, %dx.types.Handle %11, %dx.types.Handle %12, float %5, float %6, float undef, i1 false)  ; CalculateLOD(handle,sampler,coord0,coord1,coord2,clamped)
  %15 = call i1 @dx.op.isHelperLane.i1(i32 221)  ; IsHelperLane()
  %16 = zext i1 %15 to i32
  %17 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %4, i32 0)  ; CBufferLoadLegacy(handle,regIndex)
  %18 = extractvalue %dx.types.CBufRet.i32 %17, 0
  %19 = call %dx.types.fouri32 @dx.op.unpack4x8.i32(i32 219, i8 1, i32 %18)  ; Unpack4x8(unpackMode,pk)
  %20 = extractvalue %dx.types.fouri32 %19, 0
  %21 = extractvalue %dx.types.fouri32 %19, 1
  %22 = extractvalue %dx.types.CBufRet.i32 %17, 1
  %23 = call %dx.types.fouri32 @dx.op.unpack4x8.i32(i32 219, i8 0, i32 %22)  ; Unpack4x8(unpackMode,pk)
  %24 = extractvalue %dx.types.fouri32 %23, 2
  %25 = extractvalue %dx.types.fouri32 %23, 3
  %26 = call i32 @dx.op.pack4x8.i32(i32 220, i8 1, i32 %20, i32 300, i32 -4, i32 7)  ; Pack4x8(packMode,x,y,z,w)
  %27 = call i32 @dx.op.dot4AddPacked.i32(i32 163, i32 %10, i32 %18, i32 %22)  ; Dot4AddI8Packed(acc,a,b)
  %28 = call i32 @dx.op.dot4AddPacked.i32(i32 164, i32 %9, i32 %22, i32 %18)  ; Dot4AddU8Packed(acc,a,b)
  %29 = fptrunc float %7 to half
  %30 = fptrunc float %8 to half
  %31 = fptrunc float %5 to half
  %32 = fptrunc float %6 to half
  %33 = call float @dx.op.dot2AddHalf.f32(i32 162, float 1.000000e+00, half %31, half %32, half %29, half %30)  ; Dot2AddHalf(acc,ax,ay,bx,by)
  %34 = shl i32 %10, 8
  %35 = xor i32 %34, %9
  %36 = xor i32 %35, %16
  %37 = xor i32 %36, %26
  %38 = xor i32 %37, %25
  %39 = xor i32 %38, %27
  %40 = xor i32 %39, %28
  call void @dx.op.storeOutput.i32(i32 5, i32 1, i32 0, i8 0, i32 %40)  ; StoreOutput(outputSigId,rowIndex,colIndex,value)
  %41 = sitofp i32 %21 to float
  %42 = fadd fast float %33, %41
  %43 = uitofp i32 %24 to float
  call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %13)  ; StoreOutput(outputSigId,rowIndex,colIndex,value)
  call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %14)  ; StoreOutput(outputSigId,rowIndex,colIndex,value)
  call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %42)  ; StoreOutput(outputSigId,rowIndex,colIndex,value)
  call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %43)  ; StoreOutput(outputSigId,rowIndex,colIndex,value)
  ret void
}

; Function Attrs: nounwind readnone
declare i32 @dx.op.sampleIndex.i32(i32) #0

; Function Attrs: nounwind readnone
declare i32 @dx.op.coverage.i32(i32) #0

; Function Attrs: nounwind readnone
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #0

; Function Attrs: nounwind
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1

; Function Attrs: nounwind
declare void @dx.op.storeOutput.i32(i32, i32, i32, i8, i32) #1

; Function Attrs: nounwind readonly
declare float @dx.op.calculateLOD.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, i1) #2

; Function Attrs: nounwind readonly
declare i1 @dx.op.isHelperLane.i1(i32) #2

; Function Attrs: nounwind readnone
declare %dx.types.fouri32 @dx.op.unpack4x8.i32(i32, i8, i32) #0

; Function Attrs: nounwind readnone
declare i32 @dx.op.pack4x8.i32(i32, i8, i32, i32, i32, i32) #0

; Function Attrs: nounwind readnone
declare i32 @dx.op.dot4AddPacked.i32(i32, i32, i32, i32) #0

; Function Attrs: nounwind readnone
declare float @dx.op.dot2AddHalf.f32(i32, float, half, half, half, half) #0

; Function Attrs: nounwind readonly
declare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #2

; Function Attrs: nounwind readnone
declare %dx.types.Handle @dx.op.annotateHandle(i32, %dx.types.Handle, %dx.types.ResourceProperties) #0

; Function Attrs: nounwind readnone
declare %dx.types.Handle @dx.op.createHandleFromBinding(i32, %dx.types.ResBind, i32, i1) #0

attributes #0 = { nounwind readnone }
attributes #1 = { nounwind }
attributes #2 = { nounwind readonly }

!llvm.ident = !{!0}
!dx.version = !{!1}
!dx.valver = !{!2}
!dx.shaderModel = !{!3}
!dx.resources = !{!4}
!dx.viewIdState = !{!12}
!dx.entryPoints = !{!13}

!0 = !{!"dxcoob 1.8.2405.0"}
!1 = !{i32 1, i32 6}
!2 = !{i32 1, i32 8}
!3 = !{!"ps", i32 6, i32 6}
!4 = !{!5, null, !8, !10}
!5 = !{!6}
!6 = !{i32 0, %"class.Texture2D<vector<float, 4> >"* undef, !"", i32 0, i32 0, i32 1, i32 2, i32 0, !7}
!7 = !{i32 0, i32 9}
!8 = !{!9}
!9 = !{i32 0, %c* undef, !"", i32 0, i32 0, i32 1, i32 8, null}
!10 = !{!11}
!11 = !{i32 0, %struct.SamplerState* undef, !"", i32 0, i32 0, i32 1, i32 0, null}
!12 = !{[8 x i32] [i32 6, i32 5, i32 4, i32 4, i32 0, i32 0, i32 7, i32 7]}
!13 = !{void ()* @main, !"main", !14, !4, !27}
!14 = !{!15, !21, null}
!15 = !{!16, !19, !20}
!16 = !{i32 0, !"SV_Position", i8 9, i8 3, !17, i8 4, i32 1, i8 4, i32 0, i8 0, !18}
!17 = !{i32 0}
!18 = !{i32 3, i32 3}
!19 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !17, i8 2, i32 1, i8 2, i32 1, i8 0, !18}
!20 = !{i32 2, !"SV_SampleIndex", i8 5, i8 12, !17, i8 1, i32 1, i8 1, i32 -1, i8 -1, null}
!21 = !{!22, !24}
!22 = !{i32 0, !"SV_Target", i8 9, i8 16, !17, i8 0, i32 1, i8 4, i32 0, i8 0, !23}
!23 = !{i32 3, i32 15}
!24 = !{i32 1, !"SV_Target", i8 5, i8 16, !25, i8 0, i32 1, i8 1, i32 1, i8 0, !26}
!25 = !{i32 1}
!26 = !{i32 3, i32 1}
!27 = !{i32 0, i64 8388640}
