	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mgslpc_add_device
_mgslpc_add_device:                     ## @mgslpc_add_device
	.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
	movq	%rdi, %rbx
	movq	$0, 24(%rdi)
	movq	_mgslpc_device_count@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movl	%edx, (%rdi)
	movl	16(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_sprintf
	movslq	(%rbx), %rax
	movq	_MAX_DEVICE_COUNT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_3
## %bb.1:
	movq	_maxframe@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %eax
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, 4(%rbx)
LBB0_3:
	incl	(%r14)
	movq	_mgslpc_device_list@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rax
	movq	24(%rcx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_4
## %bb.5:
	addq	$24, %rax
LBB0_6:
	movq	%rbx, (%rax)
	movl	4(%rbx), %ecx
	movl	$4096, %eax                     ## imm = 0x1000
	cmpl	$4096, %ecx                     ## imm = 0x1000
	jl	LBB0_8
## %bb.7:
	movl	$65535, %eax                    ## imm = 0xFFFF
	cmpl	$65536, %ecx                    ## imm = 0x10000
	jb	LBB0_9
LBB0_8:
	movl	%eax, 4(%rbx)
LBB0_9:
	movl	16(%rbx), %esi
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_printk                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mgslpc_device_count,4,2        ## @mgslpc_device_count
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ttySLP%d"

	.comm	_MAX_DEVICE_COUNT,4,2           ## @MAX_DEVICE_COUNT
	.comm	_maxframe,8,3                   ## @maxframe
	.comm	_mgslpc_device_list,8,3         ## @mgslpc_device_list
L_.str.1:                               ## @.str.1
	.asciz	"SyncLink PC Card %s:IO=%04X IRQ=%d\n"

	.no_dead_strip	_mgslpc_add_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mgslpc_add_device
_mgslpc_add_device:                     ; @mgslpc_add_device
	.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	x19, x0
	str	xzr, [x0, #24]
Lloh0:
	adrp	x20, _mgslpc_device_count@GOTPAGE
Lloh1:
	ldr	x20, [x20, _mgslpc_device_count@GOTPAGEOFF]
	ldr	w2, [x20]
	str	w2, [x0]
	ldr	w0, [x0, #16]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
	ldrsw	x8, [x19]
Lloh4:
	adrp	x9, _MAX_DEVICE_COUNT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MAX_DEVICE_COUNT@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.1:
Lloh7:
	adrp	x9, _maxframe@GOTPAGE
Lloh8:
	ldr	x9, [x9, _maxframe@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	ldr	w8, [x9, x8, lsl #2]
	cbz	w8, LBB0_3
; %bb.2:
	str	w8, [x19, #4]
LBB0_3:
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
Lloh10:
	adrp	x8, _mgslpc_device_list@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mgslpc_device_list@GOTPAGEOFF]
	ldr	x9, [x8]
	cbz	x9, LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x9
	ldr	x9, [x9, #24]
	cbnz	x9, LBB0_4
; %bb.5:
	add	x8, x8, #24
LBB0_6:
	str	x19, [x8]
	ldr	w8, [x19, #4]
	cmp	w8, #1, lsl #12                 ; =4096
	b.ge	LBB0_8
; %bb.7:
	mov	w8, #4096
	b	LBB0_10
LBB0_8:
	cmp	w8, #16, lsl #12                ; =65536
	b.lo	LBB0_11
; %bb.9:
	mov	w8, #65535
LBB0_10:
	str	w8, [x19, #4]
LBB0_11:
	ldp	w2, w1, [x19, #12]
	ldr	w3, [x19, #8]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_printk
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_mgslpc_device_count,4,2        ; @mgslpc_device_count
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ttySLP%d"

	.comm	_MAX_DEVICE_COUNT,4,2           ; @MAX_DEVICE_COUNT
	.comm	_maxframe,8,3                   ; @maxframe
	.comm	_mgslpc_device_list,8,3         ; @mgslpc_device_list
l_.str.1:                               ; @.str.1
	.asciz	"SyncLink PC Card %s:IO=%04X IRQ=%d\n"

	.no_dead_strip	_mgslpc_add_device
.subsections_via_symbols
