	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function if_cs_prog_firmware
_if_cs_prog_firmware:                   ## @if_cs_prog_firmware
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	je	LBB0_1
## %bb.7:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_1:
	movq	%rcx, %rbx
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	%r14, %rdi
	movq	%rdx, %rsi
	callq	_if_cs_prog_helper
	testl	%eax, %eax
	je	LBB0_2
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%r14), %rax
	movq	_MODEL_8305@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_if_cs_prog_real
	testl	%eax, %eax
	jne	LBB0_6
LBB0_4:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movq	_if_cs_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DRV_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_5
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_5:
	movq	_IF_CS_CARD_INT_CAUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IF_CS_BIT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_if_cs_write16
	movq	%r14, %rdi
	callq	_if_cs_enable_ints
	movl	$1, (%r15)
	movq	%r15, %rdi
	callq	_lbs_start_card
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free_irq                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to find firmware (%d)\n"

	.comm	_MODEL_8305,8,3                 ## @MODEL_8305
	.comm	_if_cs_interrupt,4,2            ## @if_cs_interrupt
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.comm	_DRV_NAME,4,2                   ## @DRV_NAME
L_.str.1:                               ## @.str.1
	.asciz	"error in request_irq\n"

	.comm	_IF_CS_CARD_INT_CAUSE,4,2       ## @IF_CS_CARD_INT_CAUSE
	.comm	_IF_CS_BIT_MASK,4,2             ## @IF_CS_BIT_MASK
L_.str.2:                               ## @.str.2
	.asciz	"could not activate card\n"

	.no_dead_strip	_if_cs_prog_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function if_cs_prog_firmware
_if_cs_prog_firmware:                   ; @if_cs_prog_firmware
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	cbz	w1, LBB0_2
; %bb.1:
	str	x1, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_3
LBB0_2:
	mov	x21, x3
	mov	x20, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	mov	x1, x2
	bl	_if_cs_prog_helper
	cbz	w0, LBB0_4
LBB0_3:
	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_4:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _MODEL_8305@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MODEL_8305@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	bl	_if_cs_prog_real
	cbnz	w0, LBB0_3
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _if_cs_interrupt@GOTPAGE
Lloh6:
	ldr	x8, [x8, _if_cs_interrupt@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _DRV_NAME@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DRV_NAME@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x4, x19
	bl	_request_irq
	cbz	w0, LBB0_8
; %bb.7:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	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
	b	_pr_err
LBB0_8:
Lloh16:
	adrp	x8, _IF_CS_CARD_INT_CAUSE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IF_CS_CARD_INT_CAUSE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _IF_CS_BIT_MASK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IF_CS_BIT_MASK@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_if_cs_write16
	mov	x0, x19
	bl	_if_cs_enable_ints
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x20
	bl	_lbs_start_card
	cbz	x0, LBB0_3
; %bb.9:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	mov	x1, 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
	b	_free_irq
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to find firmware (%d)\n"

	.comm	_MODEL_8305,8,3                 ; @MODEL_8305
	.comm	_if_cs_interrupt,4,2            ; @if_cs_interrupt
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.comm	_DRV_NAME,4,2                   ; @DRV_NAME
l_.str.1:                               ; @.str.1
	.asciz	"error in request_irq\n"

	.comm	_IF_CS_CARD_INT_CAUSE,4,2       ; @IF_CS_CARD_INT_CAUSE
	.comm	_IF_CS_BIT_MASK,4,2             ; @IF_CS_BIT_MASK
l_.str.2:                               ; @.str.2
	.asciz	"could not activate card\n"

	.no_dead_strip	_if_cs_prog_firmware
.subsections_via_symbols
