	.file	"extr_htmldoc.c_get_document_charset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"GetCharset failed: %08x\n"
	.text
	.p2align 4
	.globl	get_document_charset
	.type	get_document_charset, @function
get_document_charset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	r12, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	test	r12, r12
	je	.L15
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	lea	rbp, 12[rsp]
	xor	esi, esi
	mov	rbx, rdi
	mov	rdi, rbp
	call	nsAString_Init@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	rsi, rbp
	call	nsIDOMHTMLDocument_GetCharacterSet@PLT
	mov	edi, eax
	mov	r12d, eax
	call	NS_SUCCEEDED@PLT
	test	rax, rax
	je	.L3
	mov	rdi, rbp
	lea	rsi, 16[rsp]
	call	nsAString_GetData@PLT
	mov	rdi, QWORD PTR 16[rsp]
	cmp	QWORD PTR [rdi], 0
	jne	.L4
.L13:
	mov	rdi, rbp
	call	nsAString_Finish@PLT
.L5:
	mov	r12, QWORD PTR CP_UTF8[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	esi, r12d
	lea	rdi, .LC0[rip]
	call	ERR@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L4:
	call	SysAllocString@PLT
	mov	r13d, eax
	mov	edi, eax
	call	cp_from_charset_string@PLT
	mov	edi, r13d
	mov	r12, rax
	call	SysFreeString@PLT
	mov	rdi, rbp
	call	nsAString_Finish@PLT
	test	r12, r12
	je	.L5
	mov	QWORD PTR [rbx], r12
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	get_document_charset, .-get_document_charset
	.comm	CP_UTF8,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_htmldoc.c_get_document_charset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"GetCharset failed: %08x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_document_charset
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_document_charset, %function
get_document_charset:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r1, [r0]
	ldr	r3, .L17
	sub	sp, sp, #28
	cmp	r1, #0
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	beq	.L15
.L1:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	mov	r0, r1
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, pc}
.L15:
	mov	r4, r0
	add	r0, sp, #12
	bl	nsAString_Init
	add	r1, sp, #12
	ldr	r0, [r4, #4]
	bl	nsIDOMHTMLDocument_GetCharacterSet
	mov	r5, r0
	bl	NS_SUCCEEDED
	cmp	r0, #0
	beq	.L3
	add	r1, sp, #16
	add	r0, sp, #12
	bl	nsAString_GetData
	ldr	r0, [sp, #16]
	ldr	r3, [r0]
	cmp	r3, #0
	bne	.L4
.L13:
	add	r0, sp, #12
	bl	nsAString_Finish
.L5:
	ldr	r3, .L17+4
	ldr	r1, [r3]
	b	.L1
.L3:
	mov	r1, r5
	ldr	r0, .L17+8
	bl	ERR
	b	.L13
.L4:
	bl	SysAllocString
	mov	r5, r0
	bl	cp_from_charset_string
	str	r0, [sp, #4]
	mov	r0, r5
	bl	SysFreeString
	add	r0, sp, #12
	bl	nsAString_Finish
	ldr	r1, [sp, #4]
	cmp	r1, #0
	strne	r1, [r4]
	bne	.L1
	b	.L5
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	.LC1
	.word	CP_UTF8
	.word	.LC0
	.size	get_document_charset, .-get_document_charset
	.comm	CP_UTF8,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
