	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function inport_open
_inport_open:                           ## @inport_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_inport_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_inport_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_request_irq
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_3
LBB0_2:
	movq	_INPORT_REG_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_INPORT_CONTROL_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_outb
	movq	_INPORT_MODE_IRQ@GOTPCREL(%rip), %rax
	movq	_INPORT_MODE_BASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_INPORT_DATA_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_outb
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_inport_irq,4,2                 ## @inport_irq
	.comm	_inport_interrupt,4,2           ## @inport_interrupt
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"inport"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_INPORT_REG_MODE,4,2            ## @INPORT_REG_MODE
	.comm	_INPORT_CONTROL_PORT,4,2        ## @INPORT_CONTROL_PORT
	.comm	_INPORT_MODE_IRQ,4,2            ## @INPORT_MODE_IRQ
	.comm	_INPORT_MODE_BASE,4,2           ## @INPORT_MODE_BASE
	.comm	_INPORT_DATA_PORT,4,2           ## @INPORT_DATA_PORT
	.no_dead_strip	_inport_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function inport_open
_inport_open:                           ; @inport_open
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _inport_irq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _inport_irq@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _inport_interrupt@GOTPAGE
Lloh4:
	ldr	x8, [x8, _inport_interrupt@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #0
	mov	x4, #0
	bl	_request_irq
	cbz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _EBUSY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh11:
	adrp	x8, _INPORT_REG_MODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _INPORT_REG_MODE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _INPORT_CONTROL_PORT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _INPORT_CONTROL_PORT@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_outb
Lloh17:
	adrp	x8, _INPORT_MODE_IRQ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _INPORT_MODE_IRQ@GOTPAGEOFF]
Lloh19:
	adrp	x9, _INPORT_MODE_BASE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _INPORT_MODE_BASE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh23:
	adrp	x8, _INPORT_DATA_PORT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _INPORT_DATA_PORT@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_outb
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_inport_irq,4,2                 ; @inport_irq
	.comm	_inport_interrupt,4,2           ; @inport_interrupt
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"inport"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_INPORT_REG_MODE,4,2            ; @INPORT_REG_MODE
	.comm	_INPORT_CONTROL_PORT,4,2        ; @INPORT_CONTROL_PORT
	.comm	_INPORT_MODE_IRQ,4,2            ; @INPORT_MODE_IRQ
	.comm	_INPORT_MODE_BASE,4,2           ; @INPORT_MODE_BASE
	.comm	_INPORT_DATA_PORT,4,2           ; @INPORT_DATA_PORT
	.no_dead_strip	_inport_open
.subsections_via_symbols
