	.file	"extr_objects.c_EMFDRV_SelectFont.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	EMFDRV_SelectFont
	.type	EMFDRV_SelectFont, @function
EMFDRV_SelectFont:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	get_emf_physdev@PLT
	mov	r14, QWORD PTR [rax]
	test	r14, r14
	jne	.L10
	mov	ebx, DWORD PTR OEM_FIXED_FONT[rip]
	cmp	ebx, DWORD PTR DEFAULT_GUI_FONT[rip]
	jg	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	cmp	DWORD PTR DEFAULT_PALETTE[rip], ebx
	je	.L5
	mov	edi, ebx
	call	GetStockObject@PLT
	cmp	rax, rbp
	je	.L18
.L5:
	add	ebx, 1
	cmp	DWORD PTR DEFAULT_GUI_FONT[rip], ebx
	jge	.L7
.L4:
	mov	rsi, rbp
	mov	rdi, r12
	call	EMFDRV_FindObject@PLT
	mov	ebx, eax
	test	eax, eax
	jne	.L6
	mov	rsi, rbp
	mov	rdi, r12
	call	EMFDRV_CreateFontIndirect@PLT
	mov	ebx, eax
	test	eax, eax
	je	.L1
	mov	esi, DWORD PTR 8[r12]
	mov	rdi, rbp
	call	GDI_hdc_using_object@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR EMR_SELECTOBJECT[rip]
	lea	rsi, 16[rsp]
	mov	rdi, r12
	mov	DWORD PTR 16[rsp], 12
	mov	DWORD PTR 12[rsp], ebx
	mov	DWORD PTR 20[rsp], eax
	call	EMFDRV_WriteRecord@PLT
	test	eax, eax
	je	.L1
.L10:
	mov	eax, DWORD PTR GGO_BITMAP[rip]
	mov	rdi, r12
	mov	r14, rbp
	mov	DWORD PTR 0[r13], eax
	mov	esi, DWORD PTR pSelectFont[rip]
	call	GET_NEXT_PHYSDEV@PLT
	mov	rdx, r13
	mov	rsi, rbp
	mov	rdi, rax
	mov	rax, QWORD PTR [rax]
	call	[QWORD PTR [rax]]
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	rax, r14
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	or	ebx, -2147483648
	jmp	.L6
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	EMFDRV_SelectFont, .-EMFDRV_SelectFont
	.comm	pSelectFont,4,4
	.comm	OEM_FIXED_FONT,4,4
	.comm	GGO_BITMAP,4,4
	.comm	EMR_SELECTOBJECT,4,4
	.comm	DEFAULT_PALETTE,4,4
	.comm	DEFAULT_GUI_FONT,4,4
	.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_objects.c_EMFDRV_SelectFont.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	EMFDRV_SelectFont
	.syntax unified
	.arm
	.fpu softvfp
	.type	EMFDRV_SelectFont, %function
EMFDRV_SelectFont:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L20
	sub	sp, sp, #16
	mov	r5, r1
	mov	r7, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r6, r0
	bl	get_emf_physdev
	ldr	r8, [r0]
	cmp	r8, #0
	bne	.L10
	ldr	r3, .L20+4
	ldr	r9, .L20+8
	ldr	r4, [r3]
	ldr	r3, [r9]
	cmp	r4, r3
	bgt	.L4
	ldr	r10, .L20+12
.L7:
	ldr	r3, [r10]
	cmp	r3, r4
	beq	.L5
	mov	r0, r4
	bl	GetStockObject
	cmp	r0, r5
	beq	.L18
.L5:
	ldr	r3, [r9]
	add	r4, r4, #1
	cmp	r3, r4
	bge	.L7
.L4:
	mov	r1, r5
	mov	r0, r6
	bl	EMFDRV_FindObject
	subs	r4, r0, #0
	bne	.L6
	mov	r1, r5
	mov	r0, r6
	bl	EMFDRV_CreateFontIndirect
	subs	r4, r0, #0
	beq	.L1
	mov	r0, r5
	ldr	r1, [r6, #4]
	bl	GDI_hdc_using_object
.L6:
	mov	r3, #12
	ldr	r2, .L20+16
	mov	r0, r6
	ldr	r2, [r2]
	add	r1, sp, #4
	str	r4, [sp]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	bl	EMFDRV_WriteRecord
	cmp	r0, #0
	beq	.L1
.L10:
	ldr	r2, .L20+20
	ldr	r3, .L20+24
	ldr	r2, [r2]
	mov	r0, r6
	str	r2, [r7]
	ldr	r1, [r3]
	bl	GET_NEXT_PHYSDEV
	ldr	r3, [r0]
	mov	r2, r7
	mov	r1, r5
	ldr	r3, [r3]
	blx	r3
	mov	r8, r5
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r8
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	orr	r4, r4, #-2147483648
	b	.L6
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC0
	.word	OEM_FIXED_FONT
	.word	DEFAULT_GUI_FONT
	.word	DEFAULT_PALETTE
	.word	EMR_SELECTOBJECT
	.word	GGO_BITMAP
	.word	pSelectFont
	.size	EMFDRV_SelectFont, .-EMFDRV_SelectFont
	.comm	pSelectFont,4,4
	.comm	OEM_FIXED_FONT,4,4
	.comm	GGO_BITMAP,4,4
	.comm	EMR_SELECTOBJECT,4,4
	.comm	DEFAULT_PALETTE,4,4
	.comm	DEFAULT_GUI_FONT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
