	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2x00soc_alloc_reg
_rt2x00soc_alloc_reg:                   ## @rt2x00soc_alloc_reg
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	28(%rdi), %edi
	callq	_to_platform_device
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%rax), %ebx
	movq	%rax, %rdi
	callq	_resource_size
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ioremap
	movl	%eax, 24(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movq	8(%r14), %rax
	movl	4(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_kzalloc
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_kzalloc
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_8
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_rt2x00_probe_err
	movq	%r14, %rdi
	callq	_rt2x00soc_free_reg
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate registers\n"

	.no_dead_strip	_rt2x00soc_alloc_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2x00soc_alloc_reg
_rt2x00soc_alloc_reg:                   ; @rt2x00soc_alloc_reg
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #28]
	bl	_to_platform_device
Lloh0:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w20, [x0]
	bl	_resource_size
	mov	x1, x0
	mov	x0, x20
	bl	_ioremap
	str	w0, [x19, #24]
	cbz	w0, LBB0_7
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
Lloh3:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_kzalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.4:
	mov	w0, #0
	b	LBB0_9
LBB0_5:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_rt2x00_probe_err
	mov	x0, x19
	bl	_rt2x00soc_free_reg
LBB0_7:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate registers\n"

	.no_dead_strip	_rt2x00soc_alloc_reg
.subsections_via_symbols
