	.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	_sms_err                        ## TAILCALL
LBB0_1:
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	movq	8(%r12), %r14
	testq	%rdx, %rdx
	jle	LBB0_12
## %bb.2:
	testq	%rsi, %rsi
	jne	LBB0_12
## %bb.3:
	movq	(%r12), %rax
	movq	16(%rax), %r15
	movq	%r15, %rdi
	callq	_smsendian_handle_message_header
	movq	8(%rbx), %rcx
	movq	(%r15), %rsi
	cmpq	%rsi, %rcx
	jge	LBB0_4
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
	movq	%rcx, %rdx
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
LBB0_13:
	xorl	%eax, %eax
	callq	_sms_err
	jmp	LBB0_14
LBB0_4:
	movq	(%r12), %rax
	movq	%rsi, (%rax)
	movq	(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.5:
	movl	8(%r15), %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	_sms_err
	jmp	LBB0_14
LBB0_9:
	movq	$0, 8(%rax)
	jmp	LBB0_10
LBB0_8:
	addq	%r15, %rdx
	movq	%rdx, %rdi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_memcpy
	movq	(%r12), %rax
LBB0_10:
	movl	8(%r14), %edi
	movq	%rax, %rsi
	callq	_smscore_onresponse
	movq	$0, (%r12)
LBB0_14:
	movq	%r14, %rdi
	movq	%r12, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_smsusb_submit_urb              ## 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"

	.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"

L_.str.2:                               ## @.str.2
	.asciz	"invalid response msglen %d actual %d"

L_.str.3:                               ## @.str.3
	.asciz	"error, urb status %d, %d bytes"

	.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	_sms_err
LBB0_2:
	mov	x22, x0
	ldr	x19, [x0, #16]
	ldr	x20, [x19, #8]
	cmp	x2, #1
	ccmp	x1, #0, #0, ge
	b.eq	LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_.str.3@PAGE
Lloh6:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldr	x8, [x19]
	ldr	x21, [x8, #16]
	mov	x0, x21
	bl	_smsendian_handle_message_header
	ldr	x2, [x22, #8]
	ldr	x1, [x21]
	cmp	x2, x1
	b.ge	LBB0_8
; %bb.5:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_6:
	bl	_sms_err
LBB0_7:
	mov	x0, x20
	mov	x1, 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	_smsusb_submit_urb
LBB0_8:
	ldr	x8, [x19]
	str	x1, [x8]
	ldr	x9, [x20]
	cbz	x9, LBB0_12
; %bb.9:
	ldr	w10, [x21, #8]
Lloh9:
	adrp	x11, _MSG_HDR_FLAG_SPLIT_MSG@GOTPAGE
Lloh10:
	ldr	x11, [x11, _MSG_HDR_FLAG_SPLIT_MSG@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_12
; %bb.10:
	ubfx	x10, x10, #8, #2
	add	x9, x9, x10
	str	x9, [x8, #8]
	add	x8, x9, w1, sxtw
	cmp	x8, x2
	b.le	LBB0_13
; %bb.11:
	str	x2, [sp]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x9
	b	LBB0_6
LBB0_12:
	str	xzr, [x8, #8]
	b	LBB0_14
LBB0_13:
	add	x0, x21, x9
	mov	x1, x21
	mov	w2, #16
	bl	_memcpy
	ldr	x8, [x19]
LBB0_14:
	ldr	w0, [x20, #8]
	mov	x1, x8
	bl	_smscore_onresponse
	str	xzr, [x19]
	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 AdrpAdd	Lloh12, Lloh13
	.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"

	.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"

l_.str.2:                               ; @.str.2
	.asciz	"invalid response msglen %d actual %d"

l_.str.3:                               ; @.str.3
	.asciz	"error, urb status %d, %d bytes"

	.no_dead_strip	_smsusb_onresponse
.subsections_via_symbols
