	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wanxl_attach
_wanxl_attach:                          ## @wanxl_attach
	.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
	movl	%edx, %ebx
	movl	%esi, %r14d
	callq	_dev_to_port
	movq	%rax, %r15
	movq	_ENCODING_NRZ@GOTPCREL(%rip), %rax
	cmpw	%r14w, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_ENCODING_NRZI@GOTPCREL(%rip), %rax
	cmpw	%r14w, (%rax)
	jne	LBB0_2
LBB0_3:
	movq	_PARITY_NONE@GOTPCREL(%rip), %rax
	cmpw	%bx, (%rax)
	je	LBB0_8
## %bb.4:
	movq	_PARITY_CRC32_PR1_CCITT@GOTPCREL(%rip), %rax
	cmpw	%bx, (%rax)
	je	LBB0_8
## %bb.5:
	movq	_PARITY_CRC16_PR1_CCITT@GOTPCREL(%rip), %rax
	cmpw	%bx, (%rax)
	je	LBB0_8
## %bb.6:
	movq	_PARITY_CRC32_PR0_CCITT@GOTPCREL(%rip), %rax
	cmpw	%bx, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_PARITY_CRC16_PR0_CCITT@GOTPCREL(%rip), %rax
	cmpw	%bx, (%rax)
	je	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_8:
	movq	%r15, %rdi
	callq	_get_status
	movw	%r14w, (%rax)
	movq	%r15, %rdi
	callq	_get_status
	movw	%bx, 2(%rax)
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENCODING_NRZ,2,1               ## @ENCODING_NRZ
	.comm	_ENCODING_NRZI,2,1              ## @ENCODING_NRZI
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PARITY_NONE,2,1                ## @PARITY_NONE
	.comm	_PARITY_CRC32_PR1_CCITT,2,1     ## @PARITY_CRC32_PR1_CCITT
	.comm	_PARITY_CRC16_PR1_CCITT,2,1     ## @PARITY_CRC16_PR1_CCITT
	.comm	_PARITY_CRC32_PR0_CCITT,2,1     ## @PARITY_CRC32_PR0_CCITT
	.comm	_PARITY_CRC16_PR0_CCITT,2,1     ## @PARITY_CRC16_PR0_CCITT
	.no_dead_strip	_wanxl_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wanxl_attach
_wanxl_attach:                          ; @wanxl_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x20, x1
	bl	_dev_to_port
Lloh0:
	adrp	x8, _ENCODING_NRZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENCODING_NRZ@GOTPAGEOFF]
	ldrh	w8, [x8]
Lloh2:
	adrp	x9, _ENCODING_NRZI@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ENCODING_NRZI@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	b.ne	LBB0_3
; %bb.1:
Lloh4:
	adrp	x8, _PARITY_NONE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PARITY_NONE@GOTPAGEOFF]
	ldrh	w8, [x8]
Lloh6:
	adrp	x9, _PARITY_CRC32_PR1_CCITT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PARITY_CRC32_PR1_CCITT@GOTPAGEOFF]
	ldrh	w9, [x9]
Lloh8:
	adrp	x10, _PARITY_CRC16_PR1_CCITT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PARITY_CRC16_PR1_CCITT@GOTPAGEOFF]
	ldrh	w10, [x10]
Lloh10:
	adrp	x11, _PARITY_CRC32_PR0_CCITT@GOTPAGE
Lloh11:
	ldr	x11, [x11, _PARITY_CRC32_PR0_CCITT@GOTPAGEOFF]
	ldrh	w11, [x11]
Lloh12:
	adrp	x12, _PARITY_CRC16_PR0_CCITT@GOTPAGE
Lloh13:
	ldr	x12, [x12, _PARITY_CRC16_PR0_CCITT@GOTPAGEOFF]
	ldrh	w12, [x12]
	cmp	w8, w19
	ccmp	w9, w19, #4, ne
	ccmp	w10, w19, #4, ne
	ccmp	w11, w19, #4, ne
	ccmp	w12, w19, #4, ne
	b.ne	LBB0_3
; %bb.2:
	mov	x21, x0
	bl	_get_status
	strh	w20, [x0]
	mov	x0, x21
	bl	_get_status
	mov	x8, x0
	mov	w0, #0
	strh	w19, [x8, #2]
	b	LBB0_4
LBB0_3:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ENCODING_NRZ,2,1               ; @ENCODING_NRZ
	.comm	_ENCODING_NRZI,2,1              ; @ENCODING_NRZI
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PARITY_NONE,2,1                ; @PARITY_NONE
	.comm	_PARITY_CRC32_PR1_CCITT,2,1     ; @PARITY_CRC32_PR1_CCITT
	.comm	_PARITY_CRC16_PR1_CCITT,2,1     ; @PARITY_CRC16_PR1_CCITT
	.comm	_PARITY_CRC32_PR0_CCITT,2,1     ; @PARITY_CRC32_PR0_CCITT
	.comm	_PARITY_CRC16_PR0_CCITT,2,1     ; @PARITY_CRC16_PR0_CCITT
	.no_dead_strip	_wanxl_attach
.subsections_via_symbols
