	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_numbered_child
_add_numbered_child:                    ## @add_numbered_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -88(%rbp)                 ## 4-byte Spill
	movl	%r8d, -84(%rbp)                 ## 4-byte Spill
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movl	%edx, -72(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movl	%edi, %ebx
	movl	24(%rbp), %r13d
	movl	16(%rbp), %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_twl_get_last_module
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	setbe	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_pr_err
	movq	_EPERM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.2:
	movl	%r15d, %edi
LBB0_5:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movl	%r14d, -80(%rbp)                ## 4-byte Spill
	movl	%r13d, -76(%rbp)                ## 4-byte Spill
	movl	-88(%rbp), %r14d                ## 4-byte Reload
	movq	_twl_priv@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	8(%rax), %rax
	movl	%ebx, %ecx
	movslq	(%rax,%rcx,4), %rbx
	movq	%r12, %rdi
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	callq	_platform_device_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r13
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	(%r15,%rbx,8), %rax
	movq	%rax, (%r13)
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.7:
	movq	%r13, %rdi
	movl	-84(%rbp), %edx                 ## 4-byte Reload
	callq	_platform_device_add_data
	testl	%eax, %eax
	js	LBB0_8
LBB0_11:
	movl	-80(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movl	%eax, -64(%rbp)
	movq	_IORESOURCE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, -56(%rbp)
	movl	%eax, -52(%rbp)
	cmpl	$1, %ecx
	movl	$2, %edx
	sbbl	$0, %edx
	leaq	-64(%rbp), %rsi
	movq	%r13, %rdi
	callq	_platform_device_add_resources
	testl	%eax, %eax
	js	LBB0_13
LBB0_14:
	movq	%r13, %rdi
	callq	_platform_device_add
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.15:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_device_init_wakeup
	jmp	LBB0_16
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	je	LBB0_5
	jmp	LBB0_18
LBB0_8:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_13:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_9:
	movq	%r13, %rdi
	callq	_dev_dbg
LBB0_10:
	movq	%r13, %rdi
	callq	_platform_device_put
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%r15,%rax,8), %rdi
	leaq	L_.str.3(%rip), %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_dev_err
	movl	%ebx, %edi
	callq	_ERR_PTR
	movq	%rax, %r13
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movq	%r13, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: invalid module number %d\n"

	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_twl_priv,8,3                   ## @twl_priv
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"can't add platform_data\n"

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

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

	.no_dead_strip	_add_numbered_child
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_numbered_child
_add_numbered_child:                    ; @add_numbered_child
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x7
	mov	x23, x6
	mov	x21, x5
	mov	x24, x4
	mov	x25, x3
	mov	x26, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_twl_get_last_module
	cmp	w0, w20
	cset	w0, ls
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_pr_err
Lloh8:
	adrp	x8, _EPERM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	ldr	x9, [sp, #24]
Lloh10:
	adrp	x10, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x10, [x10, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x10, x9
	b.ne	LBB0_18
; %bb.3:
	neg	w0, w8
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_ERR_PTR
LBB0_4:
Lloh13:
	adrp	x8, _twl_priv@GOTPAGE
Lloh14:
	ldr	x8, [x8, _twl_priv@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldp	x27, x9, [x8]
	ldrsw	x28, [x9, w20, uxtw #2]
	mov	x0, x19
	mov	x1, x26
	bl	_platform_device_alloc
	cbz	x0, LBB0_11
; %bb.5:
	mov	x20, x0
	ldr	x8, [x27, x28, lsl #3]
	str	x8, [x0]
	cbz	x25, LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x25
	mov	x2, x24
	bl	_platform_device_add_data
	tbnz	w0, #31, LBB0_12
LBB0_7:
	cbz	w23, LBB0_9
; %bb.8:
Lloh16:
	adrp	x8, _IORESOURCE_IRQ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IORESOURCE_IRQ@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	stp	w23, w8, [sp, #8]
	stp	w22, w8, [sp, #16]
	cmp	w22, #0
	mov	w8, #1
	cinc	w2, w8, ne
	add	x1, sp, #8
	mov	x0, x20
	bl	_platform_device_add_resources
	tbnz	w0, #31, LBB0_13
LBB0_9:
	mov	x0, x20
	bl	_platform_device_add
	mov	x24, x0
	cbnz	w0, LBB0_15
; %bb.10:
	mov	x0, x20
	mov	x1, x21
	bl	_device_init_wakeup
	b	LBB0_16
LBB0_11:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_12:
	mov	x24, x0
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_13:
	mov	x24, x0
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_14:
	mov	x0, x20
	bl	_dev_dbg
LBB0_15:
	mov	x0, x20
	bl	_platform_device_put
	ldr	x0, [x27, x28, lsl #3]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	mov	x0, x24
	bl	_ERR_PTR
	mov	x20, x0
LBB0_16:
	ldr	x8, [sp, #24]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: invalid module number %d\n"

	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_twl_priv,8,3                   ; @twl_priv
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"can't add platform_data\n"

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

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

	.no_dead_strip	_add_numbered_child
.subsections_via_symbols
