	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_gpio_irq_request_channel
_meson_gpio_irq_request_channel:        ## @meson_gpio_irq_request_channel
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_spin_lock
	movl	16(%r15), %edi
	movq	_NUM_CHANNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_find_first_zero_bit
	cmpl	(%rbx), %eax
	jae	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	movl	16(%r15), %esi
	movl	%eax, %edi
	callq	_set_bit
	movl	%r12d, %edi
	callq	_meson_gpio_irq_channel_to_reg
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r12d, %edi
	callq	_REG_PIN_SEL_SHIFT
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %r13
	movl	$255, %r14d
	movl	%eax, %ecx
	shll	%cl, %r14d
	movl	%r12d, %edi
	callq	_REG_PIN_SEL_SHIFT
	movq	%r13, %rbx
	movl	%eax, %ecx
	shlq	%cl, %rbx
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	movq	%rbx, %rcx
	callq	_meson_gpio_irq_update_bits
	movl	%r12d, %eax
	shlq	$2, %rax
	addq	8(%r15), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	(%rbx), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_pr_debug
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	%r15, %rdi
	callq	_spin_unlock
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_CHANNEL,4,2                ## @NUM_CHANNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No channel available\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
L_.str.1:                               ## @.str.1
	.asciz	"hwirq %lu assigned to channel %d - irq %u\n"

	.no_dead_strip	_meson_gpio_irq_request_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_gpio_irq_request_channel
_meson_gpio_irq_request_channel:        ; @meson_gpio_irq_request_channel
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_spin_lock
	ldr	w0, [x21, #16]
Lloh0:
	adrp	x23, _NUM_CHANNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NUM_CHANNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_find_first_zero_bit
	ldr	w8, [x23]
	cmp	w0, w8
	b.hs	LBB0_2
; %bb.1:
	mov	x22, x0
	ldr	w1, [x21, #16]
	bl	_set_bit
	mov	x0, x22
	bl	_meson_gpio_irq_channel_to_reg
	mov	x23, x0
	mov	x0, x22
	bl	_REG_PIN_SEL_SHIFT
	mov	w8, #255
	lsl	w24, w8, w0
	mov	x0, x22
	bl	_REG_PIN_SEL_SHIFT
	lsl	x3, x19, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	bl	_meson_gpio_irq_update_bits
	ldr	x8, [x21, #8]
	add	x8, x8, w22, uxtw #2
	str	x8, [x20]
	mov	x0, x21
	bl	_spin_unlock
	ldr	x8, [x20]
	ldr	w3, [x8]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	mov	x2, x22
	bl	_pr_debug
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_spin_unlock
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh6:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_CHANNEL,4,2                ; @NUM_CHANNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No channel available\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
l_.str.1:                               ; @.str.1
	.asciz	"hwirq %lu assigned to channel %d - irq %u\n"

	.no_dead_strip	_meson_gpio_irq_request_channel
.subsections_via_symbols
