	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function picolcd_set_contrast
_picolcd_set_contrast:                  ## @picolcd_set_contrast
	.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
	movl	%esi, %ebx
	callq	_lcd_get_data
	movq	%rax, %r14
	movq	_REPORT_CONTRAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r14), %esi
	callq	_picolcd_out_report
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r15
	cmpl	$1, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	cmpl	$1, (%rax)
	jne	LBB0_3
## %bb.4:
	movzbl	%bl, %eax
	movl	%eax, (%r14)
	movq	%r14, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	8(%r15), %rax
	movq	(%rax), %rdi
	movl	(%r14), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_hid_set_field
	movq	_PICOLCD_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	jne	LBB0_6
## %bb.5:
	movl	12(%r14), %edi
	movq	_HID_REQ_SET_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_hid_hw_request
LBB0_6:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_7
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REPORT_CONTRAST,4,2            ## @REPORT_CONTRAST
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PICOLCD_FAILED,4,2             ## @PICOLCD_FAILED
	.comm	_HID_REQ_SET_REPORT,4,2         ## @HID_REQ_SET_REPORT
	.no_dead_strip	_picolcd_set_contrast
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function picolcd_set_contrast
_picolcd_set_contrast:                  ; @picolcd_set_contrast
	.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	x21, x1
	bl	_lcd_get_data
	mov	x19, x0
Lloh0:
	adrp	x8, _REPORT_CONTRAST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REPORT_CONTRAST@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #12]
	bl	_picolcd_out_report
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.3:
	and	w8, w21, #0xff
	str	w8, [x19]
	add	x21, x19, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
	ldr	w2, [x19]
	mov	w1, #0
	bl	_hid_set_field
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _PICOLCD_FAILED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PICOLCD_FAILED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x19, #12]
Lloh6:
	adrp	x8, _HID_REQ_SET_REPORT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HID_REQ_SET_REPORT@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_hid_hw_request
LBB0_5:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_REPORT_CONTRAST,4,2            ; @REPORT_CONTRAST
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PICOLCD_FAILED,4,2             ; @PICOLCD_FAILED
	.comm	_HID_REQ_SET_REPORT,4,2         ; @HID_REQ_SET_REPORT
	.no_dead_strip	_picolcd_set_contrast
.subsections_via_symbols
