	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcmcia_register_driver         ## -- Begin function pcmcia_register_driver
	.p2align	4, 0x90
_pcmcia_register_driver:                ## @pcmcia_register_driver
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	callq	_pcmcia_check_driver
	movq	_pcmcia_bus_type@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movl	16(%rbx), %eax
	movl	28(%rbx), %ecx
	movl	%ecx, 4(%rbx)
	movl	%eax, (%rbx)
	leaq	20(%rbx), %r14
	leaq	24(%rbx), %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	callq	_INIT_LIST_HEAD
	movl	16(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movq	%rbx, %rdi
	callq	_driver_register
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_pcmcia_create_newid_file
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_driver_unregister
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_7
LBB0_3:
	movl	%eax, %r14d
	jmp	LBB0_7
LBB0_5:
	xorl	%r14d, %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_pcmcia_bus_type,4,2            ## @pcmcia_bus_type
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"registering driver %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcmcia_register_driver         ; -- Begin function pcmcia_register_driver
	.p2align	2
_pcmcia_register_driver:                ; @pcmcia_register_driver
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_pcmcia_check_driver
Lloh0:
	adrp	x8, _pcmcia_bus_type@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pcmcia_bus_type@GOTPAGEOFF]
	str	x8, [x19, #8]
	ldr	w8, [x19, #28]
	ldr	w9, [x19, #16]
	stp	w9, w8, [x19]
	add	x20, x19, #20
	add	x0, x19, #24
	bl	_mutex_init
	mov	x0, x20
	bl	_INIT_LIST_HEAD
	ldr	w1, [x19, #16]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	x0, x19
	bl	_driver_register
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_pcmcia_create_newid_file
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_driver_unregister
	b	LBB0_6
LBB0_4:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_5:
	mov	x20, x0
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_pcmcia_bus_type,4,2            ; @pcmcia_bus_type
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"registering driver %s\n"

.subsections_via_symbols
