	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socket_setup
_socket_setup:                          ## @socket_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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	movq	24(%rbx), %rax
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	_SS_DETECT@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_1
## %bb.3:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	addl	%r15d, %r15d
	leal	(%r15,%r15,4), %edi
	callq	_msleep
	movl	$100, %r14d
	leaq	-44(%rbp), %r15
	movq	_SS_PENDING@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rax
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	*(%rax)
	movl	-44(%rbp), %eax
	testl	%eax, (%r12)
	je	LBB0_1
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r13), %ecx
	testl	%eax, %ecx
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$100, %edi
	callq	_msleep
	decl	%r14d
	jne	LBB0_4
## %bb.7:
	movl	-44(%rbp), %eax
	movl	(%r13), %ecx
LBB0_8:
	testl	%eax, %ecx
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_SS_CARDBUS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.11:
	movq	_SS_CAP_CARDBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_12
## %bb.13:
	movq	_SOCKET_CARDBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 48(%rbx)
	jmp	LBB0_15
LBB0_14:
	movq	_SOCKET_CARDBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, 48(%rbx)
LBB0_15:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	_SS_3VCARD@GOTPCREL(%rip), %rdx
	movl	$33, %ecx
	testl	%eax, (%rdx)
	je	LBB0_16
LBB0_18:
	movl	%ecx, 36(%rbx)
	movl	%ecx, 32(%rbx)
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movq	_HOOK_POWER_PRE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	callq	*%rax
LBB0_20:
	leaq	32(%rbx), %rsi
	movq	$0, 40(%rbx)
	movq	24(%rbx), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	movq	_vcc_settle@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %edi
	callq	_msleep
	movq	24(%rbx), %rax
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	_SS_POWERON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_21
## %bb.24:
	movq	%rbx, %rdi
	callq	_socket_reset
	movl	%eax, -44(%rbp)
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_26
## %bb.25:
	movq	_HOOK_POWER_POST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	*%rcx
	movl	-44(%rbp), %eax
	jmp	LBB0_26
LBB0_16:
	movq	_SS_XVCARD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.22:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_23
LBB0_12:
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_21:
	leaq	L_.str.4(%rip), %rsi
LBB0_23:
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_17:
	movl	$50, %ecx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setup\n"

	.comm	_SS_DETECT,4,2                  ## @SS_DETECT
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SS_PENDING,4,2                 ## @SS_PENDING
L_.str.1:                               ## @.str.1
	.asciz	"voltage interrogation timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_SS_CARDBUS,4,2                 ## @SS_CARDBUS
	.comm	_SS_CAP_CARDBUS,4,2             ## @SS_CAP_CARDBUS
L_.str.2:                               ## @.str.2
	.asciz	"cardbus cards are not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SOCKET_CARDBUS,4,2             ## @SOCKET_CARDBUS
	.comm	_SS_3VCARD,4,2                  ## @SS_3VCARD
	.comm	_SS_XVCARD,4,2                  ## @SS_XVCARD
L_.str.3:                               ## @.str.3
	.asciz	"unsupported voltage key\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_HOOK_POWER_PRE,4,2             ## @HOOK_POWER_PRE
	.comm	_vcc_settle,4,2                 ## @vcc_settle
	.comm	_SS_POWERON,4,2                 ## @SS_POWERON
L_.str.4:                               ## @.str.4
	.asciz	"unable to apply power\n"

	.comm	_HOOK_POWER_POST,4,2            ## @HOOK_POWER_POST
	.no_dead_strip	_socket_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function socket_setup
_socket_setup:                          ; @socket_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x19, x0
	add	x20, x0, #16
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	add	x1, sp, #12
	mov	x0, x19
	blr	x8
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x22, _SS_DETECT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SS_DETECT@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.1:
	add	w8, w21, w21, lsl #2
	lsl	w0, w8, #1
	bl	_msleep
	mov	w23, #100
Lloh4:
	adrp	x21, _SS_PENDING@GOTPAGE
Lloh5:
	ldr	x21, [x21, _SS_PENDING@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	add	x1, sp, #12
	mov	x0, x19
	blr	x8
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #100
	bl	_msleep
	subs	w23, w23, #1
	b.ne	LBB0_2
; %bb.5:
	ldr	w8, [sp, #12]
	ldr	w9, [x21]
LBB0_6:
	tst	w9, w8
	b.eq	LBB0_11
; %bb.7:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh8:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	add	sp, sp, #80
	ret
LBB0_11:
Lloh12:
	adrp	x9, _SS_CARDBUS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SS_CARDBUS@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.12:
	ldr	w9, [x19]
Lloh15:
	adrp	x10, _SS_CAP_CARDBUS@GOTPAGE
Lloh16:
	ldr	x10, [x10, _SS_CAP_CARDBUS@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_24
; %bb.13:
Lloh18:
	adrp	x9, _SOCKET_CARDBUS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SOCKET_CARDBUS@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	ldr	w10, [x19, #48]
	orr	w9, w10, w9
	b	LBB0_15
LBB0_14:
Lloh21:
	adrp	x9, _SOCKET_CARDBUS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SOCKET_CARDBUS@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	ldr	w10, [x19, #48]
	bic	w9, w10, w9
LBB0_15:
	str	w9, [x19, #48]
Lloh24:
	adrp	x9, _SS_3VCARD@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SS_3VCARD@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_22
; %bb.16:
	mov	w8, #33
LBB0_17:
	stp	w8, w8, [x19, #32]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_19
; %bb.18:
Lloh27:
	adrp	x9, _HOOK_POWER_PRE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _HOOK_POWER_PRE@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
LBB0_19:
	add	x1, x19, #32
	str	xzr, [x19, #40]
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
Lloh30:
	adrp	x8, _vcc_settle@GOTPAGE
Lloh31:
	ldr	x8, [x8, _vcc_settle@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	add	w8, w8, w8, lsl #2
	lsl	w0, w8, #1
	bl	_msleep
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	add	x1, sp, #12
	mov	x0, x19
	blr	x8
	ldr	w8, [sp, #12]
Lloh33:
	adrp	x9, _SS_POWERON@GOTPAGE
Lloh34:
	ldr	x9, [x9, _SS_POWERON@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_25
; %bb.20:
	mov	x0, x19
	bl	_socket_reset
	str	w0, [sp, #12]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.21:
Lloh36:
	adrp	x9, _HOOK_POWER_POST@GOTPAGE
Lloh37:
	ldr	x9, [x9, _HOOK_POWER_POST@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
	ldr	w0, [sp, #12]
	b	LBB0_10
LBB0_22:
Lloh39:
	adrp	x9, _SS_XVCARD@GOTPAGE
Lloh40:
	ldr	x9, [x9, _SS_XVCARD@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_27
; %bb.23:
Lloh42:
	adrp	x1, l_.str.3@PAGE
Lloh43:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_26
LBB0_24:
Lloh44:
	adrp	x1, l_.str.2@PAGE
Lloh45:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh46:
	adrp	x8, _EINVAL@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_25:
Lloh48:
	adrp	x1, l_.str.4@PAGE
Lloh49:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_26:
	mov	x0, x20
	bl	_dev_err
Lloh50:
	adrp	x8, _EIO@GOTPAGE
Lloh51:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_9
LBB0_27:
	mov	w8, #50
	b	LBB0_17
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setup\n"

	.comm	_SS_DETECT,4,2                  ; @SS_DETECT
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SS_PENDING,4,2                 ; @SS_PENDING
l_.str.1:                               ; @.str.1
	.asciz	"voltage interrogation timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_SS_CARDBUS,4,2                 ; @SS_CARDBUS
	.comm	_SS_CAP_CARDBUS,4,2             ; @SS_CAP_CARDBUS
l_.str.2:                               ; @.str.2
	.asciz	"cardbus cards are not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SOCKET_CARDBUS,4,2             ; @SOCKET_CARDBUS
	.comm	_SS_3VCARD,4,2                  ; @SS_3VCARD
	.comm	_SS_XVCARD,4,2                  ; @SS_XVCARD
l_.str.3:                               ; @.str.3
	.asciz	"unsupported voltage key\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_HOOK_POWER_PRE,4,2             ; @HOOK_POWER_PRE
	.comm	_vcc_settle,4,2                 ; @vcc_settle
	.comm	_SS_POWERON,4,2                 ; @SS_POWERON
l_.str.4:                               ; @.str.4
	.asciz	"unable to apply power\n"

	.comm	_HOOK_POWER_POST,4,2            ; @HOOK_POWER_POST
	.no_dead_strip	_socket_setup
.subsections_via_symbols
