	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_attach                 ## -- Begin function cxd2880_attach
	.p2align	4, 0x90
_cxd2880_attach:                        ## @cxd2880_attach
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	$0, -24(%rbp)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	movq	%rax, _cxd2880_attach.priv(%rip)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %ecx
	movl	%ecx, 28(%rax)
	movl	4(%rbx), %edx
	movl	%edx, 24(%rax)
	movl	%ecx, 20(%rax)
	leaq	8(%r14), %rdi
	movq	_cxd2880_dvbt_t2_ops@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	_cxd2880_attach.priv(%rip), %rdi
	addq	$20, %rdi
	movq	_CXD2880_SPI_MODE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$55000000, %edx                 ## imm = 0x3473BC0
	callq	_cxd2880_spi_device_initialize
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_21
LBB0_3:
	xorl	%r14d, %r14d
	jmp	LBB0_21
LBB0_7:
	movq	_cxd2880_attach.priv(%rip), %rsi
	leaq	16(%rsi), %rdi
	addq	$20, %rsi
	callq	_cxd2880_spi_device_create_spi
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
LBB0_9:
	movq	_cxd2880_attach.priv(%rip), %rdi
	leaq	16(%rdi), %rsi
	xorl	%edx, %edx
	callq	_cxd2880_io_spi_create
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
LBB0_6:
	xorl	%r14d, %r14d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_14:
	movq	_cxd2880_attach.priv(%rip), %rdi
	callq	_kfree
LBB0_21:
	movq	%r14, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	movq	_cxd2880_attach.priv(%rip), %rdi
	movq	_CXD2880_IO_TGT_SYS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	*(%rdi)
	testl	%eax, %eax
	je	LBB0_15
## %bb.12:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_13
LBB0_15:
	movq	_cxd2880_attach.priv(%rip), %rdi
	movl	(%rbx), %esi
	leaq	-24(%rbp), %rcx
	movl	$253, %edx
	movl	$1, %r8d
	callq	*8(%rdi)
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_13
LBB0_17:
	movl	-24(%rbp), %eax
	movq	_CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_0X@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	je	LBB0_20
## %bb.18:
	movq	_CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_11@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	je	LBB0_20
## %bb.19:
	leaq	L_.str.6(%rip), %rdi
LBB0_13:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_14
LBB0_20:
	movq	_cxd2880_attach.priv(%rip), %rax
	movq	%rax, (%r14)
	movq	_CXD2880_TNRDMD_DRIVER_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_CXD2880_TNRDMD_CHIP_ID_UNKNOWN,4,2 ## @CXD2880_TNRDMD_CHIP_ID_UNKNOWN
.zerofill __DATA,__bss,_cxd2880_attach.priv,8,3 ## @cxd2880_attach.priv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid arg.\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_cxd2880_dvbt_t2_ops,4,2        ## @cxd2880_dvbt_t2_ops
	.comm	_CXD2880_SPI_MODE_0,4,2         ## @CXD2880_SPI_MODE_0
L_.str.1:                               ## @.str.1
	.asciz	"spi_device_initialize failed. %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"spi_device_create_spi failed. %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"io_spi_create failed. %d\n"

	.comm	_CXD2880_IO_TGT_SYS,4,2         ## @CXD2880_IO_TGT_SYS
L_.str.4:                               ## @.str.4
	.asciz	"set bank to 0x00 failed.\n"

L_.str.5:                               ## @.str.5
	.asciz	"read chip id failed.\n"

	.comm	_CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_0X,4,2 ## @CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_0X
	.comm	_CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_11,4,2 ## @CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_11
L_.str.6:                               ## @.str.6
	.asciz	"chip id invalid.\n"

L_.str.7:                               ## @.str.7
	.asciz	"CXD2880 driver version: Ver %s\n"

	.comm	_CXD2880_TNRDMD_DRIVER_VERSION,4,2 ## @CXD2880_TNRDMD_DRIVER_VERSION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_attach                 ; -- Begin function cxd2880_attach
	.p2align	2
_cxd2880_attach:                        ; @cxd2880_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	str	xzr, [sp, #8]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	adrp	x21, _cxd2880_attach.priv@PAGE
	str	x0, [x21, _cxd2880_attach.priv@PAGEOFF]
	cbz	x0, LBB0_17
; %bb.2:
	ldr	d0, [x20]
	str	s0, [x0, #28]
	stur	d0, [x0, #20]
	add	x0, x19, #8
Lloh3:
	adrp	x1, _cxd2880_dvbt_t2_ops@GOTPAGE
Lloh4:
	ldr	x1, [x1, _cxd2880_dvbt_t2_ops@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x21, _cxd2880_attach.priv@PAGEOFF]
	add	x0, x8, #20
Lloh5:
	adrp	x8, _CXD2880_SPI_MODE_0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CXD2880_SPI_MODE_0@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #15296
	movk	w2, #839, lsl #16
	bl	_cxd2880_spi_device_initialize
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_5
; %bb.3:
	str	x0, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_4:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_18
LBB0_5:
	ldr	x8, [x21, _cxd2880_attach.priv@PAGEOFF]
	add	x0, x8, #16
	add	x1, x8, #20
	bl	_cxd2880_spi_device_create_spi
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_7
; %bb.6:
	str	x0, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_7:
	ldr	x0, [x21, _cxd2880_attach.priv@PAGEOFF]
	add	x1, x0, #16
	mov	w2, #0
	bl	_cxd2880_io_spi_create
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_9
; %bb.8:
	str	x0, [sp]
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_16
LBB0_9:
	ldr	x0, [x21, _cxd2880_attach.priv@PAGEOFF]
	ldr	x8, [x0]
Lloh16:
	adrp	x20, _CXD2880_IO_TGT_SYS@GOTPAGE
Lloh17:
	ldr	x20, [x20, _CXD2880_IO_TGT_SYS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w2, #0
	mov	w3, #0
	blr	x8
	cbz	w0, LBB0_11
; %bb.10:
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_16
LBB0_11:
	ldr	x0, [x21, _cxd2880_attach.priv@PAGEOFF]
	ldr	x8, [x0, #8]
	ldr	w1, [x20]
	add	x3, sp, #8
	mov	w2, #253
	mov	w4, #1
	blr	x8
	cbz	w0, LBB0_13
; %bb.12:
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_16
LBB0_13:
	ldr	w8, [sp, #8]
Lloh22:
	adrp	x9, _CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_0X@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_0X@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w9, w8
	b.eq	LBB0_19
; %bb.14:
Lloh25:
	adrp	x9, _CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_11@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_11@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	cmp	w9, w8
	b.eq	LBB0_19
; %bb.15:
Lloh28:
	adrp	x0, l_.str.6@PAGE
Lloh29:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_16:
	bl	_pr_err
	ldr	x0, [x21, _cxd2880_attach.priv@PAGEOFF]
	bl	_kfree
LBB0_17:
	mov	x19, #0
LBB0_18:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_19:
	ldr	x8, [x21, _cxd2880_attach.priv@PAGEOFF]
	str	x8, [x19]
Lloh30:
	adrp	x8, _CXD2880_TNRDMD_DRIVER_VERSION@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CXD2880_TNRDMD_DRIVER_VERSION@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x0, l_.str.7@PAGE
Lloh34:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_info
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_CXD2880_TNRDMD_CHIP_ID_UNKNOWN,4,2 ; @CXD2880_TNRDMD_CHIP_ID_UNKNOWN
.zerofill __DATA,__bss,_cxd2880_attach.priv,8,3 ; @cxd2880_attach.priv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid arg.\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_cxd2880_dvbt_t2_ops,4,2        ; @cxd2880_dvbt_t2_ops
	.comm	_CXD2880_SPI_MODE_0,4,2         ; @CXD2880_SPI_MODE_0
l_.str.1:                               ; @.str.1
	.asciz	"spi_device_initialize failed. %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"spi_device_create_spi failed. %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"io_spi_create failed. %d\n"

	.comm	_CXD2880_IO_TGT_SYS,4,2         ; @CXD2880_IO_TGT_SYS
l_.str.4:                               ; @.str.4
	.asciz	"set bank to 0x00 failed.\n"

l_.str.5:                               ; @.str.5
	.asciz	"read chip id failed.\n"

	.comm	_CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_0X,4,2 ; @CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_0X
	.comm	_CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_11,4,2 ; @CXD2880_TNRDMD_CHIP_ID_CXD2880_ES1_11
l_.str.6:                               ; @.str.6
	.asciz	"chip id invalid.\n"

l_.str.7:                               ; @.str.7
	.asciz	"CXD2880 driver version: Ver %s\n"

	.comm	_CXD2880_TNRDMD_DRIVER_VERSION,4,2 ; @CXD2880_TNRDMD_DRIVER_VERSION
.subsections_via_symbols
