	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ximage_realloc
_ximage_realloc:                        ## @ximage_realloc
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	_xlib_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_XLockDisplay
	movq	_ximage@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_XDestroyImage
LBB0_2:
	movq	$0, (%r12)
	movq	_scr_w@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_scr_h@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %edi
	imull	%ebx, %edi
	movl	$4, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_ZPixmap@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	$24, %edx
	xorl	%r8d, %r8d
	movq	%rax, %r9
	pushq	$0
	pushq	$32
	pushq	%r15
	pushq	%rbx
	callq	_XCreateImage
	addq	$32, %rsp
	movq	%rax, (%r12)
	testq	%rax, %rax
	jne	LBB0_5
LBB0_4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
LBB0_5:
	movq	_xlib_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_XUnlockDisplay                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_xlib_display,4,2               ## @xlib_display
	.comm	_ximage,8,3                     ## @ximage
	.comm	_scr_w,4,2                      ## @scr_w
	.comm	_scr_h,4,2                      ## @scr_h
	.comm	_ZPixmap,4,2                    ## @ZPixmap
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to alloc ximage\n"

	.no_dead_strip	_ximage_realloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ximage_realloc
_ximage_realloc:                        ; @ximage_realloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _xlib_display@GOTPAGE
Lloh1:
	ldr	x23, [x23, _xlib_display@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_XLockDisplay
Lloh2:
	adrp	x24, _ximage@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ximage@GOTPAGEOFF]
	ldr	x0, [x24]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_XDestroyImage
LBB0_2:
Lloh4:
	adrp	x8, _scr_w@GOTPAGE
Lloh5:
	ldr	x8, [x8, _scr_w@GOTPAGEOFF]
	str	xzr, [x24]
Lloh6:
	ldr	w21, [x8]
Lloh7:
	adrp	x8, _scr_h@GOTPAGE
Lloh8:
	ldr	x8, [x8, _scr_h@GOTPAGEOFF]
Lloh9:
	ldr	w22, [x8]
	mul	w0, w22, w21
	mov	w1, #4
	bl	_calloc
	cbz	x0, LBB0_4
; %bb.3:
	mov	x5, x0
Lloh10:
	adrp	x8, _ZPixmap@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ZPixmap@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	w8, #32
	str	x8, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #24
	mov	w4, #0
	mov	x6, x21
	mov	x7, x22
	bl	_XCreateImage
	str	x0, [x24]
	cbnz	x0, LBB0_5
LBB0_4:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_5:
	ldr	w0, [x23]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_XUnlockDisplay
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_xlib_display,4,2               ; @xlib_display
	.comm	_ximage,8,3                     ; @ximage
	.comm	_scr_w,4,2                      ; @scr_w
	.comm	_scr_h,4,2                      ; @scr_h
	.comm	_ZPixmap,4,2                    ; @ZPixmap
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to alloc ximage\n"

	.no_dead_strip	_ximage_realloc
.subsections_via_symbols
