	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpa_auth_gen_wpa_ie            ## -- Begin function wpa_auth_gen_wpa_ie
	.p2align	4, 0x90
_wpa_auth_gen_wpa_ie:                   ## @wpa_auth_gen_wpa_ie
	.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	%rbx
	subq	$520, %rsp                      ## imm = 0x208
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	16(%rdi), %r15
	movl	20(%rdi), %eax
	movq	_WPA_PROTO_OSEN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.2:
	leaq	-544(%rbp), %rsi
	movq	%r15, %rdi
	callq	_wpa_write_osen
	movq	%rax, %rbx
	movl	20(%r14), %eax
	jmp	LBB0_3
LBB0_1:
	leaq	-544(%rbp), %rbx
LBB0_3:
	movq	_WPA_PROTO_RSN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.4:
	leaq	-544(%rbp), %rdx
	subq	%rbx, %rdx
	addq	$2048, %rdx                     ## imm = 0x800
	shrq	$2, %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	callq	_wpa_write_rsn_ie
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movl	%eax, %eax
	leaq	(%rbx,%rax,4), %rbx
	movl	20(%r14), %eax
LBB0_6:
	movq	_WPA_PROTO_WPA@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.7:
	leaq	-544(%rbp), %rdx
	subq	%rbx, %rdx
	addq	$2048, %rdx                     ## imm = 0x800
	shrq	$2, %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_wpa_write_wpa_ie
	testl	%eax, %eax
	js	LBB0_12
## %bb.8:
	movl	%eax, %eax
	leaq	(%rbx,%rax,4), %rbx
LBB0_9:
	movq	8(%r14), %rdi
	callq	_os_free
	leaq	-544(%rbp), %rax
	subq	%rax, %rbx
	shrq	$2, %rbx
	movl	%ebx, %edi
	callq	_os_malloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	leaq	-544(%rbp), %rsi
	movq	%rax, %rdi
	movl	%ebx, %edx
	callq	_os_memcpy
	movl	%ebx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_10:
	movl	$-1, %eax
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	addq	$520, %rsp                      ## imm = 0x208
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WPA_PROTO_OSEN,4,2             ## @WPA_PROTO_OSEN
	.comm	_WPA_PROTO_RSN,4,2              ## @WPA_PROTO_RSN
	.comm	_WPA_PROTO_WPA,4,2              ## @WPA_PROTO_WPA
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpa_auth_gen_wpa_ie            ; -- Begin function wpa_auth_gen_wpa_ie
	.p2align	2
_wpa_auth_gen_wpa_ie:                   ; @wpa_auth_gen_wpa_ie
	.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
	sub	sp, sp, #528
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	x21, x0, #16
	ldr	w8, [x0, #20]
Lloh3:
	adrp	x9, _WPA_PROTO_OSEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WPA_PROTO_OSEN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	add	x1, sp, #8
	mov	x0, x21
	bl	_wpa_write_osen
	mov	x20, x0
	ldr	w8, [x19, #20]
	b	LBB0_3
LBB0_2:
	add	x20, sp, #8
LBB0_3:
Lloh6:
	adrp	x9, _WPA_PROTO_RSN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WPA_PROTO_RSN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	add	x8, sp, #8
	sub	x8, x8, x20
	add	x8, x8, #2048
	lsr	x2, x8, #2
	mov	x0, x21
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, #0
	bl	_wpa_write_rsn_ie
	tbnz	w0, #31, LBB0_12
; %bb.5:
	add	x20, x20, w0, uxtw #2
	ldr	w8, [x19, #20]
LBB0_6:
Lloh9:
	adrp	x9, _WPA_PROTO_WPA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WPA_PROTO_WPA@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
	add	x8, sp, #8
	sub	x8, x8, x20
	add	x8, x8, #2048
	lsr	x2, x8, #2
	mov	x0, x21
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_wpa_write_wpa_ie
	tbnz	w0, #31, LBB0_12
; %bb.8:
	add	x20, x20, w0, uxtw #2
LBB0_9:
	ldr	x0, [x19, #8]
	bl	_os_free
	add	x8, sp, #8
	sub	x8, x20, x8
	lsr	x20, x8, #2
	mov	x0, x20
	bl	_os_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_11
; %bb.10:
	add	x1, sp, #8
	mov	x2, x20
	bl	_os_memcpy
	mov	w0, #0
	str	w20, [x19]
	b	LBB0_12
LBB0_11:
	mov	w0, #-1
LBB0_12:
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	add	sp, sp, #528
	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_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_WPA_PROTO_OSEN,4,2             ; @WPA_PROTO_OSEN
	.comm	_WPA_PROTO_RSN,4,2              ; @WPA_PROTO_RSN
	.comm	_WPA_PROTO_WPA,4,2              ; @WPA_PROTO_WPA
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
.subsections_via_symbols
