	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uhdlc_open
_uhdlc_open:                            ## @uhdlc_open
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_dev_to_hdlc
	movq	(%rax), %rbx
	xorl	%r15d, %r15d
	cmpl	$1, (%rbx)
	je	LBB0_6
## %bb.1:
	movq	40(%rbx), %r12
	movq	32(%rbx), %rax
	movl	4(%rax), %edi
	movq	_ucc_hdlc_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	movq	%rbx, %r8
	callq	_request_irq
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_3:
	movq	32(%rbx), %rax
	movl	(%rax), %edi
	callq	_ucc_fast_get_qe_cr_subblock
	movq	_QE_INIT_TX_RX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_QE_CR_PROTOCOL_UNSPECIFIED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	xorl	%r15d, %r15d
	movl	%eax, %esi
	xorl	%ecx, %ecx
	callq	_qe_issue_cmd
	movl	24(%rbx), %edi
	movq	_COMM_DIR_RX@GOTPCREL(%rip), %rax
	movq	_COMM_DIR_TX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_ucc_fast_enable
	cmpq	$0, 16(%rbx)
	je	LBB0_5
## %bb.4:
	movb	(%r12), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	8(%r12), %rcx
	orl	%eax, (%rcx)
LBB0_5:
	movl	$1, (%rbx)
	movl	8(%rbx), %edi
	callq	_netif_device_attach
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_napi_enable
	movq	%r14, %rdi
	callq	_netdev_reset_queue
	movq	%r14, %rdi
	callq	_netif_start_queue
	movq	%r14, %rdi
	callq	_hdlc_open
LBB0_6:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ucc_hdlc_irq_handler,4,2       ## @ucc_hdlc_irq_handler
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hdlc"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_QE_INIT_TX_RX,4,2              ## @QE_INIT_TX_RX
	.comm	_QE_CR_PROTOCOL_UNSPECIFIED,4,2 ## @QE_CR_PROTOCOL_UNSPECIFIED
	.comm	_COMM_DIR_RX,4,2                ## @COMM_DIR_RX
	.comm	_COMM_DIR_TX,4,2                ## @COMM_DIR_TX
	.no_dead_strip	_uhdlc_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uhdlc_open
_uhdlc_open:                            ; @uhdlc_open
	.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, x0
	bl	_dev_to_hdlc
	ldr	x20, [x0]
	ldr	w8, [x20]
	cmp	w8, #1
	b.eq	LBB0_6
; %bb.1:
	ldp	x8, x21, [x20, #32]
	ldr	w0, [x8, #4]
Lloh0:
	adrp	x8, _ucc_hdlc_irq_handler@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ucc_hdlc_irq_handler@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #0
	mov	x4, x20
	bl	_request_irq
	cbz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_3:
	ldr	x8, [x20, #32]
	ldr	w0, [x8]
	bl	_ucc_fast_get_qe_cr_subblock
	mov	x1, x0
Lloh8:
	adrp	x8, _QE_INIT_TX_RX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _QE_INIT_TX_RX@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _QE_CR_PROTOCOL_UNSPECIFIED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _QE_CR_PROTOCOL_UNSPECIFIED@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_qe_issue_cmd
Lloh14:
	adrp	x8, _COMM_DIR_RX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _COMM_DIR_RX@GOTPAGEOFF]
	ldr	w0, [x20, #24]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _COMM_DIR_TX@GOTPAGE
Lloh18:
	ldr	x9, [x9, _COMM_DIR_TX@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_ucc_fast_enable
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w8, [x21]
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	x9, [x21, #8]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
LBB0_5:
	mov	w8, #1
	str	w8, [x20]
	ldr	w0, [x20, #8]
	bl	_netif_device_attach
	add	x0, x20, #4
	bl	_napi_enable
	mov	x0, x19
	bl	_netdev_reset_queue
	mov	x0, x19
	bl	_netif_start_queue
	mov	x0, x19
	bl	_hdlc_open
LBB0_6:
	mov	w0, #0
LBB0_7:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ucc_hdlc_irq_handler,4,2       ; @ucc_hdlc_irq_handler
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hdlc"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_QE_INIT_TX_RX,4,2              ; @QE_INIT_TX_RX
	.comm	_QE_CR_PROTOCOL_UNSPECIFIED,4,2 ; @QE_CR_PROTOCOL_UNSPECIFIED
	.comm	_COMM_DIR_RX,4,2                ; @COMM_DIR_RX
	.comm	_COMM_DIR_TX,4,2                ; @COMM_DIR_TX
	.no_dead_strip	_uhdlc_open
.subsections_via_symbols
