	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ec100_attach                   ## -- Begin function ec100_attach
	.p2align	4, 0x90
_ec100_attach:                          ## @ec100_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%r15, 24(%rbx)
	leaq	16(%rbx), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$51, %esi
	callq	_ec100_read_reg
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	cmpl	$11, -28(%rbp)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	addq	$8, %rdi
	movq	_ec100_ops@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%rbx, (%rbx)
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_kfree
	xorl	%ebx, %ebx
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ec100_ops,4,2                  ## @ec100_ops
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ec100_attach                   ; -- Begin function ec100_attach
	.p2align	2
_ec100_attach:                          ; @ec100_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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_2
; %bb.1:
	str	x21, [x19, #24]
	add	x0, x19, #16
	mov	x1, x20
	mov	w2, #4
	bl	_memcpy
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #51
	bl	_ec100_read_reg
	ldr	w8, [sp, #12]
	cmp	w0, #0
	ccmp	w8, #11, #0, eq
	b.eq	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
	b	LBB0_4
LBB0_3:
	add	x0, x19, #8
Lloh3:
	adrp	x1, _ec100_ops@GOTPAGE
Lloh4:
	ldr	x1, [x1, _ec100_ops@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
	str	x19, [x19]
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ec100_ops,4,2                  ; @ec100_ops
.subsections_via_symbols
