	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a2232_open
_a2232_open:                            ## @a2232_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	%rsi, %r14
	movslq	(%rdi), %rbx
	movq	_a2232_ports@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	shlq	$4, %rbx
	leaq	(%r12,%rbx), %r15
	movq	%r15, 8(%rdi)
	movq	%rdi, 8(%r12,%rbx)
	incl	(%r12,%rbx)
	movq	%r15, %rdi
	callq	_gs_init_port
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movq	_GS_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r12,%rbx)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_gs_block_til_ready
	testl	%eax, %eax
	je	LBB0_4
LBB0_1:
	decl	(%r15)
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, %rdi
	callq	_a2232_enable_rx_interrupts
	xorl	%eax, %eax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_a2232_ports,8,3                ## @a2232_ports
	.comm	_GS_ACTIVE,4,2                  ## @GS_ACTIVE
	.no_dead_strip	_a2232_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a2232_open
_a2232_open:                            ; @a2232_open
	.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, x1
	ldrsw	x8, [x0]
Lloh0:
	adrp	x9, _a2232_ports@GOTPAGE
Lloh1:
	ldr	x9, [x9, _a2232_ports@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x19, x9, x8, lsl #4
	str	x19, [x0, #8]
	str	x0, [x19, #8]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_gs_init_port
	cbnz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _GS_ACTIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GS_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_gs_block_til_ready
	cbz	w0, LBB0_4
LBB0_2:
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	bl	_a2232_enable_rx_interrupts
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_a2232_ports,8,3                ; @a2232_ports
	.comm	_GS_ACTIVE,4,2                  ; @GS_ACTIVE
	.no_dead_strip	_a2232_open
.subsections_via_symbols
