	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_teap_build_pac
_eap_teap_build_pac:                    ## @eap_teap_build_pac
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_EAP_TEAP_PAC_KEY_LEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_random_get_bytes
	testq	%rax, %rax
	js	LBB0_27
## %bb.1:
	leaq	-88(%rbp), %rdi
	callq	_os_get_time
	testq	%rax, %rax
	js	LBB0_26
## %bb.2:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	callq	_wpa_hexdump_key
	movl	(%rbx), %eax
	movl	(%r15), %ecx
	addl	%ecx, %eax
	addl	$18, %eax
	movslq	%eax, %rdi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_26
## %bb.3:
	movq	%rax, %r12
	movq	8(%r14), %rdi
	callq	_os_strlen
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_PAC_OPAQUE_TYPE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movl	(%rbx), %edx
	leaq	8(%r12), %rdi
	movl	%edx, 4(%r12)
	movq	%r13, %rsi
	callq	_os_memcpy
	movslq	(%rbx), %rbx
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r14), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	_PAC_OPAQUE_TYPE_LIFETIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12,%rbx,4)
	leaq	(%r12,%rbx,4), %rdi
	addq	$16, %rdi
	movl	$4, 12(%r12,%rbx,4)
	movq	24(%r14), %rsi
	addq	-88(%rbp), %rsi
	callq	_WPA_PUT_BE32
	leaq	(%r12,%rbx,4), %rbx
	addq	$32, %rbx
	movq	8(%r15), %rdx
	testq	%rdx, %rdx
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	je	LBB0_5
## %bb.4:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %ecx
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_hexdump_ascii
	movq	_PAC_OPAQUE_TYPE_IDENTITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	(%r15), %eax
	leaq	8(%rbx), %rdi
	movl	%eax, 4(%rbx)
	movq	8(%r15), %rsi
	movl	(%r15), %edx
	callq	_os_memcpy
	movslq	(%r15), %rax
	leaq	(%rbx,%rax,4), %rbx
	addq	$8, %rbx
LBB0_5:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rcx
	subq	%r12, %rcx
	movq	%rcx, %rax
	sarq	$2, %rax
	testb	$28, %cl
	je	LBB0_14
## %bb.6:
	movq	_PAC_OPAQUE_TYPE_PAD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%rbx)
	leaq	1(%rax), %r14
	testb	$7, %r14b
	je	LBB0_15
## %bb.7:
	movl	(%rcx), %edx
	movl	%edx, 4(%rbx)
	leaq	2(%rax), %r14
	testb	$7, %r14b
	je	LBB0_15
## %bb.8:
	movl	(%rcx), %edx
	movl	%edx, 8(%rbx)
	leaq	3(%rax), %r14
	testb	$7, %r14b
	je	LBB0_15
## %bb.9:
	movl	(%rcx), %edx
	movl	%edx, 12(%rbx)
	leaq	4(%rax), %r14
	testb	$7, %r14b
	je	LBB0_15
## %bb.10:
	movl	(%rcx), %edx
	movl	%edx, 16(%rbx)
	leaq	5(%rax), %r14
	testb	$7, %r14b
	je	LBB0_15
## %bb.11:
	movl	(%rcx), %edx
	movl	%edx, 20(%rbx)
	leaq	6(%rax), %r14
	testb	$7, %r14b
	je	LBB0_15
## %bb.12:
	movl	(%rcx), %edx
	movl	%edx, 24(%rbx)
	leaq	7(%rax), %r14
	testb	$7, %r14b
	je	LBB0_15
## %bb.13:
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rbx)
	addq	$8, %rax
LBB0_14:
	movq	%rax, %r14
LBB0_15:
	leaq	8(%r14), %rbx
	movq	%rbx, %rdi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_24
## %bb.16:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movl	32(%r15), %edi
	shrq	$3, %r14
	movl	$4, %esi
	movq	%r14, %rdx
	movq	%r12, %rcx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r8
	callq	_aes_wrap
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_os_free
	testq	%r14, %r14
	js	LBB0_23
## %bb.17:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_wpa_hexdump
	movq	_EAP_TEAP_PAC_KEY_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	(%r15), %rcx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	addq	%r15, %rax
	addq	%rbx, %rax
	leaq	(%rcx,%rax), %rdi
	addq	$160, %rdi
	callq	_wpabuf_alloc
	testq	%rax, %rax
	je	LBB0_23
## %bb.18:
	movq	%rax, %r12
	movl	(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r12, %rdi
	movl	$12, %esi
	callq	_wpabuf_put
	movq	%r14, %rbx
	movq	%rax, %r14
	leaq	8(%rax), %rdi
	movq	_TEAP_TLV_MANDATORY@GOTPCREL(%rip), %r15
	movq	_TEAP_TLV_RESULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r15), %esi
	callq	_WPA_PUT_BE16
	leaq	4(%r14), %rdi
	movl	$2, %esi
	callq	_WPA_PUT_BE16
	movq	_TEAP_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	callq	_WPA_PUT_BE16
	movl	(%rbx), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_wpabuf_put
	movq	%rax, %rbx
	movq	_TEAP_TLV_PAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r15), %edi
	callq	_host_to_be16
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, 8(%rbx)
	movq	_PAC_TYPE_PAC_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EAP_TEAP_PAC_KEY_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movq	%r12, %rdi
	movq	%r13, %rdx
	callq	_eap_teap_put_tlv
	movq	_PAC_TYPE_PAC_OPAQUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	callq	_eap_teap_put_tlv
	movq	%rbx, %rdi
	callq	_os_free
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_wpabuf_put
	movq	%rax, %r15
	movq	_PAC_TYPE_PAC_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_host_to_be16
	movq	%rax, 8(%r15)
	movq	_PAC_TYPE_CRED_LIFETIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_eap_teap_put_tlv_hdr
	movq	24(%r14), %rsi
	addq	-88(%rbp), %rsi
	movq	%r12, %rdi
	callq	_wpabuf_put_be32
	movq	_PAC_TYPE_A_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r14), %rdx
	movslq	(%r14), %rcx
	movq	%r12, %rdi
	callq	_eap_teap_put_tlv
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	8(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_20
## %bb.19:
	movq	_PAC_TYPE_I_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movslq	(%rcx), %rcx
	movq	%r12, %rdi
	callq	_eap_teap_put_tlv
LBB0_20:
	movq	_PAC_TYPE_A_ID_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rdx
	movq	%r12, %rdi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_eap_teap_put_tlv
	movq	_PAC_TYPE_PAC_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$2, %edx
	callq	_eap_teap_put_tlv_hdr
	movq	_PAC_TYPE_TUNNEL_PAC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_wpabuf_put_be16
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_wpabuf_put
	movq	%rax, %r14
	movq	%rax, %rdi
	subq	%r15, %rdi
	addq	$-16, %rdi
	shrq	$2, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_host_to_be16
	movq	%rax, (%r15)
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	subq	%rbx, %r14
	addq	$-16, %r14
	shrq	$2, %r14
	movl	%r14d, %edi
	callq	_host_to_be16
	movq	%rax, (%rbx)
	jmp	LBB0_27
LBB0_23:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_24:
	movq	%r12, %rdi
LBB0_25:
	callq	_os_free
LBB0_26:
	xorl	%r12d, %r12d
LBB0_27:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.28:
	movq	%r12, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EAP_TEAP_PAC_KEY_LEN,4,2       ## @EAP_TEAP_PAC_KEY_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-TEAP: Build a new PAC"

L_.str.1:                               ## @.str.1
	.asciz	"EAP-TEAP: Generated PAC-Key"

	.comm	_PAC_OPAQUE_TYPE_KEY,4,2        ## @PAC_OPAQUE_TYPE_KEY
L_.str.2:                               ## @.str.2
	.asciz	"EAP-TEAP: PAC-Key lifetime: %u seconds"

	.comm	_PAC_OPAQUE_TYPE_LIFETIME,4,2   ## @PAC_OPAQUE_TYPE_LIFETIME
L_.str.3:                               ## @.str.3
	.asciz	"EAP-TEAP: PAC-Opaque Identity"

	.comm	_PAC_OPAQUE_TYPE_IDENTITY,4,2   ## @PAC_OPAQUE_TYPE_IDENTITY
	.comm	_PAC_OPAQUE_TYPE_PAD,4,2        ## @PAC_OPAQUE_TYPE_PAD
L_.str.4:                               ## @.str.4
	.asciz	"EAP-TEAP: PAC-Opaque"

L_.str.5:                               ## @.str.5
	.asciz	"EAP-TEAP: Add Result TLV (status=SUCCESS)"

	.comm	_TEAP_TLV_MANDATORY,4,2         ## @TEAP_TLV_MANDATORY
	.comm	_TEAP_TLV_RESULT,4,2            ## @TEAP_TLV_RESULT
	.comm	_TEAP_STATUS_SUCCESS,4,2        ## @TEAP_STATUS_SUCCESS
L_.str.6:                               ## @.str.6
	.asciz	"EAP-TEAP: Add PAC TLV"

	.comm	_TEAP_TLV_PAC,4,2               ## @TEAP_TLV_PAC
	.comm	_PAC_TYPE_PAC_KEY,4,2           ## @PAC_TYPE_PAC_KEY
	.comm	_PAC_TYPE_PAC_OPAQUE,4,2        ## @PAC_TYPE_PAC_OPAQUE
	.comm	_PAC_TYPE_PAC_INFO,4,2          ## @PAC_TYPE_PAC_INFO
	.comm	_PAC_TYPE_CRED_LIFETIME,4,2     ## @PAC_TYPE_CRED_LIFETIME
	.comm	_PAC_TYPE_A_ID,4,2              ## @PAC_TYPE_A_ID
	.comm	_PAC_TYPE_I_ID,4,2              ## @PAC_TYPE_I_ID
	.comm	_PAC_TYPE_A_ID_INFO,4,2         ## @PAC_TYPE_A_ID_INFO
	.comm	_PAC_TYPE_PAC_TYPE,4,2          ## @PAC_TYPE_PAC_TYPE
	.comm	_PAC_TYPE_TUNNEL_PAC,4,2        ## @PAC_TYPE_TUNNEL_PAC
	.no_dead_strip	_eap_teap_build_pac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_teap_build_pac
_eap_teap_build_pac:                    ; @eap_teap_build_pac
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x27, _EAP_TEAP_PAC_KEY_LEN@GOTPAGE
Lloh4:
	ldr	x27, [x27, _EAP_TEAP_PAC_KEY_LEN@GOTPAGEOFF]
	ldr	w8, [x27]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh7:
	adrp	x28, _MSG_DEBUG@GOTPAGE
Lloh8:
	ldr	x28, [x28, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x28]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	ldr	w1, [x27]
	mov	x0, x22
	bl	_random_get_bytes
	tbnz	x0, #63, LBB0_24
; %bb.1:
	sub	x0, x29, #96
	bl	_os_get_time
	tbnz	x0, #63, LBB0_24
; %bb.2:
	ldr	w0, [x28]
	ldr	w3, [x27]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_wpa_hexdump_key
	ldr	w8, [x27]
	ldr	w9, [x20]
	add	w8, w8, w9
	add	w8, w8, #18
	sxtw	x0, w8
	bl	_os_malloc
	mov	x23, x0
	cbz	x0, LBB0_25
; %bb.3:
	ldr	x0, [x19, #8]
	bl	_os_strlen
	mov	x21, x0
Lloh13:
	adrp	x8, _PAC_OPAQUE_TYPE_KEY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PAC_OPAQUE_TYPE_KEY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x23]
	ldr	w2, [x27]
	add	x24, x23, #8
	str	w2, [x23, #4]
	mov	x0, x24
	mov	x1, x22
	bl	_os_memcpy
	ldrsw	x8, [x27]
	add	x24, x24, x8, lsl #2
	ldr	w0, [x28]
	ldr	x8, [x19, #24]
	str	x8, [sp, #-16]!
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	add	sp, sp, #16
Lloh18:
	adrp	x8, _PAC_OPAQUE_TYPE_LIFETIME@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PAC_OPAQUE_TYPE_LIFETIME@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	add	x0, x24, #8
	mov	w9, #4
	stp	w8, w9, [x24]
	ldur	x8, [x29, #-96]
	ldr	x9, [x19, #24]
	add	x1, x9, x8
	bl	_WPA_PUT_BE32
	add	x25, x24, #24
	ldr	x2, [x20, #8]
	cbz	x2, LBB0_5
; %bb.4:
	ldr	w0, [x28]
	ldr	w3, [x20]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_hexdump_ascii
Lloh23:
	adrp	x8, _PAC_OPAQUE_TYPE_IDENTITY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PAC_OPAQUE_TYPE_IDENTITY@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x25]
	ldr	w8, [x20]
	add	x24, x25, #8
	str	w8, [x25, #4]
	ldr	x1, [x20, #8]
	ldr	w2, [x20]
	mov	x0, x24
	bl	_os_memcpy
	ldrsw	x8, [x20]
	add	x25, x24, x8, lsl #2
LBB0_5:
	sub	x8, x25, x23
	asr	x24, x8, #2
	tst	x8, #0x1c
	b.eq	LBB0_15
; %bb.6:
	mov	w9, #-1
	eor	w8, w9, w8, lsr #2
	and	x8, x8, #0x7
	add	x8, x24, x8
Lloh26:
	adrp	x9, _PAC_OPAQUE_TYPE_PAD@GOTPAGE
Lloh27:
	ldr	x9, [x9, _PAC_OPAQUE_TYPE_PAD@GOTPAGEOFF]
	ldr	w10, [x9]
	str	w10, [x25]
	add	w10, w24, #1
	tst	x10, #0x7
	b.eq	LBB0_14
; %bb.7:
	ldr	w10, [x9]
	str	w10, [x25, #4]
	add	w10, w24, #2
	tst	x10, #0x7
	b.eq	LBB0_14
; %bb.8:
	ldr	w10, [x9]
	str	w10, [x25, #8]
	add	w10, w24, #3
	tst	x10, #0x7
	b.eq	LBB0_14
; %bb.9:
	ldr	w10, [x9]
	str	w10, [x25, #12]
	add	w10, w24, #4
	tst	x10, #0x7
	b.eq	LBB0_14
; %bb.10:
	ldr	w10, [x9]
	str	w10, [x25, #16]
	add	w10, w24, #5
	tst	x10, #0x7
	b.eq	LBB0_14
; %bb.11:
	ldr	w10, [x9]
	str	w10, [x25, #20]
	add	w10, w24, #6
	tst	x10, #0x7
	b.eq	LBB0_14
; %bb.12:
	ldr	w10, [x9]
	str	w10, [x25, #24]
	sub	w10, w24, #1
	tst	x10, #0x7
	b.eq	LBB0_14
; %bb.13:
	ldr	w9, [x9]
	str	w9, [x25, #28]
LBB0_14:
	add	x24, x8, #1
LBB0_15:
	add	x26, x24, #8
	mov	x0, x26
	bl	_os_malloc
	cbz	x0, LBB0_21
; %bb.16:
	mov	x25, x0
	ldr	w0, [x19, #32]
	lsr	x2, x24, #3
	mov	w1, #4
	mov	x3, x23
	mov	x4, x25
	bl	_aes_wrap
	mov	x24, x0
	mov	x0, x23
	bl	_os_free
	tbnz	x24, #63, LBB0_22
; %bb.17:
	ldr	w0, [x28]
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x25
	mov	x3, x26
	bl	_wpa_hexdump
	ldrsw	x8, [x27]
	ldrsw	x9, [x19]
	add	x10, x21, x26
	add	x8, x10, x8
	add	x8, x8, x9
	add	x0, x8, #160
	bl	_wpabuf_alloc
	mov	x23, x0
	cbz	x0, LBB0_27
; %bb.18:
	stur	x21, [x29, #-104]               ; 8-byte Folded Spill
	ldr	w0, [x28]
Lloh30:
	adrp	x1, l_.str.5@PAGE
Lloh31:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_wpa_printf
	mov	x0, x23
	mov	w1, #12
	bl	_wpabuf_put
	mov	x24, x0
Lloh32:
	adrp	x21, _TEAP_TLV_MANDATORY@GOTPAGE
Lloh33:
	ldr	x21, [x21, _TEAP_TLV_MANDATORY@GOTPAGEOFF]
	add	x0, x0, #8
	ldr	w8, [x21]
Lloh34:
	adrp	x9, _TEAP_TLV_RESULT@GOTPAGE
Lloh35:
	ldr	x9, [x9, _TEAP_TLV_RESULT@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_WPA_PUT_BE16
	add	x0, x24, #4
	mov	w1, #2
	bl	_WPA_PUT_BE16
Lloh37:
	adrp	x8, _TEAP_STATUS_SUCCESS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _TEAP_STATUS_SUCCESS@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_WPA_PUT_BE16
	ldr	w0, [x28]
Lloh40:
	adrp	x1, l_.str.6@PAGE
Lloh41:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_wpa_printf
	mov	x0, x23
	mov	w1, #16
	bl	_wpabuf_put
	mov	x24, x0
	ldr	w8, [x21]
Lloh42:
	adrp	x9, _TEAP_TLV_PAC@GOTPAGE
Lloh43:
	ldr	x9, [x9, _TEAP_TLV_PAC@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_host_to_be16
	str	x0, [x24, #8]
Lloh45:
	adrp	x8, _PAC_TYPE_PAC_KEY@GOTPAGE
Lloh46:
	ldr	x8, [x8, _PAC_TYPE_PAC_KEY@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	ldrsw	x3, [x27]
	mov	x0, x23
	mov	x2, x22
	bl	_eap_teap_put_tlv
Lloh48:
	adrp	x8, _PAC_TYPE_PAC_OPAQUE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _PAC_TYPE_PAC_OPAQUE@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x25
	mov	x3, x26
	bl	_eap_teap_put_tlv
	mov	x0, x25
	bl	_os_free
	mov	x0, x23
	mov	w1, #16
	bl	_wpabuf_put
	mov	x22, x0
Lloh51:
	adrp	x8, _PAC_TYPE_PAC_INFO@GOTPAGE
Lloh52:
	ldr	x8, [x8, _PAC_TYPE_PAC_INFO@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
	bl	_host_to_be16
	str	x0, [x22, #8]
Lloh54:
	adrp	x8, _PAC_TYPE_CRED_LIFETIME@GOTPAGE
Lloh55:
	ldr	x8, [x8, _PAC_TYPE_CRED_LIFETIME@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
	mov	x0, x23
	mov	w2, #4
	bl	_eap_teap_put_tlv_hdr
	ldur	x8, [x29, #-96]
	ldr	x9, [x19, #24]
	add	x1, x9, x8
	mov	x0, x23
	bl	_wpabuf_put_be32
Lloh57:
	adrp	x8, _PAC_TYPE_A_ID@GOTPAGE
Lloh58:
	ldr	x8, [x8, _PAC_TYPE_A_ID@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	ldr	x2, [x19, #16]
	ldrsw	x3, [x19]
	mov	x0, x23
	bl	_eap_teap_put_tlv
	ldr	x2, [x20, #8]
	cbz	x2, LBB0_20
; %bb.19:
Lloh60:
	adrp	x8, _PAC_TYPE_I_ID@GOTPAGE
Lloh61:
	ldr	x8, [x8, _PAC_TYPE_I_ID@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
	ldrsw	x3, [x20]
	mov	x0, x23
	bl	_eap_teap_put_tlv
LBB0_20:
Lloh63:
	adrp	x8, _PAC_TYPE_A_ID_INFO@GOTPAGE
Lloh64:
	ldr	x8, [x8, _PAC_TYPE_A_ID_INFO@GOTPAGEOFF]
Lloh65:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	mov	x0, x23
	ldur	x3, [x29, #-104]                ; 8-byte Folded Reload
	bl	_eap_teap_put_tlv
Lloh66:
	adrp	x8, _PAC_TYPE_PAC_TYPE@GOTPAGE
Lloh67:
	ldr	x8, [x8, _PAC_TYPE_PAC_TYPE@GOTPAGEOFF]
Lloh68:
	ldr	w1, [x8]
	mov	x0, x23
	mov	w2, #2
	bl	_eap_teap_put_tlv_hdr
Lloh69:
	adrp	x8, _PAC_TYPE_TUNNEL_PAC@GOTPAGE
Lloh70:
	ldr	x8, [x8, _PAC_TYPE_TUNNEL_PAC@GOTPAGEOFF]
Lloh71:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_wpabuf_put_be16
	mov	x0, x23
	mov	w1, #0
	bl	_wpabuf_put
	mov	x19, x0
	sub	x8, x0, x22
	sub	x8, x8, #16
	lsr	x0, x8, #2
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_host_to_be16
	str	x0, [x22]
	sub	x8, x19, x24
	sub	x8, x8, #16
	lsr	x0, x8, #2
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_host_to_be16
	str	x0, [x24]
	b	LBB0_25
LBB0_21:
	mov	x0, x23
	b	LBB0_23
LBB0_22:
	mov	x0, x25
LBB0_23:
	bl	_os_free
LBB0_24:
	mov	x23, #0
LBB0_25:
	ldur	x8, [x29, #-88]
Lloh72:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh73:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh74:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.26:
	mov	x0, x23
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_27:
	mov	x0, x25
	bl	_os_free
	b	LBB0_25
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.cfi_endproc
                                        ; -- End function
	.comm	_EAP_TEAP_PAC_KEY_LEN,4,2       ; @EAP_TEAP_PAC_KEY_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-TEAP: Build a new PAC"

l_.str.1:                               ; @.str.1
	.asciz	"EAP-TEAP: Generated PAC-Key"

	.comm	_PAC_OPAQUE_TYPE_KEY,4,2        ; @PAC_OPAQUE_TYPE_KEY
l_.str.2:                               ; @.str.2
	.asciz	"EAP-TEAP: PAC-Key lifetime: %u seconds"

	.comm	_PAC_OPAQUE_TYPE_LIFETIME,4,2   ; @PAC_OPAQUE_TYPE_LIFETIME
l_.str.3:                               ; @.str.3
	.asciz	"EAP-TEAP: PAC-Opaque Identity"

	.comm	_PAC_OPAQUE_TYPE_IDENTITY,4,2   ; @PAC_OPAQUE_TYPE_IDENTITY
	.comm	_PAC_OPAQUE_TYPE_PAD,4,2        ; @PAC_OPAQUE_TYPE_PAD
l_.str.4:                               ; @.str.4
	.asciz	"EAP-TEAP: PAC-Opaque"

l_.str.5:                               ; @.str.5
	.asciz	"EAP-TEAP: Add Result TLV (status=SUCCESS)"

	.comm	_TEAP_TLV_MANDATORY,4,2         ; @TEAP_TLV_MANDATORY
	.comm	_TEAP_TLV_RESULT,4,2            ; @TEAP_TLV_RESULT
	.comm	_TEAP_STATUS_SUCCESS,4,2        ; @TEAP_STATUS_SUCCESS
l_.str.6:                               ; @.str.6
	.asciz	"EAP-TEAP: Add PAC TLV"

	.comm	_TEAP_TLV_PAC,4,2               ; @TEAP_TLV_PAC
	.comm	_PAC_TYPE_PAC_KEY,4,2           ; @PAC_TYPE_PAC_KEY
	.comm	_PAC_TYPE_PAC_OPAQUE,4,2        ; @PAC_TYPE_PAC_OPAQUE
	.comm	_PAC_TYPE_PAC_INFO,4,2          ; @PAC_TYPE_PAC_INFO
	.comm	_PAC_TYPE_CRED_LIFETIME,4,2     ; @PAC_TYPE_CRED_LIFETIME
	.comm	_PAC_TYPE_A_ID,4,2              ; @PAC_TYPE_A_ID
	.comm	_PAC_TYPE_I_ID,4,2              ; @PAC_TYPE_I_ID
	.comm	_PAC_TYPE_A_ID_INFO,4,2         ; @PAC_TYPE_A_ID_INFO
	.comm	_PAC_TYPE_PAC_TYPE,4,2          ; @PAC_TYPE_PAC_TYPE
	.comm	_PAC_TYPE_TUNNEL_PAC,4,2        ; @PAC_TYPE_TUNNEL_PAC
	.no_dead_strip	_eap_teap_build_pac
.subsections_via_symbols
