	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_sim_msg_add_encr_start     ## -- Begin function eap_sim_msg_add_encr_start
	.p2align	4, 0x90
_eap_sim_msg_add_encr_start:            ## @eap_sim_msg_add_encr_start
	.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
	movl	%edx, %r15d
	movq	%rdi, %r12
	movq	_EAP_SIM_IV_LEN@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_eap_sim_msg_add
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movl	8(%r12), %edi
	callq	_wpabuf_head_u8
	subq	%rax, %rbx
	shrq	$2, %rbx
	addl	$4, %ebx
	movl	%ebx, (%r12)
	movl	8(%r12), %edi
	callq	_wpabuf_mhead_u8
	addl	(%r12), %eax
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_random_get_bytes
	testq	%rax, %rax
	je	LBB0_3
LBB0_5:
	movl	$0, (%r12)
	jmp	LBB0_6
LBB0_3:
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_eap_sim_msg_add
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rbx
	movl	8(%r12), %edi
	callq	_wpabuf_head_u8
	subq	%rax, %rbx
	shrq	$2, %rbx
	movl	%ebx, 4(%r12)
	xorl	%r14d, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAP_SIM_IV_LEN,4,2             ## @EAP_SIM_IV_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_sim_msg_add_encr_start     ; -- Begin function eap_sim_msg_add_encr_start
	.p2align	2
_eap_sim_msg_add_encr_start:            ; @eap_sim_msg_add_encr_start
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x22, _EAP_SIM_IV_LEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EAP_SIM_IV_LEN@GOTPAGEOFF]
	ldr	w4, [x22]
	mov	w2, #0
	mov	x3, #0
	bl	_eap_sim_msg_add
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	w0, [x19, #8]
	bl	_wpabuf_head_u8
	sub	x8, x21, x0
	lsr	x8, x8, #2
	add	w8, w8, #4
	str	w8, [x19]
	ldr	w0, [x19, #8]
	bl	_wpabuf_mhead_u8
	ldr	w8, [x19]
	add	w0, w8, w0
	ldr	w1, [x22]
	bl	_random_get_bytes
	cbz	x0, LBB0_5
LBB0_2:
	str	wzr, [x19]
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	bl	_eap_sim_msg_add
	cbz	x0, LBB0_2
; %bb.6:
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_wpabuf_head_u8
	mov	x8, x0
	mov	w0, #0
	sub	x8, x20, x8
	lsr	x8, x8, #2
	str	w8, [x19, #4]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EAP_SIM_IV_LEN,4,2             ; @EAP_SIM_IV_LEN
.subsections_via_symbols
