	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function cxd2880_init
LCPI0_0:
	.long	1                               ## 0x1
	.long	18                              ## 0x12
	.long	8                               ## 0x8
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_cxd2880_init:                          ## @cxd2880_init
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	(%rdi), %rbx
	movq	_CXD2880_TNRDMD_TSOUT_IF_SPI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	_CXD2880_TNRDMD_XTAL_SHARE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,18,8,1]
	movaps	%xmm0, -48(%rbp)
	movl	(%rbx), %edi
	callq	_mutex_lock
	leaq	8(%rbx), %r14
	leaq	16(%rbx), %rsi
	cmpq	%rsi, 8(%rbx)
	je	LBB0_5
## %bb.3:
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_cxd2880_tnrdmd_create
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_mutex_unlock
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_pr_info
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_5:
	movq	%r14, %rdi
	callq	_cxd2880_integ_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_mutex_unlock
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_10
LBB0_7:
	movq	_CXD2880_TNRDMD_CFG_TSPIN_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_cxd2880_tnrdmd_set_cfg
	movl	%eax, %r14d
	movl	(%rbx), %edi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movl	%r14d, %r15d
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_debug
LBB0_10:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid arg.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CXD2880_TNRDMD_TSOUT_IF_SPI,4,2 ## @CXD2880_TNRDMD_TSOUT_IF_SPI
	.comm	_CXD2880_TNRDMD_XTAL_SHARE_NONE,4,2 ## @CXD2880_TNRDMD_XTAL_SHARE_NONE
L_.str.1:                               ## @.str.1
	.asciz	"cxd2880 tnrdmd create failed %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"cxd2880 integ init failed %d\n"

	.comm	_CXD2880_TNRDMD_CFG_TSPIN_CURRENT,4,2 ## @CXD2880_TNRDMD_CFG_TSPIN_CURRENT
L_.str.3:                               ## @.str.3
	.asciz	"cxd2880 set config failed %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"OK.\n"

	.no_dead_strip	_cxd2880_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function cxd2880_init
lCPI0_0:
	.long	1                               ; 0x1
	.long	18                              ; 0x12
	.long	8                               ; 0x8
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_cxd2880_init:                          ; @cxd2880_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _CXD2880_TNRDMD_TSOUT_IF_SPI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CXD2880_TNRDMD_TSOUT_IF_SPI@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _CXD2880_TNRDMD_XTAL_SHARE_NONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CXD2880_TNRDMD_XTAL_SHARE_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #32]
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp, #16]
	mov	x19, x21
	ldr	w0, [x19], #16
	bl	_mutex_lock
	mov	x20, x21
	ldr	x8, [x20, #8]!
	cmp	x8, x19
	b.eq	LBB0_5
; %bb.2:
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x19
	bl	_cxd2880_tnrdmd_create
	cbz	w0, LBB0_5
; %bb.3:
	mov	x19, x0
	ldr	w0, [x21]
	bl	_mutex_unlock
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_pr_info
	b	LBB0_10
LBB0_4:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_10
LBB0_5:
	mov	x0, x20
	bl	_cxd2880_integ_init
	cbz	w0, LBB0_7
; %bb.6:
	mov	x19, x0
	ldr	w0, [x21]
	bl	_mutex_unlock
	str	x19, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	b	LBB0_10
LBB0_7:
Lloh17:
	adrp	x8, _CXD2880_TNRDMD_CFG_TSPIN_CURRENT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CXD2880_TNRDMD_CFG_TSPIN_CURRENT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_cxd2880_tnrdmd_set_cfg
	mov	x19, x0
	ldr	w0, [x21]
	bl	_mutex_unlock
	cbz	w19, LBB0_9
; %bb.8:
	str	x19, [sp]
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	b	LBB0_10
LBB0_9:
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_debug
LBB0_10:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid arg.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CXD2880_TNRDMD_TSOUT_IF_SPI,4,2 ; @CXD2880_TNRDMD_TSOUT_IF_SPI
	.comm	_CXD2880_TNRDMD_XTAL_SHARE_NONE,4,2 ; @CXD2880_TNRDMD_XTAL_SHARE_NONE
l_.str.1:                               ; @.str.1
	.asciz	"cxd2880 tnrdmd create failed %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"cxd2880 integ init failed %d\n"

	.comm	_CXD2880_TNRDMD_CFG_TSPIN_CURRENT,4,2 ; @CXD2880_TNRDMD_CFG_TSPIN_CURRENT
l_.str.3:                               ; @.str.3
	.asciz	"cxd2880 set config failed %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"OK.\n"

	.no_dead_strip	_cxd2880_init
.subsections_via_symbols
