	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function htc_setup_complete
_htc_setup_complete:                    ## @htc_setup_complete
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$54, %edi
	callq	_alloc_skb
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	$4, %esi
	callq	_skb_reserve
	movq	%r15, %rdi
	movl	$4, %esi
	callq	_skb_put
	movq	%rax, %rbx
	movq	_HTC_MSG_SETUP_COMPLETE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movl	%eax, (%rbx)
	movq	_HTC_OP_START_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
	movl	(%r15), %edx
	movq	_ENDPOINT0@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_htc_issue_send
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movq	%r15, %rdi
	callq	_kfree_skb
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	leaq	4(%r14), %rdi
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_kfree_skb
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate send buffer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HTC_MSG_SETUP_COMPLETE_ID,4,2  ## @HTC_MSG_SETUP_COMPLETE_ID
	.comm	_HTC_OP_START_WAIT,4,2          ## @HTC_OP_START_WAIT
	.comm	_ENDPOINT0,4,2                  ## @ENDPOINT0
	.comm	_HZ,4,2                         ## @HZ
L_.str.1:                               ## @.str.1
	.asciz	"HTC start timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_htc_setup_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function htc_setup_complete
_htc_setup_complete:                    ; @htc_setup_complete
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #54
	bl	_alloc_skb
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	w1, #4
	bl	_skb_reserve
	mov	x0, x19
	mov	w1, #4
	bl	_skb_put
	mov	x21, x0
Lloh3:
	adrp	x8, _HTC_MSG_SETUP_COMPLETE_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HTC_MSG_SETUP_COMPLETE_ID@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_be16
	str	w0, [x21]
Lloh6:
	adrp	x8, _HTC_OP_START_WAIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HTC_OP_START_WAIT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
	ldr	w2, [x19]
Lloh9:
	adrp	x8, _ENDPOINT0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENDPOINT0@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w3, #0
	bl	_htc_issue_send
	cbz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_kfree_skb
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	ldr	w0, [x20]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	add	x0, x20, #4
Lloh18:
	adrp	x8, _HZ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	ldr	w0, [x20]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_kfree_skb
Lloh23:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate send buffer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HTC_MSG_SETUP_COMPLETE_ID,4,2  ; @HTC_MSG_SETUP_COMPLETE_ID
	.comm	_HTC_OP_START_WAIT,4,2          ; @HTC_OP_START_WAIT
	.comm	_ENDPOINT0,4,2                  ; @ENDPOINT0
	.comm	_HZ,4,2                         ; @HZ
l_.str.1:                               ; @.str.1
	.asciz	"HTC start timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_htc_setup_complete
.subsections_via_symbols
