	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_get_dev_info
_qed_get_dev_info:                      ## @qed_get_dev_info
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movl	36(%rbx), %edi
	movq	_PCI_VENDOR_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_pci_read_config_word
	movl	36(%rbx), %edi
	movq	_PCI_DEVICE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	4(%rbx), %rdx
	callq	_pci_read_config_word
	movl	4(%rbx), %edx
	movq	_QED_DEV_ID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edx, %eax
	cmpl	$128, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.3:
	movq	_QED_DEV_TYPE_AH@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	_QED_DEV_TYPE_BB@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_MISCS_REG_CHIP_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_qed_rd
	movl	%eax, 8(%rbx)
	movq	_MISCS_REG_CHIP_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_qed_rd
	movl	%eax, 12(%rbx)
	movq	_CHIP_REV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_MASK_FIELD
	movq	_MISCS_REG_CMT_ENABLED_FOR_PAIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_qed_rd
	movl	(%r14), %ecx
	btl	%ecx, %eax
	jae	LBB0_5
## %bb.6:
	movslq	28(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_DP_NOTICE
	movl	$2, %eax
	jmp	LBB0_7
LBB0_9:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_DP_NOTICE
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movl	$1, %eax
LBB0_7:
	movl	%eax, 16(%rbx)
	movq	_MISCS_REG_CHIP_TEST_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_qed_rd
	sarl	$4, %eax
	movl	%eax, 20(%rbx)
	movq	_CHIP_BOND_ID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_MASK_FIELD
	movq	_MISCS_REG_CHIP_METAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_qed_rd
	movl	%eax, 24(%rbx)
	movq	_CHIP_METAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_MASK_FIELD
	movl	28(%rbx), %r14d
	movq	%rbx, %rdi
	callq	_QED_IS_BB
	testq	%rax, %rax
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rax, %rdx
	movl	8(%rbx), %r9d
	movl	12(%rbx), %eax
	leal	65(%rax), %ecx
	movl	24(%rbx), %r8d
	movl	20(%rbx), %ebx
	subq	$8, %rsp
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	pushq	%r8
	pushq	%rbx
	pushq	%rax
	callq	_DP_INFO
	addq	$32, %rsp
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_VENDOR_ID,4,2              ## @PCI_VENDOR_ID
	.comm	_PCI_DEVICE_ID,4,2              ## @PCI_DEVICE_ID
	.comm	_QED_DEV_ID_MASK,4,2            ## @QED_DEV_ID_MASK
	.comm	_QED_DEV_TYPE_BB,4,2            ## @QED_DEV_TYPE_BB
	.comm	_QED_DEV_TYPE_AH,4,2            ## @QED_DEV_TYPE_AH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown device id 0x%x\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MISCS_REG_CHIP_NUM,4,2         ## @MISCS_REG_CHIP_NUM
	.comm	_MISCS_REG_CHIP_REV,4,2         ## @MISCS_REG_CHIP_REV
	.comm	_CHIP_REV,4,2                   ## @CHIP_REV
	.comm	_MISCS_REG_CMT_ENABLED_FOR_PAIR,4,2 ## @MISCS_REG_CMT_ENABLED_FOR_PAIR
L_.str.1:                               ## @.str.1
	.asciz	"device in CMT mode\n"

	.comm	_MISCS_REG_CHIP_TEST_REG,4,2    ## @MISCS_REG_CHIP_TEST_REG
	.comm	_CHIP_BOND_ID,4,2               ## @CHIP_BOND_ID
	.comm	_MISCS_REG_CHIP_METAL,4,2       ## @MISCS_REG_CHIP_METAL
	.comm	_CHIP_METAL,4,2                 ## @CHIP_METAL
L_.str.2:                               ## @.str.2
	.asciz	"Chip details - %s %c%d, Num: %04x Rev: %04x Bond id: %04x Metal: %04x\n"

L_.str.3:                               ## @.str.3
	.asciz	"BB"

L_.str.4:                               ## @.str.4
	.asciz	"AH"

	.no_dead_strip	_qed_get_dev_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_get_dev_info
_qed_get_dev_info:                      ; @qed_get_dev_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	w0, [x19, #36]
Lloh0:
	adrp	x8, _PCI_VENDOR_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_VENDOR_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_pci_read_config_word
	ldr	w0, [x19, #36]
Lloh3:
	adrp	x8, _PCI_DEVICE_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_DEVICE_ID@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, x19, #4
	bl	_pci_read_config_word
	ldr	w8, [x19, #4]
Lloh6:
	adrp	x9, _QED_DEV_ID_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _QED_DEV_ID_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w8
	cmp	w9, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w9, #129
	b.ne	LBB0_6
; %bb.2:
Lloh9:
	adrp	x8, _QED_DEV_TYPE_AH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _QED_DEV_TYPE_AH@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _QED_DEV_TYPE_BB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _QED_DEV_TYPE_BB@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	str	w8, [x19, #32]
Lloh13:
	adrp	x8, _MISCS_REG_CHIP_NUM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MISCS_REG_CHIP_NUM@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_qed_rd
	str	w0, [x19, #8]
Lloh16:
	adrp	x8, _MISCS_REG_CHIP_REV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MISCS_REG_CHIP_REV@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_qed_rd
	mov	x1, x0
	str	w0, [x19, #12]
Lloh19:
	adrp	x8, _CHIP_REV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CHIP_REV@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_MASK_FIELD
Lloh22:
	adrp	x8, _MISCS_REG_CMT_ENABLED_FOR_PAIR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MISCS_REG_CMT_ENABLED_FOR_PAIR@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_qed_rd
	ldr	w8, [x20]
	lsr	w8, w0, w8
	tbz	w8, #0, LBB0_7
; %bb.5:
	ldrsw	x0, [x19, #28]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DP_NOTICE
	mov	w8, #2
	b	LBB0_8
LBB0_6:
	str	x8, [sp]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_DP_NOTICE
Lloh29:
	adrp	x8, _EBUSY@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	mov	w8, #1
LBB0_8:
	str	w8, [x19, #16]
Lloh32:
	adrp	x8, _MISCS_REG_CHIP_TEST_REG@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MISCS_REG_CHIP_TEST_REG@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_qed_rd
	asr	w1, w0, #4
	str	w1, [x19, #20]
Lloh35:
	adrp	x8, _CHIP_BOND_ID@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CHIP_BOND_ID@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_MASK_FIELD
Lloh38:
	adrp	x8, _MISCS_REG_CHIP_METAL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MISCS_REG_CHIP_METAL@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_qed_rd
	mov	x1, x0
	str	w0, [x19, #24]
Lloh41:
	adrp	x8, _CHIP_METAL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CHIP_METAL@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	bl	_MASK_FIELD
	ldr	w20, [x19, #28]
	mov	x0, x19
	bl	_QED_IS_BB
Lloh44:
	adrp	x8, l_.str.3@PAGE
Lloh45:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh46:
	adrp	x9, l_.str.4@PAGE
Lloh47:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	x0, #0
	csel	x2, x9, x8, eq
	ldp	w5, w6, [x19, #8]
	add	w3, w6, #65
	ldp	w7, w4, [x19, #20]
	str	w4, [sp]
Lloh48:
	adrp	x1, l_.str.2@PAGE
Lloh49:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_DP_INFO
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_VENDOR_ID,4,2              ; @PCI_VENDOR_ID
	.comm	_PCI_DEVICE_ID,4,2              ; @PCI_DEVICE_ID
	.comm	_QED_DEV_ID_MASK,4,2            ; @QED_DEV_ID_MASK
	.comm	_QED_DEV_TYPE_BB,4,2            ; @QED_DEV_TYPE_BB
	.comm	_QED_DEV_TYPE_AH,4,2            ; @QED_DEV_TYPE_AH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown device id 0x%x\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MISCS_REG_CHIP_NUM,4,2         ; @MISCS_REG_CHIP_NUM
	.comm	_MISCS_REG_CHIP_REV,4,2         ; @MISCS_REG_CHIP_REV
	.comm	_CHIP_REV,4,2                   ; @CHIP_REV
	.comm	_MISCS_REG_CMT_ENABLED_FOR_PAIR,4,2 ; @MISCS_REG_CMT_ENABLED_FOR_PAIR
l_.str.1:                               ; @.str.1
	.asciz	"device in CMT mode\n"

	.comm	_MISCS_REG_CHIP_TEST_REG,4,2    ; @MISCS_REG_CHIP_TEST_REG
	.comm	_CHIP_BOND_ID,4,2               ; @CHIP_BOND_ID
	.comm	_MISCS_REG_CHIP_METAL,4,2       ; @MISCS_REG_CHIP_METAL
	.comm	_CHIP_METAL,4,2                 ; @CHIP_METAL
l_.str.2:                               ; @.str.2
	.asciz	"Chip details - %s %c%d, Num: %04x Rev: %04x Bond id: %04x Metal: %04x\n"

l_.str.3:                               ; @.str.3
	.asciz	"BB"

l_.str.4:                               ; @.str.4
	.asciz	"AH"

	.no_dead_strip	_qed_get_dev_info
.subsections_via_symbols
