	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mgsl_allocate_device
_mgsl_allocate_device:                  ## @mgsl_allocate_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	40(%rbx), %rdi
	callq	_tty_port_init
	movq	_mgsl_port_ops@GOTPCREL(%rip), %rax
	movq	%rax, 48(%rbx)
	movq	_MGSL_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	leaq	56(%rbx), %rdi
	movq	_mgsl_bh_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movl	$4096, (%rbx)                   ## imm = 0x1000
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, 40(%rbx)
	movl	%eax, %ecx
	shll	$5, %ecx
	subl	%eax, %ecx
	subl	%eax, %ecx
	movl	%ecx, 44(%rbx)
	leaq	36(%rbx), %rdi
	callq	_init_waitqueue_head
	leaq	32(%rbx), %rdi
	callq	_init_waitqueue_head
	leaq	28(%rbx), %rdi
	callq	_spin_lock_init
	leaq	24(%rbx), %rdi
	callq	_spin_lock_init
	movq	%rbx, %rdi
	addq	$20, %rdi
	movq	_default_params@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	_HDLC_TXIDLE_FLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	$1, 4(%rbx)
	movq	$0, 8(%rbx)
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_printk
LBB0_3:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error can't allocate device instance data\n"

	.comm	_mgsl_port_ops,4,2              ## @mgsl_port_ops
	.comm	_MGSL_MAGIC,4,2                 ## @MGSL_MAGIC
	.comm	_mgsl_bh_handler,4,2            ## @mgsl_bh_handler
	.comm	_HZ,4,2                         ## @HZ
	.comm	_default_params,4,2             ## @default_params
	.comm	_HDLC_TXIDLE_FLAGS,4,2          ## @HDLC_TXIDLE_FLAGS
	.no_dead_strip	_mgsl_allocate_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mgsl_allocate_device
_mgsl_allocate_device:                  ; @mgsl_allocate_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
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_2
; %bb.1:
	add	x0, x19, #40
	bl	_tty_port_init
Lloh3:
	adrp	x8, _mgsl_port_ops@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mgsl_port_ops@GOTPAGEOFF]
	str	x8, [x19, #48]
Lloh5:
	adrp	x8, _MGSL_MAGIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MGSL_MAGIC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #60]
	add	x0, x19, #56
Lloh8:
	adrp	x8, _mgsl_bh_handler@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mgsl_bh_handler@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_INIT_WORK
	mov	w8, #4096
	str	w8, [x19]
Lloh11:
	adrp	x8, _HZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w9, w8, lt
	asr	w9, w9, #1
	mov	w10, #30
	mul	w8, w8, w10
	stp	w9, w8, [x19, #40]
	add	x0, x19, #36
	bl	_init_waitqueue_head
	add	x0, x19, #32
	bl	_init_waitqueue_head
	add	x0, x19, #28
	bl	_spin_lock_init
	add	x0, x19, #24
	bl	_spin_lock_init
	add	x0, x19, #20
Lloh14:
	adrp	x1, _default_params@GOTPAGE
Lloh15:
	ldr	x1, [x1, _default_params@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
Lloh16:
	adrp	x8, _HDLC_TXIDLE_FLAGS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HDLC_TXIDLE_FLAGS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	w8, #1
	str	w8, [x19, #4]
	str	xzr, [x19, #8]
	b	LBB0_3
LBB0_2:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error can't allocate device instance data\n"

	.comm	_mgsl_port_ops,4,2              ; @mgsl_port_ops
	.comm	_MGSL_MAGIC,4,2                 ; @MGSL_MAGIC
	.comm	_mgsl_bh_handler,4,2            ; @mgsl_bh_handler
	.comm	_HZ,4,2                         ; @HZ
	.comm	_default_params,4,2             ; @default_params
	.comm	_HDLC_TXIDLE_FLAGS,4,2          ; @HDLC_TXIDLE_FLAGS
	.no_dead_strip	_mgsl_allocate_device
.subsections_via_symbols
