//
// Generated by LLVM NVPTX Back-End
//

.version 8.8
.target sm_89
.address_size 64

	// .globl	quant_query_per_thread_int8_kernel // -- Begin function quant_query_per_thread_int8_kernel
.extern .shared .align 16 .b8 global_smem[];
                                        // @quant_query_per_thread_int8_kernel
.visible .entry quant_query_per_thread_int8_kernel(
	.param .u64 .ptr .global .align 1 quant_query_per_thread_int8_kernel_param_0,
	.param .u64 .ptr .global .align 1 quant_query_per_thread_int8_kernel_param_1,
	.param .u64 .ptr .global .align 1 quant_query_per_thread_int8_kernel_param_2,
	.param .u32 quant_query_per_thread_int8_kernel_param_3,
	.param .u32 quant_query_per_thread_int8_kernel_param_4,
	.param .u32 quant_query_per_thread_int8_kernel_param_5,
	.param .u32 quant_query_per_thread_int8_kernel_param_6,
	.param .u32 quant_query_per_thread_int8_kernel_param_7,
	.param .u32 quant_query_per_thread_int8_kernel_param_8,
	.param .u32 quant_query_per_thread_int8_kernel_param_9,
	.param .u32 quant_query_per_thread_int8_kernel_param_10,
	.param .u32 quant_query_per_thread_int8_kernel_param_11,
	.param .u64 .ptr .global .align 1 quant_query_per_thread_int8_kernel_param_12,
	.param .u64 .ptr .global .align 1 quant_query_per_thread_int8_kernel_param_13
)
.reqntid 128
{
	.reg .pred 	%p<5>;
	.reg .b16 	%rs<10>;
	.reg .b32 	%r<69>;
	.reg .b64 	%rd<20>;
	.loc	1 22 0                          // quant_per_thread.py:22:0
$L__func_begin0:
	.loc	1 22 0                          // quant_per_thread.py:22:0

// %bb.0:
	ld.param.b64 	%rd4, [quant_query_per_thread_int8_kernel_param_0];
	ld.param.b64 	%rd5, [quant_query_per_thread_int8_kernel_param_1];
$L__tmp0:
	.loc	1 27 15                         // quant_per_thread.py:27:15
	mov.u32 	%r5, %ctaid.x;
	.loc	1 28 15                         // quant_per_thread.py:28:15
	and.b32 	%r6, %r5, 7;
	ld.param.b64 	%rd6, [quant_query_per_thread_int8_kernel_param_2];
	ld.param.b32 	%r7, [quant_query_per_thread_int8_kernel_param_3];
	.loc	1 29 13                         // quant_per_thread.py:29:13
	mov.u32 	%r8, %ctaid.y;
	.loc	1 30 13                         // quant_per_thread.py:30:13
	mov.u32 	%r9, %ctaid.z;
	ld.param.b32 	%r10, [quant_query_per_thread_int8_kernel_param_4];
	.loc	1 32 14                         // quant_per_thread.py:32:14
	shl.b32 	%r11, %r5, 2;
	ld.param.b32 	%r12, [quant_query_per_thread_int8_kernel_param_5];
	and.b32 	%r13, %r11, -32;
	ld.param.b32 	%r14, [quant_query_per_thread_int8_kernel_param_6];
	ld.param.b32 	%r15, [quant_query_per_thread_int8_kernel_param_7];
	.loc	1 32 30                         // quant_per_thread.py:32:30
	mov.u32 	%r16, %tid.x;
	and.b32 	%r17, %r16, 96;
	ld.param.b32 	%r18, [quant_query_per_thread_int8_kernel_param_8];
	shr.u32 	%r19, %r17, 2;
	ld.param.b32 	%r20, [quant_query_per_thread_int8_kernel_param_9];
	.loc	1 32 14                         // quant_per_thread.py:32:14
	or.b32 	%r21, %r19, %r13;
	ld.param.b32 	%r22, [quant_query_per_thread_int8_kernel_param_10];
	or.b32 	%r23, %r21, %r6;
	ld.param.b32 	%r24, [quant_query_per_thread_int8_kernel_param_11];
	.loc	1 35 26                         // quant_per_thread.py:35:26
	mul.lo.s32 	%r25, %r10, %r9;
	.loc	1 35 18                         // quant_per_thread.py:35:18
	mad.wide.s32 	%rd7, %r25, 2, %rd4;
	.loc	1 35 46                         // quant_per_thread.py:35:46
	mul.lo.s32 	%r26, %r12, %r8;
	.loc	1 35 18                         // quant_per_thread.py:35:18
	mad.wide.s32 	%rd8, %r26, 2, %rd7;
	.loc	1 35 66                         // quant_per_thread.py:35:66
	mul.lo.s32 	%r27, %r14, %r23;
	.loc	1 35 18                         // quant_per_thread.py:35:18
	mad.wide.s32 	%rd9, %r27, 2, %rd8;
	.loc	1 35 96                         // quant_per_thread.py:35:96
	shl.b32 	%r28, %r16, 1;
	and.b32 	%r29, %r28, 62;
	.loc	1 35 18                         // quant_per_thread.py:35:18
	cvt.u64.u32 	%rd10, %r29;
	mad.wide.u32 	%rd1, %r29, 2, %rd9;
	.loc	1 36 28                         // quant_per_thread.py:36:28
	mul.lo.s32 	%r30, %r15, %r9;
	.loc	1 36 19                         // quant_per_thread.py:36:19
	cvt.s64.s32 	%rd11, %r30;
	add.s64 	%rd12, %rd5, %rd11;
	.loc	1 36 48                         // quant_per_thread.py:36:48
	mul.lo.s32 	%r31, %r18, %r8;
	.loc	1 36 19                         // quant_per_thread.py:36:19
	cvt.s64.s32 	%rd13, %r31;
	add.s64 	%rd14, %rd12, %rd13;
	.loc	1 36 68                         // quant_per_thread.py:36:68
	mul.lo.s32 	%r32, %r20, %r23;
	.loc	1 36 19                         // quant_per_thread.py:36:19
	cvt.s64.s32 	%rd15, %r32;
	add.s64 	%rd16, %rd14, %rd15;
	add.s64 	%rd2, %rd16, %rd10;
	.loc	1 37 26                         // quant_per_thread.py:37:26
	mul.lo.s32 	%r33, %r22, %r9;
	.loc	1 37 18                         // quant_per_thread.py:37:18
	mad.wide.s32 	%rd17, %r33, 4, %rd6;
	.loc	1 37 46                         // quant_per_thread.py:37:46
	mul.lo.s32 	%r34, %r24, %r8;
	.loc	1 37 18                         // quant_per_thread.py:37:18
	mad.wide.s32 	%rd18, %r34, 4, %rd17;
	.loc	1 37 66                         // quant_per_thread.py:37:66
	and.b32 	%r35, %r5, 2147483640;
	.loc	1 37 18                         // quant_per_thread.py:37:18
	mad.wide.u32 	%rd19, %r35, 4, %rd18;
	mad.wide.u32 	%rd3, %r6, 4, %rd19;
	.loc	1 39 34                         // quant_per_thread.py:39:34
	setp.lt.s32 	%p1, %r23, %r7;
	.loc	1 39 9                          // quant_per_thread.py:39:9
	// begin inline asm
	.loc	1 39 9                          // quant_per_thread.py:39:9
	mov.u32 %r1, 0x0;
	@%p1 ld.global.b32 { %r1 }, [ %rd1 + 0 ];

	// end inline asm
	mov.b32 	{%rs2, %rs3}, %r1;
	.loc	1 40 9                          // quant_per_thread.py:40:9
	cvt.f32.bf16 	%r36, %rs2;
	cvt.f32.bf16 	%r37, %rs3;
	.loc	1 41 20                         // quant_per_thread.py:41:20
	abs.f32 	%r38, %r36;
	abs.f32 	%r39, %r37;
$L__tmp1:
	.loc	1 41 13                         // quant_per_thread.py:41:13
	.loc	2 191 16, function_name $L__info_string0, inlined_at 1 41 13 // standard.py:191:16
	.loc	2 170 12, function_name $L__info_string0, inlined_at 2 191 16 // standard.py:170:12
	max.f32 	%r40, %r38, %r39;
$L__tmp2:
	.loc	2 191 16, function_name $L__info_string0, inlined_at 1 41 13 // standard.py:191:16
	shfl.sync.bfly.b32 	%r41, %r40, 16, 31, -1;
$L__tmp3:
	.loc	2 170 12, function_name $L__info_string0, inlined_at 2 191 16 // standard.py:170:12
	max.f32 	%r42, %r40, %r41;
$L__tmp4:
	.loc	2 191 16, function_name $L__info_string0, inlined_at 1 41 13 // standard.py:191:16
	shfl.sync.bfly.b32 	%r43, %r42, 8, 31, -1;
$L__tmp5:
	.loc	2 170 12, function_name $L__info_string0, inlined_at 2 191 16 // standard.py:170:12
	max.f32 	%r44, %r42, %r43;
$L__tmp6:
	.loc	2 191 16, function_name $L__info_string0, inlined_at 1 41 13 // standard.py:191:16
	shfl.sync.bfly.b32 	%r45, %r44, 4, 31, -1;
$L__tmp7:
	.loc	2 170 12, function_name $L__info_string0, inlined_at 2 191 16 // standard.py:170:12
	max.f32 	%r46, %r44, %r45;
$L__tmp8:
	.loc	2 191 16, function_name $L__info_string0, inlined_at 1 41 13 // standard.py:191:16
	shfl.sync.bfly.b32 	%r47, %r46, 2, 31, -1;
$L__tmp9:
	.loc	2 170 12, function_name $L__info_string0, inlined_at 2 191 16 // standard.py:170:12
	max.f32 	%r48, %r46, %r47;
$L__tmp10:
	.loc	2 191 16, function_name $L__info_string0, inlined_at 1 41 13 // standard.py:191:16
	shfl.sync.bfly.b32 	%r49, %r48, 1, 31, -1;
$L__tmp11:
	.loc	2 170 12, function_name $L__info_string0, inlined_at 2 191 16 // standard.py:170:12
	max.f32 	%r3, %r48, %r49;
$L__tmp12:
	.loc	2 191 16, function_name $L__info_string0, inlined_at 1 41 13 // standard.py:191:16
	shr.u32 	%r50, %r17, 3;
	mov.b32 	%r51, global_smem;
	add.s32 	%r2, %r51, %r50;
	// begin inline asm
	.loc	2 191 16, function_name $L__info_string0, inlined_at 1 41 13 // standard.py:191:16
	st.shared::cta.b32 [ %r2 + 0 ], %r3;

	// end inline asm
	bar.sync 	0;
	shl.b32 	%r52, %r16, 2;
	and.b32 	%r53, %r52, 12;
	add.s32 	%r54, %r51, %r53;
	ld.shared.b32 	%r55, [%r54];
	shfl.sync.bfly.b32 	%r56, %r55, 2, 31, -1;
$L__tmp13:
	.loc	2 170 12, function_name $L__info_string0, inlined_at 2 191 16 // standard.py:170:12
	max.f32 	%r57, %r55, %r56;
$L__tmp14:
	.loc	2 191 16, function_name $L__info_string0, inlined_at 1 41 13 // standard.py:191:16
	shfl.sync.bfly.b32 	%r58, %r57, 1, 31, -1;
$L__tmp15:
	.loc	2 170 12, function_name $L__info_string0, inlined_at 2 191 16 // standard.py:170:12
	max.f32 	%r59, %r57, %r58;
	mov.b32 	%r60, 0f42FE0000;
$L__tmp16:
	.loc	1 41 13                         // quant_per_thread.py:41:13
	div.full.f32 	%r61, %r59, %r60;
	add.f32 	%r4, %r61, 0f33D6BF95;
	.loc	1 42 14                         // quant_per_thread.py:42:14
	div.full.f32 	%r62, %r36, %r4;
	div.full.f32 	%r63, %r37, %r4;
	.loc	1 43 30                         // quant_per_thread.py:43:30
	setp.ge.f32 	%p3, %r62, 0f00000000;
	setp.ge.f32 	%p4, %r63, 0f00000000;
	.loc	1 43 21                         // quant_per_thread.py:43:21
	selp.f32 	%r64, 0f3F000000, 0fBF000000, %p4;
	selp.f32 	%r65, 0f3F000000, 0fBF000000, %p3;
	.loc	1 43 5                          // quant_per_thread.py:43:5
	add.f32 	%r66, %r62, %r65;
	add.f32 	%r67, %r63, %r64;
	.loc	1 44 14                         // quant_per_thread.py:44:14
	cvt.rzi.s16.f32 	%rs4, %r67;
	cvt.rzi.s16.f32 	%rs5, %r66;
	mov.b32 	%r68, {%rs5, %rs4};
	.loc	1 45 5                          // quant_per_thread.py:45:5
	mov.b32 	{%rs6, %rs7}, %r68;
	shl.b16 	%rs8, %rs7, 8;
	and.b16 	%rs9, %rs6, 255;
	or.b16 	%rs1, %rs9, %rs8;
	// begin inline asm
	@%p1 st.global.b16 [ %rd2 + 0 ], { %rs1 };

	// end inline asm
	.loc	1 46 5                          // quant_per_thread.py:46:5
	setp.eq.b32 	%p2, %r16, 0;
	// begin inline asm
	@%p2 st.global.b32 [ %rd3 + 0 ], { %r4 };

	// end inline asm
	.loc	1 22 1                          // quant_per_thread.py:22:1
	ret;
$L__tmp17:
$L__func_end0:
                                        // -- End function
}
	.file	1 "D:\\Comfy\\App\\ComfyUI_windows_portable\\python_embeded\\Lib\\site-packages\\sageattention\\triton\\quant_per_thread.py"
	.file	2 "D:\\Comfy\\App\\ComfyUI_windows_portable\\python_embeded\\Lib\\site-packages\\triton\\language\\standard.py"
	.section	.debug_abbrev
	{
.b8 1                                   // Abbreviation Code
.b8 17                                  // DW_TAG_compile_unit
.b8 1                                   // DW_CHILDREN_yes
.b8 37                                  // DW_AT_producer
.b8 8                                   // DW_FORM_string
.b8 19                                  // DW_AT_language
.b8 5                                   // DW_FORM_data2
.b8 3                                   // DW_AT_name
.b8 8                                   // DW_FORM_string
.b8 16                                  // DW_AT_stmt_list
.b8 6                                   // DW_FORM_data4
.b8 27                                  // DW_AT_comp_dir
.b8 8                                   // DW_FORM_string
.b8 0                                   // EOM(1)
.b8 0                                   // EOM(2)
.b8 2                                   // Abbreviation Code
.b8 46                                  // DW_TAG_subprogram
.b8 0                                   // DW_CHILDREN_no
.b8 3                                   // DW_AT_name
.b8 8                                   // DW_FORM_string
.b8 32                                  // DW_AT_inline
.b8 11                                  // DW_FORM_data1
.b8 0                                   // EOM(1)
.b8 0                                   // EOM(2)
.b8 3                                   // Abbreviation Code
.b8 46                                  // DW_TAG_subprogram
.b8 1                                   // DW_CHILDREN_yes
.b8 17                                  // DW_AT_low_pc
.b8 1                                   // DW_FORM_addr
.b8 18                                  // DW_AT_high_pc
.b8 1                                   // DW_FORM_addr
.b8 49                                  // DW_AT_abstract_origin
.b8 19                                  // DW_FORM_ref4
.b8 0                                   // EOM(1)
.b8 0                                   // EOM(2)
.b8 4                                   // Abbreviation Code
.b8 29                                  // DW_TAG_inlined_subroutine
.b8 1                                   // DW_CHILDREN_yes
.b8 49                                  // DW_AT_abstract_origin
.b8 19                                  // DW_FORM_ref4
.b8 17                                  // DW_AT_low_pc
.b8 1                                   // DW_FORM_addr
.b8 18                                  // DW_AT_high_pc
.b8 1                                   // DW_FORM_addr
.b8 88                                  // DW_AT_call_file
.b8 11                                  // DW_FORM_data1
.b8 89                                  // DW_AT_call_line
.b8 11                                  // DW_FORM_data1
.b8 87                                  // DW_AT_call_column
.b8 11                                  // DW_FORM_data1
.b8 0                                   // EOM(1)
.b8 0                                   // EOM(2)
.b8 5                                   // Abbreviation Code
.b8 29                                  // DW_TAG_inlined_subroutine
.b8 0                                   // DW_CHILDREN_no
.b8 49                                  // DW_AT_abstract_origin
.b8 19                                  // DW_FORM_ref4
.b8 17                                  // DW_AT_low_pc
.b8 1                                   // DW_FORM_addr
.b8 18                                  // DW_AT_high_pc
.b8 1                                   // DW_FORM_addr
.b8 88                                  // DW_AT_call_file
.b8 11                                  // DW_FORM_data1
.b8 89                                  // DW_AT_call_line
.b8 11                                  // DW_FORM_data1
.b8 87                                  // DW_AT_call_column
.b8 11                                  // DW_FORM_data1
.b8 0                                   // EOM(1)
.b8 0                                   // EOM(2)
.b8 0                                   // EOM(3)
	}
	.section	.debug_info
	{
.b32 242                                // Length of Unit
.b8 2                                   // DWARF version number
.b8 0
.b32 .debug_abbrev                      // Offset Into Abbrev. Section
.b8 8                                   // Address Size (in bytes)
.b8 1                                   // Abbrev [1] 0xb:0xeb DW_TAG_compile_unit
.b8 116                                 // DW_AT_producer
.b8 114
.b8 105
.b8 116
.b8 111
.b8 110
.b8 0
.b8 2                                   // DW_AT_language
.b8 0
.b8 113                                 // DW_AT_name
.b8 117
.b8 97
.b8 110
.b8 116
.b8 95
.b8 112
.b8 101
.b8 114
.b8 95
.b8 116
.b8 104
.b8 114
.b8 101
.b8 97
.b8 100
.b8 46
.b8 112
.b8 121
.b8 0
.b32 .debug_line                        // DW_AT_stmt_list
.b8 68                                  // DW_AT_comp_dir
.b8 58
.b8 92
.b8 67
.b8 111
.b8 109
.b8 102
.b8 121
.b8 92
.b8 65
.b8 112
.b8 112
.b8 92
.b8 67
.b8 111
.b8 109
.b8 102
.b8 121
.b8 85
.b8 73
.b8 95
.b8 119
.b8 105
.b8 110
.b8 100
.b8 111
.b8 119
.b8 115
.b8 95
.b8 112
.b8 111
.b8 114
.b8 116
.b8 97
.b8 98
.b8 108
.b8 101
.b8 92
.b8 112
.b8 121
.b8 116
.b8 104
.b8 111
.b8 110
.b8 95
.b8 101
.b8 109
.b8 98
.b8 101
.b8 100
.b8 101
.b8 100
.b8 92
.b8 76
.b8 105
.b8 98
.b8 92
.b8 115
.b8 105
.b8 116
.b8 101
.b8 45
.b8 112
.b8 97
.b8 99
.b8 107
.b8 97
.b8 103
.b8 101
.b8 115
.b8 92
.b8 115
.b8 97
.b8 103
.b8 101
.b8 97
.b8 116
.b8 116
.b8 101
.b8 110
.b8 116
.b8 105
.b8 111
.b8 110
.b8 92
.b8 116
.b8 114
.b8 105
.b8 116
.b8 111
.b8 110
.b8 0
.b8 2                                   // Abbrev [2] 0x89:0x25 DW_TAG_subprogram
.b8 113                                 // DW_AT_name
.b8 117
.b8 97
.b8 110
.b8 116
.b8 95
.b8 113
.b8 117
.b8 101
.b8 114
.b8 121
.b8 95
.b8 112
.b8 101
.b8 114
.b8 95
.b8 116
.b8 104
.b8 114
.b8 101
.b8 97
.b8 100
.b8 95
.b8 105
.b8 110
.b8 116
.b8 56
.b8 95
.b8 107
.b8 101
.b8 114
.b8 110
.b8 101
.b8 108
.b8 0
.b8 1                                   // DW_AT_inline
.b8 3                                   // Abbrev [3] 0xae:0x47 DW_TAG_subprogram
.b64 $L__func_begin0                    // DW_AT_low_pc
.b64 $L__func_end0                      // DW_AT_high_pc
.b32 137                                // DW_AT_abstract_origin
.b8 4                                   // Abbrev [4] 0xc3:0x31 DW_TAG_inlined_subroutine
.b32 137                                // DW_AT_abstract_origin
.b64 $L__tmp1                           // DW_AT_low_pc
.b64 $L__tmp16                          // DW_AT_high_pc
.b8 1                                   // DW_AT_call_file
.b8 41                                  // DW_AT_call_line
.b8 13                                  // DW_AT_call_column
.b8 5                                   // Abbrev [5] 0xdb:0x18 DW_TAG_inlined_subroutine
.b32 137                                // DW_AT_abstract_origin
.b64 $L__tmp1                           // DW_AT_low_pc
.b64 $L__tmp16                          // DW_AT_high_pc
.b8 2                                   // DW_AT_call_file
.b8 191                                 // DW_AT_call_line
.b8 16                                  // DW_AT_call_column
.b8 0                                   // End Of Children Mark
.b8 0                                   // End Of Children Mark
.b8 0                                   // End Of Children Mark
	}
	.section	.debug_str
	{
$L__info_string0:
.b8 113                                 // string offset=0 ; quant_query_per_thread_int8_kernel
.b8 117
.b8 97
.b8 110
.b8 116
.b8 95
.b8 113
.b8 117
.b8 101
.b8 114
.b8 121
.b8 95
.b8 112
.b8 101
.b8 114
.b8 95
.b8 116
.b8 104
.b8 114
.b8 101
.b8 97
.b8 100
.b8 95
.b8 105
.b8 110
.b8 116
.b8 56
.b8 95
.b8 107
.b8 101
.b8 114
.b8 110
.b8 101
.b8 108
.b8 0
	}
	.section	.debug_macinfo	{	}
