	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adc_enqueue_request
_adc_enqueue_request:                   ## @adc_enqueue_request
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	___to_adc
	movq	%rax, %rbx
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movslq	4(%rbx), %r13
	movq	16(%rbx), %rax
	cmpq	$0, (%rax,%r13,8)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movl	(%rbx), %ecx
	movq	%r12, (%rax,%r13,8)
	cmpl	%r13d, %ecx
	jne	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_trigger_next_adc_job_if_any
LBB0_4:
	incl	%r13d
	movq	_PCF50633_MAX_ADC_FIFO_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	andl	%r13d, %eax
	movl	%eax, 4(%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ADC queue is full, dropping request\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PCF50633_MAX_ADC_FIFO_DEPTH,4,2 ## @PCF50633_MAX_ADC_FIFO_DEPTH
	.no_dead_strip	_adc_enqueue_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adc_enqueue_request
_adc_enqueue_request:                   ; @adc_enqueue_request
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	mov	x20, x0
	bl	___to_adc
	mov	x21, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldrsw	x23, [x21, #4]
	ldr	x8, [x21, #16]
	ldr	x9, [x8, x23, lsl #3]
	cbz	x9, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mutex_unlock
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	ldr	w9, [x21]
	str	x22, [x8, x23, lsl #3]
	cmp	w9, w23
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_trigger_next_adc_job_if_any
LBB0_4:
	add	w8, w23, #1
Lloh5:
	adrp	x9, _PCF50633_MAX_ADC_FIFO_DEPTH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PCF50633_MAX_ADC_FIFO_DEPTH@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	sub	w9, w9, #1
	and	w8, w9, w8
	str	w8, [x21, #4]
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ADC queue is full, dropping request\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PCF50633_MAX_ADC_FIFO_DEPTH,4,2 ; @PCF50633_MAX_ADC_FIFO_DEPTH
	.no_dead_strip	_adc_enqueue_request
.subsections_via_symbols
