	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsusb_onresponse
_smsusb_onresponse:                     ## @smsusb_onresponse
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rsi
	movq	8(%rdi), %rdx
	movq	_ESHUTDOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%rsi, %rax
	jne	LBB0_1
## %bb.15:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_1:
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	testq	%rdx, %rdx
	jle	LBB0_12
## %bb.2:
	testq	%rsi, %rsi
	jne	LBB0_12
## %bb.3:
	movq	16(%r15), %r12
	movq	8(%r15), %rax
	movq	16(%rax), %r14
	movq	%r14, %rdi
	callq	_smsendian_handle_message_header
	movq	8(%rbx), %rcx
	movq	(%r14), %rsi
	cmpq	%rsi, %rcx
	jge	LBB0_4
## %bb.11:
	leaq	L_.str.3(%rip), %rdi
	movq	%rcx, %rdx
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.4(%rip), %rdi
LBB0_13:
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_14
LBB0_4:
	movq	8(%r15), %rax
	movq	%rsi, (%rax)
	movq	(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.5:
	movl	8(%r14), %edi
	movq	_MSG_HDR_FLAG_SPLIT_MSG@GOTPCREL(%rip), %rbx
	testl	%edi, (%rbx)
	je	LBB0_9
## %bb.6:
	shrl	$8, %edi
	andl	$3, %edi
	addq	%rdi, %rdx
	movq	%rdx, 8(%rax)
	movslq	%esi, %rax
	addq	%rdx, %rax
	cmpq	%rcx, %rax
	jle	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_14
LBB0_9:
	movq	$0, 8(%rax)
	jmp	LBB0_10
LBB0_8:
	addq	%r14, %rdx
	movq	%rdx, %rdi
	movq	%r14, %rsi
	movl	$16, %edx
	callq	_memcpy
LBB0_10:
	movl	12(%r14), %edi
	callq	_smscore_translate_msg
	movl	12(%r14), %edx
	movq	(%r14), %rcx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
	movq	%r14, %rdi
	callq	_smsendian_handle_rx_message
	movl	8(%r12), %edi
	movq	8(%r15), %rsi
	callq	_smscore_onresponse
	movq	$0, 8(%r15)
LBB0_14:
	movq	_do_submit_urb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_INIT_WORK
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_schedule_work                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ESHUTDOWN,8,3                  ## @ESHUTDOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error, urb status %d (-ESHUTDOWN), %d bytes\n"

	.comm	_MSG_HDR_FLAG_SPLIT_MSG,4,2     ## @MSG_HDR_FLAG_SPLIT_MSG
L_.str.1:                               ## @.str.1
	.asciz	"invalid response msglen %d offset %d size %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"received %s(%d) size: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"invalid response msglen %d actual %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"error, urb status %d, %d bytes\n"

	.comm	_do_submit_urb,4,2              ## @do_submit_urb
	.no_dead_strip	_smsusb_onresponse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsusb_onresponse
_smsusb_onresponse:                     ; @smsusb_onresponse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x8, _ESHUTDOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ESHUTDOWN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldp	x1, x2, [x0]
	cmn	x1, x8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	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
	add	sp, sp, #64
	b	_pr_err
LBB0_2:
	mov	x21, x0
	ldr	x19, [x0, #16]
	cmp	x2, #1
	ccmp	x1, #0, #0, ge
	b.eq	LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_.str.4@PAGE
Lloh6:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldp	x8, x22, [x19, #8]
	ldr	x20, [x8, #16]
	mov	x0, x20
	bl	_smsendian_handle_message_header
	ldr	x2, [x21, #8]
	ldr	x1, [x20]
	cmp	x2, x1
	b.ge	LBB0_8
; %bb.5:
Lloh7:
	adrp	x0, l_.str.3@PAGE
Lloh8:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_6:
	bl	_pr_err
LBB0_7:
Lloh9:
	adrp	x8, _do_submit_urb@GOTPAGE
Lloh10:
	ldr	x8, [x8, _do_submit_urb@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_INIT_WORK
	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
	add	sp, sp, #64
	b	_schedule_work
LBB0_8:
	ldr	x9, [x19, #8]
	str	x1, [x9]
	ldr	x8, [x22]
	cbz	x8, LBB0_12
; %bb.9:
	ldr	w10, [x20, #8]
Lloh12:
	adrp	x11, _MSG_HDR_FLAG_SPLIT_MSG@GOTPAGE
Lloh13:
	ldr	x11, [x11, _MSG_HDR_FLAG_SPLIT_MSG@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_12
; %bb.10:
	ubfx	x10, x10, #8, #2
	add	x8, x8, x10
	str	x8, [x9, #8]
	add	x9, x8, w1, sxtw
	cmp	x9, x2
	b.le	LBB0_13
; %bb.11:
	str	x2, [sp]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x8
	b	LBB0_6
LBB0_12:
	str	xzr, [x9, #8]
	b	LBB0_14
LBB0_13:
	add	x0, x20, x8
	mov	x1, x20
	mov	w2, #16
	bl	_memcpy
LBB0_14:
	ldr	w0, [x20, #12]
	bl	_smscore_translate_msg
	mov	x1, x0
	ldr	w2, [x20, #12]
	ldr	x3, [x20]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
	mov	x0, x20
	bl	_smsendian_handle_rx_message
	ldr	w0, [x22, #8]
	ldr	x1, [x19, #8]
	bl	_smscore_onresponse
	str	xzr, [x19, #8]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ESHUTDOWN,8,3                  ; @ESHUTDOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error, urb status %d (-ESHUTDOWN), %d bytes\n"

	.comm	_MSG_HDR_FLAG_SPLIT_MSG,4,2     ; @MSG_HDR_FLAG_SPLIT_MSG
l_.str.1:                               ; @.str.1
	.asciz	"invalid response msglen %d offset %d size %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"received %s(%d) size: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"invalid response msglen %d actual %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"error, urb status %d, %d bytes\n"

	.comm	_do_submit_urb,4,2              ; @do_submit_urb
	.no_dead_strip	_smsusb_onresponse
.subsections_via_symbols
