	.file	"extr_bitmap.c_test_select_object.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"GetDC(0) failed\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"CreateCompatibleBitmap failed\n"
	.section	.rodata.str1.1
.LC2:
	.string	"SelectObject should fail\n"
.LC3:
	.string	"SelectObject failed\n"
.LC4:
	.string	"CreateBitmap failed\n"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"SelectObject failed, BITSPIXEL: %d, created depth: %d\n"
	.align 8
.LC6:
	.string	"SelectObject should fail. BITSPIXELS: %d, created depth: %d\n"
	.section	.rodata.str1.1
.LC7:
	.string	"GetObject returned %d\n"
.LC8:
	.string	"wrong bmType %d\n"
.LC9:
	.string	"wrong bmWidth %d\n"
.LC10:
	.string	"wrong bmHeight %d\n"
.LC11:
	.string	"wrong bmWidthBytes %d\n"
.LC12:
	.string	"wrong bmPlanes %u\n"
	.section	.rodata.str1.8
	.align 8
.LC13:
	.string	"wrong bmBitsPixel %d(15 bpp special)\n"
	.section	.rodata.str1.1
.LC14:
	.string	"wrong bmBitsPixel %d\n"
.LC15:
	.string	"wrong bmBits %p\n"
	.text
	.p2align 4
	.type	test_select_object, @function
test_select_object:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	edi, edi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 64[rsp], 32
	lea	r14, 16[rsp]
	movabs	rax, 64424509448
	mov	QWORD PTR 48[rsp], rax
	movabs	rax, 103079215120
	mov	QWORD PTR 56[rsp], rax
	call	GetDC@PLT
	xor	edi, edi
	lea	rsi, .LC0[rip]
	test	rax, rax
	mov	rbp, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	edx, 10
	mov	rdi, rbp
	mov	esi, 10
	call	CreateCompatibleBitmap@PLT
	xor	edi, edi
	lea	rsi, .LC1[rip]
	test	rax, rax
	mov	r12, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	rsi, r12
	mov	rdi, rbp
	call	SelectObject@PLT
	xor	edi, edi
	lea	rsi, .LC2[rip]
	test	rax, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, r12
	call	DeleteObject@PLT
	mov	rsi, rbp
	xor	edi, edi
	call	ReleaseDC@PLT
	xor	edi, edi
	call	CreateCompatibleDC@PLT
	xor	edi, edi
	lea	rsi, .LC0[rip]
	test	rax, rax
	mov	r12, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	edx, 10
	mov	esi, 10
	mov	rdi, r12
	call	CreateCompatibleBitmap@PLT
	xor	edi, edi
	lea	rsi, .LC1[rip]
	test	rax, rax
	mov	rbp, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	SelectObject@PLT
	xor	edi, edi
	lea	rsi, .LC3[rip]
	test	rax, rax
	mov	r13, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	rsi, r13
	mov	rdi, r12
	call	SelectObject@PLT
	xor	edi, edi
	lea	rsi, .LC3[rip]
	cmp	rbp, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, rbp
	call	DeleteObject@PLT
	mov	esi, DWORD PTR PLANES[rip]
	mov	rdi, r12
	call	GetDeviceCaps@PLT
	xor	r8d, r8d
	mov	ecx, 1
	mov	esi, 10
	mov	edx, eax
	mov	edi, 10
	call	CreateBitmap@PLT
	xor	edi, edi
	lea	rsi, .LC4[rip]
	test	rax, rax
	mov	rbp, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	SelectObject@PLT
	xor	edi, edi
	lea	rsi, .LC3[rip]
	test	rax, rax
	mov	r13, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	rsi, r13
	mov	rdi, r12
	lea	r13, 48[rsp]
	call	SelectObject@PLT
	xor	edi, edi
	lea	rsi, .LC3[rip]
	cmp	rbp, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, rbp
	call	DeleteObject@PLT
	lea	rax, 68[rsp]
	mov	QWORD PTR 8[rsp], rax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	xor	edi, edi
	cmp	r15d, edx
	lea	rsi, .LC14[rip]
	sete	dil
	xor	eax, eax
	call	ok@PLT
.L6:
	mov	edx, DWORD PTR 40[rsp]
	xor	edi, edi
	lea	rsi, .LC15[rip]
	test	edx, edx
	sete	dil
	xor	eax, eax
	add	r13, 4
	call	ok@PLT
	mov	rdi, rbp
	call	DeleteObject@PLT
	cmp	r13, QWORD PTR 8[rsp]
	je	.L18
.L7:
	mov	esi, DWORD PTR PLANES[rip]
	mov	rdi, r12
	call	GetDeviceCaps@PLT
	mov	esi, DWORD PTR BITSPIXEL[rip]
	mov	rdi, r12
	mov	ebx, eax
	call	GetDeviceCaps@PLT
	mov	r15d, DWORD PTR 0[r13]
	xor	r8d, r8d
	mov	edx, ebx
	mov	esi, 10
	mov	edi, 10
	mov	DWORD PTR [rsp], eax
	mov	ecx, r15d
	call	CreateBitmap@PLT
	xor	edi, edi
	lea	rsi, .LC4[rip]
	test	rax, rax
	mov	rbp, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	SelectObject@PLT
	mov	r9d, DWORD PTR [rsp]
	mov	r8, rax
	cmp	r15d, r9d
	je	.L2
	cmp	r15d, 15
	jne	.L3
	cmp	r9d, 16
	je	.L2
.L3:
	xor	edi, edi
	test	r8, r8
	mov	ecx, r15d
	mov	edx, r9d
	sete	dil
	lea	rsi, .LC6[rip]
	xor	eax, eax
	call	ok@PLT
.L4:
	mov	edx, 28
	mov	esi, 170
	mov	rdi, r14
	call	memset@PLT
	mov	rdx, r14
	mov	esi, 28
	mov	rdi, rbp
	call	GetObjectW@PLT
	xor	edi, edi
	lea	rsi, .LC7[rip]
	cmp	eax, 28
	mov	edx, eax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	edx, DWORD PTR 16[rsp]
	xor	edi, edi
	lea	rsi, .LC8[rip]
	test	edx, edx
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	edx, DWORD PTR 20[rsp]
	xor	edi, edi
	lea	rsi, .LC9[rip]
	cmp	edx, 10
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	edx, DWORD PTR 24[rsp]
	xor	edi, edi
	lea	rsi, .LC10[rip]
	cmp	edx, 10
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	edx, DWORD PTR 28[rsp]
	mov	esi, DWORD PTR 32[rsp]
	mov	edi, DWORD PTR 20[rsp]
	mov	DWORD PTR [rsp], edx
	call	get_bitmap_stride@PLT
	mov	edx, DWORD PTR [rsp]
	xor	edi, edi
	lea	rsi, .LC11[rip]
	cmp	edx, eax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	edx, DWORD PTR 36[rsp]
	xor	edi, edi
	lea	rsi, .LC12[rip]
	cmp	edx, ebx
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	edx, DWORD PTR 32[rsp]
	cmp	r15d, 15
	jne	.L5
	xor	edi, edi
	cmp	edx, 16
	lea	rsi, .LC13[rip]
	sete	dil
	xor	eax, eax
	call	ok@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	test	r8, r8
	mov	ecx, r15d
	mov	edx, r9d
	mov	QWORD PTR [rsp], r8
	setne	dil
	lea	rsi, .LC5[rip]
	xor	eax, eax
	movzx	edi, dil
	call	ok@PLT
	mov	r8, QWORD PTR [rsp]
	mov	rdi, r12
	mov	rsi, r8
	call	SelectObject@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, r12
	call	DeleteDC@PLT
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_select_object, .-test_select_object
	.comm	PLANES,4,4
	.comm	BITSPIXEL,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_bitmap.c_test_select_object.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC1:
	.ascii	"GetDC(0) failed\012\000"
	.align	2
.LC2:
	.ascii	"CreateCompatibleBitmap failed\012\000"
	.align	2
.LC3:
	.ascii	"SelectObject should fail\012\000"
	.align	2
.LC4:
	.ascii	"SelectObject failed\012\000"
	.align	2
.LC5:
	.ascii	"CreateBitmap failed\012\000"
	.align	2
.LC6:
	.ascii	"SelectObject failed, BITSPIXEL: %d, created depth: "
	.ascii	"%d\012\000"
	.align	2
.LC7:
	.ascii	"SelectObject should fail. BITSPIXELS: %d, created d"
	.ascii	"epth: %d\012\000"
	.align	2
.LC8:
	.ascii	"GetObject returned %d\012\000"
	.align	2
.LC9:
	.ascii	"wrong bmType %d\012\000"
	.align	2
.LC10:
	.ascii	"wrong bmWidth %d\012\000"
	.align	2
.LC11:
	.ascii	"wrong bmHeight %d\012\000"
	.align	2
.LC12:
	.ascii	"wrong bmWidthBytes %d\012\000"
	.align	2
.LC13:
	.ascii	"wrong bmPlanes %u\012\000"
	.align	2
.LC14:
	.ascii	"wrong bmBitsPixel %d(15 bpp special)\012\000"
	.align	2
.LC15:
	.ascii	"wrong bmBitsPixel %d\012\000"
	.align	2
.LC16:
	.ascii	"wrong bmBits %p\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_select_object, %function
test_select_object:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	lr, .L15
	sub	sp, sp, #68
	add	ip, sp, #40
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	ldr	r2, .L15+4
	mov	r0, #0
	ldr	r2, [r2]
	str	r2, [sp, #60]
	mov	r2,#0
	str	r3, [ip]
	bl	GetDC
	mov	r4, r0
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r1, .L15+8
	bl	ok
	mov	r2, #10
	mov	r0, r4
	mov	r1, r2
	bl	CreateCompatibleBitmap
	mov	r5, r0
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r1, .L15+12
	bl	ok
	mov	r1, r5
	mov	r0, r4
	bl	SelectObject
	clz	r0, r0
	ldr	r1, .L15+16
	lsr	r0, r0, #5
	bl	ok
	mov	r0, r5
	bl	DeleteObject
	mov	r1, r4
	mov	r0, #0
	bl	ReleaseDC
	mov	r0, #0
	bl	CreateCompatibleDC
	mov	r6, r0
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r1, .L15+8
	bl	ok
	mov	r2, #10
	mov	r0, r6
	mov	r1, r2
	bl	CreateCompatibleBitmap
	mov	r4, r0
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r1, .L15+12
	bl	ok
	mov	r1, r4
	mov	r0, r6
	bl	SelectObject
	mov	r5, r0
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r1, .L15+20
	bl	ok
	mov	r1, r5
	mov	r0, r6
	bl	SelectObject
	sub	r0, r4, r0
	clz	r0, r0
	ldr	r1, .L15+20
	lsr	r0, r0, #5
	bl	ok
	mov	r0, r4
	bl	DeleteObject
	ldr	r3, .L15+24
	mov	r0, r6
	ldr	r1, [r3]
	bl	GetDeviceCaps
	mov	r1, #10
	mov	r3, #0
	mov	r2, r0
	str	r3, [sp]
	mov	r0, r1
	mov	r3, #1
	bl	CreateBitmap
	mov	r4, r0
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r1, .L15+28
	bl	ok
	mov	r1, r4
	mov	r0, r6
	bl	SelectObject
	mov	r5, r0
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r1, .L15+20
	bl	ok
	mov	r1, r5
	mov	r0, r6
	bl	SelectObject
	sub	r0, r4, r0
	clz	r0, r0
	ldr	r1, .L15+20
	lsr	r0, r0, #5
	bl	ok
	mov	r0, r4
	bl	DeleteObject
	ldr	fp, .L15+28
	add	r9, sp, #40
	b	.L7
.L13:
	cmp	r5, #15
	cmpeq	r7, #16
	beq	.L2
	clz	r0, r0
	mov	r2, r7
	mov	r3, r5
	ldr	r1, .L15+32
	lsr	r0, r0, #5
	bl	ok
.L4:
	mov	r2, #28
	mov	r1, #170
	add	r0, sp, #12
	bl	memset
	mov	r1, #28
	add	r2, sp, #12
	mov	r0, r4
	bl	GetObjectW
	mov	r2, r0
	sub	r0, r0, #28
	clz	r0, r0
	ldr	r1, .L15+36
	lsr	r0, r0, #5
	bl	ok
	ldr	r2, [sp, #12]
	ldr	r1, .L15+40
	clz	r0, r2
	lsr	r0, r0, #5
	bl	ok
	ldr	r2, [sp, #16]
	ldr	r1, .L15+44
	sub	r0, r2, #10
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r2, [sp, #20]
	ldr	r1, .L15+48
	sub	r0, r2, #10
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r1, [sp, #28]
	ldr	r0, [sp, #16]
	ldr	r7, [sp, #24]
	bl	get_bitmap_stride
	sub	r0, r7, r0
	clz	r0, r0
	ldr	r2, [sp, #24]
	ldr	r1, .L15+52
	lsr	r0, r0, #5
	bl	ok
	ldr	r2, [sp, #32]
	ldr	r1, .L15+56
	sub	r0, r2, r8
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r2, [sp, #28]
	cmp	r5, #15
	subeq	r0, r2, #16
	subne	r0, r5, r2
	clz	r0, r0
	ldreq	r1, .L15+60
	ldrne	r1, .L15+64
	lsr	r0, r0, #5
	bl	ok
	ldr	r2, [sp, #36]
	ldr	r1, .L15+68
	clz	r0, r2
	lsr	r0, r0, #5
	bl	ok
	mov	r0, r4
	bl	DeleteObject
	add	r3, sp, #60
	cmp	r9, r3
	beq	.L12
.L7:
	ldr	r3, .L15+24
	mov	r0, r6
	ldr	r1, [r3]
	bl	GetDeviceCaps
	ldr	r3, .L15+72
	mov	r8, r0
	ldr	r1, [r3]
	mov	r0, r6
	bl	GetDeviceCaps
	mov	r1, #10
	mov	r3, #0
	ldr	r5, [r9], #4
	mov	r2, r8
	mov	r7, r0
	str	r3, [sp]
	mov	r0, r1
	mov	r3, r5
	bl	CreateBitmap
	mov	r4, r0
	subs	r0, r0, #0
	movne	r0, #1
	mov	r1, fp
	bl	ok
	mov	r1, r4
	mov	r0, r6
	bl	SelectObject
	cmp	r5, r7
	mov	r10, r0
	bne	.L13
.L2:
	subs	r0, r10, #0
	mov	r2, r7
	mov	r3, r5
	movne	r0, #1
	ldr	r1, .L15+76
	bl	ok
	mov	r1, r10
	mov	r0, r6
	bl	SelectObject
	b	.L4
.L12:
	mov	r0, r6
	bl	DeleteDC
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [sp, #60]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LANCHOR0
	.word	.LC17
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	PLANES
	.word	.LC5
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	BITSPIXEL
	.word	.LC6
	.size	test_select_object, .-test_select_object
	.comm	PLANES,4,4
	.comm	BITSPIXEL,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
.LC0:
	.word	8
	.word	15
	.word	16
	.word	24
	.word	32
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
