	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CRYPT_GetRetrieveFunction
_CRYPT_GetRetrieveFunction:             ## @CRYPT_GetRetrieveFunction
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movl	%edi, %ebx
	movl	l___const.CRYPT_GetRetrieveFunction.components+16(%rip), %eax
	movl	%eax, -48(%rbp)
	movups	l___const.CRYPT_GetRetrieveFunction.components(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	callq	_debugstr_w
	movslq	%eax, %rsi
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rdx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_TRACE
	movq	$0, (%r15)
	movq	$0, (%r14)
	movl	$1, -60(%rbp)
	leaq	-64(%rbp), %rcx
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_InternetCrackUrlW
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	-56(%rbp), %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.3:
	cmpl	$130, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.5:
	movq	_FTP_RetrieveEncodedObjectW@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_7:
	movq	_HTTP_RetrieveEncodedObjectW@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	movq	_File_RetrieveEncodedObjectW@GOTPCREL(%rip), %rax
LBB0_6:
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_16:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_CP_ACP@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	-60(%rbp), %ecx
	movl	-52(%rbp), %edx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_WideCharToMultiByte
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_CryptMemAlloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movq	%rax, %r12
	cmpq	$0, _CRYPT_GetRetrieveFunction.set(%rip)
	jne	LBB0_13
## %bb.12:
	movq	_SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_CryptInitOIDFunctionSet
	movq	%rax, _CRYPT_GetRetrieveFunction.set(%rip)
LBB0_13:
	movl	(%r13), %edi
	movl	-60(%rbp), %ecx
	movl	-52(%rbp), %edx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	xorl	%esi, %esi
	movq	%r12, %r8
	movl	%ebx, %r9d
	callq	_WideCharToMultiByte
	movq	_CRYPT_GetRetrieveFunction.set(%rip), %rdi
	movq	_X509_ASN_ENCODING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	movq	%r14, %r9
	callq	_CryptGetOIDFunctionAddress
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_CryptMemFree
	jmp	LBB0_16
LBB0_14:
	movq	_ERROR_OUTOFMEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
LBB0_15:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @__const.CRYPT_GetRetrieveFunction.components
l___const.CRYPT_GetRetrieveFunction.components:
	.long	20                              ## 0x14
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%s, %p, %p)\n"

	.comm	_FTP_RetrieveEncodedObjectW,8,3 ## @FTP_RetrieveEncodedObjectW
	.comm	_HTTP_RetrieveEncodedObjectW,8,3 ## @HTTP_RetrieveEncodedObjectW
	.comm	_File_RetrieveEncodedObjectW,8,3 ## @File_RetrieveEncodedObjectW
	.comm	_CP_ACP,4,2                     ## @CP_ACP
.zerofill __DATA,__bss,_CRYPT_GetRetrieveFunction.set,8,3 ## @CRYPT_GetRetrieveFunction.set
	.comm	_SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC,4,2 ## @SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC
	.comm	_X509_ASN_ENCODING,4,2          ## @X509_ASN_ENCODING
	.comm	_ERROR_OUTOFMEMORY,4,2          ## @ERROR_OUTOFMEMORY
	.comm	_FALSE,8,3                      ## @FALSE
L_.str.1:                               ## @.str.1
	.asciz	"returning %d\n"

	.no_dead_strip	_CRYPT_GetRetrieveFunction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CRYPT_GetRetrieveFunction
_CRYPT_GetRetrieveFunction:             ; @CRYPT_GetRetrieveFunction
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, l___const.CRYPT_GetRetrieveFunction.components@PAGE
Lloh1:
	add	x8, x8, l___const.CRYPT_GetRetrieveFunction.components@PAGEOFF
	ldr	q0, [x8]
	str	q0, [sp, #16]
	ldr	w8, [x8, #16]
	str	w8, [sp, #32]
	bl	_debugstr_w
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	stp	x19, x20, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	str	xzr, [x19]
	str	xzr, [x20]
	mov	w8, #1
	str	w8, [sp, #20]
	add	x3, sp, #16
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	bl	_InternetCrackUrlW
	mov	x21, x0
	cbz	x0, LBB0_8
; %bb.1:
	ldr	w8, [sp, #24]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #130
	b.eq	LBB0_6
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.4:
Lloh4:
	adrp	x8, _FTP_RetrieveEncodedObjectW@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FTP_RetrieveEncodedObjectW@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh6:
	adrp	x8, _HTTP_RetrieveEncodedObjectW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HTTP_RetrieveEncodedObjectW@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _File_RetrieveEncodedObjectW@GOTPAGE
Lloh9:
	ldr	x8, [x8, _File_RetrieveEncodedObjectW@GOTPAGEOFF]
LBB0_7:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_8:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_TRACE
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
Lloh12:
	adrp	x23, _CP_ACP@GOTPAGE
Lloh13:
	ldr	x23, [x23, _CP_ACP@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	w2, [sp, #28]
	ldr	w3, [sp, #20]
	mov	w1, #0
	mov	x4, #0
	mov	w5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_WideCharToMultiByte
	cbz	w0, LBB0_15
; %bb.10:
	mov	x21, x0
	bl	_CryptMemAlloc
	cbz	x0, LBB0_14
; %bb.11:
	mov	x22, x0
	adrp	x24, _CRYPT_GetRetrieveFunction.set@PAGE
	ldr	x8, [x24, _CRYPT_GetRetrieveFunction.set@PAGEOFF]
	cbnz	x8, LBB0_13
; %bb.12:
Lloh14:
	adrp	x8, _SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_CryptInitOIDFunctionSet
	str	x0, [x24, _CRYPT_GetRetrieveFunction.set@PAGEOFF]
LBB0_13:
	ldr	w0, [x23]
	ldr	w2, [sp, #28]
	ldr	w3, [sp, #20]
	mov	w1, #0
	mov	x4, x22
	mov	x5, x21
	mov	x6, #0
	mov	x7, #0
	bl	_WideCharToMultiByte
	ldr	x0, [x24, _CRYPT_GetRetrieveFunction.set@PAGEOFF]
Lloh17:
	adrp	x8, _X509_ASN_ENCODING@GOTPAGE
Lloh18:
	ldr	x8, [x8, _X509_ASN_ENCODING@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x2, x22
	mov	w3, #0
	mov	x4, x19
	mov	x5, x20
	bl	_CryptGetOIDFunctionAddress
	mov	x21, x0
	mov	x0, x22
	bl	_CryptMemFree
	b	LBB0_8
LBB0_14:
Lloh20:
	adrp	x8, _ERROR_OUTOFMEMORY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERROR_OUTOFMEMORY@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_SetLastError
LBB0_15:
Lloh23:
	adrp	x8, _FALSE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh25:
	ldr	x21, [x8]
	b	LBB0_8
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.CRYPT_GetRetrieveFunction.components
l___const.CRYPT_GetRetrieveFunction.components:
	.long	20                              ; 0x14
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%s, %p, %p)\n"

	.comm	_FTP_RetrieveEncodedObjectW,8,3 ; @FTP_RetrieveEncodedObjectW
	.comm	_HTTP_RetrieveEncodedObjectW,8,3 ; @HTTP_RetrieveEncodedObjectW
	.comm	_File_RetrieveEncodedObjectW,8,3 ; @File_RetrieveEncodedObjectW
	.comm	_CP_ACP,4,2                     ; @CP_ACP
.zerofill __DATA,__bss,_CRYPT_GetRetrieveFunction.set,8,3 ; @CRYPT_GetRetrieveFunction.set
	.comm	_SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC,4,2 ; @SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC
	.comm	_X509_ASN_ENCODING,4,2          ; @X509_ASN_ENCODING
	.comm	_ERROR_OUTOFMEMORY,4,2          ; @ERROR_OUTOFMEMORY
	.comm	_FALSE,8,3                      ; @FALSE
l_.str.1:                               ; @.str.1
	.asciz	"returning %d\n"

	.no_dead_strip	_CRYPT_GetRetrieveFunction
.subsections_via_symbols
