	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cudbg_collect_fw_devlog        ## -- Begin function cudbg_collect_fw_devlog
	.p2align	4, 0x90
_cudbg_collect_fw_devlog:               ## @cudbg_collect_fw_devlog
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	%r13, %rdi
	callq	_t4_init_devlog_params
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	24(%r13), %edx
	leaq	-64(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_cudbg_get_buff
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	cmpq	$0, 16(%r13)
	je	LBB0_6
## %bb.4:
	movq	%r13, %rdi
	callq	_spin_lock
	movl	8(%r13), %esi
	movl	28(%r13), %edx
	movq	16(%r13), %rcx
	movl	24(%r13), %r8d
	movq	-64(%rbp), %r9
	movl	$1, (%rsp)
	movq	%r13, %rdi
	callq	_t4_memory_rw
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_spin_unlock
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	movl	%ebx, (%r14)
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	callq	_cudbg_put_buff
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %ebx
	movl	%eax, (%r14)
	jmp	LBB0_7
LBB0_6:
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_cudbg_write_and_release_buff
	movl	%eax, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cudbg_collect_fw_devlog        ; -- Begin function cudbg_collect_fw_devlog
	.p2align	2
_cudbg_collect_fw_devlog:               ; @cudbg_collect_fw_devlog
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0]
	stp	xzr, xzr, [sp]
	mov	x0, x22
	bl	_t4_init_devlog_params
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w2, [x22, #24]
	mov	x3, sp
	mov	x0, x19
	mov	x1, x21
	bl	_cudbg_get_buff
	mov	x23, x0
	cbnz	w0, LBB0_7
; %bb.2:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_6
; %bb.3:
	mov	x0, x22
	bl	_spin_lock
	ldr	w1, [x22, #8]
	ldr	x3, [x22, #16]
	ldp	w4, w2, [x22, #24]
	ldr	x5, [sp]
	mov	x0, x22
	mov	w6, #1
	bl	_t4_memory_rw
	mov	x23, x0
	mov	x0, x22
	bl	_spin_unlock
	cbz	w23, LBB0_6
; %bb.4:
	str	w23, [x20]
	mov	x1, sp
	mov	x0, x19
	bl	_cudbg_put_buff
	b	LBB0_7
LBB0_5:
	mov	x23, x0
	str	w0, [x20]
	b	LBB0_7
LBB0_6:
	mov	x1, sp
	mov	x0, x19
	mov	x2, x21
	bl	_cudbg_write_and_release_buff
	mov	x23, x0
LBB0_7:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
