	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hso_create_bulk_serial_device
_hso_create_bulk_serial_device:         ## @hso_create_bulk_serial_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	%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	%esi, %ebx
	movq	%rdi, %r15
	callq	_hso_create_device
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	%rax, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$48, %edi
	callq	_kzalloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_15
## %bb.2:
	movq	%r12, 40(%r14)
	movq	%r14, 32(%r12)
	movq	_HSO_PORT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_HSO_PORT_MODEM@GOTPCREL(%rip), %rax
	movl	$1, %esi
	cmpl	(%rax), %ebx
	jne	LBB0_10
## %bb.3:
	movl	(%r13), %esi
	movl	$32, %edi
	callq	_kzalloc
	movq	%rax, 24(%r14)
	movq	%r13, %rbx
	movl	(%r13), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	24(%r14), %r13
	movq	%rax, 24(%r13)
	movl	$2, %esi
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	_USB_ENDPOINT_XFER_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hso_get_ep
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movl	(%rbx), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	4(%r13), %rdi
	callq	_mutex_init
	movq	%r13, %rdi
	callq	_init_waitqueue_head
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_15
LBB0_8:
	movq	%r14, %rdi
	callq	_hso_free_tiomget
LBB0_9:
	movl	$2, %esi
LBB0_10:
	movq	_BULK_URB_RX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BULK_URB_TX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_hso_serial_common_create
	testq	%rax, %rax
	jne	LBB0_15
## %bb.11:
	movq	_USB_ENDPOINT_XFER_BULK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hso_get_ep
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movl	(%rbx), %esi
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hso_get_ep
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_hso_std_serial_write_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movl	(%r14), %edi
	movq	%r14, %rsi
	callq	_set_serial_by_index
	movq	%r12, %rdi
	callq	_hso_log_port
	jmp	LBB0_17
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	%r14, %rdi
	callq	_hso_serial_tty_unregister
	movq	%r14, %rdi
	callq	_hso_serial_common_free
LBB0_15:
	movq	%r14, %rdi
	callq	_hso_free_tiomget
	movq	%r14, %rdi
	callq	_kfree
	movq	%r12, %rdi
	callq	_kfree
LBB0_16:
	xorl	%r12d, %r12d
LBB0_17:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_HSO_PORT_MASK,4,2              ## @HSO_PORT_MASK
	.comm	_HSO_PORT_MODEM,4,2             ## @HSO_PORT_MODEM
	.comm	_USB_ENDPOINT_XFER_INT,4,2      ## @USB_ENDPOINT_XFER_INT
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to find INT IN ep\n"

	.comm	_BULK_URB_RX_SIZE,4,2           ## @BULK_URB_RX_SIZE
	.comm	_BULK_URB_TX_SIZE,4,2           ## @BULK_URB_TX_SIZE
	.comm	_USB_ENDPOINT_XFER_BULK,4,2     ## @USB_ENDPOINT_XFER_BULK
L_.str.1:                               ## @.str.1
	.asciz	"Failed to find BULK IN ep\n"

	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_hso_std_serial_write_data,4,2  ## @hso_std_serial_write_data
	.no_dead_strip	_hso_create_bulk_serial_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hso_create_bulk_serial_device
_hso_create_bulk_serial_device:         ; @hso_create_bulk_serial_device
	.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	x22, x1
	mov	x21, x0
	bl	_hso_create_device
	mov	x19, x0
	cbz	x0, LBB0_17
; %bb.1:
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #48
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_16
; %bb.2:
	str	x19, [x20, #40]
	str	x20, [x19, #32]
Lloh2:
	adrp	x8, _HSO_PORT_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HSO_PORT_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w22
Lloh5:
	adrp	x9, _HSO_PORT_MODEM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HSO_PORT_MODEM@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.3:
	ldr	w1, [x23]
	mov	w0, #32
	bl	_kzalloc
	str	x0, [x20, #24]
	ldr	w1, [x23]
	mov	w0, #4
	bl	_kzalloc
	ldr	x22, [x20, #24]
	str	x0, [x22, #24]
	cbz	x0, LBB0_10
; %bb.4:
Lloh8:
	adrp	x8, _USB_ENDPOINT_XFER_INT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _USB_ENDPOINT_XFER_INT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _USB_DIR_IN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _USB_DIR_IN@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_hso_get_ep
	str	x0, [x22, #16]
	cbz	x0, LBB0_8
; %bb.5:
	ldr	w1, [x23]
	mov	w0, #0
	bl	_usb_alloc_urb
	str	x0, [x22, #8]
	cbz	x0, LBB0_9
; %bb.6:
	add	x0, x22, #4
	bl	_mutex_init
	mov	x0, x22
	bl	_init_waitqueue_head
	b	LBB0_10
LBB0_7:
	mov	w1, #1
	b	LBB0_11
LBB0_8:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_16
LBB0_9:
	mov	x0, x20
	bl	_hso_free_tiomget
LBB0_10:
	mov	w1, #2
LBB0_11:
Lloh16:
	adrp	x8, _BULK_URB_RX_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BULK_URB_RX_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	adrp	x8, _BULK_URB_TX_SIZE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BULK_URB_TX_SIZE@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_hso_serial_common_create
	cbnz	x0, LBB0_16
; %bb.12:
Lloh22:
	adrp	x22, _USB_ENDPOINT_XFER_BULK@GOTPAGE
Lloh23:
	ldr	x22, [x22, _USB_ENDPOINT_XFER_BULK@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh24:
	adrp	x8, _USB_DIR_IN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _USB_DIR_IN@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_hso_get_ep
	str	x0, [x20, #16]
	cbz	x0, LBB0_15
; %bb.13:
	ldr	w1, [x22]
Lloh27:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_hso_get_ep
	str	x0, [x20, #8]
	cbz	x0, LBB0_15
; %bb.14:
Lloh30:
	adrp	x8, _hso_std_serial_write_data@GOTPAGE
Lloh31:
	ldr	x8, [x8, _hso_std_serial_write_data@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	ldr	w0, [x20]
	mov	x1, x20
	bl	_set_serial_by_index
	mov	x0, x19
	bl	_hso_log_port
	b	LBB0_17
LBB0_15:
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	mov	x0, x20
	bl	_hso_serial_tty_unregister
	mov	x0, x20
	bl	_hso_serial_common_free
LBB0_16:
	mov	x0, x20
	bl	_hso_free_tiomget
	mov	x0, x20
	bl	_kfree
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_17:
	mov	x0, x19
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_HSO_PORT_MASK,4,2              ; @HSO_PORT_MASK
	.comm	_HSO_PORT_MODEM,4,2             ; @HSO_PORT_MODEM
	.comm	_USB_ENDPOINT_XFER_INT,4,2      ; @USB_ENDPOINT_XFER_INT
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to find INT IN ep\n"

	.comm	_BULK_URB_RX_SIZE,4,2           ; @BULK_URB_RX_SIZE
	.comm	_BULK_URB_TX_SIZE,4,2           ; @BULK_URB_TX_SIZE
	.comm	_USB_ENDPOINT_XFER_BULK,4,2     ; @USB_ENDPOINT_XFER_BULK
l_.str.1:                               ; @.str.1
	.asciz	"Failed to find BULK IN ep\n"

	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_hso_std_serial_write_data,4,2  ; @hso_std_serial_write_data
	.no_dead_strip	_hso_create_bulk_serial_device
.subsections_via_symbols
