	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_irq_map                    ## -- Begin function ipu_irq_map
	.p2align	4, 0x90
_ipu_irq_map:                           ## @ipu_irq_map
	.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	%edi, %r14d
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_might_sleep
	movq	_map_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	%r14d, %edi
	callq	_src2map
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_pr_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_2:
	movl	%r15d, %ebx
	negl	%ebx
	movq	_map_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	jle	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_pr_err
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_map_lock,4,2                   ## @map_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IPU: Source %u already mapped to IRQ %u\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CONFIG_MX3_IPU_IRQS,4,2        ## @CONFIG_MX3_IPU_IRQS
	.comm	_irq_map,8,3                    ## @irq_map
	.comm	_bank_lock,4,2                  ## @bank_lock
	.comm	_irq_bank,8,3                   ## @irq_bank
L_.str.2:                               ## @.str.2
	.asciz	"IPU: couldn't map source %u: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_irq_map                    ; -- Begin function ipu_irq_map
	.p2align	2
_ipu_irq_map:                           ; @ipu_irq_map
	.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, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_might_sleep
Lloh3:
	adrp	x0, _map_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _map_lock@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x19
	bl	_src2map
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w2, [x0]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_err
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w21, [x8]
LBB0_2:
	neg	w20, w21
Lloh10:
	adrp	x0, _map_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _map_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	cmp	w21, #1
	b.lt	LBB0_4
; %bb.3:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_pr_err
LBB0_4:
	mov	x0, x20
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_map_lock,4,2                   ; @map_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IPU: Source %u already mapped to IRQ %u\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CONFIG_MX3_IPU_IRQS,4,2        ; @CONFIG_MX3_IPU_IRQS
	.comm	_irq_map,8,3                    ; @irq_map
	.comm	_bank_lock,4,2                  ; @bank_lock
	.comm	_irq_bank,8,3                   ; @irq_bank
l_.str.2:                               ; @.str.2
	.asciz	"IPU: couldn't map source %u: %d\n"

.subsections_via_symbols
