	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mfd_add_device
_mfd_add_device:                        ## @mfd_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	%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	%r8d, %ebx
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movl	40(%rdx), %edi
	movslq	%esi, %rsi
	addq	32(%rdx), %rsi
	callq	_platform_device_alloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	%rax, %r14
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	(%r13), %eax
	shll	$3, %eax
	leal	(%rax,%rax,4), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.2:
	movq	%rax, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r14)
	movl	24(%r13), %esi
	movq	%r14, %rdi
	callq	_platform_set_drvdata
	movl	16(%r13), %edx
	movl	20(%r13), %esi
	movq	%r14, %rdi
	callq	_platform_device_add_data
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:
	movl	(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_12
## %bb.4:
	movq	8(%r13), %rax
	movslq	-44(%rbp), %r10                 ## 4-byte Folded Reload
	leaq	(,%rdx,8), %rcx
	leaq	(%rcx,%rcx,4), %r11
	xorl	%edi, %edi
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %r8
	movq	_IORESOURCE_IRQ@GOTPCREL(%rip), %r9
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, 24(%rbx,%rdi)
	movq	16(%rax,%rdi), %rcx
	addq	16(%r15), %rcx
	movq	%rcx, 16(%rbx,%rdi)
	movq	8(%rax,%rdi), %rcx
	addq	16(%r15), %rcx
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rcx, 8(%rbx,%rdi)
	addq	$40, %rdi
	cmpq	%rdi, %r11
	je	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	32(%rax,%rdi), %ecx
	movl	%ecx, 32(%rbx,%rdi)
	movl	(%rax,%rdi), %ecx
	movl	%ecx, (%rbx,%rdi)
	testq	%r15, %r15
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r8), %esi
	andl	%ecx, %esi
	jne	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	testl	%ecx, (%r9)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rax,%rdi), %rcx
	addq	%r10, %rcx
	movq	%rcx, 16(%rbx,%rdi)
	movq	8(%rax,%rdi), %rcx
	addq	%r10, %rcx
	jmp	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%rax,%rdi), %rcx
	movq	%rcx, 24(%rbx,%rdi)
	movq	16(%rax,%rdi), %rcx
	movq	%rcx, 16(%rbx,%rdi)
	movq	8(%rax,%rdi), %rcx
	jmp	LBB0_11
LBB0_12:
	movq	%r14, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_platform_device_add_resources
	movq	%r14, %rdi
	callq	_platform_device_add
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_13
LBB0_14:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_15:
	movq	%r14, %rdi
	callq	_platform_device_put
LBB0_16:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%rbx, %rdi
	callq	_kfree
	xorl	%r12d, %r12d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_IORESOURCE_IRQ,4,2             ## @IORESOURCE_IRQ
	.no_dead_strip	_mfd_add_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mfd_add_device
_mfd_add_device:                        ; @mfd_add_device
	.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
	mov	x22, x4
	mov	x20, x3
	mov	x23, x2
	mov	x25, x0
	ldr	w0, [x2, #40]
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w24, w8
	ldr	x8, [x2, #32]
	add	x1, x8, w1, sxtw
	bl	_platform_device_alloc
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
	ldr	w8, [x23]
	add	w8, w8, w8, lsl #2
	lsl	w0, w8, #3
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_14
; %bb.2:
	mov	x21, x0
	str	x25, [x19]
	ldr	w1, [x23, #24]
	mov	x0, x19
	bl	_platform_set_drvdata
	ldp	w2, w1, [x23, #16]
	mov	x0, x19
	bl	_platform_device_add_data
	mov	x24, x0
	cbnz	w0, LBB0_13
; %bb.3:
	ldr	w2, [x23]
	cmp	w2, #1
	b.lt	LBB0_12
; %bb.4:
	ldr	x10, [x23, #8]
	sxtw	x8, w22
	add	x9, x21, #16
	add	x10, x10, #16
Lloh6:
	adrp	x11, _IORESOURCE_MEM@GOTPAGE
Lloh7:
	ldr	x11, [x11, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh8:
	adrp	x12, _IORESOURCE_IRQ@GOTPAGE
Lloh9:
	ldr	x12, [x12, _IORESOURCE_IRQ@GOTPAGEOFF]
	mov	x13, x2
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x14, [x20, #16]
	ldr	x15, [x10]
	add	x14, x15, x14
	stp	x14, x20, [x9]
	ldr	x14, [x20, #16]
	ldur	x15, [x10, #-8]
	add	x14, x15, x14
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	stur	x14, [x9, #-8]
	add	x9, x9, #40
	add	x10, x10, #40
	subs	x13, x13, #1
	b.eq	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x10, #16]
	str	w14, [x9, #16]
	ldur	w14, [x10, #-16]
	stur	w14, [x9, #-16]
	cbz	x20, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w15, [x11]
	and	w15, w15, w14
	cbnz	w15, LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w15, [x12]
	tst	w15, w14
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x14, [x10]
	add	x14, x14, x8
	str	x14, [x9]
	ldur	x14, [x10, #-8]
	add	x14, x14, x8
	b	LBB0_6
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldp	x15, x14, [x10]
	stp	x15, x14, [x9]
	ldur	x14, [x10, #-8]
	b	LBB0_6
LBB0_12:
	mov	x0, x19
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_platform_device_add_resources
	mov	x0, x19
	bl	_platform_device_add
	mov	x24, x0
	cbz	w0, LBB0_16
LBB0_13:
	mov	x0, x21
	bl	_kfree
LBB0_14:
	mov	x0, x19
	bl	_platform_device_put
LBB0_15:
	mov	x0, x24
	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_16:
	mov	x0, x21
	bl	_kfree
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_IORESOURCE_IRQ,4,2             ; @IORESOURCE_IRQ
	.no_dead_strip	_mfd_add_device
.subsections_via_symbols
