	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpaa_eth_add_device
_dpaa_eth_add_device:                   ## @dpaa_eth_add_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rsi), %r14
	movq	%rsi, -24(%rbp)
	movl	4(%r14), %eax
	movl	%eax, -28(%rbp)
	movl	%edi, -32(%rbp)
	movq	_eth_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	_dpaa_eth_add_device.dpaa_eth_dev_cnt(%rip), %esi
	leaq	L_.str(%rip), %rdi
	callq	_platform_device_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	(%r14), %eax
	movl	%eax, (%rbx)
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_platform_device_add_data
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_platform_device_add
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_4
LBB0_5:
	movq	%rbx, %rdi
	callq	_platform_device_put
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movq	_eth_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	%r14d, %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
LBB0_7:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	incl	_dpaa_eth_add_device.dpaa_eth_dev_cnt(%rip)
	movq	_eth_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_dpaa_eth_add_device.dpaa_eth_dev_cnt,4,2 ## @dpaa_eth_add_device.dpaa_eth_dev_cnt
	.comm	_eth_lock,4,2                   ## @eth_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dpaa-ethernet"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_dpaa_eth_add_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpaa_eth_add_device
_dpaa_eth_add_device:                   ; @dpaa_eth_add_device
	.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
	ldr	x20, [x1]
	str	x1, [sp, #8]
	ldr	w8, [x20, #4]
	stp	w0, w8, [sp]
Lloh0:
	adrp	x0, _eth_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _eth_lock@GOTPAGEOFF]
	bl	_mutex_lock
	adrp	x21, _dpaa_eth_add_device.dpaa_eth_dev_cnt@PAGE
	ldr	w1, [x21, _dpaa_eth_add_device.dpaa_eth_dev_cnt@PAGEOFF]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_platform_device_alloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w8, [x20]
	str	w8, [x0]
	mov	x1, sp
	mov	w2, #16
	bl	_platform_device_add_data
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_platform_device_add
	mov	x20, x0
	cbz	w0, LBB0_7
LBB0_3:
	mov	x0, x19
	bl	_platform_device_put
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
Lloh7:
	adrp	x0, _eth_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _eth_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x20
	bl	_ERR_PTR
	mov	x19, x0
LBB0_6:
	mov	x0, x19
	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
LBB0_7:
	ldr	w8, [x21, _dpaa_eth_add_device.dpaa_eth_dev_cnt@PAGEOFF]
	add	w8, w8, #1
	str	w8, [x21, _dpaa_eth_add_device.dpaa_eth_dev_cnt@PAGEOFF]
Lloh9:
	adrp	x0, _eth_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _eth_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_dpaa_eth_add_device.dpaa_eth_dev_cnt,4,2 ; @dpaa_eth_add_device.dpaa_eth_dev_cnt
	.comm	_eth_lock,4,2                   ; @eth_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dpaa-ethernet"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_dpaa_eth_add_device
.subsections_via_symbols
