	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isicom_setup_port
_isicom_setup_port:                     ## @isicom_setup_port
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r15
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	xorl	%r14d, %r14d
	testl	%eax, 4(%r15)
	jne	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	40(%r15), %r12
	leaq	4(%r15), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_tty_port_alloc_xmit_buf
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	leaq	4(%r12), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	_TTY_IO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	cmpl	$1, 8(%r15)
	jne	LBB0_5
## %bb.4:
	incl	12(%r12)
LBB0_5:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r15)
	movq	$0, 32(%r15)
	movl	8(%r12), %edi
	callq	_WaitTillCardIsFree
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movl	(%r15), %edi
	movb	(%r12), %cl
	shll	%cl, %edi
	orl	$32770, %edi                    ## imm = 0x8002
	movl	8(%r12), %esi
	callq	_outw
	movq	_ISICOM_KILLTX@GOTPCREL(%rip), %rax
	movq	_ISICOM_KILLRX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	shll	$8, %edi
	orl	$6, %edi
	movl	8(%r12), %esi
	callq	_outw
	movl	8(%r12), %edi
	callq	_InterruptTheCard
LBB0_7:
	movq	%rbx, %rdi
	callq	_isicom_config_port
	movl	(%r13), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	jmp	LBB0_8
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ## @ASYNC_INITIALIZED
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TTY_IO_ERROR,4,2               ## @TTY_IO_ERROR
	.comm	_ISICOM_KILLTX,4,2              ## @ISICOM_KILLTX
	.comm	_ISICOM_KILLRX,4,2              ## @ISICOM_KILLRX
	.no_dead_strip	_isicom_setup_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isicom_setup_port
_isicom_setup_port:                     ; @isicom_setup_port
	.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
	ldr	x24, [x0, #8]
	mov	x19, x24
	ldr	w8, [x19, #4]!
Lloh0:
	adrp	x22, _ASYNC_INITIALIZED@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ASYNC_INITIALIZED@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	x23, [x24, #40]
	mov	x0, x19
	bl	_tty_port_alloc_xmit_buf
	tbnz	x0, #63, LBB0_9
; %bb.2:
	add	x21, x23, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x8, _TTY_IO_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TTY_IO_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_clear_bit
	ldr	w8, [x24, #8]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.3:
	ldr	w8, [x23, #12]
	add	w8, w8, #1
	str	w8, [x23, #12]
LBB0_4:
	stp	xzr, xzr, [x24, #16]
	str	xzr, [x24, #32]
	ldr	w0, [x23, #8]
	bl	_WaitTillCardIsFree
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	w8, [x24]
	ldr	w9, [x23]
	lsl	w8, w8, w9
	mov	w9, #32770
	orr	w0, w8, w9
	ldr	w1, [x23, #8]
	bl	_outw
Lloh5:
	adrp	x8, _ISICOM_KILLTX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ISICOM_KILLTX@GOTPAGEOFF]
Lloh7:
	adrp	x9, _ISICOM_KILLRX@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ISICOM_KILLRX@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	w0, #6
	bfi	w0, w8, #8, #24
	ldr	w1, [x23, #8]
	bl	_outw
	ldr	w0, [x23, #8]
	bl	_InterruptTheCard
LBB0_6:
	mov	x0, x20
	bl	_isicom_config_port
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
LBB0_7:
	mov	w0, #0
LBB0_8:
	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_9:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ; @ASYNC_INITIALIZED
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TTY_IO_ERROR,4,2               ; @TTY_IO_ERROR
	.comm	_ISICOM_KILLTX,4,2              ; @ISICOM_KILLTX
	.comm	_ISICOM_KILLRX,4,2              ; @ISICOM_KILLRX
	.no_dead_strip	_isicom_setup_port
.subsections_via_symbols
