	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function osi_setup
_osi_setup:                             ## @osi_setup
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	16(%rdi), %rcx
	movq	_pcmcia_osi_mac@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$144, %esi
	callq	_pcmcia_loop_tuple
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_9
## %bb.1:
	movq	_MANFID_OSITECH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r14, %rax
	jne	LBB0_3
## %bb.2:
	movq	_PRODID_OSITECH_SEVEN@GOTPCREL(%rip), %rcx
	cmpq	%r15, (%rcx)
	je	LBB0_5
LBB0_3:
	movq	_MANFID_PSION@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	jne	LBB0_6
## %bb.4:
	movq	_PRODID_PSION_NET100@GOTPCREL(%rip), %rcx
	cmpq	%r15, (%rcx)
	jne	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	callq	_osi_load_firmware
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_8
LBB0_6:
	cmpq	%r14, %rax
	jne	LBB0_8
## %bb.7:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_OSITECH_AUI_PWR@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	(%rax), %rsi
	movl	$768, %edi                      ## imm = 0x300
	callq	_set_bits
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_OSITECH_RESET_ISR@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	(%rax), %rsi
	movl	$768, %edi                      ## imm = 0x300
	callq	_set_bits
	leaq	8(%rbx), %r14
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	(%r15), %rdi
	addq	(%rax), %rdi
	callq	_inw
	movl	%eax, %r15d
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	(%r12), %rdi
	addq	(%rax), %rdi
	callq	_inw
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pcmcia_osi_mac,4,2             ## @pcmcia_osi_mac
	.comm	_MANFID_OSITECH,8,3             ## @MANFID_OSITECH
	.comm	_PRODID_OSITECH_SEVEN,8,3       ## @PRODID_OSITECH_SEVEN
	.comm	_MANFID_PSION,8,3               ## @MANFID_PSION
	.comm	_PRODID_PSION_NET100,8,3        ## @PRODID_PSION_NET100
	.comm	_OSITECH_AUI_PWR,8,3            ## @OSITECH_AUI_PWR
	.comm	_OSITECH_RESET_ISR,8,3          ## @OSITECH_RESET_ISR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AUI/PWR: %4.4x RESET/ISR: %4.4x\n"

	.no_dead_strip	_osi_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function osi_setup
_osi_setup:                             ; @osi_setup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x3, [x0, #16]
Lloh0:
	adrp	x8, _pcmcia_osi_mac@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pcmcia_osi_mac@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #144
	bl	_pcmcia_loop_tuple
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_8
LBB0_2:
Lloh3:
	adrp	x8, _MANFID_OSITECH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MANFID_OSITECH@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _PRODID_OSITECH_SEVEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PRODID_OSITECH_SEVEN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x20
	ccmp	x9, x21, #0, eq
	b.eq	LBB0_6
; %bb.3:
Lloh9:
	adrp	x9, _MANFID_PSION@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MANFID_PSION@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _PRODID_PSION_NET100@GOTPAGE
Lloh13:
	ldr	x10, [x10, _PRODID_PSION_NET100@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x9, x20
	ccmp	x10, x21, #0, eq
	b.eq	LBB0_6
; %bb.4:
	cmp	x8, x20
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh15:
	adrp	x20, _OSITECH_AUI_PWR@GOTPAGE
Lloh16:
	ldr	x20, [x20, _OSITECH_AUI_PWR@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #768
	bl	_set_bits
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh17:
	adrp	x21, _OSITECH_RESET_ISR@GOTPAGE
Lloh18:
	ldr	x21, [x21, _OSITECH_RESET_ISR@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #768
	bl	_set_bits
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_inw
	mov	x20, x0
	ldr	x8, [x19], #8
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_inw
	mov	x3, x0
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_dbg
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_osi_load_firmware
	cbnz	w0, LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_pcmcia_osi_mac,4,2             ; @pcmcia_osi_mac
	.comm	_MANFID_OSITECH,8,3             ; @MANFID_OSITECH
	.comm	_PRODID_OSITECH_SEVEN,8,3       ; @PRODID_OSITECH_SEVEN
	.comm	_MANFID_PSION,8,3               ; @MANFID_PSION
	.comm	_PRODID_PSION_NET100,8,3        ; @PRODID_PSION_NET100
	.comm	_OSITECH_AUI_PWR,8,3            ; @OSITECH_AUI_PWR
	.comm	_OSITECH_RESET_ISR,8,3          ; @OSITECH_RESET_ISR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AUI/PWR: %4.4x RESET/ISR: %4.4x\n"

	.no_dead_strip	_osi_setup
.subsections_via_symbols
