	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dln2_check_hw
_dln2_check_hw:                         ## @dln2_check_hw
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$4, -12(%rbp)
	movq	_DLN2_HANDLE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CMD_GET_DEVICE_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-12(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-16(%rbp), %r9
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	__dln2_transfer
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	cmpl	$3, -12(%rbp)
	ja	LBB0_3
## %bb.2:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movl	-16(%rbp), %edi
	callq	_le32_to_cpu
	movq	%rax, %rcx
	movq	_DLN2_HW_ID@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_6
## %bb.4:
	movq	(%rbx), %rbx
	movl	-16(%rbp), %edi
	callq	_le32_to_cpu
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DLN2_HANDLE_CTRL,4,2           ## @DLN2_HANDLE_CTRL
	.comm	_CMD_GET_DEVICE_VER,4,2         ## @CMD_GET_DEVICE_VER
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_DLN2_HW_ID,8,3                 ## @DLN2_HW_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device ID 0x%x not supported\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_dln2_check_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dln2_check_hw
_dln2_check_hw:                         ; @dln2_check_hw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	w8, #4
	str	w8, [sp, #8]
Lloh0:
	adrp	x8, _DLN2_HANDLE_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DLN2_HANDLE_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _CMD_GET_DEVICE_VER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_GET_DEVICE_VER@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x5, sp, #12
	add	x6, sp, #8
	mov	x3, #0
	mov	w4, #0
	bl	__dln2_transfer
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldr	w8, [sp, #8]
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	ldr	w0, [sp, #12]
	bl	_le32_to_cpu
Lloh8:
	adrp	x8, _DLN2_HW_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DLN2_HW_ID@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	ldr	x19, [x19]
	ldr	w0, [sp, #12]
	bl	_le32_to_cpu
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DLN2_HANDLE_CTRL,4,2           ; @DLN2_HANDLE_CTRL
	.comm	_CMD_GET_DEVICE_VER,4,2         ; @CMD_GET_DEVICE_VER
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_DLN2_HW_ID,8,3                 ; @DLN2_HW_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device ID 0x%x not supported\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_dln2_check_hw
.subsections_via_symbols
