	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_mbox_register
_omap_mbox_register:                    ## @omap_mbox_register
	.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
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_14
## %bb.2:
	movq	(%r15), %rbx
	xorl	%r13d, %r13d
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.3:
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %esi
	movl	4(%rbx), %r9d
	movq	_omap_mbox_class@GOTPCREL(%rip), %rdi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	movq	%r12, %r8
	callq	_device_create
	movl	%eax, (%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r15,%r13,8), %rbx
	incq	%r13
	testq	%rbx, %rbx
	jne	LBB0_4
LBB0_7:
	movq	_omap_mbox_devices_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	8(%r14), %rdi
	movq	_omap_mbox_devices@GOTPCREL(%rip), %rsi
	callq	_list_add
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	4(%r14), %edi
	movq	%r14, %rsi
	callq	_devm_mbox_controller_register
	jmp	LBB0_8
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_5:
	movl	(%rbx), %edi
	callq	_PTR_ERR
LBB0_8:
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	testl	%r13d, %r13d
	je	LBB0_13
## %bb.11:
	movslq	%r13d, %rax
	negl	%r13d
	leaq	(%r15,%rax,8), %r15
	addq	$-8, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rbx,8), %rax
	movl	(%rax), %edi
	callq	_device_unregister
	decq	%rbx
	cmpl	%ebx, %r13d
	jne	LBB0_12
	jmp	LBB0_13
LBB0_9:
	xorl	%r14d, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_omap_mbox_class,4,2            ## @omap_mbox_class
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_omap_mbox_devices_lock,4,2     ## @omap_mbox_devices_lock
	.comm	_omap_mbox_devices,4,2          ## @omap_mbox_devices
	.no_dead_strip	_omap_mbox_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_mbox_register
_omap_mbox_register:                    ; @omap_mbox_register
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	x24, [x0, #16]
	cbz	x24, LBB0_7
; %bb.2:
	ldr	x20, [x24]
	cbz	x20, LBB0_9
; %bb.3:
	mov	x23, #0
	add	x25, x24, #8
Lloh0:
	adrp	x21, _omap_mbox_class@GOTPAGE
Lloh1:
	ldr	x21, [x21, _omap_mbox_class@GOTPAGEOFF]
Lloh2:
	adrp	x22, l_.str@PAGE
Lloh3:
	add	x22, x22, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, #4]
	ldr	w5, [x20, #4]
	mov	x0, x21
	mov	w2, #0
	mov	x3, x20
	mov	x4, x22
	bl	_device_create
	str	w0, [x20]
	bl	_IS_ERR
	cbnz	x0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x23, #1
	ldr	x20, [x25, x23, lsl #3]
	mov	x23, x8
	cbnz	x20, LBB0_4
; %bb.6:
	mov	x23, x8
	b	LBB0_10
LBB0_7:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	w23, #0
LBB0_10:
Lloh7:
	adrp	x20, _omap_mbox_devices_lock@GOTPAGE
Lloh8:
	ldr	x20, [x20, _omap_mbox_devices_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #8
Lloh9:
	adrp	x1, _omap_mbox_devices@GOTPAGE
Lloh10:
	ldr	x1, [x1, _omap_mbox_devices@GOTPAGEOFF]
	bl	_list_add
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w0, [x19, #4]
	mov	x1, x19
	bl	_devm_mbox_controller_register
	mov	x19, x0
	cbnz	w0, LBB0_12
	b	LBB0_8
LBB0_11:
	ldr	w0, [x20]
	bl	_PTR_ERR
	mov	x19, x0
	cbz	w0, LBB0_8
LBB0_12:
	cbz	w23, LBB0_8
; %bb.13:
	add	x8, x24, w23, sxtw #3
	sub	x20, x8, #8
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20], #-8
	ldr	w0, [x8]
	bl	_device_unregister
	subs	w23, w23, #1
	b.ne	LBB0_14
	b	LBB0_8
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_omap_mbox_class,4,2            ; @omap_mbox_class
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_omap_mbox_devices_lock,4,2     ; @omap_mbox_devices_lock
	.comm	_omap_mbox_devices,4,2          ; @omap_mbox_devices
	.no_dead_strip	_omap_mbox_register
.subsections_via_symbols
