	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxgb4_cudbg_collect            ## -- Begin function cxgb4_cudbg_collect
	.p2align	4, 0x90
_cxgb4_cudbg_collect:                   ## @cxgb4_cudbg_collect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r12
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -128(%rbp)
	movq	$0, -112(%rbp)
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %r14d
	leaq	-96(%rbp), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r12, -72(%rbp)
	movq	%rbx, -80(%rbp)
	movl	%r14d, -96(%rbp)
	movq	%rbx, -120(%rbp)
	movl	%r14d, -128(%rbp)
	movq	_CUDBG_SIGNATURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movl	$40, (%rbx)
	movq	_CUDBG_MAJOR_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_CUDBG_MINOR_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_CUDBG_MAX_ENTITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	4(%r12), %ecx
	movl	%ecx, 24(%rbx)
	movq	_CUDBG_DUMP_TYPE_MINI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rbx)
	leal	40(,%rax,4), %r15d
	cmpl	%r15d, %r14d
	jge	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_12
LBB0_2:
	xorl	%eax, %eax
	callq	_cudbg_get_workspace_size
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movq	_CUDBG_COMPRESSION_ZLIB@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	leaq	-96(%rbp), %rdi
	callq	_cudbg_alloc_compress_buff
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_6:
	movq	_CUDBG_COMPRESSION_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	jmp	LBB0_7
LBB0_4:
	movq	-88(%rbp), %rax
LBB0_7:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movl	%r15d, -124(%rbp)
	movl	%r15d, -44(%rbp)
	movq	_CXGB4_ETH_DUMP_HW@GOTPCREL(%rip), %rax
	movl	-60(%rbp), %r15d                ## 4-byte Reload
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_cxgb4_collect_hw_dump@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_ARRAY_SIZE
	leaq	-96(%rbp), %rdi
	leaq	-128(%rbp), %rsi
	leaq	-44(%rbp), %r9
	movl	%r12d, %edx
	movl	%eax, %ecx
	movq	%rbx, %r8
	callq	_cxgb4_cudbg_collect_entity
LBB0_9:
	movq	_CXGB4_ETH_DUMP_MEM@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_11
## %bb.10:
	movq	_cxgb4_collect_mem_dump@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_ARRAY_SIZE
	leaq	-96(%rbp), %rdi
	leaq	-128(%rbp), %rsi
	leaq	-44(%rbp), %r9
	movl	%r15d, %edx
	movl	%eax, %ecx
	movq	%rbx, %r8
	callq	_cxgb4_cudbg_collect_entity
LBB0_11:
	leaq	-96(%rbp), %rdi
	callq	_cudbg_free_compress_buff
	movl	-44(%rbp), %eax
	movl	%eax, 16(%rbx)
	movq	-88(%rbp), %rcx
	movq	_CUDBG_COMPRESSION_NONE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	cmovel	%eax, %r14d
	movl	%r14d, (%r13)
	xorl	%r13d, %r13d
LBB0_12:
	movl	%r13d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CUDBG_SIGNATURE,4,2            ## @CUDBG_SIGNATURE
	.comm	_CUDBG_MAJOR_VERSION,4,2        ## @CUDBG_MAJOR_VERSION
	.comm	_CUDBG_MINOR_VERSION,4,2        ## @CUDBG_MINOR_VERSION
	.comm	_CUDBG_MAX_ENTITY,4,2           ## @CUDBG_MAX_ENTITY
	.comm	_CUDBG_DUMP_TYPE_MINI,4,2       ## @CUDBG_DUMP_TYPE_MINI
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CUDBG_COMPRESSION_ZLIB,8,3     ## @CUDBG_COMPRESSION_ZLIB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fail allocating compression buffer ret: %d.  Continuing without compression.\n"

	.comm	_CUDBG_COMPRESSION_NONE,8,3     ## @CUDBG_COMPRESSION_NONE
	.comm	_CXGB4_ETH_DUMP_HW,4,2          ## @CXGB4_ETH_DUMP_HW
	.comm	_cxgb4_collect_hw_dump,4,2      ## @cxgb4_collect_hw_dump
	.comm	_CXGB4_ETH_DUMP_MEM,4,2         ## @CXGB4_ETH_DUMP_MEM
	.comm	_cxgb4_collect_mem_dump,4,2     ## @cxgb4_collect_mem_dump
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxgb4_cudbg_collect            ; -- Begin function cxgb4_cudbg_collect
	.p2align	2
_cxgb4_cudbg_collect:                   ; @cxgb4_cudbg_collect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	stp	xzr, xzr, [sp, #40]
	str	xzr, [sp, #56]
	ldr	w23, [x2]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	stp	x20, x22, [sp, #16]
	str	w23, [sp]
	str	x20, [sp, #48]
	str	w23, [sp, #40]
Lloh0:
	adrp	x8, _CUDBG_SIGNATURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CUDBG_SIGNATURE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20, #36]
	mov	w8, #40
	str	w8, [x20]
Lloh3:
	adrp	x8, _CUDBG_MAJOR_VERSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CUDBG_MAJOR_VERSION@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CUDBG_MINOR_VERSION@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CUDBG_MINOR_VERSION@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _CUDBG_MAX_ENTITY@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CUDBG_MAX_ENTITY@GOTPAGEOFF]
	stp	w9, w8, [x20, #28]
Lloh11:
	ldr	w8, [x10]
	str	w8, [x20, #4]
	ldr	w9, [x22, #4]
Lloh12:
	adrp	x10, _CUDBG_DUMP_TYPE_MINI@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CUDBG_DUMP_TYPE_MINI@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	stp	w10, w9, [x20, #20]
	lsl	w8, w8, #2
	add	w25, w8, #40
	cmp	w23, w25
	b.ge	LBB0_2
; %bb.1:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_2:
	bl	_cudbg_get_workspace_size
Lloh18:
	adrp	x24, _CUDBG_COMPRESSION_NONE@GOTPAGE
Lloh19:
	ldr	x24, [x24, _CUDBG_COMPRESSION_NONE@GOTPAGEOFF]
	cbz	w0, LBB0_5
; %bb.3:
Lloh20:
	adrp	x8, _CUDBG_COMPRESSION_ZLIB@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CUDBG_COMPRESSION_ZLIB@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	x0, sp
	bl	_cudbg_alloc_compress_buff
	cbz	w0, LBB0_6
; %bb.4:
	mov	x2, x0
	ldr	w0, [x22]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_5:
	ldr	x8, [x24]
	str	x8, [sp, #8]
	b	LBB0_7
LBB0_6:
	ldr	x8, [sp, #8]
LBB0_7:
	str	x8, [x20, #8]
	str	w25, [sp, #44]
	str	w25, [sp, #36]
Lloh25:
	adrp	x8, _CXGB4_ETH_DUMP_HW@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CXGB4_ETH_DUMP_HW@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.8:
Lloh28:
	adrp	x8, _cxgb4_collect_hw_dump@GOTPAGE
Lloh29:
	ldr	x8, [x8, _cxgb4_collect_hw_dump@GOTPAGEOFF]
Lloh30:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x3, x0
	mov	x0, sp
	add	x1, sp, #40
	add	x5, sp, #36
	mov	x2, x22
	mov	x4, x20
	bl	_cxgb4_cudbg_collect_entity
LBB0_9:
Lloh31:
	adrp	x8, _CXGB4_ETH_DUMP_MEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CXGB4_ETH_DUMP_MEM@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_11
; %bb.10:
Lloh34:
	adrp	x8, _cxgb4_collect_mem_dump@GOTPAGE
Lloh35:
	ldr	x8, [x8, _cxgb4_collect_mem_dump@GOTPAGEOFF]
Lloh36:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x3, x0
	mov	x0, sp
	add	x1, sp, #40
	add	x5, sp, #36
	mov	x2, x21
	mov	x4, x20
	bl	_cxgb4_cudbg_collect_entity
LBB0_11:
	mov	x0, sp
	bl	_cudbg_free_compress_buff
	mov	w0, #0
	ldr	w8, [sp, #36]
	str	w8, [x20, #16]
	ldr	x9, [sp, #8]
	ldr	x10, [x24]
	cmp	x9, x10
	csel	w8, w8, w23, eq
	str	w8, [x19]
LBB0_12:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_CUDBG_SIGNATURE,4,2            ; @CUDBG_SIGNATURE
	.comm	_CUDBG_MAJOR_VERSION,4,2        ; @CUDBG_MAJOR_VERSION
	.comm	_CUDBG_MINOR_VERSION,4,2        ; @CUDBG_MINOR_VERSION
	.comm	_CUDBG_MAX_ENTITY,4,2           ; @CUDBG_MAX_ENTITY
	.comm	_CUDBG_DUMP_TYPE_MINI,4,2       ; @CUDBG_DUMP_TYPE_MINI
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CUDBG_COMPRESSION_ZLIB,8,3     ; @CUDBG_COMPRESSION_ZLIB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fail allocating compression buffer ret: %d.  Continuing without compression.\n"

	.comm	_CUDBG_COMPRESSION_NONE,8,3     ; @CUDBG_COMPRESSION_NONE
	.comm	_CXGB4_ETH_DUMP_HW,4,2          ; @CXGB4_ETH_DUMP_HW
	.comm	_cxgb4_collect_hw_dump,4,2      ; @cxgb4_collect_hw_dump
	.comm	_CXGB4_ETH_DUMP_MEM,4,2         ; @CXGB4_ETH_DUMP_MEM
	.comm	_cxgb4_collect_mem_dump,4,2     ; @cxgb4_collect_mem_dump
.subsections_via_symbols
