	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function program_hw
_program_hw:                            ## @program_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	callq	_rx_stop
	movq	%rbx, %rdi
	callq	_tx_stop
	xorps	%xmm0, %xmm0
	movups	%xmm0, 64(%rbx)
	movq	$0, 80(%rbx)
	movq	56(%rbx), %rax
	movq	_MGSL_MODE_HDLC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	cmpq	$0, 16(%rbx)
	je	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_hdlc_mode
	jmp	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	callq	_async_mode
LBB0_4:
	movq	%rbx, %rdi
	callq	_set_signals
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movups	%xmm0, 40(%rbx)
	movq	_CDCD@GOTPCREL(%rip), %rax
	movq	_CCTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	orl	(%rbx), %edx
	movl	%edx, (%rbx)
	movq	_IE1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_write_reg
	movq	%rbx, %rdi
	callq	_get_signals
	cmpq	$0, 16(%rbx)
	je	LBB0_5
LBB0_7:
	movq	%rbx, %rdi
	callq	_rx_start
LBB0_8:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_5:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	(%rax), %rax
	movq	_CREAD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MGSL_MODE_HDLC,8,3             ## @MGSL_MODE_HDLC
	.comm	_CDCD,4,2                       ## @CDCD
	.comm	_CCTS,4,2                       ## @CCTS
	.comm	_IE1,4,2                        ## @IE1
	.comm	_CREAD,4,2                      ## @CREAD
	.no_dead_strip	_program_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function program_hw
_program_hw:                            ; @program_hw
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_rx_stop
	mov	x0, x20
	bl	_tx_stop
	stp	xzr, xzr, [x20, #72]
	str	xzr, [x20, #64]
	ldr	x8, [x20, #56]
Lloh0:
	adrp	x9, _MGSL_MODE_HDLC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MGSL_MODE_HDLC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_hdlc_mode
	b	LBB0_4
LBB0_3:
	mov	x0, x20
	bl	_async_mode
LBB0_4:
	mov	x0, x20
	bl	_set_signals
	movi.2d	v0, #0000000000000000
	stur	q0, [x20, #24]
Lloh3:
	adrp	x8, _CDCD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CDCD@GOTPAGEOFF]
	stur	q0, [x20, #40]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CCTS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CCTS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20]
	orr	w2, w8, w9
	str	w2, [x20]
Lloh9:
	adrp	x8, _IE1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IE1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_write_reg
	mov	x0, x20
	bl	_get_signals
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_7
LBB0_5:
	mov	x0, x20
	bl	_rx_start
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_7:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.8:
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _CREAD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CREAD@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MGSL_MODE_HDLC,8,3             ; @MGSL_MODE_HDLC
	.comm	_CDCD,4,2                       ; @CDCD
	.comm	_CCTS,4,2                       ; @CCTS
	.comm	_IE1,4,2                        ; @IE1
	.comm	_CREAD,4,2                      ; @CREAD
	.no_dead_strip	_program_hw
.subsections_via_symbols
