	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sx_setup_board
_sx_setup_board:                        ## @sx_setup_board
	.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
	movl	(%rdi), %edx
	movq	_SX_BOARD_ACTIVE@GOTPCREL(%rip), %r14
	xorl	%eax, %eax
	testl	%edx, (%r14)
	jne	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	movq	_SX_BOARD_IS_PCI@GOTPCREL(%rip), %rcx
	movl	4(%rdi), %edi
	movq	_sx_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_DISABLED@GOTPCREL(%rip), %rax
	andl	(%rcx), %edx
	je	LBB0_3
## %bb.2:
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_3:
	orl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %r8
	callq	_request_irq
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_turn_ints_on
	movl	(%r14), %eax
	orl	%eax, (%rbx)
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SX_BOARD_ACTIVE,4,2            ## @SX_BOARD_ACTIVE
	.comm	_SX_BOARD_IS_PCI,4,2            ## @SX_BOARD_IS_PCI
	.comm	_sx_interrupt,4,2               ## @sx_interrupt
	.comm	_IRQF_DISABLED,4,2              ## @IRQF_DISABLED
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"specialix IO8+"

	.no_dead_strip	_sx_setup_board
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sx_setup_board
_sx_setup_board:                        ; @sx_setup_board
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x20, _SX_BOARD_ACTIVE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SX_BOARD_ACTIVE@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_4
LBB0_2:
	mov	x19, x0
Lloh2:
	adrp	x9, _SX_BOARD_IS_PCI@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SX_BOARD_IS_PCI@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	ldr	w0, [x0, #4]
Lloh5:
	adrp	x10, _sx_interrupt@GOTPAGE
Lloh6:
	ldr	x10, [x10, _sx_interrupt@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x10]
Lloh8:
	adrp	x10, _IRQF_DISABLED@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IRQF_DISABLED@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _IRQF_SHARED@GOTPAGE
Lloh12:
	ldr	x11, [x11, _IRQF_SHARED@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	tst	w9, w8
	csel	w8, wzr, w11, eq
	orr	w2, w10, w8
Lloh14:
	adrp	x3, l_.str@PAGE
Lloh15:
	add	x3, x3, l_.str@PAGEOFF
	mov	x4, x19
	bl	_request_irq
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_turn_ints_on
	mov	w0, #0
	ldr	w8, [x20]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SX_BOARD_ACTIVE,4,2            ; @SX_BOARD_ACTIVE
	.comm	_SX_BOARD_IS_PCI,4,2            ; @SX_BOARD_IS_PCI
	.comm	_sx_interrupt,4,2               ; @sx_interrupt
	.comm	_IRQF_DISABLED,4,2              ; @IRQF_DISABLED
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"specialix IO8+"

	.no_dead_strip	_sx_setup_board
.subsections_via_symbols
