	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtip_detect_product
_mtip_detect_product:                   ## @mtip_detect_product
	.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	%rdi, %r14
	movq	_HOST_HSORG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	24(%r14), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_MTIP_PRODUCT_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movl	$1, (%r14)
	testb	$8, %bl
	jne	LBB0_1
## %bb.4:
	movq	8(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
LBB0_1:
	movq	_MTIP_PRODUCT_ASICFPGA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_HSORG_HWREV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%ebx, %edx
	movq	_HSORG_SLOTGROUPS@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	sarl	$8, %edx
	incl	%ebx
	movq	8(%r14), %rdi
	movl	%ebx, %r8d
	shll	$5, %r8d
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %ecx
	callq	_dev_info
	movq	_MTIP_MAX_SLOT_GROUPS@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	cmpl	%edx, %ebx
	jbe	LBB0_3
## %bb.2:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
	movl	(%r15), %ebx
LBB0_3:
	movl	%ebx, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST_HSORG,8,3                 ## @HOST_HSORG
	.comm	_MTIP_PRODUCT_UNKNOWN,4,2       ## @MTIP_PRODUCT_UNKNOWN
	.comm	_MTIP_PRODUCT_ASICFPGA,4,2      ## @MTIP_PRODUCT_ASICFPGA
	.comm	_HSORG_HWREV,4,2                ## @HSORG_HWREV
	.comm	_HSORG_SLOTGROUPS,4,2           ## @HSORG_SLOTGROUPS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ASIC-FPGA design, HS rev 0x%x, %i slot groups [%i slots]\n"

	.comm	_MTIP_MAX_SLOT_GROUPS,4,2       ## @MTIP_MAX_SLOT_GROUPS
L_.str.1:                               ## @.str.1
	.asciz	"Warning: driver only supports %i slot groups.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unrecognized product id\n"

	.no_dead_strip	_mtip_detect_product
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtip_detect_product
_mtip_detect_product:                   ; @mtip_detect_product
	.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	x19, x0
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x9, _HOST_HSORG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HOST_HSORG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh3:
	adrp	x8, _MTIP_PRODUCT_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTIP_PRODUCT_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	w8, #1
	str	w8, [x19]
	tbnz	w0, #3, LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	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
	b	_dev_warn
LBB0_2:
Lloh8:
	adrp	x8, _MTIP_PRODUCT_ASICFPGA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTIP_PRODUCT_ASICFPGA@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #16]
Lloh11:
	adrp	x8, _HSORG_HWREV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HSORG_HWREV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh14:
	adrp	x9, _HSORG_SLOTGROUPS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HSORG_SLOTGROUPS@GOTPAGEOFF]
	asr	w2, w8, #8
Lloh16:
	ldr	w8, [x9]
	and	w8, w8, w0
	add	w20, w8, #1
	ldr	x0, [x19, #8]
	lsl	w4, w20, #5
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_info
Lloh19:
	adrp	x21, _MTIP_MAX_SLOT_GROUPS@GOTPAGE
Lloh20:
	ldr	x21, [x21, _MTIP_MAX_SLOT_GROUPS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w20, w8
	b.ls	LBB0_4
; %bb.3:
	ldr	x0, [x19, #8]
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
	ldr	w20, [x21]
LBB0_4:
	str	w20, [x19]
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST_HSORG,8,3                 ; @HOST_HSORG
	.comm	_MTIP_PRODUCT_UNKNOWN,4,2       ; @MTIP_PRODUCT_UNKNOWN
	.comm	_MTIP_PRODUCT_ASICFPGA,4,2      ; @MTIP_PRODUCT_ASICFPGA
	.comm	_HSORG_HWREV,4,2                ; @HSORG_HWREV
	.comm	_HSORG_SLOTGROUPS,4,2           ; @HSORG_SLOTGROUPS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ASIC-FPGA design, HS rev 0x%x, %i slot groups [%i slots]\n"

	.comm	_MTIP_MAX_SLOT_GROUPS,4,2       ; @MTIP_MAX_SLOT_GROUPS
l_.str.1:                               ; @.str.1
	.asciz	"Warning: driver only supports %i slot groups.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unrecognized product id\n"

	.no_dead_strip	_mtip_detect_product
.subsections_via_symbols
