	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_picolcd_send_and_wait          ## -- Begin function picolcd_send_and_wait
	.p2align	4, 0x90
_picolcd_send_and_wait:                 ## @picolcd_send_and_wait
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_hid_get_drvdata
	movq	%rax, %r14
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_picolcd_out_report
	xorl	%ebx, %ebx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_19
## %bb.1:
	testq	%r14, %r14
	je	LBB0_19
## %bb.2:
	movq	_PICOLCD_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_4
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_init_completion
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, 24(%rbx)
	leaq	4(%r14), %rdi
	xorps	%xmm0, %xmm0
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movups	%xmm0, 8(%rbx)
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	addq	$8, %r14
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_14
## %bb.6:
	movslq	%r12d, %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=1
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	addl	%ebx, %esi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	incq	%r12
	movslq	%ecx, %rdx
	cmpq	%rdx, %r12
	jge	LBB0_14
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	(%rax,%r12,8), %rdi
	cmpl	$0, (%rdi)
	jle	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movslq	%esi, %r13
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r13,4), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=2
	movl	%ebx, %esi
	callq	_hid_set_field
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax,%r12,8), %rdi
	incq	%rbx
	cmpl	(%rdi), %ebx
	jge	LBB0_7
LBB0_12:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	(%rbx,%r13), %rax
	xorl	%edx, %edx
	cmpq	%r14, %rax
	jge	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	(%r15,%rbx,4), %edx
	jmp	LBB0_11
LBB0_14:
	movq	_PICOLCD_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	testl	%eax, (%r14)
	je	LBB0_17
## %bb.15:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_17:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, 16(%r14)
	movl	24(%r14), %edi
	movq	_HID_REQ_SET_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_hid_hw_request
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%esi, %esi
	movq	%rbx, %rdi
	callq	_wait_for_completion_interruptible_timeout
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	$0, 16(%r14)
LBB0_18:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_19:
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PICOLCD_FAILED,4,2             ## @PICOLCD_FAILED
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_HID_REQ_SET_REPORT,4,2         ## @HID_REQ_SET_REPORT
	.comm	_HZ,4,2                         ## @HZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_picolcd_send_and_wait          ; -- Begin function picolcd_send_and_wait
	.p2align	2
_picolcd_send_and_wait:                 ; @picolcd_send_and_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x3
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	bl	_hid_get_drvdata
	mov	x20, x0
	mov	x0, x19
	mov	x1, x21
	bl	_picolcd_out_report
	mov	x19, #0
	cbz	x0, LBB0_19
; %bb.1:
	cbz	x20, LBB0_19
; %bb.2:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _PICOLCD_FAILED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PICOLCD_FAILED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x19, #0
	b	LBB0_19
LBB0_4:
	mov	x22, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_19
; %bb.5:
	mov	x0, x19
	bl	_init_completion
	stp	xzr, x22, [x19, #16]
	add	x0, x20, #4
	str	xzr, [x19, #8]
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_mutex_lock
	add	x0, x20, #8
	str	x0, [sp]                        ; 8-byte Folded Spill
	bl	_spin_lock_irqsave
	ldr	w9, [x22]
	cmp	w9, #1
	b.lt	LBB0_15
; %bb.6:
	mov	x27, #0
	mov	w28, #0
	sxtw	x21, w25
	ldr	x8, [x22, #8]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	w28, w28, w25
	ldr	w9, [x22]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x27, x27, #1
	cmp	x27, w9, sxtw
	b.ge	LBB0_15
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	x0, [x8, x27, lsl #3]
	ldr	w10, [x0]
	cmp	w10, #1
	b.lt	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x25, #0
	sxtw	x24, w28
	add	x26, x23, w28, sxtw #2
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	w2, [x26, x25, lsl #2]
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	mov	x1, x25
	bl	_hid_set_field
	ldr	x8, [x22, #8]
	ldr	x0, [x8, x27, lsl #3]
	ldr	w9, [x0]
	add	x25, x25, #1
	cmp	w25, w9
	b.ge	LBB0_7
LBB0_13:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x8, x24, x25
	cmp	x8, x21
	b.lt	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	mov	w2, #0
	b	LBB0_12
LBB0_15:
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _PICOLCD_FAILED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PICOLCD_FAILED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
	ldr	x21, [sp]                       ; 8-byte Folded Reload
	b	LBB0_18
LBB0_17:
	str	x19, [x20, #16]
	ldr	w0, [x20, #24]
Lloh9:
	adrp	x8, _HID_REQ_SET_REPORT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HID_REQ_SET_REPORT@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_hid_hw_request
	ldr	x21, [sp]                       ; 8-byte Folded Reload
	mov	x0, x21
	bl	_spin_unlock_irqrestore
Lloh12:
	adrp	x8, _HZ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	lsl	w1, w8, #1
	mov	x0, x19
	bl	_wait_for_completion_interruptible_timeout
	mov	x0, x21
	bl	_spin_lock_irqsave
	str	xzr, [x20, #16]
LBB0_18:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_mutex_unlock
LBB0_19:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PICOLCD_FAILED,4,2             ; @PICOLCD_FAILED
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_HID_REQ_SET_REPORT,4,2         ; @HID_REQ_SET_REPORT
	.comm	_HZ,4,2                         ; @HZ
.subsections_via_symbols
