	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function device_init
_device_init:                           ## @device_init
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SLGT_MAX_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	(%r14), %rsi
	movq	_SYNCLINK_GT2_DEVICE_ID@GOTPCREL(%rip), %rax
	movq	_SYNCLINK_GT4_DEVICE_ID@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rsi
	movq	(%rax), %rax
	sete	%dl
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %rsi
	leal	1(%rdx,%rdx,2), %eax
	movl	$2, %r13d
	cmovnel	%eax, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_alloc_dev
	movq	%rax, (%r12,%rbx,8)
	testq	%rax, %rax
	je	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_1
## %bb.6:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leal	(,%rax,8), %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx,8), %rax
	movl	48(%rax), %edi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movq	(%r12,%rbx,8), %rdi
	callq	_add_device
	movq	(%r12,%rbx,8), %rdi
	movl	%r13d, (%rdi)
	addq	$44, %rdi
	callq	_spin_lock_init
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_7
## %bb.8:
	movq	(%r12), %rdi
	callq	_claim_resources
	testl	%eax, %eax
	je	LBB0_9
LBB0_18:
	xorl	%ebx, %ebx
	movq	_serial_driver@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	(%r12,%rbx,8), %rax
	movl	16(%rax), %esi
	movq	8(%rax), %rdx
	callq	_tty_register_device
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_19
	jmp	LBB0_20
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_20
## %bb.3:
	incq	%rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-16(%r12,%rbx,8), %rdi
	callq	_kfree
	decq	%rbx
	cmpq	$1, %rbx
	jg	LBB0_4
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	(%r12), %rdi
	callq	_alloc_dma_bufs
	cmpl	$2, %r13d
	jb	LBB0_12
## %bb.10:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	44(%rax), %ecx
	movq	(%r12,%rbx,8), %rdi
	movl	%ecx, 44(%rdi)
	movl	28(%rax), %ecx
	movl	%ecx, 28(%rdi)
	movl	40(%rax), %eax
	movl	%eax, 40(%rdi)
	callq	_alloc_dma_bufs
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_11
LBB0_12:
	movq	(%r12), %r8
	movq	_slgt_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	36(%r8), %edx
	movl	28(%r8), %edi
	movl	32(%r8), %ecx
	callq	_request_irq
	movq	(%r12), %rdi
	testq	%rax, %rax
	js	LBB0_13
## %bb.14:
	movl	$1, 4(%rdi)
	callq	_adapter_test
	cmpl	$2, %r13d
	jb	LBB0_18
## %bb.15:
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movl	24(%rax), %edx
	movl	%edx, 24(%rcx)
	movl	20(%rax), %edx
	movl	%edx, 20(%rcx)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_18
## %bb.16:
	movl	24(%rax), %ecx
	movq	16(%r12), %rdx
	movl	%ecx, 24(%rdx)
	movl	20(%rax), %ecx
	movl	%ecx, 20(%rdx)
	movl	24(%rax), %ecx
	movq	24(%r12), %rdx
	movl	%ecx, 24(%rdx)
	movl	20(%rax), %ecx
	movl	%ecx, 20(%rdx)
	cmpl	$4, %r13d
	je	LBB0_18
## %bb.17:
	movl	24(%rax), %ecx
	movq	32(%r12), %rdx
	movl	%ecx, 24(%rdx)
	movl	20(%rax), %ecx
	movl	%ecx, 20(%rdx)
	movl	24(%rax), %ecx
	movq	40(%r12), %rdx
	movl	%ecx, 24(%rdx)
	movl	20(%rax), %ecx
	movl	%ecx, 20(%rdx)
	movl	24(%rax), %ecx
	movq	48(%r12), %rdx
	movl	%ecx, 24(%rdx)
	movl	20(%rax), %eax
	movl	%eax, 20(%rdx)
	jmp	LBB0_18
LBB0_13:
	movslq	28(%rdi), %rdi
	callq	_DBGERR
	jmp	LBB0_18
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SLGT_MAX_PORTS,4,2             ## @SLGT_MAX_PORTS
	.comm	_SYNCLINK_GT2_DEVICE_ID,8,3     ## @SYNCLINK_GT2_DEVICE_ID
	.comm	_SYNCLINK_GT4_DEVICE_ID,8,3     ## @SYNCLINK_GT4_DEVICE_ID
	.comm	_slgt_interrupt,4,2             ## @slgt_interrupt
	.comm	_serial_driver,4,2              ## @serial_driver
	.no_dead_strip	_device_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function device_init
_device_init:                           ; @device_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _SLGT_MAX_PORTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SLGT_MAX_PORTS@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
	lsl	x8, x26, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x19, x9, x8
	mov	sp, x19
	mov	x22, #0
	ldr	x24, [x1]
Lloh8:
	adrp	x8, _SYNCLINK_GT2_DEVICE_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SYNCLINK_GT2_DEVICE_ID@GOTPAGEOFF]
Lloh10:
	ldr	x25, [x8]
Lloh11:
	adrp	x8, _SYNCLINK_GT4_DEVICE_ID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SYNCLINK_GT4_DEVICE_ID@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x24, x8
	mov	w8, #4
	csinc	w8, w8, wzr, eq
	cmp	x24, x25
	mov	w9, #2
	csel	w23, w9, w8, eq
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_alloc_dev
	str	x0, [x19, x22, lsl #3]
	cbz	x0, LBB0_8
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x22, x22, #1
	cmp	x23, x22
	b.ne	LBB0_1
; %bb.3:
	mov	x21, #0
	lsl	w20, w26, #3
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x22, x21, #3
	ldr	x8, [x19, x22]
	ldr	w0, [x8, #48]
	mov	x1, x19
	mov	x2, x20
	bl	_memcpy
	ldr	x0, [x19, x22]
	bl	_add_device
	ldr	x0, [x19, x22]
	str	w23, [x0], #44
	bl	_spin_lock_init
	add	x21, x21, #1
	cmp	x23, x21
	b.ne	LBB0_4
; %bb.5:
	ldr	x0, [x19]
	bl	_claim_resources
	cbz	w0, LBB0_13
LBB0_6:
Lloh14:
	adrp	x20, _serial_driver@GOTPAGE
Lloh15:
	ldr	x20, [x20, _serial_driver@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	x8, [x19], #8
	ldr	w1, [x8, #16]
	ldr	x2, [x8, #8]
	bl	_tty_register_device
	subs	x23, x23, #1
	b.ne	LBB0_7
	b	LBB0_11
LBB0_8:
	cbz	w22, LBB0_11
; %bb.9:
	sub	x20, x22, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, x20, lsl #3]
	bl	_kfree
	add	x8, x20, #1
	sub	x20, x20, #1
	cmp	x8, #1
	b.gt	LBB0_10
LBB0_11:
	ldur	x8, [x29, #-72]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.12:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	x0, [x19]
	bl	_alloc_dma_bufs
	cmp	w23, #2
	b.lo	LBB0_17
; %bb.14:
	ldp	x8, x0, [x19]
	ldr	w9, [x8, #28]
	str	w9, [x0, #28]
	ldr	d0, [x8, #40]
	str	d0, [x0, #40]
	bl	_alloc_dma_bufs
	cmp	x24, x25
	b.eq	LBB0_17
; %bb.15:
	ldr	x8, [x19]
	ldr	x0, [x19, #16]
	ldr	w9, [x8, #28]
	str	w9, [x0, #28]
	ldr	d0, [x8, #40]
	str	d0, [x0, #40]
	bl	_alloc_dma_bufs
	ldr	x8, [x19]
	ldr	x0, [x19, #24]
	ldr	w9, [x8, #28]
	str	w9, [x0, #28]
	ldr	d0, [x8, #40]
	str	d0, [x0, #40]
	bl	_alloc_dma_bufs
	cmp	w23, #4
	b.eq	LBB0_17
; %bb.16:
	ldr	x8, [x19]
	ldr	x0, [x19, #32]
	ldr	w9, [x8, #28]
	str	w9, [x0, #28]
	ldr	d0, [x8, #40]
	str	d0, [x0, #40]
	bl	_alloc_dma_bufs
	ldr	x8, [x19]
	ldr	x0, [x19, #40]
	ldr	w9, [x8, #28]
	str	w9, [x0, #28]
	ldr	d0, [x8, #40]
	str	d0, [x0, #40]
	bl	_alloc_dma_bufs
	ldr	x8, [x19]
	ldr	x0, [x19, #48]
	ldr	w9, [x8, #28]
	str	w9, [x0, #28]
	ldr	d0, [x8, #40]
	str	d0, [x0, #40]
	bl	_alloc_dma_bufs
LBB0_17:
	ldr	x4, [x19]
Lloh19:
	adrp	x8, _slgt_interrupt@GOTPAGE
Lloh20:
	ldr	x8, [x8, _slgt_interrupt@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldp	w3, w2, [x4, #32]
	ldr	w0, [x4, #28]
	bl	_request_irq
	mov	x8, x0
	ldr	x0, [x19]
	tbnz	x8, #63, LBB0_22
; %bb.18:
	mov	w8, #1
	str	w8, [x0, #4]
	bl	_adapter_test
	cmp	w23, #2
	b.lo	LBB0_6
; %bb.19:
	ldp	x8, x9, [x19]
	ldur	d0, [x8, #20]
	stur	d0, [x9, #20]
	cmp	x24, x25
	b.eq	LBB0_6
; %bb.20:
	ldur	d0, [x8, #20]
	ldp	x9, x10, [x19, #16]
	stur	d0, [x9, #20]
	ldur	d0, [x8, #20]
	stur	d0, [x10, #20]
	cmp	w23, #4
	b.eq	LBB0_6
; %bb.21:
	ldur	d0, [x8, #20]
	ldp	x9, x10, [x19, #32]
	stur	d0, [x9, #20]
	ldur	d0, [x8, #20]
	stur	d0, [x10, #20]
	ldr	x9, [x19, #48]
	ldur	d0, [x8, #20]
	stur	d0, [x9, #20]
	b	LBB0_6
LBB0_22:
	ldrsw	x0, [x0, #28]
	bl	_DBGERR
	b	LBB0_6
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SLGT_MAX_PORTS,4,2             ; @SLGT_MAX_PORTS
	.comm	_SYNCLINK_GT2_DEVICE_ID,8,3     ; @SYNCLINK_GT2_DEVICE_ID
	.comm	_SYNCLINK_GT4_DEVICE_ID,8,3     ; @SYNCLINK_GT4_DEVICE_ID
	.comm	_slgt_interrupt,4,2             ; @slgt_interrupt
	.comm	_serial_driver,4,2              ; @serial_driver
	.no_dead_strip	_device_init
.subsections_via_symbols
