	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sx_setup_port
_sx_setup_port:                         ## @sx_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_func_enter
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, 16(%rbx)
	jne	LBB0_10
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_2
LBB0_7:
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:
	movq	_TTY_IO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_clear_bit
LBB0_9:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	$0, 48(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_sx_change_speed
	movl	(%r12), %eax
	orl	%eax, 16(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%r15d, %r15d
LBB0_10:
	xorl	%eax, %eax
	callq	_func_exit
LBB0_11:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_zeroed_page
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	cmpq	$0, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	%rax, %rdi
	callq	_free_page
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_func_exit
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_3:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_func_exit
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_6:
	movq	%rax, (%rbx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ## @ASYNC_INITIALIZED
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_TTY_IO_ERROR,4,2               ## @TTY_IO_ERROR
	.no_dead_strip	_sx_setup_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sx_setup_port
_sx_setup_port:                         ; @sx_setup_port
	.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, x1
	mov	x20, x0
	bl	_func_enter
	ldr	w8, [x19, #16]
Lloh0:
	adrp	x22, _ASYNC_INITIALIZED@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ASYNC_INITIALIZED@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_7
LBB0_2:
	add	x21, x19, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _TTY_IO_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TTY_IO_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_clear_bit
LBB0_4:
	stp	xzr, xzr, [x19, #32]
	str	xzr, [x19, #48]
	mov	x0, x20
	mov	x1, x19
	bl	_sx_change_speed
	ldr	w8, [x22]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
LBB0_5:
	bl	_func_exit
	mov	w0, #0
LBB0_6:
	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
LBB0_7:
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_get_zeroed_page
	cbz	x0, LBB0_10
; %bb.8:
	ldr	x8, [x19]
	cbz	x8, LBB0_12
; %bb.9:
	bl	_free_page
	bl	_func_exit
Lloh8:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
	bl	_func_exit
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_12:
	str	x0, [x19]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ; @ASYNC_INITIALIZED
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_TTY_IO_ERROR,4,2               ; @TTY_IO_ERROR
	.no_dead_strip	_sx_setup_port
.subsections_via_symbols
