	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_child
_add_child:                             ## @add_child
	.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
	movl	%r9d, %r13d
	movl	%r8d, %r12d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	movl	$-1, %esi
	callq	_platform_device_alloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	%r12d, %esi
	callq	_device_init_wakeup
	movq	%r15, (%rbx)
	testq	%r14, %r14
	je	LBB0_5
## %bb.2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_platform_device_add_data
	testl	%eax, %eax
	js	LBB0_3
LBB0_5:
	testl	%r13d, %r13d
	je	LBB0_8
## %bb.6:
	movl	%r13d, -56(%rbp)
	movq	_IORESOURCE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_platform_device_add_resources
	testl	%eax, %eax
	js	LBB0_7
LBB0_8:
	movq	%rbx, %rdi
	callq	_platform_device_add
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_10
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_7:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%rbx, %rdi
	callq	_dev_dbg
LBB0_9:
	movq	%rbx, %rdi
	callq	_platform_device_put
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_dev_err
	movl	%r12d, %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
LBB0_10:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't add platform_data\n"

	.comm	_IORESOURCE_IRQ,4,2             ## @IORESOURCE_IRQ
L_.str.1:                               ## @.str.1
	.asciz	"can't add irq\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to add device %s\n"

	.no_dead_strip	_add_child
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_child
_add_child:                             ; @add_child
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x23, x5
	mov	x25, x4
	mov	x22, x3
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	w1, #-1
	bl	_platform_device_alloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	mov	x1, x25
	bl	_device_init_wakeup
	str	x20, [x21]
	cbz	x24, LBB0_3
; %bb.2:
	mov	x0, x21
	mov	x1, x24
	mov	x2, x22
	bl	_platform_device_add_data
	tbnz	w0, #31, LBB0_7
LBB0_3:
	cbz	w23, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _IORESOURCE_IRQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w23, w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #1
	bl	_platform_device_add_resources
	tbnz	w0, #31, LBB0_8
LBB0_5:
	mov	x0, x21
	bl	_platform_device_add
	mov	x22, x0
	cbnz	w0, LBB0_10
	b	LBB0_11
LBB0_6:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_ERR_PTR
LBB0_7:
	mov	x22, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
	mov	x22, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x21
	bl	_dev_dbg
LBB0_10:
	mov	x0, x21
	bl	_platform_device_put
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_dev_err
	mov	x0, x22
	bl	_ERR_PTR
	mov	x21, x0
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't add platform_data\n"

	.comm	_IORESOURCE_IRQ,4,2             ; @IORESOURCE_IRQ
l_.str.1:                               ; @.str.1
	.asciz	"can't add irq\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to add device %s\n"

	.no_dead_strip	_add_child
.subsections_via_symbols
