	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_device
_add_device:                            ## @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, 40(%rdi)
	movq	_slgt_device_count@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	%rcx, (%rdi)
	movl	20(%rdi), %edi
	movq	_tty_dev_prefix@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_sprintf
	movq	(%rbx), %rax
	movq	_MAX_DEVICES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	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, 8(%rbx)
LBB0_3:
	incq	(%r14)
	movq	_slgt_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	40(%rcx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_4
## %bb.5:
	addq	$40, %rax
LBB0_6:
	movq	%rbx, (%rax)
	movl	8(%rbx), %r9d
	movl	$4096, %eax                     ## imm = 0x1000
	cmpl	$4096, %r9d                     ## imm = 0x1000
	jl	LBB0_8
## %bb.7:
	movl	$65535, %eax                    ## imm = 0xFFFF
	cmpl	$65536, %r9d                    ## imm = 0x10000
	jb	LBB0_9
LBB0_8:
	movl	%eax, 8(%rbx)
	movl	%eax, %r9d
LBB0_9:
	movq	32(%rbx), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_14
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_15
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_15
LBB0_13:
	movq	_MGSL_MODE_ASYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	leaq	L_.str.4(%rip), %rsi
LBB0_15:
	movl	20(%rbx), %edx
	movl	12(%rbx), %r8d
	movl	16(%rbx), %ecx
	leaq	L_.str.6(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_printk                         ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_12
	.long	L0_0_set_11
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_slgt_device_count,8,3          ## @slgt_device_count
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%d"

	.comm	_tty_dev_prefix,8,3             ## @tty_dev_prefix
	.comm	_MAX_DEVICES,8,3                ## @MAX_DEVICES
	.comm	_maxframe,8,3                   ## @maxframe
	.comm	_slgt_device_list,8,3           ## @slgt_device_list
L_.str.1:                               ## @.str.1
	.asciz	"GT"

L_.str.2:                               ## @.str.2
	.asciz	"GT2"

L_.str.3:                               ## @.str.3
	.asciz	"GT4"

L_.str.4:                               ## @.str.4
	.asciz	"AC"

	.comm	_MGSL_MODE_ASYNC,4,2            ## @MGSL_MODE_ASYNC
L_.str.5:                               ## @.str.5
	.asciz	"(unknown model)"

L_.str.6:                               ## @.str.6
	.asciz	"SyncLink %s %s IO=%08x IRQ=%d MaxFrameSize=%u\n"

	.no_dead_strip	_add_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_device
_add_device:                            ; @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, #40]
Lloh0:
	adrp	x20, _slgt_device_count@GOTPAGE
Lloh1:
	ldr	x20, [x20, _slgt_device_count@GOTPAGEOFF]
	ldr	x3, [x20]
	str	x3, [x0]
	ldr	w0, [x0, #20]
Lloh2:
	adrp	x8, _tty_dev_prefix@GOTPAGE
Lloh3:
	ldr	x8, [x8, _tty_dev_prefix@GOTPAGEOFF]
Lloh4:
	ldr	x2, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
	ldr	x8, [x19]
Lloh7:
	adrp	x9, _MAX_DEVICES@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAX_DEVICES@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_3
; %bb.1:
Lloh10:
	adrp	x9, _maxframe@GOTPAGE
Lloh11:
	ldr	x9, [x9, _maxframe@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	ldr	w8, [x9, x8, lsl #2]
	cbz	w8, LBB0_3
; %bb.2:
	str	w8, [x19, #8]
LBB0_3:
	ldr	x8, [x20]
	add	x8, x8, #1
	str	x8, [x20]
Lloh13:
	adrp	x8, _slgt_device_list@GOTPAGE
Lloh14:
	ldr	x8, [x8, _slgt_device_list@GOTPAGEOFF]
	ldr	x9, [x8]
	cbz	x9, LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x9
	ldr	x9, [x9, #40]
	cbnz	x9, LBB0_4
; %bb.5:
	add	x8, x8, #40
LBB0_6:
	str	x19, [x8]
	ldr	w5, [x19, #8]
	cmp	w5, #1, lsl #12                 ; =4096
	b.ge	LBB0_8
; %bb.7:
	mov	w5, #4096
	b	LBB0_10
LBB0_8:
	cmp	w5, #16, lsl #12                ; =65536
	b.lo	LBB0_11
; %bb.9:
	mov	w5, #65535
LBB0_10:
	str	w5, [x19, #8]
LBB0_11:
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_14
; %bb.12:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh17:
	adrp	x9, lJTI0_0@PAGE
Lloh18:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_13
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_13:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_14:
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_17
LBB0_15:
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_16:
Lloh25:
	adrp	x8, _MGSL_MODE_ASYNC@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MGSL_MODE_ASYNC@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_17:
	ldp	w3, w2, [x19, #16]
	ldr	w4, [x19, #12]
Lloh30:
	adrp	x0, l_.str.6@PAGE
Lloh31:
	add	x0, x0, l_.str.6@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_printk
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_17-LBB0_13)>>2
	.byte	(LBB0_13-LBB0_13)>>2
	.byte	(LBB0_15-LBB0_13)>>2
	.byte	(LBB0_16-LBB0_13)>>2
                                        ; -- End function
	.comm	_slgt_device_count,8,3          ; @slgt_device_count
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%d"

	.comm	_tty_dev_prefix,8,3             ; @tty_dev_prefix
	.comm	_MAX_DEVICES,8,3                ; @MAX_DEVICES
	.comm	_maxframe,8,3                   ; @maxframe
	.comm	_slgt_device_list,8,3           ; @slgt_device_list
l_.str.1:                               ; @.str.1
	.asciz	"GT"

l_.str.2:                               ; @.str.2
	.asciz	"GT2"

l_.str.3:                               ; @.str.3
	.asciz	"GT4"

l_.str.4:                               ; @.str.4
	.asciz	"AC"

	.comm	_MGSL_MODE_ASYNC,4,2            ; @MGSL_MODE_ASYNC
l_.str.5:                               ; @.str.5
	.asciz	"(unknown model)"

l_.str.6:                               ; @.str.6
	.asciz	"SyncLink %s %s IO=%08x IRQ=%d MaxFrameSize=%u\n"

	.no_dead_strip	_add_device
.subsections_via_symbols
