	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cudbg_collect_vpd_data         ## -- Begin function cudbg_collect_vpd_data
	.p2align	4, 0x90
_cudbg_collect_vpd_data:                ## @cudbg_collect_vpd_data
	.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
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	%rsp, -120(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -112(%rbp)
	movq	_CUDBG_VPD_VER_LEN@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movaps	%xmm0, -96(%rbp)
	movl	$0, -80(%rbp)
	leaq	-96(%rbp), %rsi
	movq	%r13, %rdi
	callq	_t4_get_raw_vpd_params
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	leaq	-49(%rbp), %rsi
	movq	%r13, %rdi
	callq	_t4_get_fw_version
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:
	movl	(%r13), %edi
	movq	_EEPROMVSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_set_vpd_size
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movq	_CUDBG_SCFG_VER_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CUDBG_SCFG_VER_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-51(%rbp), %rcx
	movq	%r13, %rdi
	callq	_cudbg_read_vpd_reg
	movl	%eax, %ebx
	movl	(%r13), %edi
	movq	_CUDBG_VPD_PF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_set_vpd_size
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	testl	%ebx, %ebx
	jne	LBB0_10
## %bb.5:
	movq	_CUDBG_VPD_VER_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%r13, %rdi
	movq	%r12, %rcx
	callq	_cudbg_read_vpd_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movslq	(%r14), %rax
	movb	$0, (%r12,%rax)
	leaq	-50(%rbp), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_kstrtouint
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	leaq	-112(%rbp), %rcx
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	$36, %edx
	callq	_cudbg_get_buff
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	-112(%rbp), %rbx
	movl	32(%rbx), %edi
	movl	-84(%rbp), %esi
	movq	_SERNUM_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	incq	%rdx
	callq	_memcpy
	movl	28(%rbx), %edi
	movl	-88(%rbp), %esi
	movq	_PN_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	incq	%rdx
	callq	_memcpy
	movl	24(%rbx), %edi
	movl	-92(%rbp), %esi
	movq	_MACADDR_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	incq	%rdx
	callq	_memcpy
	movl	20(%rbx), %edi
	movl	-96(%rbp), %esi
	movq	_ID_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	incq	%rdx
	callq	_memcpy
	movb	-51(%rbp), %al
	movb	%al, (%rbx)
	movb	-50(%rbp), %al
	movb	%al, 1(%rbx)
	movsbl	-49(%rbp), %edi
	callq	_FW_HDR_FW_VER_MAJOR_G
	movl	%eax, 16(%rbx)
	movsbl	-49(%rbp), %edi
	callq	_FW_HDR_FW_VER_MINOR_G
	movl	%eax, 12(%rbx)
	movsbl	-49(%rbp), %edi
	callq	_FW_HDR_FW_VER_MICRO_G
	movl	%eax, 8(%rbx)
	movsbl	-49(%rbp), %edi
	callq	_FW_HDR_FW_VER_BUILD_G
	movl	%eax, 4(%rbx)
	leaq	-112(%rbp), %rsi
	movq	%r15, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_cudbg_write_and_release_buff
LBB0_9:
	movl	%eax, %ebx
LBB0_10:
	movq	-120(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CUDBG_VPD_VER_LEN,4,2          ## @CUDBG_VPD_VER_LEN
	.comm	_EEPROMVSIZE,4,2                ## @EEPROMVSIZE
	.comm	_CUDBG_SCFG_VER_ADDR,4,2        ## @CUDBG_SCFG_VER_ADDR
	.comm	_CUDBG_SCFG_VER_LEN,4,2         ## @CUDBG_SCFG_VER_LEN
	.comm	_CUDBG_VPD_PF_SIZE,4,2          ## @CUDBG_VPD_PF_SIZE
	.comm	_CUDBG_VPD_VER_ADDR,4,2         ## @CUDBG_VPD_VER_ADDR
	.comm	_SERNUM_LEN,8,3                 ## @SERNUM_LEN
	.comm	_PN_LEN,8,3                     ## @PN_LEN
	.comm	_MACADDR_LEN,8,3                ## @MACADDR_LEN
	.comm	_ID_LEN,8,3                     ## @ID_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cudbg_collect_vpd_data         ; -- Begin function cudbg_collect_vpd_data
	.p2align	2
_cudbg_collect_vpd_data:                ; @cudbg_collect_vpd_data
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #48
	mov	x19, x1
	mov	x20, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x22, [x0]
	stp	xzr, xzr, [x29, #-88]
Lloh3:
	adrp	x25, _CUDBG_VPD_VER_LEN@GOTPAGE
Lloh4:
	ldr	x25, [x25, _CUDBG_VPD_VER_LEN@GOTPAGEOFF]
	ldr	w8, [x25]
	add	w8, w8, #1
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	stp	xzr, xzr, [x29, #-112]
	stur	wzr, [x29, #-96]
	sub	x1, x29, #112
	mov	x0, x22
	bl	_t4_get_raw_vpd_params
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.1:
	sub	x1, x29, #91
	mov	x0, x22
	bl	_t4_get_fw_version
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.2:
	ldr	w0, [x22]
Lloh7:
	adrp	x8, _EEPROMVSIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EEPROMVSIZE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_pci_set_vpd_size
	tbnz	w0, #31, LBB0_9
; %bb.3:
Lloh10:
	adrp	x8, _CUDBG_SCFG_VER_ADDR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CUDBG_SCFG_VER_ADDR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _CUDBG_SCFG_VER_LEN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CUDBG_SCFG_VER_LEN@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	sub	x3, x29, #89
	mov	x0, x22
	bl	_cudbg_read_vpd_reg
	mov	x23, x0
	ldr	w0, [x22]
Lloh16:
	adrp	x8, _CUDBG_VPD_PF_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CUDBG_VPD_PF_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_pci_set_vpd_size
	tbnz	w0, #31, LBB0_9
; %bb.4:
	cbnz	w23, LBB0_10
; %bb.5:
Lloh19:
	adrp	x8, _CUDBG_VPD_VER_ADDR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CUDBG_VPD_VER_ADDR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w2, [x25]
	mov	x0, x22
	mov	x3, x21
	bl	_cudbg_read_vpd_reg
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.6:
	ldrsw	x8, [x25]
	strb	wzr, [x21, x8]
	sub	x2, x29, #90
	mov	x0, x21
	mov	w1, #0
	bl	_kstrtouint
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.7:
	sub	x3, x29, #88
	mov	x0, x20
	mov	x1, x19
	mov	w2, #36
	bl	_cudbg_get_buff
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.8:
	ldur	x21, [x29, #-88]
	ldr	w0, [x21, #32]
	ldur	w1, [x29, #-100]
Lloh22:
	adrp	x8, _SERNUM_LEN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SERNUM_LEN@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	add	x2, x8, #1
	bl	_memcpy
	ldr	w0, [x21, #28]
	ldur	w1, [x29, #-104]
Lloh25:
	adrp	x8, _PN_LEN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PN_LEN@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	add	x2, x8, #1
	bl	_memcpy
	ldr	w0, [x21, #24]
	ldur	w1, [x29, #-108]
Lloh28:
	adrp	x8, _MACADDR_LEN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MACADDR_LEN@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	add	x2, x8, #1
	bl	_memcpy
	ldr	w0, [x21, #20]
	ldur	w1, [x29, #-112]
Lloh31:
	adrp	x8, _ID_LEN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ID_LEN@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	add	x2, x8, #1
	bl	_memcpy
	ldurb	w8, [x29, #-89]
	strb	w8, [x21]
	ldurb	w8, [x29, #-90]
	strb	w8, [x21, #1]
	ldursb	w0, [x29, #-91]
	bl	_FW_HDR_FW_VER_MAJOR_G
	str	w0, [x21, #16]
	ldursb	w0, [x29, #-91]
	bl	_FW_HDR_FW_VER_MINOR_G
	str	w0, [x21, #12]
	ldursb	w0, [x29, #-91]
	bl	_FW_HDR_FW_VER_MICRO_G
	str	w0, [x21, #8]
	ldursb	w0, [x29, #-91]
	bl	_FW_HDR_FW_VER_BUILD_G
	str	w0, [x21, #4]
	sub	x1, x29, #88
	mov	x0, x20
	mov	x2, x19
	bl	_cudbg_write_and_release_buff
LBB0_9:
	mov	x23, x0
LBB0_10:
	mov	sp, x24
	ldur	x8, [x29, #-72]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x23
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_CUDBG_VPD_VER_LEN,4,2          ; @CUDBG_VPD_VER_LEN
	.comm	_EEPROMVSIZE,4,2                ; @EEPROMVSIZE
	.comm	_CUDBG_SCFG_VER_ADDR,4,2        ; @CUDBG_SCFG_VER_ADDR
	.comm	_CUDBG_SCFG_VER_LEN,4,2         ; @CUDBG_SCFG_VER_LEN
	.comm	_CUDBG_VPD_PF_SIZE,4,2          ; @CUDBG_VPD_PF_SIZE
	.comm	_CUDBG_VPD_VER_ADDR,4,2         ; @CUDBG_VPD_VER_ADDR
	.comm	_SERNUM_LEN,8,3                 ; @SERNUM_LEN
	.comm	_PN_LEN,8,3                     ; @PN_LEN
	.comm	_MACADDR_LEN,8,3                ; @MACADDR_LEN
	.comm	_ID_LEN,8,3                     ; @ID_LEN
.subsections_via_symbols
