	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidpp_send_fap_command_sync
_hidpp_send_fap_command_sync:           ## @hidpp_send_fap_command_sync
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$5, %r8d
	jb	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movl	%r8d, %ebx
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	_HIDPP_REPORT_LONG_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$-4, %eax
	cmpl	%ebx, %eax
	jge	LBB0_6
## %bb.7:
	movq	_REPORT_ID_HIDPP_VERY_LONG@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_6:
	movq	_REPORT_ID_HIDPP_LONG@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	%r15, 16(%r14)
	movq	%r13, 8(%r14)
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_hidpp_send_message_sync
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_kfree
	movl	%ebx, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HIDPP_REPORT_LONG_LENGTH,4,2   ## @HIDPP_REPORT_LONG_LENGTH
	.comm	_REPORT_ID_HIDPP_VERY_LONG,4,2  ## @REPORT_ID_HIDPP_VERY_LONG
	.comm	_REPORT_ID_HIDPP_LONG,4,2       ## @REPORT_ID_HIDPP_LONG
	.no_dead_strip	_hidpp_send_fap_command_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidpp_send_fap_command_sync
_hidpp_send_fap_command_sync:           ; @hidpp_send_fap_command_sync
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cmp	w4, #5
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	x19, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x25, x1
	mov	x20, x0
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.3:
	mov	x24, x0
Lloh5:
	adrp	x8, _HIDPP_REPORT_LONG_LENGTH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HIDPP_REPORT_LONG_LENGTH@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	sub	w8, w8, #4
Lloh8:
	adrp	x9, _REPORT_ID_HIDPP_VERY_LONG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _REPORT_ID_HIDPP_VERY_LONG@GOTPAGEOFF]
Lloh10:
	adrp	x10, _REPORT_ID_HIDPP_LONG@GOTPAGE
Lloh11:
	ldr	x10, [x10, _REPORT_ID_HIDPP_LONG@GOTPAGEOFF]
	cmp	w8, w21
	csel	x8, x9, x10, lt
	ldr	w8, [x8]
	str	w8, [x0, #24]
	stp	x23, x25, [x0, #8]
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	mov	x0, x20
	mov	x1, x24
	mov	x2, x19
	bl	_hidpp_send_message_sync
	mov	x19, x0
	mov	x0, x24
	bl	_kfree
	mov	x0, x19
	b	LBB0_6
LBB0_4:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HIDPP_REPORT_LONG_LENGTH,4,2   ; @HIDPP_REPORT_LONG_LENGTH
	.comm	_REPORT_ID_HIDPP_VERY_LONG,4,2  ; @REPORT_ID_HIDPP_VERY_LONG
	.comm	_REPORT_ID_HIDPP_LONG,4,2       ; @REPORT_ID_HIDPP_LONG
	.no_dead_strip	_hidpp_send_fap_command_sync
.subsections_via_symbols
