	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_graphics_device_bounds
_get_graphics_device_bounds:            ## @get_graphics_device_bounds
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_Ok@GOTPCREL(%rip), %r12
	movq	(%r12), %r14
	movq	16(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	leaq	-48(%rbp), %rsi
	callq	_GetClientRect
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	movl	-48(%rbp), %eax
	movl	%eax, (%r15)
	movl	-44(%rbp), %ecx
	movl	%ecx, 4(%r15)
	movl	-40(%rbp), %edx
	subl	%eax, %edx
	movl	%edx, 8(%r15)
	movl	-36(%rbp), %eax
	subl	%ecx, %eax
LBB0_14:
	movl	%eax, 12(%r15)
	jmp	LBB0_15
LBB0_3:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.4:
	leaq	-48(%rbp), %rdx
	movq	%r15, %rsi
	callq	_GdipGetImageBounds
	movq	%rax, %r14
	cmpq	(%r12), %rax
	jne	LBB0_15
## %bb.5:
	movq	-48(%rbp), %rsi
	movq	_UnitPixel@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_15
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_FIXME
	jmp	LBB0_15
LBB0_7:
	movq	_GenericError@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_15
LBB0_8:
	movl	(%rbx), %edi
	callq	_GetObjectType
	movq	_OBJ_MEMDC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.9:
	movq	$0, (%r15)
	movl	(%rbx), %edi
	movq	_OBJ_BITMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetCurrentObject
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	leaq	-48(%rbp), %rdx
	movq	%rax, %rdi
	movl	$8, %esi
	callq	_GetObjectW
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movl	-48(%rbp), %eax
	movl	%eax, 8(%r15)
	movl	-44(%rbp), %eax
	jmp	LBB0_14
LBB0_12:
	movq	$0, (%r15)
	movl	(%rbx), %edi
	movq	_HORZRES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetDeviceCaps
	movl	%eax, 8(%r15)
	movl	(%rbx), %edi
	movq	_VERTRES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetDeviceCaps
	movl	%eax, 12(%r15)
LBB0_15:
	movq	%r14, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	$1, 8(%r15)
	movl	$1, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_Ok,8,3                         ## @Ok
	.comm	_GenericError,8,3               ## @GenericError
	.comm	_UnitPixel,8,3                  ## @UnitPixel
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"need to convert from unit %i\n"

	.comm	_OBJ_MEMDC,8,3                  ## @OBJ_MEMDC
	.comm	_OBJ_BITMAP,4,2                 ## @OBJ_BITMAP
	.comm	_HORZRES,4,2                    ## @HORZRES
	.comm	_VERTRES,4,2                    ## @VERTRES
	.no_dead_strip	_get_graphics_device_bounds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_graphics_device_bounds
_get_graphics_device_bounds:            ; @get_graphics_device_bounds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _Ok@GOTPAGE
Lloh1:
	ldr	x22, [x22, _Ok@GOTPAGEOFF]
	ldr	x19, [x22]
	ldr	x0, [x0, #16]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x1, sp
	bl	_GetClientRect
	cbz	w0, LBB0_7
; %bb.2:
	ldp	d0, d1, [sp]
	sub.2s	v1, v1, v0
	stp	d0, d1, [x20]
	b	LBB0_14
LBB0_3:
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_8
; %bb.4:
	mov	x2, sp
	mov	x1, x20
	bl	_GdipGetImageBounds
	mov	x19, x0
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.5:
	ldr	x1, [sp]
Lloh2:
	adrp	x8, _UnitPixel@GOTPAGE
Lloh3:
	ldr	x8, [x8, _UnitPixel@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x1, x8
	b.eq	LBB0_14
; %bb.6:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
	b	LBB0_14
LBB0_7:
Lloh7:
	adrp	x8, _GenericError@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GenericError@GOTPAGEOFF]
Lloh9:
	ldr	x19, [x8]
	b	LBB0_14
LBB0_8:
	ldr	w0, [x21]
	bl	_GetObjectType
Lloh10:
	adrp	x8, _OBJ_MEMDC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _OBJ_MEMDC@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.9:
	str	xzr, [x20]
	ldr	w0, [x21]
Lloh13:
	adrp	x8, _OBJ_BITMAP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _OBJ_BITMAP@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_GetCurrentObject
	cbz	x0, LBB0_13
; %bb.10:
	mov	x2, sp
	mov	w1, #8
	bl	_GetObjectW
	cbz	x0, LBB0_13
; %bb.11:
	ldp	w8, w9, [sp]
	stp	w8, w9, [x20, #8]
	b	LBB0_14
LBB0_12:
	str	xzr, [x20]
	ldr	w0, [x21]
Lloh16:
	adrp	x8, _HORZRES@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HORZRES@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_GetDeviceCaps
	str	w0, [x20, #8]
	ldr	w0, [x21]
Lloh19:
	adrp	x8, _VERTRES@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VERTRES@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_GetDeviceCaps
	str	w0, [x20, #12]
	b	LBB0_14
LBB0_13:
	mov	w8, #1
	stp	w8, w8, [x20, #8]
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_Ok,8,3                         ; @Ok
	.comm	_GenericError,8,3               ; @GenericError
	.comm	_UnitPixel,8,3                  ; @UnitPixel
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"need to convert from unit %i\n"

	.comm	_OBJ_MEMDC,8,3                  ; @OBJ_MEMDC
	.comm	_OBJ_BITMAP,4,2                 ; @OBJ_BITMAP
	.comm	_HORZRES,4,2                    ; @HORZRES
	.comm	_VERTRES,4,2                    ; @VERTRES
	.no_dead_strip	_get_graphics_device_bounds
.subsections_via_symbols
