	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %r14
	addq	$8, %r14
	movq	(%rax), %r15
	movq	_TUPLE_RETURN_COMMON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	%r15, 24(%r12)
	movabsq	$618475290879, %rax             ## imm = 0x90000000FF
	movq	%rax, 8(%r12)
	movq	$0, 16(%r12)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pcmcia_get_first_tuple
	movl	$-1, %r13d
	testl	%eax, %eax
	jne	LBB0_15
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pcmcia_get_tuple_data
	testl	%eax, %eax
	jne	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$4, (%r15)
	je	LBB0_6
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pcmcia_get_next_tuple
	testl	%eax, %eax
	je	LBB0_4
LBB0_15:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_16
LBB0_1:
	movl	$-1, %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	8(%r15), %ecx
	movl	%ecx, (%rax)
	movl	12(%r15), %ecx
	movl	%ecx, 4(%rax)
	movl	16(%r15), %ecx
	movl	%ecx, 8(%rax)
	movl	20(%r15), %ecx
	movl	%ecx, 12(%rax)
	movl	24(%r15), %ecx
	movl	%ecx, 16(%rax)
	movl	28(%r15), %ecx
	movl	%ecx, 20(%rax)
	movq	_MANFID_OSITECH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %rax
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_8
## %bb.7:
	movq	_PRODID_OSITECH_SEVEN@GOTPCREL(%rip), %rcx
	cmpq	%rsi, (%rcx)
	je	LBB0_10
LBB0_8:
	movq	_MANFID_PSION@GOTPCREL(%rip), %rcx
	cmpq	%rdx, (%rcx)
	jne	LBB0_12
## %bb.9:
	movq	_PRODID_PSION_NET100@GOTPCREL(%rip), %rcx
	cmpq	%rsi, (%rcx)
	jne	LBB0_12
LBB0_10:
	movq	%rbx, %rdi
	callq	_osi_load_firmware
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_15
	jmp	LBB0_14
LBB0_12:
	cmpq	%rdx, %rax
	jne	LBB0_14
## %bb.13:
	movq	_OSITECH_AUI_PWR@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	movl	$768, %edi                      ## imm = 0x300
	callq	_set_bits
	movq	_OSITECH_RESET_ISR@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	movl	$768, %edi                      ## imm = 0x300
	callq	_set_bits
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_inw
	movl	%eax, %r14d
	movq	(%r15), %rdi
	addq	(%rbx), %rdi
	callq	_inw
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_DEBUG
LBB0_14:
	xorl	%r13d, %r13d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_TUPLE_RETURN_COMMON,4,2        ## @TUPLE_RETURN_COMMON
	.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
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function osi_setup
lCPI0_0:
	.long	255                             ; 0xff
	.long	144                             ; 0x90
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_osi_setup:                             ; @osi_setup
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x24, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kmalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	mov	x23, x0
	str	d0, [x23, #8]!
	ldr	x25, [x0]
Lloh5:
	adrp	x8, _TUPLE_RETURN_COMMON@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TUPLE_RETURN_COMMON@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x0, #32]
	stp	xzr, x25, [x0, #16]
	mov	x0, x20
	mov	x1, x23
	bl	_pcmcia_get_first_tuple
	cbz	w0, LBB0_6
LBB0_2:
	mov	w20, #-1
LBB0_3:
	mov	x0, x19
	bl	_kfree
	b	LBB0_8
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x25]
	cmp	w8, #4
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_pcmcia_get_next_tuple
	cbnz	w0, LBB0_2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_pcmcia_get_tuple_data
	cbz	w0, LBB0_4
	b	LBB0_2
LBB0_7:
	mov	w20, #-1
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x8, [x24]
	ldr	w9, [x25, #8]
	str	w9, [x8]
	ldr	w9, [x25, #12]
	str	w9, [x8, #4]
	ldr	w9, [x25, #16]
	str	w9, [x8, #8]
	ldr	w9, [x25, #20]
	str	w9, [x8, #12]
	ldr	w9, [x25, #24]
	str	w9, [x8, #16]
	ldr	w9, [x25, #28]
	str	w9, [x8, #20]
Lloh8:
	adrp	x8, _MANFID_OSITECH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MANFID_OSITECH@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _PRODID_OSITECH_SEVEN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PRODID_OSITECH_SEVEN@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x21
	ccmp	x9, x22, #0, eq
	b.eq	LBB0_12
; %bb.10:
Lloh14:
	adrp	x9, _MANFID_PSION@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MANFID_PSION@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x21
	b.ne	LBB0_13
; %bb.11:
Lloh17:
	adrp	x9, _PRODID_PSION_NET100@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PRODID_PSION_NET100@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x22
	b.ne	LBB0_13
LBB0_12:
	mov	x0, x20
	bl	_osi_load_firmware
	mov	x20, x0
	cbnz	w0, LBB0_3
	b	LBB0_15
LBB0_13:
	cmp	x8, x21
	b.ne	LBB0_15
; %bb.14:
	ldr	x8, [x20]
Lloh20:
	adrp	x21, _OSITECH_AUI_PWR@GOTPAGE
Lloh21:
	ldr	x21, [x21, _OSITECH_AUI_PWR@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #768
	bl	_set_bits
	ldr	x8, [x20]
Lloh22:
	adrp	x22, _OSITECH_RESET_ISR@GOTPAGE
Lloh23:
	ldr	x22, [x22, _OSITECH_RESET_ISR@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	w0, #768
	bl	_set_bits
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_inw
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_inw
	mov	x3, x0
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	mov	x2, x21
	bl	_DEBUG
LBB0_15:
	mov	w20, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_TUPLE_RETURN_COMMON,4,2        ; @TUPLE_RETURN_COMMON
	.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
