	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hso_serial_common_create
_hso_serial_common_create:              ## @hso_serial_common_create
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r12
	leaq	88(%rdi), %r13
	movq	%r13, %rdi
	callq	_tty_port_init
	xorl	%eax, %eax
	callq	_get_free_serial_index
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movl	%eax, %r14d
	movq	_tty_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	80(%r12), %r8
	movq	(%r8), %rcx
	movq	_hso_serial_dev_groups@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_tty_port_register_device_attr
	movq	80(%r12), %rcx
	movl	%eax, 8(%rcx)
	movl	%r14d, (%r12)
	movq	_HSO_SERIAL_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 76(%r12)
	leaq	72(%r12), %rdi
	callq	_spin_lock_init
	movl	%r15d, 4(%r12)
	movl	%ebx, 8(%r12)
	testl	%r15d, %r15d
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	movq	64(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	64(%r12), %rax
	movq	(%rax,%rbx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, 8(%rcx)
	movq	(%rax,%rbx,8), %rax
	movq	$0, (%rax)
	movl	8(%r12), %edi
	movl	(%r14), %esi
	callq	_kzalloc
	movq	56(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	56(%r12), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	4(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	movq	%rax, 48(%r12)
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movups	%xmm0, 32(%r12)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, 12(%r12)
	movl	(%rbx), %esi
	callq	_kzalloc
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	12(%r12), %edi
	movl	(%rbx), %esi
	callq	_kzalloc
	movq	%rax, %rcx
	movq	%rax, 16(%r12)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_10
LBB0_9:
	movq	%r12, %rdi
	callq	_hso_serial_tty_unregister
	movq	%r12, %rdi
	callq	_hso_serial_common_free
	movl	$-1, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tty_drv,4,2                    ## @tty_drv
	.comm	_hso_serial_dev_groups,4,2      ## @hso_serial_dev_groups
	.comm	_HSO_SERIAL_MAGIC,4,2           ## @HSO_SERIAL_MAGIC
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_hso_serial_common_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hso_serial_common_create
_hso_serial_common_create:              ; @hso_serial_common_create
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	add	x24, x0, #88
	mov	x0, x24
	bl	_tty_port_init
	bl	_get_free_serial_index
	tbnz	w0, #31, LBB0_10
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x8, _tty_drv@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tty_drv@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x4, [x19, #80]
	ldr	x3, [x4]
Lloh3:
	adrp	x8, _hso_serial_dev_groups@GOTPAGE
Lloh4:
	ldr	x8, [x8, _hso_serial_dev_groups@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
	mov	x0, x24
	mov	x2, x23
	bl	_tty_port_register_device_attr
	ldr	x8, [x19, #80]
	str	w0, [x8, #8]
	str	w23, [x19]
Lloh6:
	adrp	x8, _HSO_SERIAL_MAGIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HSO_SERIAL_MAGIC@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #76]
	add	x0, x19, #72
	bl	_spin_lock_init
	stp	w21, w22, [x19, #4]
Lloh9:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	cmp	w21, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	w0, #0
	bl	_usb_alloc_urb
	ldr	x8, [x19, #64]
	lsl	x23, x21, #3
	str	x0, [x8, x23]
	ldr	x8, [x19, #64]
	ldr	x9, [x8, x23]
	cbz	x9, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [x9, #8]
	ldr	x8, [x8, x23]
	str	xzr, [x8]
	ldr	w0, [x19, #8]
	ldr	w1, [x22]
	bl	_kzalloc
	ldr	x8, [x19, #56]
	str	x0, [x8, x23]
	ldr	x8, [x19, #56]
	ldr	x8, [x8, x23]
	cbz	x8, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19, #4]
	cmp	x21, x8
	b.lt	LBB0_3
LBB0_6:
	ldr	w1, [x22]
	mov	w0, #0
	bl	_usb_alloc_urb
	str	x0, [x19, #48]
	cbz	x0, LBB0_10
; %bb.7:
	stp	xzr, xzr, [x0]
	stp	xzr, xzr, [x19, #32]
	str	w20, [x19, #12]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_kzalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_10
; %bb.8:
	ldr	w0, [x19, #12]
	ldr	w1, [x22]
	bl	_kzalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_10
; %bb.9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_hso_serial_tty_unregister
	mov	x0, x19
	bl	_hso_serial_common_free
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_tty_drv,4,2                    ; @tty_drv
	.comm	_hso_serial_dev_groups,4,2      ; @hso_serial_dev_groups
	.comm	_HSO_SERIAL_MAGIC,4,2           ; @HSO_SERIAL_MAGIC
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_hso_serial_common_create
.subsections_via_symbols
