	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iio_trigger_attach_poll_func
_iio_trigger_attach_poll_func:          ## @iio_trigger_attach_poll_func
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	28(%rdi), %edi
	movq	_CONFIG_IIO_CONSUMERS_PER_TRIGGER@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_bitmap_empty
	movl	%eax, %r12d
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	___module_get
	movq	%r14, %rdi
	callq	_iio_trigger_get_irq
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	28(%rbx), %esi
	movl	24(%rbx), %edx
	movl	16(%rbx), %r8d
	movl	20(%rbx), %ecx
	movq	%rax, %rdi
	movq	%rbx, %r9
	callq	_request_threaded_irq
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.5:
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	*%rcx
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_9
LBB0_7:
	movq	8(%rbx), %rax
	movq	8(%rax), %rax
	cmpq	8(%r14), %rax
	jne	LBB0_12
## %bb.8:
	movl	$1, (%r14)
	jmp	LBB0_12
LBB0_1:
	movl	24(%r14), %esi
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_9:
	movq	(%rbx), %rdi
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_10:
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_iio_trigger_put_irq
LBB0_11:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_module_put
LBB0_12:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_IIO_CONSUMERS_PER_TRIGGER,4,2 ## @CONFIG_IIO_CONSUMERS_PER_TRIGGER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not find an available irq for trigger %s, CONFIG_IIO_CONSUMERS_PER_TRIGGER=%d limit might be exceeded\n"

	.no_dead_strip	_iio_trigger_attach_poll_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iio_trigger_attach_poll_func
_iio_trigger_attach_poll_func:          ; @iio_trigger_attach_poll_func
	.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	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #28]
Lloh0:
	adrp	x21, _CONFIG_IIO_CONSUMERS_PER_TRIGGER@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CONFIG_IIO_CONSUMERS_PER_TRIGGER@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_bitmap_empty
	mov	x22, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	___module_get
	mov	x0, x20
	bl	_iio_trigger_get_irq
	str	x0, [x19]
	tbnz	x0, #63, LBB0_7
; %bb.1:
	ldp	w2, w1, [x19, #24]
	ldp	w4, w3, [x19, #16]
	mov	x5, x19
	bl	_request_threaded_irq
	mov	x21, x0
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x8, [x8]
	cmp	x8, #0
	ccmp	w22, #0, #4, ne
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	mov	w1, #1
	blr	x8
	mov	x21, x0
	tbnz	w0, #31, LBB0_8
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.6:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_11
LBB0_7:
	ldr	w1, [x20, #24]
	ldr	w2, [x21]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	mov	w21, #0
	b	LBB0_10
LBB0_8:
	ldr	x0, [x19]
	mov	x1, x19
	bl	_free_irq
LBB0_9:
	ldr	x1, [x19]
	mov	x0, x20
	bl	_iio_trigger_put_irq
LBB0_10:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_module_put
LBB0_11:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_IIO_CONSUMERS_PER_TRIGGER,4,2 ; @CONFIG_IIO_CONSUMERS_PER_TRIGGER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not find an available irq for trigger %s, CONFIG_IIO_CONSUMERS_PER_TRIGGER=%d limit might be exceeded\n"

	.no_dead_strip	_iio_trigger_attach_poll_func
.subsections_via_symbols
