	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hso_mux_serial_read
_hso_mux_serial_read:                   ## @hso_mux_serial_read
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	movq	_CTRL_URB_RX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_memset
	cmpl	$1, (%rbx)
	jne	LBB0_3
## %bb.6:
	movq	_USB_CDC_GET_ENCAPSULATED_RESPONSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	32(%rbx), %rax
	movq	_HSO_PORT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	(%rax), %edx
	movq	24(%rbx), %rax
	movl	(%rax), %ecx
	leaq	16(%rbx), %r8
	movq	8(%rbx), %rax
	movl	(%rax), %r9d
	movl	4(%rbx), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	callq	_mux_device_request
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_4
LBB0_3:
	movq	32(%rbx), %rax
	movq	8(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_4:
	movl	%r14d, %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CTRL_URB_RX_SIZE,4,2           ## @CTRL_URB_RX_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR: mux'd reads with multiple buffers not possible\n"

	.comm	_USB_CDC_GET_ENCAPSULATED_RESPONSE,4,2 ## @USB_CDC_GET_ENCAPSULATED_RESPONSE
	.comm	_HSO_PORT_MASK,4,2              ## @HSO_PORT_MASK
	.no_dead_strip	_hso_mux_serial_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hso_mux_serial_read
_hso_mux_serial_read:                   ; @hso_mux_serial_read
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _CTRL_URB_RX_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CTRL_URB_RX_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _USB_CDC_GET_ENCAPSULATED_RESPONSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_CDC_GET_ENCAPSULATED_RESPONSE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldp	x9, x8, [x19, #24]
	ldr	w8, [x8]
Lloh6:
	adrp	x10, _HSO_PORT_MASK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _HSO_PORT_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	and	w2, w10, w8
	ldr	w3, [x9]
	add	x4, x19, #16
	ldr	x8, [x19, #8]
	ldr	w5, [x8]
	ldr	w6, [x19, #4]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mux_device_request
LBB0_3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	ldr	x8, [x19, #32]
	ldr	x0, [x8, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w0, #0
LBB0_5:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CTRL_URB_RX_SIZE,4,2           ; @CTRL_URB_RX_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR: mux'd reads with multiple buffers not possible\n"

	.comm	_USB_CDC_GET_ENCAPSULATED_RESPONSE,4,2 ; @USB_CDC_GET_ENCAPSULATED_RESPONSE
	.comm	_HSO_PORT_MASK,4,2              ; @HSO_PORT_MASK
	.no_dead_strip	_hso_mux_serial_read
.subsections_via_symbols
