	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __fcpnp_write_ctrl
___fcpnp_write_ctrl:                    ## @__fcpnp_write_ctrl
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	movq	8(%rdi), %rax
	leaq	65(%rax), %rdx
	movl	4(%rdi), %r8d
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_AVM_IDX_HDLC_1@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_AVM_IDX_HDLC_2@GOTPCREL(%rip), %rax
LBB0_3:
	movzbl	(%rax), %r15d
	leaq	L_.str(%rip), %rsi
	movl	$64, %edi
	movl	%r14d, %ecx
	callq	_DBG
	movq	_AVM_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movl	%r15d, %edi
	callq	_outb
	testb	$4, %r14b
	jne	LBB0_4
## %bb.5:
	testb	$2, %r14b
	jne	LBB0_6
LBB0_7:
	testb	$1, %r14b
	jne	LBB0_9
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movzbl	(%rbx), %edi
	movq	(%r12), %rax
	movq	_AVM_DATA@GOTPCREL(%rip), %rcx
	movq	_HDLC_STATUS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addq	(%rcx), %rax
	leaq	(%rdx,%rax), %rsi
	addq	$2, %rsi
	callq	_outb
	testb	$2, %r14b
	je	LBB0_7
LBB0_6:
	movzbl	1(%rbx), %edi
	movq	(%r12), %rax
	movq	_AVM_DATA@GOTPCREL(%rip), %rcx
	movq	_HDLC_STATUS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addq	(%rcx), %rax
	leaq	(%rdx,%rax), %rsi
	incq	%rsi
	callq	_outb
	testb	$1, %r14b
	je	LBB0_8
LBB0_9:
	movq	_AVM_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movzbl	2(%rbx), %edi
	movq	_HDLC_STATUS@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_outb                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AVM_IDX_HDLC_2,1,0             ## @AVM_IDX_HDLC_2
	.comm	_AVM_IDX_HDLC_1,1,0             ## @AVM_IDX_HDLC_1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hdlc %c wr%x ctrl %x"

	.comm	_AVM_INDEX,8,3                  ## @AVM_INDEX
	.comm	_AVM_DATA,8,3                   ## @AVM_DATA
	.comm	_HDLC_STATUS,8,3                ## @HDLC_STATUS
	.no_dead_strip	___fcpnp_write_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __fcpnp_write_ctrl
___fcpnp_write_ctrl:                    ; @__fcpnp_write_ctrl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _AVM_IDX_HDLC_2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVM_IDX_HDLC_2@GOTPAGEOFF]
Lloh2:
	adrp	x9, _AVM_IDX_HDLC_1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AVM_IDX_HDLC_1@GOTPAGEOFF]
	ldp	x10, x22, [x0, #8]
	add	x2, x10, #65
	ldr	w4, [x0, #4]
	cmp	x10, #0
	csel	x8, x9, x8, eq
	ldrb	w21, [x8]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #64
	mov	x3, x20
	bl	_DBG
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _AVM_INDEX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AVM_INDEX@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_outb
Lloh9:
	adrp	x23, _AVM_DATA@GOTPAGE
Lloh10:
	ldr	x23, [x23, _AVM_DATA@GOTPAGEOFF]
Lloh11:
	adrp	x21, _HDLC_STATUS@GOTPAGE
Lloh12:
	ldr	x21, [x21, _HDLC_STATUS@GOTPAGEOFF]
	tbnz	w20, #2, LBB0_4
; %bb.1:
	tbnz	w20, #1, LBB0_5
LBB0_2:
	tbnz	w20, #0, LBB0_6
LBB0_3:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldrb	w0, [x19]
	ldr	x8, [x22]
	ldr	x9, [x23]
	ldr	x10, [x21]
	add	x8, x8, x9
	add	x8, x8, x10
	add	x1, x8, #2
	bl	_outb
	tbz	w20, #1, LBB0_2
LBB0_5:
	ldrb	w0, [x19, #1]
	ldr	x8, [x22]
	ldr	x9, [x23]
	ldr	x10, [x21]
	add	x8, x8, x9
	add	x8, x8, x10
	add	x1, x8, #1
	bl	_outb
	tbz	w20, #0, LBB0_3
LBB0_6:
	ldrb	w0, [x19, #2]
	ldr	x8, [x22]
	ldr	x9, [x23]
	ldr	x10, [x21]
	add	x8, x9, x8
	add	x1, x8, x10
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_outb
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AVM_IDX_HDLC_2,1,0             ; @AVM_IDX_HDLC_2
	.comm	_AVM_IDX_HDLC_1,1,0             ; @AVM_IDX_HDLC_1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hdlc %c wr%x ctrl %x"

	.comm	_AVM_INDEX,8,3                  ; @AVM_INDEX
	.comm	_AVM_DATA,8,3                   ; @AVM_DATA
	.comm	_HDLC_STATUS,8,3                ; @HDLC_STATUS
	.no_dead_strip	___fcpnp_write_ctrl
.subsections_via_symbols
