	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CRYPT_QueryEmbeddedMessageObject
_CRYPT_QueryEmbeddedMessageObject:      ## @CRYPT_QueryEmbeddedMessageObject
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_FALSE@GOTPCREL(%rip), %r13
	movq	(%r13), %r12
	movq	%rsi, %rdi
	callq	_debugstr_w
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_TRACE
	movq	_CERT_QUERY_OBJECT_FILE@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_GENERIC_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FILE_SHARE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OPEN_EXISTING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_FILE_ATTRIBUTE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	pushq	$0
	callq	_CreateFileW
	addq	$16, %rsp
	movq	%rax, %r15
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_15
## %bb.3:
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_CryptSIPRetrieveSubjectGuid
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	leaq	-176(%rbp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	$40, -176(%rbp)
	leaq	-44(%rbp), %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_CryptSIPLoad
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:
	leaq	-136(%rbp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	$40, -136(%rbp)
	leaq	-44(%rbp), %rax
	movq	%rax, -104(%rbp)
	movq	%r15, -112(%rbp)
	movq	%r14, -120(%rbp)
	leaq	-64(%rbp), %r14
	leaq	-96(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	*-168(%rbp)
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movl	-64(%rbp), %edi
	callq	_CryptMemAlloc
	movq	%rax, -72(%rbp)
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	leaq	-136(%rbp), %rdi
	leaq	-96(%rbp), %rsi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	movq	%r14, %rcx
	movq	%rax, %r8
	callq	*-168(%rbp)
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movq	_CERT_QUERY_OBJECT_BLOB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CERT_QUERY_FORMAT_FLAG_BINARY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	subq	$8, %rsp
	leaq	-72(%rbp), %rsi
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	xorl	%r9d, %r9d
	pushq	16(%rbp)
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	$0
	callq	_CRYPT_QueryMessageObject
	addq	$32, %rsp
	movq	%rax, %r12
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_12
## %bb.10:
	testq	%r12, %r12
	je	LBB0_12
## %bb.11:
	movq	_CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_12:
	movq	-72(%rbp), %rdi
	callq	_CryptMemFree
	jmp	LBB0_14
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_WARN
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	movq	(%r13), %r12
	jmp	LBB0_16
LBB0_4:
	xorl	%r12d, %r12d
LBB0_14:
	movq	%r15, %rdi
	callq	_CloseHandle
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	callq	_TRACE
LBB0_16:
	movq	%r12, %rax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_ERROR_OUTOFMEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	movq	(%r13), %r12
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,8,3                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

	.comm	_CERT_QUERY_OBJECT_FILE,8,3     ## @CERT_QUERY_OBJECT_FILE
L_.str.1:                               ## @.str.1
	.asciz	"don't know what to do for type %d embedded signed messages\n"

	.comm	_E_INVALIDARG,4,2               ## @E_INVALIDARG
	.comm	_GENERIC_READ,4,2               ## @GENERIC_READ
	.comm	_FILE_SHARE_READ,4,2            ## @FILE_SHARE_READ
	.comm	_OPEN_EXISTING,4,2              ## @OPEN_EXISTING
	.comm	_FILE_ATTRIBUTE_NORMAL,4,2      ## @FILE_ATTRIBUTE_NORMAL
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_CERT_QUERY_OBJECT_BLOB,4,2     ## @CERT_QUERY_OBJECT_BLOB
	.comm	_CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED,4,2 ## @CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
	.comm	_CERT_QUERY_FORMAT_FLAG_BINARY,4,2 ## @CERT_QUERY_FORMAT_FLAG_BINARY
	.comm	_CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED,8,3 ## @CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED
	.comm	_ERROR_OUTOFMEMORY,4,2          ## @ERROR_OUTOFMEMORY
L_.str.2:                               ## @.str.2
	.asciz	"returning %d\n"

	.no_dead_strip	_CRYPT_QueryEmbeddedMessageObject
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CRYPT_QueryEmbeddedMessageObject
_CRYPT_QueryEmbeddedMessageObject:      ; @CRYPT_QueryEmbeddedMessageObject
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x6
	mov	x21, x5
	mov	x20, x4
	mov	x22, x3
	mov	x25, x1
	mov	x19, x0
Lloh0:
	adrp	x26, _FALSE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _FALSE@GOTPAGEOFF]
	ldr	x24, [x26]
	mov	x0, x1
	bl	_debugstr_w
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
Lloh4:
	adrp	x8, _CERT_QUERY_OBJECT_FILE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CERT_QUERY_OBJECT_FILE@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ne	LBB0_10
; %bb.1:
Lloh7:
	adrp	x8, _GENERIC_READ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GENERIC_READ@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _FILE_SHARE_READ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FILE_SHARE_READ@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x8, _OPEN_EXISTING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _OPEN_EXISTING@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
Lloh16:
	adrp	x8, _FILE_ATTRIBUTE_NORMAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FILE_ATTRIBUTE_NORMAL@GOTPAGEOFF]
Lloh18:
	ldr	w5, [x8]
	mov	x0, x25
	mov	x3, #0
	mov	x6, #0
	bl	_CreateFileW
Lloh19:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.2:
	mov	x19, x0
	sub	x2, x29, #84
	mov	x0, x25
	mov	x1, x19
	bl	_CryptSIPRetrieveSubjectGuid
	cbz	x0, LBB0_11
; %bb.3:
	mov	w24, #40
	add	x0, sp, #80
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	str	w24, [sp, #80]
	sub	x27, x29, #84
	sub	x0, x29, #84
	add	x2, sp, #80
	mov	w1, #0
	bl	_CryptSIPLoad
	cbz	x0, LBB0_11
; %bb.4:
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	str	w24, [sp, #40]
	stp	x19, x27, [sp, #64]
	str	x25, [sp, #56]
	add	x8, sp, #24
	add	x24, x8, #8
	ldr	x8, [sp, #88]
	add	x0, sp, #40
	add	x1, sp, #16
	mov	w2, #0
	mov	x3, x24
	mov	x4, #0
	blr	x8
	cbz	x0, LBB0_11
; %bb.5:
	ldr	w0, [sp, #32]
	bl	_CryptMemAlloc
	str	x0, [sp, #24]
	cbz	x0, LBB0_15
; %bb.6:
	mov	x4, x0
	ldr	x8, [sp, #88]
	add	x0, sp, #40
	add	x1, sp, #16
	mov	w2, #0
	mov	x3, x24
	blr	x8
	cbz	x0, LBB0_16
; %bb.7:
Lloh22:
	adrp	x8, _CERT_QUERY_OBJECT_BLOB@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CERT_QUERY_OBJECT_BLOB@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x8, _CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
Lloh28:
	adrp	x8, _CERT_QUERY_FORMAT_FLAG_BINARY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CERT_QUERY_FORMAT_FLAG_BINARY@GOTPAGEOFF]
Lloh30:
	ldr	w3, [x8]
	str	x23, [sp]
	add	x1, sp, #24
	mov	x4, x22
	mov	x5, #0
	mov	x6, #0
	mov	x7, x21
	bl	_CRYPT_QueryMessageObject
	mov	x24, x0
	cbz	x20, LBB0_17
; %bb.8:
	cbz	x24, LBB0_17
; %bb.9:
Lloh31:
	adrp	x8, _CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	str	x8, [x20]
	b	LBB0_17
LBB0_10:
Lloh34:
	adrp	x0, l_.str.1@PAGE
Lloh35:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_WARN
Lloh36:
	adrp	x8, _E_INVALIDARG@GOTPAGE
Lloh37:
	ldr	x8, [x8, _E_INVALIDARG@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	bl	_SetLastError
	ldr	x24, [x26]
	b	LBB0_14
LBB0_11:
	mov	x24, #0
LBB0_12:
	mov	x0, x19
	bl	_CloseHandle
LBB0_13:
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x24
	bl	_TRACE
LBB0_14:
	mov	x0, x24
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_15:
Lloh41:
	adrp	x8, _ERROR_OUTOFMEMORY@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ERROR_OUTOFMEMORY@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	bl	_SetLastError
	ldr	x24, [x26]
	b	LBB0_12
LBB0_16:
	mov	x24, #0
LBB0_17:
	ldr	x0, [sp, #24]
	bl	_CryptMemFree
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,8,3                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

	.comm	_CERT_QUERY_OBJECT_FILE,8,3     ; @CERT_QUERY_OBJECT_FILE
l_.str.1:                               ; @.str.1
	.asciz	"don't know what to do for type %d embedded signed messages\n"

	.comm	_E_INVALIDARG,4,2               ; @E_INVALIDARG
	.comm	_GENERIC_READ,4,2               ; @GENERIC_READ
	.comm	_FILE_SHARE_READ,4,2            ; @FILE_SHARE_READ
	.comm	_OPEN_EXISTING,4,2              ; @OPEN_EXISTING
	.comm	_FILE_ATTRIBUTE_NORMAL,4,2      ; @FILE_ATTRIBUTE_NORMAL
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_CERT_QUERY_OBJECT_BLOB,4,2     ; @CERT_QUERY_OBJECT_BLOB
	.comm	_CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED,4,2 ; @CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
	.comm	_CERT_QUERY_FORMAT_FLAG_BINARY,4,2 ; @CERT_QUERY_FORMAT_FLAG_BINARY
	.comm	_CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED,8,3 ; @CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED
	.comm	_ERROR_OUTOFMEMORY,4,2          ; @ERROR_OUTOFMEMORY
l_.str.2:                               ; @.str.2
	.asciz	"returning %d\n"

	.no_dead_strip	_CRYPT_QueryEmbeddedMessageObject
.subsections_via_symbols
