	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_osu_get_certificate            ## -- Begin function osu_get_certificate
	.p2align	4, 0x90
_osu_get_certificate:                   ## @osu_get_certificate
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r13
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rdx
	callq	_xml_node_get_attr_value
	movl	$-1, %r12d
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	_MSG_INFO@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %r14
	movq	%r14, %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_write_summary
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_os_strcasecmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_3:
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_xml_node_get_attr_value_free
LBB0_4:
	movl	$-1, %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_xml_node_get_attr_value_free
	movl	(%r13), %edi
	leaq	L_.str.4(%rip), %rdx
	movq	%r15, %rsi
	callq	_get_node
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movl	(%r13), %edi
	movq	%rax, %rsi
	callq	_xml_node_get_text
	movq	%rax, %r14
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testq	%r14, %r14
	je	LBB0_12
## %bb.8:
	leaq	L_.str.7(%rip), %rbx
	movq	%rbx, %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_write_summary
	movl	(%r13), %edi
	leaq	L_.str.8(%rip), %rdx
	movq	%r15, %rsi
	callq	_get_node
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movl	(%r13), %edi
	movq	%rax, %rsi
	callq	_xml_node_get_text
	movq	%rax, %rbx
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testq	%rbx, %rbx
	je	LBB0_18
## %bb.10:
	leaq	L_.str.11(%rip), %r12
	movq	%r12, %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_write_summary
	jmp	LBB0_15
LBB0_11:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_3
LBB0_12:
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_4
LBB0_13:
	cmpl	$0, 4(%r13)
	je	LBB0_26
## %bb.14:
	xorl	%ebx, %ebx
LBB0_15:
	movl	(%r13), %edi
	leaq	L_.str.12(%rip), %rdx
	movq	%r15, %rsi
	callq	_get_node
	testq	%rax, %rax
	je	LBB0_19
## %bb.16:
	movl	(%r13), %edi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_xml_node_get_base64_text
	movq	%rax, %r15
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testq	%r15, %r15
	je	LBB0_24
## %bb.17:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str.15(%rip), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_21
LBB0_18:
	leaq	L_.str.10(%rip), %rsi
	jmp	LBB0_27
LBB0_19:
	cmpl	$0, 4(%r13)
	je	LBB0_28
## %bb.20:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
LBB0_21:
	movq	_S_IRWXU@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	L_.str.16(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mkdir
	movq	_S_IRWXG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_android_update_permission
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_est_load_cacerts
	movl	$-1, %r12d
	testq	%rax, %rax
	js	LBB0_30
## %bb.22:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_est_build_csr
	testq	%rax, %rax
	js	LBB0_30
## %bb.23:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_est_simple_enroll
	movq	%rax, %r12
	sarq	$63, %r12
	jmp	LBB0_31
LBB0_30:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_31
LBB0_24:
	leaq	L_.str.14(%rip), %rsi
	jmp	LBB0_29
LBB0_26:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.9(%rip), %rsi
LBB0_27:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$-1, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_31
LBB0_28:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.13(%rip), %rsi
LBB0_29:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$-1, %r12d
LBB0_31:
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_xml_node_get_text_free
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_xml_node_get_text_free
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_xml_node_get_text_free
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enrollmentProtocol"

	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
L_.str.1:                               ## @.str.1
	.asciz	"getCertificate - enrollmentProtocol=%s"

L_.str.2:                               ## @.str.2
	.asciz	"EST"

L_.str.3:                               ## @.str.3
	.asciz	"Unsupported enrollmentProtocol"

L_.str.4:                               ## @.str.4
	.asciz	"enrollmentServerURI"

L_.str.5:                               ## @.str.5
	.asciz	"Could not find enrollmentServerURI node"

L_.str.6:                               ## @.str.6
	.asciz	"Could not get URL text"

L_.str.7:                               ## @.str.7
	.asciz	"enrollmentServerURI: %s"

L_.str.8:                               ## @.str.8
	.asciz	"estUserID"

L_.str.9:                               ## @.str.9
	.asciz	"Could not find estUserID node"

L_.str.10:                              ## @.str.10
	.asciz	"Could not get estUserID text"

L_.str.11:                              ## @.str.11
	.asciz	"estUserID: %s"

L_.str.12:                              ## @.str.12
	.asciz	"estPassword"

L_.str.13:                              ## @.str.13
	.asciz	"Could not find estPassword node"

L_.str.14:                              ## @.str.14
	.asciz	"Could not get estPassword text"

L_.str.15:                              ## @.str.15
	.asciz	"estPassword: %s"

L_.str.16:                              ## @.str.16
	.asciz	"Cert"

	.comm	_S_IRWXU,4,2                    ## @S_IRWXU
	.comm	_S_IRWXG,4,2                    ## @S_IRWXG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_osu_get_certificate            ; -- Begin function osu_get_certificate
	.p2align	2
_osu_get_certificate:                   ; @osu_get_certificate
	.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	x22, x1
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	bl	_xml_node_get_attr_value
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x24, _MSG_INFO@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MSG_INFO@GOTPAGEOFF]
	ldr	w0, [x24]
	str	x20, [sp]
Lloh4:
	adrp	x21, l_.str.1@PAGE
Lloh5:
	add	x21, x21, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_wpa_printf
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_write_summary
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_os_strcasecmp
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w0, [x24]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_3:
	bl	_wpa_printf
	ldr	w0, [x19]
	mov	x1, x20
	bl	_xml_node_get_attr_value_free
LBB0_4:
	mov	w23, #-1
LBB0_5:
	mov	x0, x23
	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_6:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_xml_node_get_attr_value_free
	ldr	w0, [x19]
Lloh10:
	adrp	x2, l_.str.4@PAGE
Lloh11:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x1, x22
	bl	_get_node
	cbz	x0, LBB0_11
; %bb.7:
	mov	x1, x0
	ldr	w0, [x19]
	bl	_xml_node_get_text
	mov	x20, x0
	ldr	w0, [x24]
	cbz	x20, LBB0_12
; %bb.8:
	str	x20, [sp]
Lloh12:
	adrp	x21, l_.str.7@PAGE
Lloh13:
	add	x21, x21, l_.str.7@PAGEOFF
	mov	x1, x21
	bl	_wpa_printf
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_write_summary
	ldr	w0, [x19]
Lloh14:
	adrp	x2, l_.str.8@PAGE
Lloh15:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x1, x22
	bl	_get_node
	cbz	x0, LBB0_13
; %bb.9:
	mov	x1, x0
	ldr	w0, [x19]
	bl	_xml_node_get_text
	mov	x21, x0
	ldr	w0, [x24]
	cbz	x21, LBB0_18
; %bb.10:
	str	x21, [sp]
Lloh16:
	adrp	x23, l_.str.11@PAGE
Lloh17:
	add	x23, x23, l_.str.11@PAGEOFF
	mov	x1, x23
	bl	_wpa_printf
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_write_summary
	b	LBB0_15
LBB0_11:
	ldr	w0, [x24]
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_3
LBB0_12:
Lloh20:
	adrp	x1, l_.str.6@PAGE
Lloh21:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_wpa_printf
	b	LBB0_4
LBB0_13:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_25
; %bb.14:
	mov	x21, #0
LBB0_15:
	ldr	w0, [x19]
Lloh22:
	adrp	x2, l_.str.12@PAGE
Lloh23:
	add	x2, x2, l_.str.12@PAGEOFF
	mov	x1, x22
	bl	_get_node
	cbz	x0, LBB0_19
; %bb.16:
	mov	x1, x0
	ldr	w0, [x19]
	mov	x2, #0
	bl	_xml_node_get_base64_text
	mov	x22, x0
	ldr	w0, [x24]
	cbz	x22, LBB0_24
; %bb.17:
	str	x22, [sp]
Lloh24:
	adrp	x1, l_.str.15@PAGE
Lloh25:
	add	x1, x1, l_.str.15@PAGEOFF
	bl	_wpa_printf
	b	LBB0_21
LBB0_18:
Lloh26:
	adrp	x1, l_.str.10@PAGE
Lloh27:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_27
LBB0_19:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_26
; %bb.20:
	mov	x22, #0
LBB0_21:
Lloh28:
	adrp	x24, _S_IRWXU@GOTPAGE
Lloh29:
	ldr	x24, [x24, _S_IRWXU@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh30:
	adrp	x23, l_.str.16@PAGE
Lloh31:
	add	x23, x23, l_.str.16@PAGEOFF
	mov	x0, x23
	bl	_mkdir
	ldr	w8, [x24]
Lloh32:
	adrp	x9, _S_IRWXG@GOTPAGE
Lloh33:
	ldr	x9, [x9, _S_IRWXG@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x23
	bl	_android_update_permission
	mov	x0, x19
	mov	x1, x20
	bl	_est_load_cacerts
	tbnz	x0, #63, LBB0_29
; %bb.22:
	mov	x0, x19
	mov	x1, x20
	bl	_est_build_csr
	tbnz	x0, #63, LBB0_29
; %bb.23:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_est_simple_enroll
	asr	x23, x0, #63
	b	LBB0_30
LBB0_24:
Lloh35:
	adrp	x1, l_.str.14@PAGE
Lloh36:
	add	x1, x1, l_.str.14@PAGEOFF
	bl	_wpa_printf
	b	LBB0_29
LBB0_25:
	ldr	w0, [x24]
Lloh37:
	adrp	x1, l_.str.9@PAGE
Lloh38:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_wpa_printf
	mov	x21, #0
	b	LBB0_28
LBB0_26:
	ldr	w0, [x24]
Lloh39:
	adrp	x1, l_.str.13@PAGE
Lloh40:
	add	x1, x1, l_.str.13@PAGEOFF
LBB0_27:
	bl	_wpa_printf
LBB0_28:
	mov	x22, #0
LBB0_29:
	mov	w23, #-1
LBB0_30:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_xml_node_get_text_free
	ldr	w0, [x19]
	mov	x1, x21
	bl	_xml_node_get_text_free
	ldr	w0, [x19]
	mov	x1, x22
	bl	_xml_node_get_text_free
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enrollmentProtocol"

	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
l_.str.1:                               ; @.str.1
	.asciz	"getCertificate - enrollmentProtocol=%s"

l_.str.2:                               ; @.str.2
	.asciz	"EST"

l_.str.3:                               ; @.str.3
	.asciz	"Unsupported enrollmentProtocol"

l_.str.4:                               ; @.str.4
	.asciz	"enrollmentServerURI"

l_.str.5:                               ; @.str.5
	.asciz	"Could not find enrollmentServerURI node"

l_.str.6:                               ; @.str.6
	.asciz	"Could not get URL text"

l_.str.7:                               ; @.str.7
	.asciz	"enrollmentServerURI: %s"

l_.str.8:                               ; @.str.8
	.asciz	"estUserID"

l_.str.9:                               ; @.str.9
	.asciz	"Could not find estUserID node"

l_.str.10:                              ; @.str.10
	.asciz	"Could not get estUserID text"

l_.str.11:                              ; @.str.11
	.asciz	"estUserID: %s"

l_.str.12:                              ; @.str.12
	.asciz	"estPassword"

l_.str.13:                              ; @.str.13
	.asciz	"Could not find estPassword node"

l_.str.14:                              ; @.str.14
	.asciz	"Could not get estPassword text"

l_.str.15:                              ; @.str.15
	.asciz	"estPassword: %s"

l_.str.16:                              ; @.str.16
	.asciz	"Cert"

	.comm	_S_IRWXU,4,2                    ; @S_IRWXU
	.comm	_S_IRWXG,4,2                    ; @S_IRWXG
.subsections_via_symbols
