	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpcap_sense_irq
_cpcap_sense_irq:                       ## @cpcap_sense_irq
	.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
	movl	%esi, %eax
	movq	%rdi, %r15
	movq	_CPCAP_REGISTER_BITS@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, %edi
	movl	%eax, %ebx
	callq	_BIT
	movl	%eax, %r14d
	movq	_CPCAP_REGISTER_SIZE@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	testl	%ebx, %ebx
	js	LBB0_2
## %bb.1:
	movq	_CPCAP_REG_INTS1@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movq	_CPCAP_REG_INTS4@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jg	LBB0_2
## %bb.3:
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	testl	%r14d, -28(%rbp)
	setne	%al
	jmp	LBB0_5
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CPCAP_REGISTER_BITS,4,2        ## @CPCAP_REGISTER_BITS
	.comm	_CPCAP_REG_INTS1,4,2            ## @CPCAP_REG_INTS1
	.comm	_CPCAP_REGISTER_SIZE,4,2        ## @CPCAP_REGISTER_SIZE
	.comm	_CPCAP_REG_INTS4,4,2            ## @CPCAP_REG_INTS4
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cpcap_sense_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpcap_sense_irq
_cpcap_sense_irq:                       ; @cpcap_sense_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _CPCAP_REGISTER_BITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CPCAP_REGISTER_BITS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sdiv	w21, w1, w8
	msub	w0, w21, w8, w1
	bl	_BIT
Lloh3:
	adrp	x8, _CPCAP_REGISTER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CPCAP_REGISTER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mul	w8, w8, w21
	tbnz	w8, #31, LBB0_4
; %bb.1:
Lloh6:
	adrp	x9, _CPCAP_REG_INTS1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CPCAP_REG_INTS1@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _CPCAP_REG_INTS4@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CPCAP_REG_INTS4@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	add	w1, w8, w9
	cmp	w1, w10
	b.gt	LBB0_4
; %bb.2:
	mov	x19, x0
	add	x2, sp, #12
	mov	x0, x20
	bl	_regmap_read
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w8, [sp, #12]
	tst	w8, w19
	cset	w0, ne
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CPCAP_REGISTER_BITS,4,2        ; @CPCAP_REGISTER_BITS
	.comm	_CPCAP_REG_INTS1,4,2            ; @CPCAP_REG_INTS1
	.comm	_CPCAP_REGISTER_SIZE,4,2        ; @CPCAP_REGISTER_SIZE
	.comm	_CPCAP_REG_INTS4,4,2            ; @CPCAP_REG_INTS4
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cpcap_sense_irq
.subsections_via_symbols
