# # pnmscale.S from pnmscale.c with -O2 1 11 # vim: set ts=8 sw=8: 4 5 6 7 8 9 0 11 # 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1 # # original C codes are insterted like below (NNN is line number) # ##-NNN for (row = 0; row < newrows; ++row) # # some names of local variable are renamed to caller names # ##-434 makeRow() # xelrow ---> vertScaledRow # maxval ---> newmaxval # ##-280 horizontal_scale() # maxval ---> newmaxval # other aliases are recoded in: #_____VARIABLE_NAME_CONVERSION______ # # # these are typedefs described in other files # # //// in lib/pgm.h //// # typedef unsigned int gray; # //// in lib/ppm.h //// # typedef gray pixval; # typedef struct { # pixval r, g, b; # } pixel; # //// in lib/pnm.h //// # typedef pixel xel; # typedef pixval xelval; # # # FPU stack condition is described like below # #_ST1_# row #_ST0_# yscale # # by att notation # !! take care about fsub/fdiv/fmul/etc # !! the notation of operands and function is different from the manual, like # # fdivrp %st(1) <== FDIVP ST(i),ST(0) ... ST(1)=ST(1)/ST(0) # # # about operand size: # about integer (postfix-l means 32bit) # fiLDLL --- load m64int (used for loading unsigned int) # fildl, fimull, fidivl, etc --- load/calc m32int # about floting point (postfix-l means 64bit) # fLDL / fSTL / fSTPL --- load/store m64fp (double) # flds / fsts / fstps --- load/store m32fp (single) # # # other M_memorandums_M are written at the bottom of the file # .text .globl main .align 16, 0x90 .type main,@function ############################################################################### .equ TRUNC, 0xC7F # single precision, truncate .equ Fminus1_0, 0xBF800000 # -1.0 (single precition, -1082130432) ############################################################################### # # working memory on stack, offset from %esp # .equ m0x000_P1, 0x000 # func param 1 .equ m0x004_P2, 0x004 # func param 2 .equ m0x008_P3, 0x008 # func param 3 .equ m0x00c_P4, 0x00c # func param 4 .equ m0x010_P5, 0x010 # func param 5 .equ m0x014_P6, 0x014 # func param 6 #### m0x018__XXX, xx0x018 # --- .equ m0x01c_vertScaledRow_COLSminus1_g, 0x01c # &vertScaledRow[cols-1].g .equ m0x020_vertScaledRow_COLSminus1_r, 0x020 # &vertScaledRow[cols-1].r .equ m0x024_vertScaledRow_COLSminus1_b, 0x024 # &vertScaledRow[cols-1].b .equ m0x028_vertScaledRow_ZERO_b, 0x028 # &vertScaledRow[0].b .equ m0x02c_newcols_MINUS_1, 0x02c # (newcols-1) .equ m0x030_newxelrow, 0x030 # &newxelrow[0] .equ m0x034_rowsleft, 0x034 # rowsleft (single) .equ m0x038_xelrow_ZERO, 0x038 # &xelrow[0] .equ m0x03c_row, 0x03c # row .equ m0x040_verbose, 0x040 # verbose .equ m0x044_newxelrow_ZERO_b, 0x044 # &newxelrow[0].b .equ m0x048_rows, 0x048 # rows .equ m0x04c_rowsread, 0x04c # rowsread .equ m0x050_bs, 0x050 # &bs[0] .equ m0x054_rs, 0x054 # &rs[0] .equ m0x058_xelrow_ZERO_b, 0x058 # &xelrow[0].b .equ m0x05c_gs, 0x05c # &gs[0] .equ m0x060_vertScaledRow, 0x060 # &vertScaledRow[0] .equ m0x064_col, 0x064 # col .equ m0x068_newrows, 0x068 # newrows .equ m0x06c_newformat, 0x06c # newformat .equ m0x070_yscale, 0x070 # yscale (double) #### m0x074__HIGH, hh0x074 # (high) .equ m0x078_xscale, 0x078 # xscale (double) #### m0x07c__HIGH, hh0x07c # (high) .equ m0x080_newcols, 0x080 # newcols #### m0x084__MULTI__, __0x084 # [MULTI USE] .equ _m0x084_row, 0x084 # [use as] row .equ _m0x084_vertScaledRow_col_g, 0x084 # [use as] vertScaledRow[col].g .equ _m0x084_tmp_float, 0x084 # [use as] tmp_float #### m0x088__MULTI__, __0x088 # [MULTI USE] .equ _m0x088_newxelrow, 0x088 # [use as] &newxelrow[0] .equ _m0x088_vertScaledRow_col_r, 0x088 # [use as] vertScaledRow[col].r .equ _m0x088_some_float, 0x088 # [use as] some_float .equ m0x08c_format, 0x08c # format #### m0x090__MULTI__, __0x090 # [MULTI USE] .equ _m0x090_newcols, 0x090 # [use as] newcol .equ _m0x090_fracrowtofill, 0x090 # [use as] fracrowtofill (double) .equ _m0x090_col, 0x090 # [use as] col .equ _m0x090_b, 0x090 # [use as] b (single) #### m0x094__HIGH, hh0x094 # (high) .equ m0x098_ifP, 0x098 # ifP .equ m0x09c_cols, 0x09c # cols #### m0x0a0__MULTI__, __0x0a0 # [MULTI USE] .equ _m0x0a0_tmp_double, 0x0a0 # [use as] tmp_double (scale_parm) .equ _m0x0a0_inputRow, 0x0a0 # [use as] inputRow .equ _m0x0a0_cF_0_5, 0x0a0 # [use as] 0.5 #### m0x0a4__HIGH, hh0x0a4 # (high) #### m0x0a8__MULTI__, __0x0a8 # [MULTI USE] .equ _m0x0a8_cF_minus_1_0, 0x0a8 # [use as] -1.0 .equ _m0x0a8_newmaxval, 0x0a8 # [use as] newmaxval .equ m0x0ac_tmp_cw, 0x0ac # tmp_cw .equ m0x0ae_tmp_cw, 0x0ae # tmp_cw .equ m0x0b0_tmp_cw, 0x0b0 # tmp_cw .equ m0x0b2_tmp_cw, 0x0b2 # tmp_cw .equ m0x0b4_tmp_cw, 0x0b4 # tmp_cw .equ m0x0b6_tmp_cw, 0x0b6 # tmp_cw .equ m0x0b8_tmp_cw, 0x0b8 # tmp_cw .equ m0x0ba_tmp_cw, 0x0ba # tmp_cw .equ m0x0bc_tmp_cw, 0x0bc # tmp_cw .equ m0x0be_tmp_cw, 0x0be # tmp_cw .equ m0x0c0_tmp_cw, 0x0c0 # tmp_cw .equ m0x0c2_tmp_cw, 0x0c2 # tmp_cw .equ m0x0c4_tmp_cw, 0x0c4 # tmp_cw .equ m0x0c6_tmp_cw, 0x0c6 # tmp_cw .equ m0x0c8_tmp_cw, 0x0c8 # tmp_cw .equ m0x0ca_tmp_cw, 0x0ca # tmp_cw .equ m0x0cc_tmp_cw, 0x0cc # tmp_cw .equ m0x0ce_tmp_cw, 0x0ce # tmp_cw .equ m0x0d0_tmp_cw, 0x0d0 # tmp_cw .equ m0x0d2_tmp_cw, 0x0d2 # tmp_cw .equ m0x0d4_tmp_cw, 0x0d4 # tmp_cw .equ m0x0d6_tmp_cw, 0x0d6 # tmp_cw .equ m0x0d8_tmpLL, 0x0d8 # tmpLL .equ m0x0dc_tmpLL_high, 0x0dc # tmpLL_high #### m0x0e0__XXX, xx0x0e0 # --- .equ m0x0e4_tmp_int, 0x0e4 # tmp_int .equ m0x0e8_tmpLL, 0x0e8 # tmpLL .equ m0x0ec_tmpLL_high, 0x0ec # tmpLL_high .equ m0x0f0_tmpLL, 0x0f0 # tmpLL .equ m0x0f4_tmpLL_high, 0x0f4 # tmpLL_high .equ m0x0f8_tmpLL, 0x0f8 # tmpLL .equ m0x0fc_tmpLL_high, 0x0fc # tmpLL_high #### m0x100__XXX, xx0x100 # --- .equ m0x104_tmp_int, 0x104 # tmp_int .equ m0x108_tmp_int, 0x108 # tmp_int .equ m0x10c_tmp_int, 0x10c # tmp_int .equ m0x110_tmpLL, 0x110 # tmpLL .equ m0x114_tmpLL_high, 0x114 # tmpLL_high .equ m0x118_tmpLL, 0x118 # tmpLL .equ m0x11c_tmpLL_high, 0x11c # tmpLL_high .equ m0x120_tmpLL, 0x120 # tmpLL .equ m0x124_tmpLL_high, 0x124 # tmpLL_high .equ m0x128_tmpLL, 0x128 # tmpLL .equ m0x12c_tmpLL_high, 0x12c # tmpLL_high #### m0x130__XXX, xx0x130 # --- .equ m0x134_tmp_int, 0x134 # tmp_int .equ m0x138_tmpLL, 0x138 # tmpLL .equ m0x13c_tmpLL_high, 0x13c # tmpLL_high .equ m0x140_tmpLL, 0x140 # tmpLL .equ m0x144_tmpLL_high, 0x144 # tmpLL_high .equ m0x148_tmpLL, 0x148 # tmpLL .equ m0x14c_tmpLL_high, 0x14c # tmpLL_high #### m0x150__XXX, xx0x150 # --- .equ m0x154_tmp_int, 0x154 # tmp_int .equ m0x158_tmp_int, 0x158 # tmp_int .equ m0x15c_tmp_int, 0x15c # tmp_int .equ m0x160_tmp_int, 0x160 # tmp_int .equ m0x164_tmp_int, 0x164 # tmp_int .equ m0x168_tmp_int, 0x168 # tmp_int .equ m0x16c_tmp_int, 0x16c # tmp_int .equ m0x170_tmpLL, 0x170 # tmpLL .equ m0x174_tmpLL_high, 0x174 # tmpLL_high .equ m0x178_tmpLL, 0x178 # tmpLL .equ m0x17c_tmpLL_high, 0x17c # tmpLL_high .equ m0x180_tmpLL, 0x180 # tmpLL .equ m0x184_tmpLL_high, 0x184 # tmpLL_high .equ m0x188_tmpLL, 0x188 # tmpLL .equ m0x18c_tmpLL_high, 0x18c # tmpLL_high .equ m0x190_tmpLL, 0x190 # tmpLL .equ m0x194_tmpLL_high, 0x194 # tmpLL_high .equ m0x198_tmpLL, 0x198 # tmpLL .equ m0x19c_tmpLL_high, 0x19c # tmpLL_high .equ m0x1a0_tmpLL, 0x1a0 # tmpLL .equ m0x1a4_tmpLL_high, 0x1a4 # tmpLL_high .equ m0x1a8_tmpLL, 0x1a8 # tmpLL .equ m0x1ac_tmpLL_high, 0x1ac # tmpLL_high #### m0x1b0__XXX, xx0x1b0 # --- .equ m0x1b4_tmp_int, 0x1b4 # tmp_int .equ m0x1b8_tmp_int, 0x1b8 # tmp_int .equ m0x1bc_tmp_int, 0x1bc # tmp_int .equ m0x1c0_tmp_int, 0x1c0 # tmp_int .equ m0x1c4_tmp_int, 0x1c4 # tmp_int .equ m0x1c8_tmp_int, 0x1c8 # tmp_int .equ m0x1cc_tmp_int, 0x1cc # tmp_int .equ m0x1d0_tmp_int, 0x1d0 # tmp_int .equ m0x1d4_tmp_int, 0x1d4 # tmp_int .equ m0x1d8_tmp_int, 0x1d8 # tmp_int .equ m0x1dc_tmp_int, 0x1dc # tmp_int .equ m0x1e0_tmp_int, 0x1e0 # tmp_int .equ m0x1e4_tmp_int, 0x1e4 # tmp_int .equ m0x1e8_tmp_int, 0x1e8 # tmp_int .equ m0x1ec_tmp_int, 0x1ec # tmp_int .equ m0x1f0_tmpLL, 0x1f0 # tmpLL .equ m0x1f4_tmpLL_high, 0x1f4 # tmpLL_high #### m0x1f8__XXX, xx0x1f8 # --- .equ m0x1fc_tmp_int, 0x1fc # tmp_int .equ m0x200_tmp_int, 0x200 # tmp_int .equ m0x204_tmp_int, 0x204 # tmp_int .equ m0x208_tmp_int, 0x208 # tmp_int .equ m0x20c_tmp_int, 0x20c # tmp_int .equ m0x210_tmpLL, 0x210 # tmpLL .equ m0x214_tmpLL_high, 0x214 # tmpLL_high .equ m0x218_tmp_int, 0x218 # tmp_int .equ m0x21c_tmp_int, 0x21c # tmp_int .equ m0x220_tmp_int, 0x220 # tmp_int .equ m0x224_tmp_int, 0x224 # tmp_int .equ m0x228_tmp_int, 0x228 # tmp_int .equ m0x22c_tmp_int, 0x22c # tmp_int .equ m0x230_tmp_int, 0x230 # tmp_int .equ m0x234_tmp_int, 0x234 # tmp_int .equ m0x238_tmpLL, 0x238 # tmpLL .equ m0x23c_tmpLL_high, 0x23c # tmpLL_high .equ m0x240_tmpLL, 0x240 # tmpLL .equ m0x244_tmpLL_high, 0x244 # tmpLL_high .equ m0x248_tmpLL, 0x248 # tmpLL .equ m0x24c_tmpLL_high, 0x24c # tmpLL_high #### m0x250__XXX, xx0x250 # --- .equ m0x254_tmp_int, 0x254 # tmp_int .equ m0x258_tmp_int, 0x258 # tmp_int .equ m0x25c_tmp_int, 0x25c # tmp_int .equ m0x260_tmp_int, 0x260 # tmp_int .equ m0x264_tmp_int, 0x264 # tmp_int .equ m0x268_tmp_int, 0x268 # tmp_int .equ m0x26c_tmp_float, 0x26c # tmp_float (scale_parm) (to round to single) .equ m0x270_tmp_float, 0x270 # tmp_float (scale_parm) (to round to single) .equ m0x274_tmp_reduce, 0x274 # tmp_reduce .equ m0x278_maxval, 0x278 # maxval .equ m0x27c_format, 0x27c # format .equ m0x280_cols, 0x280 # cols .equ m0x284_rows, 0x284 # rows .equ m0x288_cmdline_input_filespec, 0x288 # cmdline.input_filespec .equ m0x28c_cmdline_xsize, 0x28c # cmdline.xsize .equ m0x290_cmdline_ysize, 0x290 # cmdline.ysize .equ m0x294_cmdline_xscale, 0x294 # cmdline.xscale .equ m0x298_cmdline_yscale, 0x298 # cmdline.yscale .equ m0x29c_cmdline_xbox, 0x29c # cmdline.xbox .equ m0x2a0_cmdline_ybox, 0x2a0 # cmdline.ybox .equ m0x2a4_cmdline_pixels, 0x2a4 # cmdline.pixels .equ m0x2a8_cmdline_verbose, 0x2a8 # cmdline.verbose .equ m0x2ac_cmdline_nomix, 0x2ac # cmdline.nomix #### m0x2b0__XXX, xx0x2b0 # --- .equ m0x2b4_argc, 0x2b4 # argc .equ m0x2b8_endptr, 0x2b8 # endptr .equ m0x2bc_yscale, 0x2bc # yscale .equ m0x2c0_xscale, 0x2c0 # xscale .equ m0x2c4_reduce, 0x2c4 # reduce .equ m0x2c8_pixels, 0x2c8 # pixels .equ m0x2cc_ysize, 0x2cc # ysize .equ m0x2d0_xsize, 0x2d0 # xsize .equ m0x2d4_xysize, 0x2d4 # xysize .equ m0x2d8_opt_short_allowed, 0x2d8 # opt.short_allowed (uchar) .equ m0x2d9_opt_allowNegNum, 0x2d9 # opt.allowNegNum (uchar) .equ m0x2dc_opt_opt_table, 0x2dc # opt.opt_table .equ m0x2e0_argc, 0x2e0 # argc #### m0x2e4__XXX, xx0x2e4 # --- .equ m0x2e8_size, 0x2e8 # working memory size (boundary 8byte) ############################################################################### ##-034 struct cmdline_info { ##-038 const char *input_filespec; ##-039 unsigned int xsize; ##-040 unsigned int ysize; ##-041 float xscale; ##-042 float yscale; ##-043 unsigned int xbox; ##-044 unsigned int ybox; ##-045 unsigned int pixels; ##-046 unsigned int verbose; ##-047 unsigned int nomix; ##-048 }; #c# +-----------+-----------+-----------+-----------+-----------+-----------+ #c# | .shortName| .longName | .type | .arg | .specified| .flags | #c# +-----------+-----------+-----------+-----------+-----------+-----------+ #c# | (none) | +0x4 | +0x8 | +0xc | +0x10 | +0x14 | #c# | +0x18 | +0x1c | +0x20 | +0x24 | +0x28 | +0x2c | #c# | +0x30 | +0x34 | +0x38 | +0x3c | +0x40 | +0x44 | #c# | +0x48 | +0x4c | +0x50 | +0x54 | +0x58 | +0x5c | #c# | +0x60 | +0x64 | +0x68 | +0x6c | +0x70 | +0x74 | #c# | +0x78 | +0x7c | +0x80 | +0x84 | +0x88 | +0x8c | #c# | +0x90 | +0x94 | +0x98 | +0x9c | +0xa0 | +0xa4 | #c# | +0xa8 | +0xac | +0xb0 | +0xb4 | +0xb8 | +0xbc | #c# | +0xc0 | +0xc4 | +0xc8 | +0xcc | +0xd0 | +0xd4 | #c# | +0xd8 | +0xdc | +0xe0 | +0xe4 | +0xe8 | +0xec | #c# | +0xf0 | +0xf4 | +0xf8 | +0xfc | +0x100 | +0x104 | #c# +-----------+-----------+-----------+-----------+-----------+-----------+ #c# | +0x108 | +0x10c | +0x110 | +0x114 | +0x118 | +0x11c | #c# +-----------+-----------+-----------+-----------+-----------+-----------+ .equ n0x000__0_shortName, 0x000 # [ 0].shortName .equ n0x004__0_longName, 0x004 # [ 0].longName .equ n0x008__0_type, 0x008 # [ 0].type .equ n0x00c__0_arg, 0x00c # [ 0].arg .equ n0x010__0_specified, 0x010 # [ 0].specified .equ n0x014__0_flags, 0x014 # [ 0].flags .equ n0x018__1_shortName, 0x018 # [ 1].shortName .equ n0x01c__1_longName, 0x01c # [ 1].longName .equ n0x020__1_type, 0x020 # [ 1].type .equ n0x024__1_arg, 0x024 # [ 1].arg .equ n0x028__1_specified, 0x028 # [ 1].specified .equ n0x02c__1_flags, 0x02c # [ 1].flags .equ n0x030__2_shortName, 0x030 # [ 2].shortName .equ n0x034__2_longName, 0x034 # [ 2].longName .equ n0x038__2_type, 0x038 # [ 2].type .equ n0x03c__2_arg, 0x03c # [ 2].arg .equ n0x040__2_specified, 0x040 # [ 2].specified .equ n0x044__2_flags, 0x044 # [ 2].flags .equ n0x048__3_shortName, 0x048 # [ 3].shortName .equ n0x04c__3_longName, 0x04c # [ 3].longName .equ n0x050__3_type, 0x050 # [ 3].type .equ n0x054__3_arg, 0x054 # [ 3].arg .equ n0x058__3_specified, 0x058 # [ 3].specified .equ n0x05c__3_flags, 0x05c # [ 3].flags .equ n0x060__4_shortName, 0x060 # [ 4].shortName .equ n0x064__4_longName, 0x064 # [ 4].longName .equ n0x068__4_type, 0x068 # [ 4].type .equ n0x06c__4_arg, 0x06c # [ 4].arg .equ n0x070__4_specified, 0x070 # [ 4].specified .equ n0x074__4_flags, 0x074 # [ 4].flags .equ n0x078__5_shortName, 0x078 # [ 5].shortName .equ n0x07c__5_longName, 0x07c # [ 5].longName .equ n0x080__5_type, 0x080 # [ 5].type .equ n0x084__5_arg, 0x084 # [ 5].arg .equ n0x088__5_specified, 0x088 # [ 5].specified .equ n0x08c__5_flags, 0x08c # [ 5].flags .equ n0x090__6_shortName, 0x090 # [ 6].shortName .equ n0x094__6_longName, 0x094 # [ 6].longName .equ n0x098__6_type, 0x098 # [ 6].type .equ n0x09c__6_arg, 0x09c # [ 6].arg .equ n0x0a0__6_specified, 0x0a0 # [ 6].specified .equ n0x0a4__6_flags, 0x0a4 # [ 6].flags .equ n0x0a8__7_shortName, 0x0a8 # [ 7].shortName .equ n0x0ac__7_longName, 0x0ac # [ 7].longName .equ n0x0b0__7_type, 0x0b0 # [ 7].type .equ n0x0b4__7_arg, 0x0b4 # [ 7].arg .equ n0x0b8__7_specified, 0x0b8 # [ 7].specified .equ n0x0bc__7_flags, 0x0bc # [ 7].flags .equ n0x0c0__8_shortName, 0x0c0 # [ 8].shortName .equ n0x0c4__8_longName, 0x0c4 # [ 8].longName .equ n0x0c8__8_type, 0x0c8 # [ 8].type .equ n0x0cc__8_arg, 0x0cc # [ 8].arg .equ n0x0d0__8_specified, 0x0d0 # [ 8].specified .equ n0x0d4__8_flags, 0x0d4 # [ 8].flags .equ n0x0d8__9_shortName, 0x0d8 # [ 9].shortName .equ n0x0dc__9_longName, 0x0dc # [ 9].longName .equ n0x0e0__9_type, 0x0e0 # [ 9].type .equ n0x0e4__9_arg, 0x0e4 # [ 9].arg .equ n0x0e8__9_specified, 0x0e8 # [ 9].specified .equ n0x0ec__9_flags, 0x0ec # [ 9].flags .equ n0x0f0_10_shortName, 0x0f0 # [10].shortName .equ n0x0f4_10_longName, 0x0f4 # [10].longName .equ n0x0f8_10_type, 0x0f8 # [10].type .equ n0x0fc_10_arg, 0x0fc # [10].arg .equ n0x100_10_specified, 0x100 # [10].specified .equ n0x104_10_flags, 0x104 # [10].flags .equ n0x110_11_type, 0x110 # [11].type (for endmark) ############################################################################### # # main() started (sub-functions are all static, so unroled in here) # main: # @main ##-684 int ##-685 main(int argc, char **argv ) ##-685 { ##-687 struct cmdline_info cmdline; ##-688 FILE* ifP; ##-689 int rows, cols, format, newformat, newrows, newcols; ##-690 xelval maxval, newmaxval; ##-691 float xscale, yscale; pushl %ebp #ii# movl %esp, %ebp #ii# pushl %ebx #ii# pushl %edi #ii# pushl %esi #ii# andl $0xfffffff8, %esp #ii# (boundary 8byte) nop # padding for operand size difference of above andl nop # /usr/local/bin/pnmscale uses imm32: 81 e4 f8 ff ff ff nop # now imm8(sign-extended) generated: 83 e4 f8 subl $m0x2e8_size, %esp #ii# alloc mem on stack movl 8(%ebp), %eax #ii# %eax is: argc movl %eax, m0x2b4_argc(%esp) #ii# %eax is: argc ##-693 pnm_init( &argc, argv ); movl 12(%ebp), %esi #ii# %esi is: argv movl %esi, m0x004_P2(%esp) #ii# %esi is: argv leal m0x2b4_argc(%esp), %eax #ii# %eax is: &argc movl %eax, m0x000_P1(%esp) #ii# calll pnm_init #ii# movl m0x2b4_argc(%esp), %eax #ii# %eax is: argc movl %eax, m0x2e0_argc(%esp) #ii# ##-695 parse_command_line(argc, argv, &cmdline); ############################################################################### ##-051 static void ##-052 parse_command_line(int argc, char ** argv, ##-053 struct cmdline_info *cmdline_p) #_____VARIABLE_NAME_CONVERSION______ # _caller_side____::_callie_side____ # cmdline == cmdline_p <== ! ##-053 { ##-061 optStruct3 opt; ##-058 optEntry *option_def = malloc( 100*sizeof( optEntry ) ); movl $2400, m0x000_P1(%esp) #ii# 100*24 = 0x960 calll malloc #ii# ##-063 unsigned int option_def_index; ##-064 unsigned int xysize; ##-065 int xsize, ysize, pixels; ##-066 int reduce; ##-067 float xscale, yscale, scale_parm; ##-069 option_def_index = 0; ##-070 OPTENT3(0, "xsize", OPT_UINT, &xsize, NULL, 0); movl $0, n0x010__0_specified(%eax) #ii# movb $0, n0x000__0_shortName(%eax) #ii# movl $.str_08, n0x004__0_longName(%eax) #ii# "xsize" movl $4, n0x008__0_type(%eax) #ii# leal m0x2d0_xsize(%esp), %ecx #ii# movl %ecx, n0x00c__0_arg(%eax) #ii# movl $0, n0x014__0_flags(%eax) #ii# ##-071 OPTENT3(0, "width", OPT_UINT, &xsize, NULL, 0); movl $0, n0x028__1_specified(%eax) #ii# movb $0, n0x018__1_shortName(%eax) #ii# movl $.str_09, n0x01c__1_longName(%eax) #ii# "width" movl $4, n0x020__1_type(%eax) #ii# movl %ecx, n0x024__1_arg(%eax) #ii# movl $0, n0x02c__1_flags(%eax) #ii# ##-072 OPTENT3(0, "ysize", OPT_UINT, &ysize, NULL, 0); movl $0, n0x040__2_specified(%eax) #ii# movb $0, n0x030__2_shortName(%eax) #ii# movl $.str_10, n0x034__2_longName(%eax) #ii# "ysize" movl $4, n0x038__2_type(%eax) #ii# leal m0x2cc_ysize(%esp), %ecx #ii# movl %ecx, n0x03c__2_arg(%eax) #ii# movl $0, n0x044__2_flags(%eax) #ii# ##-073 OPTENT3(0, "height", OPT_UINT, &ysize, NULL, 0); movl $0, n0x058__3_specified(%eax) #ii# movb $0, n0x048__3_shortName(%eax) #ii# movl $.str_11, n0x04c__3_longName(%eax) #ii# "height" movl $4, n0x050__3_type(%eax) #ii# movl %ecx, n0x054__3_arg(%eax) #ii# movl $0, n0x05c__3_flags(%eax) #ii# ##-074 OPTENT3(0, "xscale", OPT_FLOAT, &xscale, NULL, 0); movl $0, n0x070__4_specified(%eax) #ii# movb $0, n0x060__4_shortName(%eax) #ii# movl $.str_12, n0x064__4_longName(%eax) #ii# "xscale" movl $7, n0x068__4_type(%eax) #ii# leal m0x2c0_xscale(%esp), %ecx #ii# &xscale movl %ecx, n0x06c__4_arg(%eax) #ii# movl $0, n0x074__4_flags(%eax) #ii# ##-075 OPTENT3(0, "yscale", OPT_FLOAT, &yscale, NULL, 0); movl $0, n0x088__5_specified(%eax) #ii# movb $0, n0x078__5_shortName(%eax) #ii# movl $.str_13, n0x07c__5_longName(%eax) #ii# "yscale" movl $7, n0x080__5_type(%eax) #ii# leal m0x2bc_yscale(%esp), %ecx #ii# &yscale movl %ecx, n0x084__5_arg(%eax) #ii# movl $0, n0x08c__5_flags(%eax) #ii# ##-076 OPTENT3(0, "pixels", OPT_UINT, &pixels, NULL, 0); movl $0, n0x0a0__6_specified(%eax) #ii# movb $0, n0x090__6_shortName(%eax) #ii# movl $.str_14, n0x094__6_longName(%eax) #ii# "pixels" movl $4, n0x098__6_type(%eax) #ii# leal m0x2c8_pixels(%esp), %ecx #ii# movl %ecx, n0x09c__6_arg(%eax) #ii# movl $0, n0x0a4__6_flags(%eax) #ii# ##-077 OPTENT3(0, "reduce", OPT_UINT, &reduce, NULL, 0); movl $0, n0x0b8__7_specified(%eax) #ii# movb $0, n0x0a8__7_shortName(%eax) #ii# movl $.str_15, n0x0ac__7_longName(%eax) #ii# "reduce" movl $4, n0x0b0__7_type(%eax) #ii# leal m0x2c4_reduce(%esp), %ecx #ii# movl %ecx, n0x0b4__7_arg(%eax) #ii# movl $0, n0x0bc__7_flags(%eax) #ii# ##-078 OPTENT3(0, "xysize", OPT_FLAG, NULL, &xysize, 0); leal m0x2d4_xysize(%esp), %ecx #ii# movl %ecx, n0x0d0__8_specified(%eax) #ii# movb $0, n0x0c0__8_shortName(%eax) #ii# movl $.str_16, n0x0c4__8_longName(%eax) #ii# "xysize" movl $1, n0x0c8__8_type(%eax) #ii# movl $0, n0x0cc__8_arg(%eax) #ii# movl $0, n0x0d4__8_flags(%eax) #ii# ##-079 OPTENT3(0, "verbose", OPT_FLAG, NULL, &cmdline_p->verbose, 0); leal m0x2a8_cmdline_verbose(%esp), %ecx #ii# movl %ecx, n0x0e8__9_specified(%eax) #ii# movb $0, n0x0d8__9_shortName(%eax) #ii# movl $.str_17, n0x0dc__9_longName(%eax) #ii# "verbose" movl $1, n0x0e0__9_type(%eax) #ii# movl $0, n0x0e4__9_arg(%eax) #ii# movl $0, n0x0ec__9_flags(%eax) #ii# ##-080 OPTENT3(0, "nomix", OPT_FLAG, NULL, &cmdline_p->nomix, 0); leal m0x2ac_cmdline_nomix(%esp), %ecx #ii# movl %ecx, n0x100_10_specified(%eax) #ii# movb $0, n0x0f0_10_shortName(%eax) #ii# movl $.str_18, n0x0f4_10_longName(%eax) #ii# "nomix" movl $1, n0x0f8_10_type(%eax) #ii# movl $0, n0x0fc_10_arg(%eax) #ii# movl $0, n0x104_10_flags(%eax) #ii# movl $0, n0x110_11_type(%eax) #ii# as endmark ##-087 xsize = -1; ##-088 ysize = -1; movl $-1, m0x2d0_xsize(%esp) #ii# movl $-1, m0x2cc_ysize(%esp) #ii# ##-089 xscale = -1.0; ##-090 yscale = -1.0; movl $Fminus1_0, m0x2c0_xscale(%esp) #ii# -1.0 --> xscale movl $Fminus1_0, m0x2bc_yscale(%esp) #ii# -1.0 --> yscale ##-091 pixels = -1; ##-092 reduce = -1; movl $-1, m0x2c8_pixels(%esp) #ii# movl $-1, m0x2c4_reduce(%esp) #ii# ##-094 opt.opt_table = option_def; ##-095 opt.short_allowed = FALSE; ##-096 opt.allowNegNum = FALSE; movl %eax, m0x2dc_opt_opt_table(%esp) #ii# movb $0, m0x2d8_opt_short_allowed(%esp) #ii# movb $0, m0x2d9_opt_allowNegNum(%esp) #ii# ##-098 optParseOptions3( &argc, argv, opt, sizeof(opt), 0 ); movl m0x2d8_opt_short_allowed(%esp), %eax #ii# %eax is: opt.short_allowed movl m0x2dc_opt_opt_table(%esp), %ecx #ii# %ecx is: opt.opt_table movl %ecx, m0x00c_P4(%esp) #ii# pass struct opt as P3+P4 movl %eax, m0x008_P3(%esp) #ii# movl %esi, m0x004_P2(%esp) #ii# %esi is: argv leal m0x2e0_argc(%esp), %eax #ii# %eax is: &argc movl %eax, m0x000_P1(%esp) #ii# movl $0, m0x014_P6(%esp) #ii# movl $8, m0x010_P5(%esp) #ii# calll optParseOptions3 #ii# ##-101 if (xsize == 0) cmpl $0, m0x2d0_xsize(%esp) #ii# 0 vs xsize jne .Lp01_skip2 #ii# ##-102 pm_error("-xsize/width must be greater than zero."); movl $.str_19, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it .Lp01_skip2: ##-103 if (ysize == 0) cmpl $0, m0x2cc_ysize(%esp) #ii# 0 vs ysize jne .Lp02_skip2 #ii# ##-104 pm_error("-ysize/height must be greater than zero."); movl $.str_20, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it .Lp02_skip2: ##-105 if (xscale != -1.0 && xscale <= 0.0) flds m0x2c0_xscale(%esp) #ii#(push) xscale fld1 #ii#(push) 1.0 fchs #ii# -1.0 #_ST1_# xscale #_ST0_# -1.0 fsts _m0x0a8_cF_minus_1_0(%esp) #ii# -1.0 fxch %st(1) #ii# #_ST1_# -1.0 #_ST0_# xscale fucom %st(1) #ii# -1.0 vs xsacle fstp %st(1) #ii#(pop) __del_ST1__ #_ST0_# xscale fnstsw %ax #ii# sahf #ii# jne .Lp03_skip1 #ii# jnp .Lp04_next_if #ii# .Lp03_skip1: fldz #ii#(push) 0.0 #_ST1_# xscale #_ST0_# 0.0 fucompp #ii#(pop2) xscale vs 0.0 #_STx_# ____empty____ fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 #_ST0_# 0.0 jb .Lp04_next_if #ii# fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ ##-106 pm_error("-xscale must be greater than zero."); movl $.str_21, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it fldz #ii#(push) 0.0 #_ST0_# xscale .Lp04_next_if: ##-107 if (yscale != -1.0 && yscale <= 0.0) fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ flds m0x2bc_yscale(%esp) #ii#(push) yscale flds _m0x0a8_cF_minus_1_0(%esp) #ii#(push) -1.0 #_ST1_# yscale #_ST0_# -1.0 fxch %st(1) #ii# #_ST1_# -1.0 #_ST0_# yscale fucom %st(1) #ii# -1.0 vs yscale fstp %st(1) #ii#(pop) __del_ST1__ #_ST0_# yscale fnstsw %ax #ii# sahf #ii# jne .Lp05_skip1 #ii# jnp .Lp06_next_if #ii# .Lp05_skip1: fldz #ii#(push) 0.0 #_ST1_# yscale #_ST0_# 0.0 fucompp #ii#(pop2) yscale vs 0.0 #_STx_# ____empty____ fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 #_ST0_# 0.0 jb .Lp06_next_if #ii# fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ ##-108 pm_error("-yscale must be greater than zero."); movl $.str_22, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it fldz #ii#(push) 0.0 #_ST0_# yscale .Lp06_next_if: ##-109 if (reduce <= 0 && reduce != -1) fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ movl m0x2c4_reduce(%esp), %eax #ii# %eax is: reduce testl %eax, %eax #ii# jg .Lp07_next_if #ii# cmpl $-1, %eax #ii# -1 vs reduce je .Lp07_next_if #ii# ##-110 pm_error("-reduce must be greater than zero."); movl $.str_23, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it #_STx_# ____empty____ .Lp07_next_if: ##-112 if (xsize != -1 && xscale != -1) cmpl $-1, m0x2d0_xsize(%esp) #ii# -1 vs xsize flds m0x2c0_xscale(%esp) #ii#(push) xscale #_ST0_# xscale je .Lp09_next_if #ii# fld1 #ii#(push) 1.0 fchs #ii# -1.0 #_ST1_# xscale #_ST0_# -1.0 fxch %st(1) #ii# #_ST1_# -1.0 #_ST0_# xscale fucompp #ii#(pop2) -1.0 vs xscale #_STx_# ____empty____ fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 #_ST0_# 0.0 jne .Lp08_skip1 #ii# jnp .Lp09_next_if #ii# .Lp08_skip1: fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ ##-113 pm_error("Cannot specify both -xsize/width and -xscale."); movl $.str_24, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it fldz #ii#(push) 0.0 #_ST0_# xscale .Lp09_next_if: ##-114 if (ysize != -1 && yscale != -1) fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $-1, m0x2cc_ysize(%esp) #ii# -1 vs ysize flds m0x2bc_yscale(%esp) #ii#(push) yscale #_ST0_# yscale je .Lp11_next_if #ii# fld1 #ii#(push) 1.0 fchs #ii# -1.0 #_ST1_# yscale #_ST0_# -1.0 fxch %st(1) #ii# #_ST1_# -1.0 #_ST0_# yscale fucompp #ii#(pop2) -1.0 vs yscale #_STx_# ____empty____ fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 #_ST0_# 0.0 jne .Lp10_skip1 #ii# jnp .Lp11_next_if #ii# .Lp10_skip1: fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ ##-115 pm_error("Cannot specify both -ysize/height and -yscale."); movl $.str_25, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it fldz #ii#(push) 0.0 #_ST0_# yscale .Lp11_next_if: ##-117 if (xysize && ##-118 (xsize != -1 || xscale != -1 || ysize != -1 || yscale != -1 || ##-119 reduce != -1 || pixels != -1) ) fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $0, m0x2d4_xysize(%esp) #ii# 0 vs xysize je .Lp13_next_if #ii# cmpl $-1, m0x2d0_xsize(%esp) #ii# -1 vs xsize flds m0x2c0_xscale(%esp) #ii#(push) xscale flds m0x2bc_yscale(%esp) #ii#(push) yscale #_ST1_# xscale #_ST0_# yscale fxch %st(1) #ii# #_ST1_# yscale #_ST0_# xscale jne .Lp12_err6 #ii# flds _m0x0a8_cF_minus_1_0(%esp) #ii#(push) -1.0 #_ST2_# yscale #_ST1_# xscale #_ST0_# -1.0 fxch %st(1) #ii# #_ST2_# yscale #_ST1_# -1.0 #_ST0_# xscale fucompp #ii#(pop2) -1.0 vs xscale #_ST0_# yscale fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 #_ST1_# yscale #_ST0_# 0.0 jne .Lp12_err6 #ii# jp .Lp12_err6 #ii# fstp %st(0) #ii#(pop) __del_ST0__ #_ST0_# yscale cmpl $-1, m0x2cc_ysize(%esp) #ii# -1 vs ysize fldz #ii#(push) 0.0 #_ST1_# yscale #_ST0_# 0.0 jne .Lp12_err6 #ii# fstp %st(0) #ii#(pop) __del_ST0__ #_ST0_# yscale flds _m0x0a8_cF_minus_1_0(%esp) #ii#(push) -1.0 #_ST1_# yscale #_ST0_# -1.0 fxch %st(1) #ii# #_ST1_# -1.0 #_ST0_# yscale fucompp #ii#(pop2) -1.0 vs yscale #_STx_# ____empty____ fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST1_# 0.0 #_ST0_# 0.0 jne .Lp12_err6 #ii# jp .Lp12_err6 #ii# fstp %st(1) #ii#(pop) __del_ST1__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $-1, m0x2c4_reduce(%esp) #ii# -1 vs reduce fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST1_# 0.0 #_ST0_# 0.0 jne .Lp12_err6 #ii# fstp %st(1) #ii#(pop) __del_ST1__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $-1, m0x2c8_pixels(%esp) #ii# -1 vs pixels fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST1_# 0.0 #_ST0_# 0.0 je .Lp15 #ii# #_ST1_# yscale #_ST0_# xscale .Lp12_err6: fstp %st(1) #ii#(pop) __del_ST1__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ ##-120 pm_error("Cannot specify -xysize with other dimension options."); movl $.str_26, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it #_STx_# ____empty____ .Lp13_next_if: ##-121 if (pixels != -1 && ##-122 (xsize != -1 || xscale != -1 || ysize != -1 || yscale != -1 || ##-123 reduce != -1) ) cmpl $-1, m0x2c8_pixels(%esp) #ii# -1 vs pixels fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST1_# 0.0 #_ST0_# 0.0 je .Lp15 #ii# fstp %st(1) #ii#(pop) __del_ST1__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $-1, m0x2d0_xsize(%esp) #ii# -1 vs xsize flds m0x2c0_xscale(%esp) #ii#(push) xscale flds m0x2bc_yscale(%esp) #ii#(push) yscale fldz #ii#(push) 0.0 #_ST2_# xscale #_ST1_# yscale #_ST0_# 0.0 fxch %st(1) #ii# #_ST2_# xscale #_ST1_# 0.0 #_ST0_# yscale fxch %st(2) #ii# #_ST2_# yscale #_ST1_# 0.0 #_ST0_# xscale jne .Lp14_err5 #ii# fstp %st(1) #ii#(pop) __del_ST1__ #_ST1_# yscale #_ST0_# xscale fld1 #ii#(push) 1.0 fchs #ii# -1.0 #_ST2_# yscale #_ST1_# xscale #_ST0_# -1.0 fxch %st(1) #ii# #_ST2_# yscale #_ST1_# -1.0 #_ST0_# xscale fucomp %st(1) #ii#(pop) -1.0 vs xscale #_ST1_# yscale #_ST0_# -1.0 fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 #_ST2_# yscale #_ST1_# -1.0 #_ST0_# 0.0 jne .Lp14_err5 #ii# jp .Lp14_err5 #ii# fstp %st(0) #ii#(pop) __del_ST0__ #_ST1_# yscale #_ST0_# -1.0 cmpl $-1, m0x2cc_ysize(%esp) #ii# -1 vs ysize fldz #ii#(push) 0.0 #_ST2_# yscale #_ST1_# -1.0 #_ST0_# 0.0 jne .Lp14_err5 #ii# fstp %st(0) #ii#(pop) __del_ST0__ #_ST1_# yscale #_ST0_# -1.0 fxch %st(1) #ii# #_ST1_# -1.0 #_ST0_# yscale fucompp #ii#(pop2) -1.0 vs yscale #_STx_# ____empty____ fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 jne .Lp14_err5 #ii# jp .Lp14_err5 #ii# fstp %st(2) #ii#(pop) fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $-1, m0x2c4_reduce(%esp) #ii# -1 vs reduce fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 je .Lp17_next_if #ii# #_ST2_# yscale #_ST1_# 0.0 #_ST0_# xscale .Lp14_err5: fstp %st(2) #ii#(pop) fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ ##-124 pm_error("Cannot specify -pixels with other dimension options."); movl $.str_27, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST1_# 0.0 #_ST0_# 0.0 .Lp15: ##-125 if (reduce != -1 && ##-126 (xsize != -1 || xscale != -1 || ysize != -1 || yscale != -1) ) fstp %st(1) #ii#(pop) __del_ST1__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $-1, m0x2c4_reduce(%esp) #ii# -1 vs reduce fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 je .Lp17_next_if #ii# fstp %st(2) #ii#(pop) fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $-1, m0x2d0_xsize(%esp) #ii# -1 vs xsize flds m0x2c0_xscale(%esp) #ii#(push) xscale flds m0x2bc_yscale(%esp) #ii#(push) yscale fldz #ii#(push) 0.0 #_ST2_# xscale #_ST1_# yscale #_ST0_# 0.0 fxch %st(1) #ii# #_ST2_# xscale #_ST1_# 0.0 #_ST0_# yscale fxch %st(2) #ii# #_ST2_# yscale #_ST1_# 0.0 #_ST0_# xscale jne .Lp16_err4 #ii# fstp %st(1) #ii#(pop) __del_ST1__ #_ST1_# yscale #_ST0_# xscale fld1 #ii#(push) 1.0 fchs #ii# -1.0 #_ST2_# yscale #_ST1_# xscale #_ST0_# -1.0 fxch %st(1) #ii# #_ST2_# yscale #_ST1_# -1.0 #_ST0_# xscale fucomp %st(1) #ii#(pop) -1.0 vs xscale #_ST1_# yscale #_ST0_# -1.0 fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 #_ST2_# yscale #_ST1_# -1.0 #_ST0_# 0.0 jne .Lp16_err4 #ii# jp .Lp16_err4 #ii# fstp %st(0) #ii#(pop) __del_ST0__ #_ST1_# yscale #_ST0_# -1.0 cmpl $-1, m0x2cc_ysize(%esp) #ii# -1 vs ysize fldz #ii#(push) 0.0 #_ST2_# yscale #_ST1_# -1.0 #_ST0_# 0.0 jne .Lp16_err4 #ii# fstp %st(0) #ii#(pop) __del_ST0__ #_ST1_# yscale #_ST0_# -1.0 fxch %st(1) #ii# #_ST1_# -1.0 #_ST0_# yscale fucompp #ii#(pop2) -1.0 vs yscale #_STx_# ____empty____ fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 jne .Lp16_err4 #ii# jnp .Lp17_next_if #ii# #_ST2_# yscale #_ST1_# 0.0 #_ST0_# xscale .Lp16_err4: fstp %st(2) #ii#(pop) fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ ##-127 pm_error("Cannot specify -reduce with other dimension options."); movl $.str_28, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 .Lp17_next_if: ##-129 if (pixels == 0) fstp %st(2) #ii#(pop) fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $0, m0x2c8_pixels(%esp) #ii# 0 vs pixels jne .Lp18_skip2 #ii# ##-130 pm_error("-pixels must be greater than zero"); movl $.str_29, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it .Lp18_skip2: ##-134 if (xysize) { ##-136 scale_parm = 0.0; cmpl $0, m0x2d4_xysize(%esp) #ii# 0 vs xysize je .Lp19_else #ii# ##-137 if (argc-1 < 2) movl m0x2e0_argc(%esp), %eax #ii# %eax is: argc cmpl $2, %eax #ii# 2 vs argc jg .Lp21_else #ii# ##-138 pm_error("You must supply at least two parameters with -xysize:\n " ##-139 "x and y dimensions of the bounding box."); movl $.str_30, m0x000_P1(%esp) #ii# jmp .Lp22 #ii# .Lp19_else: ##-164 } else { ##-165 cmdline_p->xbox = 0; ##-166 cmdline_p->ybox = 0; movl $0, m0x29c_cmdline_xbox(%esp) #ii# 0 --> cmdline.xbox movl $0, m0x2a0_cmdline_ybox(%esp) #ii# 0 --> cmdline.ybox ##-168 if (xsize == -1 && xscale == -1 && ysize == -1 && yscale == -1 ##-169 && pixels == -1 && reduce == -1) { cmpl $-1, m0x2d0_xsize(%esp) #ii# -1 vs xsize flds m0x2c0_xscale(%esp) #ii#(push) xscale flds m0x2bc_yscale(%esp) #ii#(push) yscale #_ST1_# xscale #_ST0_# yscale movl m0x2c4_reduce(%esp), %ecx #ii# %ecx is: reduce movl m0x2e0_argc(%esp), %edi #ii# %edi is: argc fldz #ii#(push) 0.0 #_ST2_# xscale #_ST1_# yscale #_ST0_# 0.0 jne .Lp20_else6 #ii# fstp %st(0) #ii#(pop) __del_ST0__ #_ST1_# xscale #_ST0_# yscale fld1 #ii#(push) 1.0 fchs #ii# -1.0 #_ST2_# xscale #_ST1_# yscale #_ST0_# -1.0 fxch %st(2) #ii# #_ST2_# -1.0 #_ST1_# yscale #_ST0_# xscale fucomp %st(2) #ii#(pop) -1.0 vs xscale #_ST1_# -1.0 #_ST0_# yscale fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 #_ST2_# -1.0 #_ST1_# yscale #_ST0_# 0.0 fxch %st(2) #ii# #_ST2_# 0.0 #_ST1_# yscale #_ST0_# -1.0 jne .Lp20_else6 #ii# jp .Lp20_else6 #ii# fstp %st(2) #ii#(pop) #_ST1_# -1.0 #_ST0_# yscale cmpl $-1, m0x2cc_ysize(%esp) #ii# -1 vs ysize fldz #ii#(push) 0.0 #_ST2_# -1.0 #_ST1_# yscale #_ST0_# 0.0 fxch %st(2) #ii# #_ST2_# 0.0 #_ST1_# yscale #_ST0_# -1.0 jne .Lp20_else6 #ii# fstp %st(2) #ii#(pop) #_ST1_# -1.0 #_ST0_# yscale fucompp #ii#(pop2) -1.0 vs yscale #_STx_# ____empty____ fnstsw %ax #ii# sahf #ii# fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 fxch %st(2) #ii# #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 fxch %st(1) #ii# #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 jne .Lp20_else6 #ii# jp .Lp20_else6 #ii# fstp %st(1) #ii#(pop) __del_ST1__ fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $-1, m0x2c8_pixels(%esp) #ii# -1 vs pixels fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 fxch %st(2) #ii# fxch %st(1) #ii# #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 jne .Lp20_else6 #ii# fstp %st(1) #ii#(pop) __del_ST1__ fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ cmpl $-1, %ecx #ii# -1 vs reduce fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 fldz #ii#(push) 0.0 #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 fxch %st(2) #ii# fxch %st(1) #ii# #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 jne .Lp20_else6 #ii# fstp %st(1) #ii#(pop) __del_ST1__ fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ ##-171 if (argc-1 < 1) cmpl $1, %edi #ii# 1 vs argc jg .Lq59_else #ii# ##-172 pm_error("With no dimension options, you must supply at least " ##-173 "one parameter: \nthe scale factor."); movl $.str_37, m0x000_P1(%esp) #ii# jmp .Lp22 #ii# #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 .Lp20_else6: fstp %st(1) #ii#(pop) __del_ST1__ fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ ##-188 } else { ##-190 if (argc-1 < 1) cmpl $1, %edi #ii# 1 vs argc jg .Lp23_else #ii# ##-191 cmdline_p->input_filespec = "-"; movl $.str_36, m0x288_cmdline_input_filespec(%esp) #ii# "-" jmp .Lp24_exit_if #ii# .Lp21_else: ##-140 else if (argc-1 > 3) decl %eax #ii# cmpl $4, %eax #ii# 4 vs argc jl .Lp26_else #ii# ##-141 pm_error("Too many arguments. With -xysize, you need 2 or 3 " ##-142 "arguments."); movl $.str_31, m0x000_P1(%esp) #ii# .Lp22: calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it fldz #ii#(push) 0.0 #_ST0_# scale_parm = 0.0 ? jmp .Lp32_finish #ii# #_STx_# ____empty____ .Lp23_else: ##-192 else ##-193 cmdline_p->input_filespec = argv[1]; movl 4(%esi), %eax #ii# %esi is: argv %eax is: argv[1] movl %eax, m0x288_cmdline_input_filespec(%esp) #ii# #_STx_# ____empty____ .Lp24_exit_if: ##-195 if (reduce != -1) { fldz #ii#(push) 0.0 #_ST0_# scale_parm = 0.0 ? cmpl $-1, %ecx #ii# -1 vs reduce je .Lp32_finish #ii# ##-196 scale_parm = ((double) 1.0) / ((double) reduce); fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ movl %ecx, m0x274_tmp_reduce(%esp) #ii# fld1 #ii#(push) 1.0 #_ST0_# 1.0 fidivl m0x274_tmp_reduce(%esp) #ii# / reduce #_ST0_# 1.0 / reduce fstps m0x270_tmp_float(%esp) #ii#(pop) scale_parm #_STx_# ____empty____ #_STx==> 1.0 / reduce --> (float)scale_parm flds m0x270_tmp_float(%esp) #ii#(push) scale_parm #_ST0_# (float)scale_parm fSTL _m0x0a0_tmp_double(%esp) #ii# scale_parm (double) #_ST0_# (float)scale_parm --> tmp_double movl %ecx, m0x004_P2(%esp) #ii# fSTPL m0x008_P3(%esp) #ii#(pop) scale_parm (double) #_STx_# ____empty____ #_STx==> (float)scale_parm --> P3 ##-197 pm_message("reducing by %d gives scale factor of %f.", ##-198 reduce, scale_parm); movl $.str_39, m0x000_P1(%esp) #ii# calll pm_message #ii# .Lp25: fLDL _m0x0a0_tmp_double(%esp) #ii#(push) scale_parm (double) #_ST0_# (float)scale_parm jmp .Lp32_finish #ii# #_STx_# ____empty____ .Lp26_else: ##-143 else { ##-144 char * endptr; ##-145 cmdline_p->xbox = strtol(argv[1], &endptr, 10); movl 4(%esi), %eax #ii# %esi is: argv %eax is: argv[1] leal m0x2b8_endptr(%esp), %edi #ii# %edi is: &endptr movl %edi, m0x004_P2(%esp) #ii# movl %eax, m0x000_P1(%esp) #ii# movl $10, m0x008_P3(%esp) #ii# calll strtol #ii# movl %eax, m0x29c_cmdline_xbox(%esp) #ii# %eax is: cmdlinie.xbox ##-146 if (strlen(argv[1]) > 0 && *endptr != '\0') movl 4(%esi), %ecx #ii# %esi is: argv %ecx is: argv[1] cmpb $0, (%ecx) #ii# 0 vs argv[1][0] je .Lp27_next_if #ii# movl m0x2b8_endptr(%esp), %edx #ii# cmpb $0, (%edx) #ii# 0 vs *endptr je .Lp27_next_if #ii# movl %ecx, m0x004_P2(%esp) #ii# ##-147 pm_error("horizontal xysize not an integer: '%s'", argv[1]); movl $.str_32, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it ##-148 if (cmdline_p->xbox <= 0) movl m0x29c_cmdline_xbox(%esp), %eax #ii# .Lp27_next_if: testl %eax, %eax #ii# %eax is: cmdline.xbox jne .Lp28_exit_if #ii# movl $0, m0x004_P2(%esp) #ii# ##-149 pm_error("horizontal size is not positive: %d", ##-150 cmdline_p->xbox); movl $.str_33, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it .Lp28_exit_if: ##-152 cmdline_p->ybox = strtol(argv[2], &endptr, 10); movl 8(%esi), %eax #ii# %esi is: argv %eax is: argv[2] movl %edi, m0x004_P2(%esp) #ii# %edi is: &endptr movl %eax, m0x000_P1(%esp) #ii# movl $10, m0x008_P3(%esp) #ii# calll strtol #ii# movl %eax, m0x2a0_cmdline_ybox(%esp) #ii# %eax is: cmdline.ybox ##-153 if (strlen(argv[2]) > 0 && *endptr != '\0') movl 8(%esi), %ecx #ii# %esi is :argv %ecx is: argv[2] cmpb $0, (%ecx) #ii# 0 vs argv[2][0] je .Lp29_next_if #ii# movl m0x2b8_endptr(%esp), %edx #ii# cmpb $0, (%edx) #ii# 0 vs *endptr je .Lp29_next_if #ii# movl %ecx, m0x004_P2(%esp) #ii# ##-154 pm_error("vertical xysize not an integer: '%s'", argv[2]); movl $.str_34, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it movl m0x2a0_cmdline_ybox(%esp), %eax #ii# %eax is: cmdline.ybox .Lp29_next_if: ##-155 if (cmdline_p->ybox <= 0) testl %eax, %eax #ii# %eax is: cmdline.ybox jne .Lp30_next_if #ii# movl $0, m0x004_P2(%esp) #ii# ##-156 pm_error("vertical size is not positive: %d", ##-157 cmdline_p->ybox); movl $.str_35, m0x000_P1(%esp) #ii# calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it .Lp30_next_if: ##-159 if (argc-1 < 3) cmpl $3, m0x2e0_argc(%esp) #ii# 3 vs argc jg .Lp31_else #ii# ##-160 cmdline_p->input_filespec = "-"; movl $.str_36, m0x288_cmdline_input_filespec(%esp) #ii# "-" fldz #ii#(push) 0.0 #_ST0_# scale_parm = 0.0 ? jmp .Lp32_finish #ii# #_STx_# ____empty____ .Lp31_else: ##-161 else ##-162 cmdline_p->input_filespec = argv[3]; ##-163 } movl 12(%esi), %eax #ii# %esi is: argv %eax is: argv[3] movl %eax, m0x288_cmdline_input_filespec(%esp) #ii# fldz #ii#(push) 0.0 #_ST0_# scale_parm = 0.0 ? .Lp32_finish: ##-199 } else ##-200 scale_parm = 0.0; ##-201 } ##-202 } ##-204 cmdline_p->xsize = xsize == -1 ? 0 : xsize; movl m0x2d0_xsize(%esp), %ecx #ii# %ecx is: xsize xorl %eax, %eax #ii# %eax is: 0 cmpl $-1, %ecx #ii# -1 vs xsize movl $0, %edx #ii# %edx is: 0 je .Lp33_skip1 #ii# movl %ecx, %edx #ii# %edx is: xsize .Lp33_skip1: movl %edx, m0x28c_cmdline_xsize(%esp) #ii# cmdline.xsize ##-205 cmdline_p->ysize = ysize == -1 ? 0 : ysize; movl m0x2cc_ysize(%esp), %ecx #ii# %ecx is: ysize cmpl $-1, %ecx #ii# -1 vs ysize movl $0, %edx #ii# %edx is: 0 je .Lp34_skip1 #ii# movl %ecx, %edx #ii# %edx is: ysize .Lp34_skip1: movl %edx, m0x290_cmdline_ysize(%esp) #ii# cmdline.ysize ##-206 cmdline_p->pixels = pixels == -1 ? 0 : pixels; movl m0x2c8_pixels(%esp), %ecx #ii# %ecx is: pixels cmpl $-1, %ecx #ii# -1 vs pixels je .Lp35_skip1 #ii# movl %ecx, %eax #ii# %eax is: pixels .Lp35_skip1: movl %eax, m0x2a4_cmdline_pixels(%esp) #ii# cmdline.pixles ##-208 if (scale_parm) { fldz #ii#(push) 0.0 #_ST1_# scale_parm #_ST0_# 0.0 fxch %st(1) #ii# #_ST1_# 0.0 #_ST0_# scale_parm fucom %st(1) #ii# 0 vs scale_parm fnstsw %ax #ii# sahf #ii# jne .Lp36_skip1 #ii# jnp .Lp37_else #ii# .Lp36_skip1: ##-209 cmdline_p->xscale = scale_parm; ##-210 cmdline_p->yscale = scale_parm; fstp %st(1) #ii#(pop) __del_ST1__ #_ST0_# scale_parm fsts m0x294_cmdline_xscale(%esp) #ii# scale_parm --> cmdline.xscale jmp .Lp40_exit_func_set_ys #ii# #_ST1_# 0.0 #_ST0_# scale_parm .Lp37_else: ##-211 } else { ##-212 cmdline_p->xscale = xscale == -1.0 ? 0.0 : xscale; ##-213 cmdline_p->yscale = yscale == -1.0 ? 0.0 : yscale; ##-214 } fstp %st(0) #ii#(pop) __del_ST0__ #_ST0_# 0.0 flds m0x2c0_xscale(%esp) #ii#(push) xscale flds _m0x0a8_cF_minus_1_0(%esp) #ii#(push) -1.0 #_ST2_# 0.0 #_ST1_# xscale #_ST0_# -1.0 fucomp %st(1) #ii#(pop) xscale vs -1.0 #_ST1_# 0.0 #_ST0_# xscale fnstsw %ax #ii# sahf #ii# setnp %al #ii# sete %cl #ii# testb %al, %cl #ii# fld %st(1) #ii#(push) #_ST2_# 0.0 #_ST1_# xscale #_ST0_# 0.0 jne .Lp38_skip3 #ii# fstp %st(0) #ii#(pop) __del_ST0__ #_ST1_# 0.0 #_ST0_# xscale fldz #ii#(push) 0.0 #_ST2_# 0.0 #_ST1_# xscale #_ST0_# 0.0 fxch %st(1) #ii# #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# xscale .Lp38_skip3: fstp %st(1) #ii#(pop) __del_ST1__ #_ST1_# 0.0 #_ST0_# xscale fstps m0x294_cmdline_xscale(%esp) #ii#(pop) #_ST0_# 0.0 #_STx==> xscale --> cmdline.xscale flds m0x2bc_yscale(%esp) #ii#(push) yscale flds _m0x0a8_cF_minus_1_0(%esp) #ii#(push) -1.0 #_ST2_# 0.0 #_ST1_# yscale #_ST0_# -1.0 fucomp %st(1) #ii#(pop) yscale vs -1.0 #_ST1_# 0.0 #_ST0_# yscale fnstsw %ax #ii# sahf #ii# setnp %al #ii# sete %cl #ii# testb %al, %cl #ii# jne .Lp39_skip2 #ii# fstp %st(1) #ii#(pop) __del_ST1__ #_ST0_# yscale fldz #ii#(push) 0.0 #_ST1_# yscale #_ST0_# 0.0 .Lp39_skip2: fstp %st(0) #ii#(pop) __del_ST0__ #_ST0_# yscale #_ST0_# scale_parm / yscale .Lp40_exit_func_set_ys: # -------------------- parse_command_line.exit fstps m0x298_cmdline_yscale(%esp) #ii#(pop) scale_parm --> cmdline.yscale #_STx_# ____empty____ ##-215 } ##-697 ifP = pm_openr(cmdline.input_filespec); movl m0x288_cmdline_input_filespec(%esp), %eax #ii# movl %eax, m0x000_P1(%esp) #ii# calll pm_openr #ii# movl %eax, m0x098_ifP(%esp) #ii# ##-699 pnm_readpnminit( ifP, &cols, &rows, &maxval, &format ); leal m0x27c_format(%esp), %ecx #ii# movl %ecx, m0x010_P5(%esp) #ii# leal m0x278_maxval(%esp), %ecx #ii# movl %ecx, m0x00c_P4(%esp) #ii# leal m0x284_rows(%esp), %ecx #ii# movl %ecx, m0x008_P3(%esp) #ii# leal m0x280_cols(%esp), %ecx #ii# movl %ecx, m0x004_P2(%esp) #ii# movl %eax, m0x000_P1(%esp) #ii# calll pnm_readpnminit #ii# ##-702 if ( PNM_FORMAT_TYPE(format) == PBM_TYPE ) { movl m0x27c_format(%esp), %eax #ii# cmpl $0x5031, %eax #ii# 'P1' vs format je .Lp41_skip2 #ii# cmpl $0x5034, %eax #ii# 'P4' vs format jne .Lp42_else #ii# .Lp41_skip2: # %select.unfold ##-705 pm_message( "promoting from PBM to PGM" ); movl $.str_01, m0x000_P1(%esp) #ii# calll pm_message #ii# ##-703 newformat = PGM_TYPE; movl $0x5032, m0x06c_newformat(%esp) #ii# 'P2' --> newformat ##-704 newmaxval = PGM_MAXMAXVAL; movl $255, %ebx #ii# %ebx is: newmaxval ? jmp .Lp43_exit_if #ii# .Lp42_else: ##-706 } else { ##-707 newformat = format; movl %eax, m0x06c_newformat(%esp) #ii# ##-708 newmaxval = maxval; movl m0x278_maxval(%esp), %ebx #ii# %ebx is: newmaxval ? .Lp43_exit_if: ##-709 } ##-710 compute_output_dimensions(cmdline, rows, cols, &newrows, &newcols); ############################################################################### ##-219 static void ##-220 compute_output_dimensions(const struct cmdline_info cmdline, ##-221 const int rows, const int cols, ##-222 int * newrowsP, int * newcolsP) #_____VARIABLE_NAME_CONVERSION______ # _caller_side____::_callie_side____ # &newrows == *newrowsP <== ! # &newcols == *newcolsP <== ! ##-222 { movl m0x284_rows(%esp), %edx #ii# %edx is: rows movl m0x280_cols(%esp), %ecx #ii# %ecx is: cols flds m0x294_cmdline_xscale(%esp) #ii#(push) cmdline.xscale flds m0x298_cmdline_yscale(%esp) #ii#(push) cmdline.yscale #_ST1_# cmdline.xscale #_ST0_# cmdline.yscale ##-224 if (cmdline.pixels) { movl m0x2a4_cmdline_pixels(%esp), %eax #ii# %eax is: cmdline.pixels testl %eax, %eax #ii# je .Lp44_else #ii# ##-225 if (rows * cols <= cmdline.pixels) { ##-226 *newrowsP = rows; ##-227 *newcolsP = cols; fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ movl %ebx, _m0x0a8_newmaxval(%esp) #ii# newmaxval movl %ecx, %esi #ii# %esi is: cols imull %edx, %esi #ii# %esi is: cols*rows cmpl %eax, %esi #ii# cmdline.pixels vs cols*rows movl %edx, %edi #ii# %edi is: rows movl %ecx, %ebx #ii# %ebx is: cols fldz #ii#(push) 0.0 #_ST0_# 0.0 jbe .Lp56 #ii# ##-228 } else { ##-229 const double scale = ##-230 sqrt( (float) cmdline.pixels / ((float) cols * (float) rows)); fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ movl %eax, m0x248_tmpLL(%esp) #ii# %eax is: cmdline.pixels movl $0, m0x24c_tmpLL_high(%esp) #ii# fiLDLL m0x248_tmpLL(%esp) #ii#(push.LL) #_ST0_# cmdline.pixels movl %ecx, m0x258_tmp_int(%esp) #ii# %ecx is: cols movl %edx, m0x260_tmp_int(%esp) #ii# %edx is: rows fildl m0x260_tmp_int(%esp) #ii#(push) rows #_ST1_# cmdline.pixels #_ST0_# rows fimull m0x258_tmp_int(%esp) #ii# * cols #_ST1_# cmdline.pixels #_ST0_# rows*cols fdivrp %st(1) #ii#(pop) / (rows*cols) ###### <== FDIVP ST(i),ST(0) ... ST(1)=ST(1)/ST(0) #_ST0_# cmdline.pixels / (rows*cols) fsqrt #ii# sqrt() #_ST0_# scale = sqrt(cmdline.pixels / (rows*cols)) ##-231 *newrowsP = rows * scale; movl %edx, m0x25c_tmp_int(%esp) #ii# %edx is: rows fld %st(0) #ii#(push) #_ST1_# scale #_ST0_# scale fimull m0x25c_tmp_int(%esp) #ii# * rows #_ST1_# scale #_ST0_# scale * rows fnstcw m0x0d6_tmp_cw(%esp) #ii# movw m0x0d6_tmp_cw(%esp), %ax #ii# movw $TRUNC, m0x0d6_tmp_cw(%esp) #ii# fldcw m0x0d6_tmp_cw(%esp) #ii# movw %ax, m0x0d6_tmp_cw(%esp) #ii# fistpl m0x268_tmp_int(%esp) #ii#(pop) #_ST0_# scale fldcw m0x0d6_tmp_cw(%esp) #ii# movl m0x268_tmp_int(%esp), %edi #ii# %edi is: newrows ##-232 *newcolsP = cols * scale; movl %ecx, m0x254_tmp_int(%esp) #ii# %exc is: cols fimull m0x254_tmp_int(%esp) #ii# * cols #_ST0_# scale * cols fnstcw m0x0d4_tmp_cw(%esp) #ii# movw m0x0d4_tmp_cw(%esp), %ax #ii# movw $TRUNC, m0x0d4_tmp_cw(%esp) #ii# fldcw m0x0d4_tmp_cw(%esp) #ii# movw %ax, m0x0d4_tmp_cw(%esp) #ii# fistpl m0x264_tmp_int(%esp) #ii#(pop) #_STx_# ____empty____ fldcw m0x0d4_tmp_cw(%esp) #ii# movl m0x264_tmp_int(%esp), %ebx #ii# %ebx is: newcols jmp .Lp55_finish #ii# #_ST1_# cmdline.xscale #_ST0_# cmdline.yscale .Lp44_else: ##-233 } ##-234 } else if (cmdline.xbox) { movl m0x29c_cmdline_xbox(%esp), %esi #ii# %esi is: cmdline.xbox testl %esi, %esi #ii# je .Lp45_else #ii# fstp %st(0) #ii#(pop) __del_ST0__ fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ movl %ebx, _m0x0a8_newmaxval(%esp) #ii# %ebx is: newmaxval ? movl m0x2a0_cmdline_ybox(%esp), %edi #ii# %edi is: cmdline.ybox ##-235 const double aspect_ratio = (float) cols / (float) rows; movl %ecx, m0x230_tmp_int(%esp) #ii# %ecx is: cols fildl m0x230_tmp_int(%esp) #ii#(push) #_ST0_# cols movl %edx, m0x234_tmp_int(%esp) #ii# %edx is: rows fidivl m0x234_tmp_int(%esp) #ii# / rows #_ST0_# cols / rows --> aspect_ratio ##-236 const double box_aspect_ratio = ##-237 (float) cmdline.xbox / (float) cmdline.ybox; movl %esi, m0x238_tmpLL(%esp) #ii# %esi is: cmdline.xbox movl $0, m0x23c_tmpLL_high(%esp) #ii# fiLDLL m0x238_tmpLL(%esp) #ii#(push.LL) #_ST1_# aspect_ratio #_ST0_# cmdline.xbox movl %edi, m0x240_tmpLL(%esp) #ii# %edi is: cmdline.ybox movl $0, m0x244_tmpLL_high(%esp) #ii# fiLDLL m0x240_tmpLL(%esp) #ii#(push.LL) #_ST2_# aspect_ratio #_ST1_# cmdline.xbox #_ST0_# cmdline.ybox fdivrp %st(1) #ii#(pop) / cmdline.ybox ###### <== FDIVP ST(i),ST(0) ... ST(1)=ST(1)/ST(0) #_ST1_# aspect_ratio #_ST0_# cmdline.xbox / cmdline.ybox --> box_aspect_ratio ##-239 if (box_aspect_ratio > aspect_ratio) { fucomp %st(1) #ii#(pop) aspect_ratio vs box_aspect_ratio #_ST0_# aspect_ratio fnstsw %ax #ii# sahf #ii# movl %esi, %ebx #ii# %ebx is: cmdline.xbox jbe .Lp47_else #ii# ##-240 *newrowsP = cmdline.ybox; ##-241 *newcolsP = *newrowsP * aspect_ratio + 0.5; movl %edi, m0x220_tmp_int(%esp) #ii# %edi is: cmdline.ybox fimull m0x220_tmp_int(%esp) #ii# * cmdline.ybox #_ST0_# aspect_ratio * cmdline.ybox fadds .cFLOAT_0_5 #ii# + 0.5 #_ST0_# aspect_ratio * cmdline.ybox + 0.5 fnstcw m0x0d2_tmp_cw(%esp) #ii# movw m0x0d2_tmp_cw(%esp), %ax #ii# movw $TRUNC, m0x0d2_tmp_cw(%esp) #ii# fldcw m0x0d2_tmp_cw(%esp) #ii# movw %ax, m0x0d2_tmp_cw(%esp) #ii# fistpl m0x224_tmp_int(%esp) #ii#(pop) #_STx_# ____empty____ fldcw m0x0d2_tmp_cw(%esp) #ii# movl m0x224_tmp_int(%esp), %ebx #ii# %ebx is: newcols result jmp .Lp55_finish #ii# #_ST1_# cmdline.xscale #_ST0_# cmdline.yscale .Lp45_else: ##-246 } else { ##-247 if (cmdline.xsize) ##-248 *newcolsP = cmdline.xsize; movl %ebx, _m0x0a8_newmaxval(%esp) #ii# %ebx is: newmaxval ? movl m0x28c_cmdline_xsize(%esp), %esi #ii# %esi is: cmdline.xsize movl m0x290_cmdline_ysize(%esp), %edi #ii# %edi is: cmdline.ysize testl %esi, %esi #ii# movl %esi, %ebx #ii# %ebx is: cmdline.xsize jne .Lp50_exit_if #ii# ##-249 else if (cmdline.xscale) fldz #ii#(push) 0.0 #_ST2_# cmdline.xscale #_ST1_# cmdline.yscale #_ST0_# 0.0 fxch %st(2) #ii# #_ST2_# 0.0 #_ST1_# cmdline.yscale #_ST0_# cmdline.xscale fucom %st(2) #ii# 0.0 vs cmdline.xscale fstp %st(2) #ii#(pop) #_ST1_# cmdline.xscale #_ST0_# cmdline.yscale fnstsw %ax #ii# sahf #ii# jne .Lp46_skip1 #ii# jnp .Lp48_else #ii# .Lp46_skip1: ##-250 *newcolsP = cmdline.xscale * cols + .5; movl %ecx, m0x204_tmp_int(%esp) #ii# %ecx is: cols fxch %st(1) #ii# #_ST1_# cmdline.yscale #_ST0_# cmdline.xscale fimull m0x204_tmp_int(%esp) #ii# * cols #_ST1_# cmdline.yscale #_ST0_# cmdline.xscale * cols fadds .cFLOAT_0_5 #ii# + 0.5 #_ST1_# cmdline.yscale #_ST0_# cmdline.xscale * cols + 0.5 fnstcw m0x0ce_tmp_cw(%esp) #ii# movw m0x0ce_tmp_cw(%esp), %ax #ii# movw $TRUNC, m0x0ce_tmp_cw(%esp) #ii# fldcw m0x0ce_tmp_cw(%esp) #ii# movw %ax, m0x0ce_tmp_cw(%esp) #ii# fistpl m0x208_tmp_int(%esp) #ii#(pop) #_ST0_# cmdline.yscale fldcw m0x0ce_tmp_cw(%esp) #ii# movl m0x208_tmp_int(%esp), %ebx #ii# %ebx is: newcols result jmp .Lp49_exit_if #ii# #_ST0_# aspect_ratio .Lp47_else: ##-242 } else { ##-243 *newcolsP = cmdline.xbox; ##-244 *newrowsP = *newcolsP / aspect_ratio + 0.5; ##-245 } movl %ebx, m0x228_tmp_int(%esp) #ii# %ebx is: cmdline.xbox fildl m0x228_tmp_int(%esp) #ii#(push) #_ST1_# aspect_ratio #_ST0_# cmdline.xbox fdivp %st(1) #ii#(pop) / aspect_ratio #_ST0_# cmdline.xbox / aspect_ratio fadds .cFLOAT_0_5 #ii# + 0.5 #_ST0_# cmdline.xbox / aspect_ratio + 0.5 fnstcw m0x0d0_tmp_cw(%esp) #ii# movw m0x0d0_tmp_cw(%esp), %ax #ii# movw $TRUNC, m0x0d0_tmp_cw(%esp) #ii# fldcw m0x0d0_tmp_cw(%esp) #ii# movw %ax, m0x0d0_tmp_cw(%esp) #ii# fistpl m0x22c_tmp_int(%esp) #ii#(pop) #_STx_# ____empty____ fldcw m0x0d0_tmp_cw(%esp) #ii# movl m0x22c_tmp_int(%esp), %edi #ii# %edi is: newrows result jmp .Lp55_finish #ii# #_ST1_# cmdline.xscale #_ST0_# cmdline.yscale .Lp48_else: ##-251 else if (cmdline.ysize) fstp %st(1) #ii#(pop) __del_ST1__ #_ST0_# cmdline.yscale testl %edi, %edi #ii# %edi is: cmdline.ysize movl %ecx, %ebx #ii# %ebx is: cols je .Lp51 #ii# ##-252 *newcolsP = cols * ((float) cmdline.ysize/rows) +.5; ##-253 else ##-254 *newcolsP = cols; movl %ecx, m0x20c_tmp_int(%esp) #ii# %ecx is: cols movl %edi, m0x210_tmpLL(%esp) #ii# %edi is: cmdline.ysize movl $0, m0x214_tmpLL_high(%esp) #ii# fiLDLL m0x210_tmpLL(%esp) #ii#(push.LL) ysize #_ST1_# cmdline.yscale #_ST0_# cmdline.ysize movl %edx, m0x218_tmp_int(%esp) #ii# %edx is: rows fidivl m0x218_tmp_int(%esp) #ii# / rows #_ST1_# cmdline.yscale #_ST0_# cmdline.ysize / rows fimull m0x20c_tmp_int(%esp) #ii# * cols #_ST1_# cmdline.yscale #_ST0_# (cmdline.ysize / rows) * cols fadds .cFLOAT_0_5 #ii# + 0.5 #_ST1_# cmdline.yscale #_ST0_# (cmdline.ysize / rows) * cols + 0.5 fnstcw m0x0cc_tmp_cw(%esp) #ii# movw m0x0cc_tmp_cw(%esp), %ax #ii# movw $TRUNC, m0x0cc_tmp_cw(%esp) #ii# fldcw m0x0cc_tmp_cw(%esp) #ii# movw %ax, m0x0cc_tmp_cw(%esp) #ii# fistpl m0x21c_tmp_int(%esp) #ii#(pop) #_ST0_# cmdline.yscale fldcw m0x0cc_tmp_cw(%esp) #ii# movl m0x21c_tmp_int(%esp), %ebx #ii# %ebx is: newcols result .Lp49_exit_if: #_ST0_# cmdline.yscale fldz #ii#(push) 0.0 #_ST1_# cmdline.yscale #_ST0_# 0.0 fxch %st(1) #ii# #_ST1_# 0.0 #_ST0_# cmdline.yscale .Lp50_exit_if: ##-256 if (cmdline.ysize) ##-257 *newrowsP = cmdline.ysize; fstp %st(1) #ii#(pop) __del_ST1__ #_ST0_# cmdline.yscale testl %edi, %edi #ii# %edi is: cmdline.ysize jne .Lp56 #ii# #_ST0_# cmdline.yscale .Lp51: ##-258 else if (cmdline.yscale) fldz #ii#(push) 0.0 #_ST1_# cmdline.yscale #_ST0_# 0.0 fxch %st(1) #ii# #_ST1_# 0.0 #_ST0_# cmdline.yscale fucom %st(1) #ii# 0.0 vs cmdline.yscale fstp %st(1) #ii#(pop) __del_ST1__ #_ST0_# cmdline.yscale fnstsw %ax #ii# sahf #ii# jne .Lp52_skip1 #ii# jnp .Lp53_else #ii# .Lp52_skip1: ##-259 *newrowsP = cmdline.yscale * rows +.5; movl %edx, m0x1e4_tmp_int(%esp) #ii# %edx is: rows fimull m0x1e4_tmp_int(%esp) #ii# * rows #_ST0_# cmdline.yscale * rows fadds .cFLOAT_0_5 #ii# + 0.5 #_ST0_# cmdline.yscale * rows + 0.5 fnstcw m0x0ca_tmp_cw(%esp) #ii# movw m0x0ca_tmp_cw(%esp), %ax #ii# movw $TRUNC, m0x0ca_tmp_cw(%esp) #ii# fldcw m0x0ca_tmp_cw(%esp) #ii# movw %ax, m0x0ca_tmp_cw(%esp) #ii# fistpl m0x1e8_tmp_int(%esp) #ii#(pop) #_STx_# ____empty____ fldcw m0x0ca_tmp_cw(%esp) #ii# movl m0x1e8_tmp_int(%esp), %edi #ii# %edi is: newrows result jmp .Lp55_finish #ii# #_ST0_# cmdline.yscale .Lp53_else: ##-260 else if (cmdline.xsize) fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ testl %esi, %esi #ii# %esi is: cmdline.xsize je .Lp54_else #ii# ##-261 *newrowsP = rows * ((float) cmdline.xsize/cols) +.5; movl %edx, m0x1ec_tmp_int(%esp) #ii# %edx is: rows movl %esi, m0x1f0_tmpLL(%esp) #ii# %esi is: cmdline.xsize movl $0, m0x1f4_tmpLL_high(%esp) #ii# fiLDLL m0x1f0_tmpLL(%esp) #ii#(push.LL) #_ST0_# cmdline.xsize movl %ecx, m0x1fc_tmp_int(%esp) #ii# %ecx is: cols fidivl m0x1fc_tmp_int(%esp) #ii# / cols #_ST0_# cmdline.xsize / cols fimull m0x1ec_tmp_int(%esp) #ii# * rows #_ST0_# (cmdline.xsize / cols) * rows fadds .cFLOAT_0_5 #ii# + 0.5 #_ST0_# (cmdline.xsize / cols) * rows + 0.5 fnstcw m0x0c8_tmp_cw(%esp) #ii# movw m0x0c8_tmp_cw(%esp), %ax #ii# movw $TRUNC, m0x0c8_tmp_cw(%esp) #ii# fldcw m0x0c8_tmp_cw(%esp) #ii# movw %ax, m0x0c8_tmp_cw(%esp) #ii# fistpl m0x200_tmp_int(%esp) #ii#(pop) fldcw m0x0c8_tmp_cw(%esp) #ii# movl m0x200_tmp_int(%esp), %edi #ii# %edi is: newrows result jmp .Lp55_finish #ii# #_STx_# ____empty____ .Lp54_else: ##-262 else ##-263 *newrowsP = rows; movl %edx, %edi #ii# %edi is: rows .Lp55_finish: ##-264 } ##-273 if (*newcolsP < 1) *newcolsP = 1; ##-274 if (*newrowsP < 1) *newrowsP = 1; fldz #ii#(push) 0.0 #_ST0_# 0.0 #_ST0_# cmdline.yscale .Lp56: fstp %st(0) #ii#(pop) __del_ST0__ #_STx_# ____empty____ movl %ebx, _m0x090_newcols(%esp) #ii# %ebx is: newcols testl %ebx, %ebx #ii# movl $1, %eax #ii# 1 --> newrows movl $1, %ebx #ii# 1 --> newcols movl _m0x0a8_newmaxval(%esp), %esi #ii# %esi is: newmaxval ? jle .Lp57_skip1 #ii# movl _m0x090_newcols(%esp), %ebx #ii# %ebx is: recovered newcols .Lp57_skip1: testl %edi, %edi #ii# %edi is: newrows jle .Lp58_exit_func #ii# movl %edi, %eax #ii# %eax is: recovered newrows .Lp58_exit_func: ##-275 } ##-717 xscale = (float) newcols / cols; movl %ebx, m0x1dc_tmp_int(%esp) #ii# %ebx is: newcols fildl m0x1dc_tmp_int(%esp) #ii#(push) newcols #_ST0_# newcols movl %ecx, m0x1d4_tmp_int(%esp) #ii# %ecx is: cols fidivl m0x1d4_tmp_int(%esp) #ii# / cols --> xscale #_ST0_# newcols / cols ##-718 yscale = (float) newrows / rows; movl %eax, m0x1e0_tmp_int(%esp) #ii# %eax is: newrows fildl m0x1e0_tmp_int(%esp) #ii#(push) newrows #_ST1_# newcols / cols #_ST0_# newrows movl %edx, m0x1d8_tmp_int(%esp) #ii# %edx is: rows fidivl m0x1d8_tmp_int(%esp) #ii# / rows --> yscale #_ST1_# newcols / cols --> xscale #_ST0_# newrows / rows --> yscale #_ST1_# xscale #_ST0_# yscale ##-720 if (cmdline.verbose) { cmpl $0, m0x2a8_cmdline_verbose(%esp) #ii# 0 vs verbose movl %eax, %edi #ii# %edi is: newrows je .Lp59_exit_if #ii# movl %ebx, m0x00c_P4(%esp) #ii# %ebx is: newcols fxch %st(1) #ii# #_ST1_# yscale #_ST0_# xscale fSTL m0x004_P2(%esp) #ii# xscale (double on P2,P3) ##-721 pm_message("Scaling by %f horizontally to %d columns.", ##-722 xscale, newcols ); movl $.str_02, m0x000_P1(%esp) #ii# fSTPL m0x078_xscale(%esp) #ii#(pop) xscale (double) #_ST0_# yscale #_STx==> xscale --> xscale fSTPL m0x070_yscale(%esp) #ii#(pop) yscale (double) #_STx_# ____empty____ #_STx==># yscale --> yscale calll pm_message #ii# movl %edi, m0x00c_P4(%esp) #ii# newrows fLDL m0x070_yscale(%esp) #ii#(push) yscale (double) #_ST0_# yscale fSTPL m0x004_P2(%esp) #ii#(pop) yscale (double on P2,P3) #_STx_# ____empty____ ##-723 pm_message("Scaling by %f vertically to %d rows.", ##-724 yscale, newrows); movl $.str_03, m0x000_P1(%esp) #ii# calll pm_message #ii# fLDL m0x070_yscale(%esp) #ii#(push) yscale (double) fLDL m0x078_xscale(%esp) #ii#(push) xscale (double) #_ST1_# yscale #_ST0_# xscale movl m0x280_cols(%esp), %ecx #ii# %ecx is: cols fxch %st(1) #ii# #_ST1_# xscale #_ST0_# yscale .Lp59_exit_if: ##-725 } ##-727 if (xscale * cols < newcols - 1 || ##-728 yscale * rows < newrows - 1) fSTPL m0x070_yscale(%esp) #ii#(pop) yscale (double) #_ST0_# xscale #_STx==> yscale --> yscale fSTL m0x078_xscale(%esp) #ii# xscale (double) fSTL m0x078_xscale(%esp) #ii# xscale (double) fSTL m0x078_xscale(%esp) #ii# xscale (double) fSTL m0x078_xscale(%esp) #ii# xscale (double) #_ST0_# xscale movl %ecx, m0x1cc_tmp_int(%esp) #ii# %ecx is: cols fimull m0x1cc_tmp_int(%esp) #ii# xscale * cols #_ST0_# xscale * cols leal -1(%ebx), %eax #ii# %eax is: (newcols - 1) movl %eax, m0x02c_newcols_MINUS_1(%esp) #ii# (newcols - 1) movl %eax, m0x1d0_tmp_int(%esp) #ii# fildl m0x1d0_tmp_int(%esp) #ii#(push) (newcols - 1) #_ST0_# xscale * cols #_ST0_# (newcols - 1) fucompp #ii#(pop2) (xscale * cols) vs (newcols - 1) #_STx_# ____empty____ fnstsw %ax #ii# sahf #ii# movl %ebx, %edx #ii# %edx is: newcols ja .Lp60_enter_if #ii# movl m0x284_rows(%esp), %eax #ii# %eax is: rows movl %eax, m0x1c4_tmp_int(%esp) #ii# fLDL m0x070_yscale(%esp) #ii#(push) yscale (double) #_ST0_# yscale fimull m0x1c4_tmp_int(%esp) #ii# yscale * rows #_ST0_# yscale * rows leal -1(%edi), %eax #ii# %eax is: (newrows - 1) movl %eax, m0x1c8_tmp_int(%esp) #ii# fildl m0x1c8_tmp_int(%esp) #ii#(push) newrows - 1 #_ST1_# yscale * rows #_ST0_# (newrows - 1) fucompp #ii#(pop2) (yscale * rows) vs (newros - 1) #_STx_# ____empty____ fnstsw %ax #ii# sahf #ii# jbe .Lp61_exit_if #ii# .Lp60_enter_if: ##-729 pm_error("Arithmetic precision of this program is inadequate to " ##-730 "do the specified scaling. Use a smaller input image " ##-731 "or a slightly different scale factor."); movl $.str_04, m0x000_P1(%esp) #ii# movl %edx, %ebx #ii# %ebx is: newcols calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it movl %ebx, %edx #ii# %edx is: newcols .Lp61_exit_if: ##-733 pnm_writepnminit(stdout, newcols, newrows, newmaxval, newformat, 0); movl __stdoutp, %eax #ii# %eax is: stdout movl m0x06c_newformat(%esp), %ecx #ii# %ecx is: newformat movl %ecx, m0x010_P5(%esp) #ii# newformat movl %esi, m0x00c_P4(%esp) #ii# %esi is: newmaxval movl %edi, %ebx #ii# %edi,%ebx is: newrows movl %ebx, m0x008_P3(%esp) #ii# %ebx is: newrows movl %edx, m0x004_P2(%esp) #ii# %edx is: newcols movl %eax, m0x000_P1(%esp) #ii# %eax is: stdout movl $0, m0x014_P6(%esp) #ii# movl %edx, %esi #ii# %esi is: newcols calll pnm_writepnminit #ii# ##-735 if (cmdline.nomix) cmpl $0, m0x2ac_cmdline_nomix(%esp) #ii# 0 vs nomix movl m0x280_cols(%esp), %eax #ii# %eax is: cols movl m0x27c_format(%esp), %ecx #ii# %ecx is: format movl %ecx, m0x08c_format(%esp) #ii# format je .Lp70_scaleWithMixing #ii# ##-736 scaleWithoutMixing(ifP, cols, rows, maxval, format, ##-737 newcols, newrows, newmaxval, newformat, ##-738 xscale, yscale); ############################################################################### ##-630 static void ##-631 scaleWithoutMixing(FILE * const ifP, ##-632 int const cols, int const rows, ##-633 xelval const maxval, int const format, ##-634 int const newcols, int const newrows, ##-635 xelval const newmaxval, int const newformat, ##-636 float const xscale, float const yscale) ##-636 { ##-650 xel* xelrow; ##-651 xel* newxelrow; ##-652 int row; ##-653 int rowInXelrow; ##-655 xelrow = pnm_allocrow(cols); movl %eax, m0x000_P1(%esp) #xM# %eax is: cols movl %eax, m0x09c_cols(%esp) #xM# calll pnm_allocrow #xM# movl %eax, %edi #xM# %edi is: xelrow ##-658 newxelrow = pnm_allocrow(newcols); movl %esi, m0x000_P1(%esp) #xM# %esi is: newcols movl %esi, m0x080_newcols(%esp) #xM# calll pnm_allocrow #xM# movl %eax, _m0x088_newxelrow(%esp) #xM# %eax is: &newxelrow[0] ##-660t for (row = 0; row < newrows; ++row) { ##-661 int col; testl %ebx, %ebx #xM# %ebx is: newrows movl %ebx, %eax #xM# %eax is: newrows movl %eax, m0x068_newrows(%esp) #xM# jle .Lp68_exit_func #xM# ##-669t for (col = 0; col < newcols; ++col) { ##-669t for (col = 0; col < newcols; ++col) { movl _m0x090_newcols(%esp), %eax #xM# %eax is: newcols testl %eax, %eax #xM# jg .Lp62_skip1 #xM# movl $1, %eax #xM# 1 --> newcols .Lp62_skip1: movl %eax, _m0x090_newcols(%esp) #xM# newcols ##-656 rowInXelrow = -1; movl $-1, %ebx #xM# %ebx is: rowInXelrow ##-660t for (row = 0; row < newrows; ++row) { xorl %ecx, %ecx #xM# %ecx is: row .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lp63_row_loop: ##-663 int const inputRow = (int) (row / yscale); movl %ecx, _m0x084_row(%esp) #xM# %ecx is: row movl %ecx, m0x1bc_tmp_int(%esp) #xM# row fildl m0x1bc_tmp_int(%esp) #xM#(push) row fLDL m0x070_yscale(%esp) #xM#(push) yscale (double) #_ST1_# row #_ST0_# yscale fdivrp %st(1) #xM#(pop) / yscale ###### <== FDIVP ST(1),ST(0) ... ST(1)=ST(1)/ST(0) #_ST0_# row / yscale fnstcw m0x0c6_tmp_cw(%esp) #xM# movw m0x0c6_tmp_cw(%esp), %ax #xM# movw $TRUNC, m0x0c6_tmp_cw(%esp) #xM# fldcw m0x0c6_tmp_cw(%esp) #xM# movw %ax, m0x0c6_tmp_cw(%esp) #xM# fistpl m0x1c0_tmp_int(%esp) #xM#(pop) inputRow #_STx_# ____empty____ fldcw m0x0c6_tmp_cw(%esp) #xM# ##-665t for (; rowInXelrow < inputRow; ++rowInXelrow) movl m0x1c0_tmp_int(%esp), %eax #xM# %eax is: inputRow movl %eax, _m0x0a0_inputRow(%esp) #xM# cmpl %eax, %ebx #xM# inputRow vs rowInXelrow movl m0x08c_format(%esp), %esi #xM# %esi is: format jge .Lp65_exit_read_loop #xM# .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lp64_read_loop: ##-666 pnm_readpnmrow(ifP, xelrow, cols, newmaxval, format); movl %esi, m0x010_P5(%esp) #xM# %esi is: format movl _m0x0a8_newmaxval(%esp), %eax #xM# %eax is: newmaxval movl %eax, m0x00c_P4(%esp) #xM# movl m0x09c_cols(%esp), %eax #xM# %eax is: cols movl %eax, m0x008_P3(%esp) #xM# movl %edi, m0x004_P2(%esp) #xM# %edi is: xelrow movl m0x098_ifP(%esp), %eax #xM# %eax is: ifP movl %eax, m0x000_P1(%esp) #xM# calll pnm_readpnmrow #xM# ##-665t for (; rowInXelrow < inputRow; ++rowInXelrow) ##-665t for (; rowInXelrow < inputRow; ++rowInXelrow) incl %ebx #xM# %ebx is: rowInXelrow ++ cmpl %ebx, _m0x0a0_inputRow(%esp) #xM# rowInXelrow vs inputRow jne .Lp64_read_loop #xM# movl _m0x0a0_inputRow(%esp), %ebx #xM# inputRow --> rowInXelrow .Lp65_exit_read_loop: ##-669t for (col = 0; col < newcols; ++col) { xorl %eax, %eax #xM# %eax is: col ? cmpl $0, m0x080_newcols(%esp) #xM# 0 vs newcols movl _m0x088_newxelrow(%esp), %ecx #xM# %exc is: &newxelrow[0] fLDL m0x078_xscale(%esp) #xM#(push) xscale (double) #_ST0_# xscale jle .Lp67_exit_col_loop #xM# .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lp66_col_loop: ##-670 int const inputCol = (int) (col / xscale); movl %eax, m0x1b4_tmp_int(%esp) #xM# %eax is: col ? fildl m0x1b4_tmp_int(%esp) #xM#(push) col ? #_ST1_# xscale #_ST0_# col fdiv %st(1) #xM# / xscale #### <== FDIV ST(0),ST(i) ... ST(0)=ST(0)/ST(1) #_ST1_# xscale #_ST0_# col / xscale fnstcw m0x0c4_tmp_cw(%esp) #xM# movw m0x0c4_tmp_cw(%esp), %dx #xM# movw $TRUNC, m0x0c4_tmp_cw(%esp) #xM# fldcw m0x0c4_tmp_cw(%esp) #xM# movw %dx, m0x0c4_tmp_cw(%esp) #xM# fistpl m0x1b8_tmp_int(%esp) #xM#(pop) inputCol ? #_ST0_# xscale fldcw m0x0c4_tmp_cw(%esp) #xM# ##-672 newxelrow[col] = xelrow[inputCol]; imull $12, m0x1b8_tmp_int(%esp), %edx #xM# %edx is: 12*inputCol ? movl 8(%edi,%edx), %esi #xM# %esi is: xelrow[12*inputCol].b ? movl %esi, 8(%ecx) #xM# xelrow[].b --> newxelrow[].b movl (%edi,%edx), %esi #xM# %esi is: xelrow[].r ? movl 4(%edi,%edx), %edx #xM# %edx is: xelrow[].g ? movl %edx, 4(%ecx) #xM# xelrow[].g --> newxelrow[].g movl %esi, (%ecx) #xM# xelrow[].r --> newxelrow[].r incl %eax #xM# %eax is: col ++ ? addl $12, %ecx #xM# newxelrow[] ++ cmpl %eax, _m0x090_newcols(%esp) #xM# col vs newcols ? jne .Lp66_col_loop #xM# #_ST0_# xscale .Lp67_exit_col_loop: ##-673 } ##-675 pnm_writepnmrow(stdout, newxelrow, newcols, ##-676 newmaxval, newformat, 0 ); fstp %st(0) #xM#(pop) __del_ST0__ #_STx_# ____empty____ movl __stdoutp, %eax #xM# %eax is: stdout movl m0x06c_newformat(%esp), %ecx #xM# %ecx is: newformat movl %ecx, m0x010_P5(%esp) #xM# movl _m0x0a8_newmaxval(%esp), %ecx #xM# %ecx is: newmaxval movl %ecx, m0x00c_P4(%esp) #xM# movl m0x080_newcols(%esp), %ecx #xM# %ecx is: newcols movl %ecx, m0x008_P3(%esp) #xM# movl _m0x088_newxelrow(%esp), %ecx #xM# %ecx is: &newxelrow[0] movl %ecx, m0x004_P2(%esp) #xM# movl %eax, m0x000_P1(%esp) #xM# %eax is: stdout movl $0, m0x014_P6(%esp) #xM# calll pnm_writepnmrow #xM# ##-660t for (row = 0; row < newrows; ++row) { movl _m0x084_row(%esp), %ecx #xM# %ecx is: row incl %ecx #xM# row ++ movl m0x068_newrows(%esp), %eax #xM# %eax is: newrows cmpl %eax, %ecx #xM# newrows vs row jne .Lp63_row_loop #xM# .Lp68_exit_func: # -------------------- scaleWithoutMixing.exit ##-677 } ##-678 pnm_freerow(xelrow); ##-679 pnm_freerow(newxelrow); ##-680 } movl %edi, m0x000_P1(%esp) #xM# %edi is: xelrow calll free #xM# movl _m0x088_newxelrow(%esp), %eax #xM# %eax is: &newxelrow[0] .Lp69_for_free: movl %eax, m0x000_P1(%esp) # newxelrow or vertScaledRow calll free # ##-744 pm_close(ifP); movl m0x098_ifP(%esp), %eax # %eax is: ifP movl %eax, m0x000_P1(%esp) # calll pm_close # ##-745 pm_close(stdout); movl __stdoutp, %eax # %eax is: stdout movl %eax, m0x000_P1(%esp) # calll pm_close # ##-747 exit(0); movl $0, m0x000_P1(%esp) # calll exit # exit ##-748 } .Lp70_scaleWithMixing: ##-739 else ##-740 scaleWithMixing(ifP, cols, rows, maxval, format, ##-741 newcols, newrows, newmaxval, newformat, ##-742 xscale, yscale, cmdline.verbose); ############################################################################### ##-465 static void ##-466 scaleWithMixing(FILE * const ifP, ##-467 int const cols, int const rows, ##-468 xelval const maxval, int const format, ##-469 int const newcols, int const newrows, ##-470 xelval const newmaxval, int const newformat, ##-471 float const xscale, float const yscale, ##-472 bool const verbose) #_____VARIABLE_NAME_CONVERSION______ # _caller_side____::_callie_side____ # cmdline.verbose == verbose <== ! ##-472 { ##-520 xel* xelrow; ##-521 xel* vertScaledRow; ##-525 xel* newxelrow; ##-526 float rowsleft; ##-533 float fracrowtofill; ##-537 float *rs, *gs, *bs; ##-541 int rowsread; ##-543 int row; movl %esi, m0x080_newcols(%esp) # newcols movl %eax, %esi # cols movl m0x284_rows(%esp), %eax # rows movl %eax, m0x048_rows(%esp) # rows movl m0x2a8_cmdline_verbose(%esp), %eax # verbose movl %eax, m0x040_verbose(%esp) # verbose ##-545 xelrow = pnm_allocrow(cols); movl %esi, m0x000_P1(%esp) # cols calll pnm_allocrow # movl %eax, m0x038_xelrow_ZERO(%esp) # %eax is: &xelrow[0] ##-546 vertScaledRow = pnm_allocrow(cols); movl %esi, m0x000_P1(%esp) # cols calll pnm_allocrow # movl %eax, m0x060_vertScaledRow(%esp) # &vertScaledRow[0] ##-547 rs = (float*) pm_allocrow( cols, sizeof(float) ); movl %esi, m0x000_P1(%esp) # cols movl $4, m0x004_P2(%esp) # sizeof(float) calll pm_allocrow # movl %eax, m0x054_rs(%esp) # &rs[0] ##-548 gs = (float*) pm_allocrow( cols, sizeof(float) ); movl %esi, m0x000_P1(%esp) # cols movl $4, m0x004_P2(%esp) # sizeof(float) calll pm_allocrow # movl %eax, m0x05c_gs(%esp) # &gs[0] ##-549 bs = (float*) pm_allocrow( cols, sizeof(float) ); movl %esi, m0x000_P1(%esp) # cols movl $4, m0x004_P2(%esp) # sizeof(float) calll pm_allocrow # movl %eax, m0x050_bs(%esp) # &bs[0] ##-552 zeroAccum(cols, format, rs, gs, bs); ############################################################################### ##-393 static void ##-394 zeroAccum(int const cols, int const format, ##-395 float rs[], float gs[], float bs[]) ##-395 { ##-397 int col; ##-399 for ( col = 0; col < cols; ++col ) testl %esi, %esi # %esi is: cols movl %esi, %edi # %edi is: cols jle .Lp72_exit_loop # movl m0x050_bs(%esp), %eax # %eax is: &bs[0] movl m0x05c_gs(%esp), %ecx # %ecx is: &gs[0] movl m0x054_rs(%esp), %edx # %edx is: &rs[0] movl %edi, %esi # %esi is: cols --> counter n .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lp71_loop: ##-400 rs[col] = gs[col] = bs[col] = 0.0; movl $0, (%eax) # 0 --> bs[] movl $0, (%ecx) # 0 --> gs[] movl $0, (%edx) # 0 --> rs[] addl $4, %edx # rs ++ addl $4, %ecx # gs ++ addl $4, %eax # bs ++ decl %esi # n-- jne .Lp71_loop # ##-401 } .Lp72_exit_loop: # -------------------- zeroAccum.exit.i ##-555 newxelrow = pnm_allocrow( newcols ); movl m0x080_newcols(%esp), %eax # newcols movl %eax, m0x000_P1(%esp) # newcols calll pnm_allocrow # movl %eax, m0x030_newxelrow(%esp) # &newxelrow[0] ##-557t for ( row = 0; row < newrows; ++row ) { testl %ebx, %ebx # newrows movl _m0x0a8_newmaxval(%esp), %esi # newmaxval ? movl %edi, m0x09c_cols(%esp) # cols #_STx_# ____empty____ fldz #(push) 0.0 fldz #(push) 0.0 fldz #(push) 0.0 #_ST2_# 0.0 #_ST1_# 0.0 #_ST0_# 0.0 jle .Lq58_exit_loop # fstp %st(2) #(pop) fstp %st(0) #(pop) __del_ST0__ fstp %st(0) #(pop) __del_ST0__ #_STx_# ____empty____ movl %ebx, %ecx # newrows movl %ecx, m0x068_newrows(%esp) # newrows imull $12, %edi, %eax # %eax is: 12*cols movl m0x060_vertScaledRow(%esp), %ebx # %ebx is: &vertScaledRow[0] leal -4(%eax,%ebx), %edx # %edx is: &vertScaledRow[cols-1].b movl %edx, m0x024_vertScaledRow_COLSminus1_b(%esp) # &vertScaledRow[cols-1].b leal -12(%eax,%ebx), %edx # %edx is: &vertScaledRow[cols-1].r movl %edx, m0x020_vertScaledRow_COLSminus1_r(%esp) # &vertScaledRow[cols-1].r movl m0x038_xelrow_ZERO(%esp), %edx # %edx is: &xelrow[0] leal 8(%edx), %edx # %edx += 8 (.r --> .b) movl %edx, m0x058_xelrow_ZERO_b(%esp) # &xelrow[0].b leal 8(%ebx), %edx # %edx is: &vertScaledRow[0].b movl %edx, m0x028_vertScaledRow_ZERO_b(%esp) # &vertScaledRow[0].b movl m0x030_newxelrow(%esp), %edx # %edx is: &newxelrow[0] leal 8(%edx), %edx # %edx is: &newxelrow[0].b movl %edx, m0x044_newxelrow_ZERO_b(%esp) # &newxelrow[0].b ##-557t for ( row = 0; row < newrows; ++row ) { ##-557t for ( row = 0; row < newrows; ++row ) { movl $0, m0x03c_row(%esp) # 0 --> row ##-550 rowsread = 0; ##-551 rowsleft = 0.0; ##-553 fracrowtofill = 1.0; movl $0, m0x04c_rowsread(%esp) # 0 --> rowsread leal -8(%eax,%ebx), %eax # %eax is: &vertScaledRow[cols-1].g movl %eax, m0x01c_vertScaledRow_COLSminus1_g(%esp) # &vertScaledRow[cols-1].g movl %ecx, %eax # %eax is: newrows #_STx_# ____empty____ fldz #(push) 0.0 flds .cFLOAT_0_5 #(push) 0.5 fSTL _m0x0a0_cF_0_5(%esp) # 0.5 (double) fSTL _m0x0a0_cF_0_5(%esp) # 0.5 (double) fSTL _m0x0a0_cF_0_5(%esp) # 0.5 (double) fSTL _m0x0a0_cF_0_5(%esp) # 0.5 (double) fSTL _m0x0a0_cF_0_5(%esp) # 0.5 (double) fSTL _m0x0a0_cF_0_5(%esp) # 0.5 (double) fSTL _m0x0a0_cF_0_5(%esp) # 0.5 (double) fSTL _m0x0a0_cF_0_5(%esp) # 0.5 (double) fld %st(1) #(push) rowsleft = 0.0 #_ST2_# 0.0 #_ST1_# 0.5 #_ST0_# rowsleft = 0.0 .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# rowsleft .Lp73_row_loop: ##-560 if ( newrows == rows ) { cmpl m0x048_rows(%esp), %eax # rows vs newrows movl m0x098_ifP(%esp), %ecx # %ecx is: ifP jne .Lp74_else # fstp %st(2) #(pop) fstp %st(0) #(pop) __del_ST0__ fstps m0x034_rowsleft(%esp) #(pop) save rowsleft #_STx_# ____empty____ ##-561 pnm_readpnmrow( ifP, vertScaledRow, cols, newmaxval, format ); movl m0x08c_format(%esp), %eax # format movl %eax, m0x010_P5(%esp) # format movl %esi, m0x00c_P4(%esp) # newmaxval movl %edi, m0x008_P3(%esp) # cols movl m0x060_vertScaledRow(%esp), %eax # &vertScaledRow[0] movl %eax, m0x004_P2(%esp) # &vertScaledRow[0] movl %ecx, m0x000_P1(%esp) # ifP calll pnm_readpnmrow # jmp .Lq29_start_write # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lp74_else: #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# rowsleft ##-562 } else { ##-563d while (fracrowtofill > 0) { fld1 #(push) 1.0 (fracrowtofill = 1.0) fLDL m0x070_yscale(%esp) #(push) yscale (double) #_ST4_# cZERO = 0.0 #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# fracrowtofill = 1.0 #_ST0_# yscale movl %edi, %ebx # %ebx is: cols ? .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq01_while_loop: ##-564 if (rowsleft <= 0.0) { fxch %st(4) # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# fracrowtofill #_ST0_# cZERO = 0.0 fucom %st(2) # rowsleft vs 0.0 fnstsw %ax # sahf # jb .Lq04_exit_if # fstp %st(4) #(pop) #_ST3_# cZERO = 0.0 #_ST2_# cF:0.5 #_ST1_# rowsleft #_ST0_# fracrowtofill fstp %st(3) #(pop) #_ST2_# fracrowtofill #_ST1_# cF:0.5 #_ST0_# rowsleft fstp %st(1) #(pop) __del_ST1__ #_ST1_# fracrowtofill #_ST0_# rowsleft fstp %st(0) #(pop) __del_ST0__ #_ST0_# fracrowtofill ##-565 if (rowsread < rows) { movl m0x04c_rowsread(%esp), %eax # %eax is: rowsread cmpl m0x048_rows(%esp), %eax # rows vs rowsread jge .Lq02_else # ##-566 pnm_readpnmrow(ifP, xelrow, cols, newmaxval, format); movl %eax, %edi # %edi is: rowsread movl m0x08c_format(%esp), %eax # format movl %eax, m0x010_P5(%esp) # format movl %esi, m0x00c_P4(%esp) # %esi is: newmaxval movl %ebx, m0x008_P3(%esp) # %ebx is: cols movl m0x038_xelrow_ZERO(%esp), %eax # %eax is: &xelrow[0] movl %eax, m0x004_P2(%esp) # xelrow movl %ecx, m0x000_P1(%esp) # %ecx is: ifP fSTPL _m0x090_fracrowtofill(%esp) #(pop) save fracrowtofill (double) #_STx_# ____empty____ #_STx==> fracrowtofill --> _m0x090_fracrowtofill calll pnm_readpnmrow # fLDL _m0x090_fracrowtofill(%esp) #(push) recover fracrowtofill (double) fLDL _m0x0a0_cF_0_5(%esp) #(push) 0.5 (double) fldz #(push) 0.0 #_ST2_# fracrowtofill = _m0x090_fracrowtofill #_ST1_# _m0x0a0_cF_0_5 #_ST0_# cZERO = 0.0 ##-567 ++rowsread; incl %edi # rowsread ++ movl %edi, m0x04c_rowsread(%esp) # fLDL m0x070_yscale(%esp) #(push) yscale (double) fld %st(0) #(push) dup yscale (rowsleft = yscale) #_ST4_# fracrowtofill #_ST3_# cF:0.5 #_ST2_# cZERO = 0.0 #_ST1_# yscale #_ST0_# rowsleft = m0x070_yscale fxch %st(1) # #_ST4_# fracrowtofill #_ST3_# cF:0.5 #_ST2_# cZERO = 0.0 #_ST1_# rowsleft #_ST0_# yscale fxch %st(4) # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# cZERO = 0.0 #_ST1_# rowsleft #_ST0_# fracrowtofill fxch %st(1) # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# rowsleft fxch %st(2) # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# fracrowtofill #_ST0_# cZERO = 0.0 jmp .Lq04_exit_if # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq02_else: #_ST0_# fracrowtofill ##-568 } else { ##-577 if (verbose) cmpl $0, m0x040_verbose(%esp) # 0 vs verbose je .Lq03_exit_if # fSTL m0x004_P2(%esp) # fracrowtofill (double) #_ST0_# fracrowtofill ##-578 pm_message("%f of bottom row stretched due to " ##-579 "arithmetic imprecision", ##-580 fracrowtofill); movl $.str_05, m0x000_P1(%esp) # fSTPL _m0x090_fracrowtofill(%esp) #(pop) save fracrowtofill (double) #_STx_# ____empty____ #_STx==> fracrowtofill --> _m0x090_fracrowtofill calll pm_message # fLDL _m0x090_fracrowtofill(%esp) #(push) recover fracrowtofill (double) #_ST0_# fracrowtofill <-- _m0x090_fracrowtofill .Lq03_exit_if: fLDL m0x070_yscale(%esp) #(push) yscale (double) fld %st(0) #(push) dup yscale (rowsleft = yscale) fldz #(push) 0.0 fLDL _m0x0a0_cF_0_5(%esp) #(push) 0.5 (double) #_ST4_# fracrowtofill #_ST3_# yscale #_ST2_# rowsleft = m0x070_yscale #_ST1_# cZERO = 0.0 #_ST0_# _m0x0a0_cF_0_5 fxch %st(3) # #_ST4_# fracrowtofill #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# yscale fxch %st(4) # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill fxch %st(1) # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# fracrowtofill #_ST0_# cZERO = 0.0 .Lq04_exit_if: ##-581 } ##-582 rowsleft = yscale; ##-583 } ##-584 if (rowsleft < fracrowtofill) { fxch %st(1) # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill fucom %st(2) # rowsleft vs fracrowtofill fnstsw %ax # sahf # jbe .Lq10_else # ##-585 accumOutputRow(xelrow, rowsleft, rs, gs, bs, ##-586 cols, format); ############################################################################### ##-405 static void ##-406 accumOutputRow(xel * const xelrow, float const fraction, ##-407 float rs[], float gs[], float bs[], ##-408 int const cols, int const format) #_____VARIABLE_NAME_CONVERSION______ # _caller_side____::_callie_side____ # rowsleft == fraction <== ! ##-408 { ##-413 int col; ##-415 switch ( PNM_FORMAT_TYPE(format) ) { movl m0x08c_format(%esp), %eax # format cmpl $0x5033, %eax # 'P3' vs format je .Lq05_skip2 # cmpl $0x5036, %eax # 'P6' vs format jne .Lq07_default # .Lq05_skip2: ##-416 case PPM_TYPE: ##-417h for ( col = 0; col < cols; ++col ) { ##-417h for ( col = 0; col < cols; ++col ) { testl %ebx, %ebx # %ebx is: cols movl m0x054_rs(%esp), %eax # %eax is: &rs[0] movl m0x05c_gs(%esp), %ecx # %ecx is: &gs[0] movl m0x058_xelrow_ZERO_b(%esp), %edx # %edx is: &xelrow[0].b movl m0x050_bs(%esp), %esi # %esi is: &bs[0] movl %ebx, %edi # %edi is: cols --> counter n jle .Lq09_exit_func # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill .Lq06_col_loop: ##-418 rs[col] += fraction * PPM_GETR(xelrow[col]); movl -8(%edx), %ebx # xelrow[].r --> %ebx movl %ebx, m0x178_tmpLL(%esp) # xelrow[col].r movl $0, m0x17c_tmpLL_high(%esp) # fiLDLL m0x178_tmpLL(%esp) #(push.LL) #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].r fmul %st(3) # * fraction == rowsleft #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].r * rowsleft fadds (%eax) # + rs[] fstps (%eax) #(pop) rs[] #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill #_STx==> xelrow[col].r * rowsleft + rs[] ##-419 gs[col] += fraction * PPM_GETG(xelrow[col]); movl -4(%edx), %ebx # xelrow[].g --> %ebx movl %ebx, m0x180_tmpLL(%esp) # xelrow[col].g movl $0, m0x184_tmpLL_high(%esp) # fiLDLL m0x180_tmpLL(%esp) #(push.LL) #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].g fmul %st(3) # * fraction == rowsleft #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].g * rowsleft fadds (%ecx) # + gs[] fstps (%ecx) #(pop) gs[] #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill #_STx==> xelrow[col].g * rowsleft + gs[] ##-420 bs[col] += fraction * PPM_GETB(xelrow[col]); movl (%edx), %ebx # xelrow[].b --> %ebx movl %ebx, m0x188_tmpLL(%esp) # xelrow[col].b movl $0, m0x18c_tmpLL_high(%esp) # fiLDLL m0x188_tmpLL(%esp) #(push.LL) #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].b fmul %st(3) # * fraction == rowsleft #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].b * rowsleft fadds (%esi) # + bs[] fstps (%esi) #(pop) bs[] #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill #_STx==> xelrow[col].b * rowsleft + bs[] ##-417h for ( col = 0; col < cols; ++col ) { addl $4, %esi # bs ++ addl $12, %edx # xelrow ++ addl $4, %ecx # gs ++ addl $4, %eax # rs ++ decl %edi # n-- ##-421 } ##-422 break; jne .Lq06_col_loop # jmp .Lq09_exit_func # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq07_default: ##-424 default: ##-425h for ( col = 0; col < cols; ++col) ##-425h for ( col = 0; col < cols; ++col) testl %ebx, %ebx # cols movl m0x058_xelrow_ZERO_b(%esp), %eax # %eax is: &xelrow[0].b movl m0x05c_gs(%esp), %ecx # %ecx is: &gs[0] movl %ebx, %edx # %edx is: cols --> counter n jle .Lq09_exit_func # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq08_col_loop: ##-426 gs[col] += fraction * PNM_GET1(xelrow[col]); movl (%eax), %esi # %esi is: xelrow[col].b movl %esi, m0x170_tmpLL(%esp) # it is unsigned, so movl $0, m0x174_tmpLL_high(%esp) # add upper with plus sign fiLDLL m0x170_tmpLL(%esp) #(push.LL) load it fmul %st(3) # *= fraction fadds (%ecx) # gs[] fstps (%ecx) #(pop) gs[] ##-425h for ( col = 0; col < cols; ++col) addl $4, %ecx # gs ++ addl $12, %eax # xelrow[col].b ++ decl %edx # n-- jne .Lq08_col_loop # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # ##-427 break; ##-428 } ##-429 } #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill .Lq09_exit_func: ##-587 fracrowtofill -= rowsleft; ##-588 rowsleft = 0.0; fsubp %st(2) #(pop) fracrowtofill - rowsleft ##### <== FSUBRP ST(i),ST(0) ... ST(i)=ST(0)-ST(i) #_ST3_# yscale #_ST2_# cF:0.5 #_ST1_# fracrowtofill - rowsleft #_ST0_# cZERO = 0.0 fxch %st(1) # #_ST3_# yscale #_ST2_# cF:0.5 #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill ##-563d while (fracrowtofill > 0) { fucom %st(1) # 0.0 vs fracrowtofill fnstsw %ax # sahf # fld %st(1) #(push) rowsleft = 0.0 #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# rowsleft = 0.0 movl m0x098_ifP(%esp), %ecx # ifP movl _m0x0a8_newmaxval(%esp), %esi # newmaxval ? movl m0x09c_cols(%esp), %ebx # cols fxch %st(2) # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# fracrowtofill #_ST0_# cZERO = 0.0 fxch %st(4) # #_ST4_# cZERO = 0.0 #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# fracrowtofill #_ST0_# yscale ja .Lq01_while_loop # fstp %st(2) #(pop) #_ST3_# cZERO = 0.0 #_ST2_# cF:0.5 #_ST1_# yscale #_ST0_# fracrowtofill fstp %st(0) #(pop) __del_ST0__ #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# yscale fSTPL m0x070_yscale(%esp) #(pop) save yscale (double) #_ST1_# cZERO = 0.0 #_ST0_# cF:0.5 #_STx==> m0x070_yscale fld %st(1) #(push) rowsleft = 0.0 ?? #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# rowsleft = 0.0 movl m0x08c_format(%esp), %eax # format jmp .Lq16_exit_while # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill .Lq10_else: ##-589 } else { ##-590 accumOutputRow(xelrow, fracrowtofill, rs, gs, bs, ##-591 cols, format); ############################################################################### ##-405 static void ##-406 accumOutputRow(xel * const xelrow, float const fraction, ##-407 float rs[], float gs[], float bs[], ##-408 int const cols, int const format) #_____VARIABLE_NAME_CONVERSION______ # _caller_side____::_callie_side____ # fracrowtofill == fraction <== ! ##-408 { ##-413 int col; ##-415 switch ( PNM_FORMAT_TYPE(format) ) { movl m0x08c_format(%esp), %eax # format cmpl $0x5033, %eax # 'P3' vs format je .Lq11_skip2 # cmpl $0x5036, %eax # 'P6' vs format jne .Lq13_default # .Lq11_skip2: ##-416 case PPM_TYPE: ##-417h for ( col = 0; col < cols; ++col ) { testl %ebx, %ebx # %ebx is: cols movl m0x054_rs(%esp), %eax # %eax is: &rs[0] movl m0x05c_gs(%esp), %ecx # %ecx is: &gs[0] movl m0x058_xelrow_ZERO_b(%esp), %edx # %edx is: &xelrow[0].b movl m0x050_bs(%esp), %esi # %esi is: &bs[0] movl %ebx, %edi # %edi is: cols --> counter n jle .Lq15_exit_func # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq12_loop: ##-418 rs[col] += fraction * PPM_GETR(xelrow[col]); movl -8(%edx), %ebx # xelrow[].r movl %ebx, m0x198_tmpLL(%esp) # xelrow[col].r movl $0, m0x19c_tmpLL_high(%esp) # fiLDLL m0x198_tmpLL(%esp) #(push.LL) #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].r fmul %st(1) # * fraction == fracrowtofill #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].r * fracrowtofill fadds (%eax) # + rs[] fstps (%eax) #(pop) rs[] #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill #_STx==> xelrow[col].r * fracrowtofill + rs[] ##-419 gs[col] += fraction * PPM_GETG(xelrow[col]); movl -4(%edx), %ebx # xelrow[].g movl %ebx, m0x1a0_tmpLL(%esp) # xelrow[col].g movl $0, m0x1a4_tmpLL_high(%esp) # fiLDLL m0x1a0_tmpLL(%esp) #(push.LL) #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].g fmul %st(1) # * fraction == fracrowtofill #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].g * fracrowtofill fadds (%ecx) # + gs[] fstps (%ecx) #(pop) gs[] #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill #_STx==> xelrow[col].g * fracrowtofill + gs[] ##-420 bs[col] += fraction * PPM_GETB(xelrow[col]); movl (%edx), %ebx # xelrow[].b movl %ebx, m0x1a8_tmpLL(%esp) # xelrow[col].b movl $0, m0x1ac_tmpLL_high(%esp) # fiLDLL m0x1a8_tmpLL(%esp) #(push.LL) #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].b fmul %st(1) # * fraction == fracrowtofill #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].b * fracrowtofill fadds (%esi) # + bs[] fstps (%esi) #(pop) bs[] #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill #_STx==> xelrow[col].b * fracrowtofill + bs[] ##-417h for ( col = 0; col < cols; ++col ) { ##-417h for ( col = 0; col < cols; ++col ) { addl $4, %esi # bs ++ addl $12, %edx # xelrow ++ addl $4, %ecx # gs ++ addl $4, %eax # rs ++ decl %edi # n-- ##-421 } ##-422 break; jne .Lq12_loop # jmp .Lq15_exit_func # #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill .Lq13_default: ##-424 default: ##-425h for ( col = 0; col < cols; ++col) testl %ebx, %ebx # %ebx is: cols movl m0x058_xelrow_ZERO_b(%esp), %eax # %eax is: &xelrow[0].b movl m0x05c_gs(%esp), %ecx # %ecx is: &gs[0] movl %ebx, %edx # %edx is: cols --> counter n jle .Lq15_exit_func # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq14_col_loop: ##-426 gs[col] += fraction * PNM_GET1(xelrow[col]); movl (%eax), %esi # xelrow[].b movl %esi, m0x190_tmpLL(%esp) # xelrow[col].b movl $0, m0x194_tmpLL_high(%esp) # fiLDLL m0x190_tmpLL(%esp) #(push.LL) #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].b fmul %st(1) # * fraction == fracrowtofill #_ST5_# yscale #_ST4_# cF:0.5 #_ST3_# rowsleft #_ST2_# cZERO = 0.0 #_ST1_# fracrowtofill #_ST0_# xelrow[col].b * fracrowtofill fadds (%ecx) # + gs[] fstps (%ecx) #(pop) gs[] #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill #_STx==> xelrow[col].b * fracrowtofill + gs[] ##-425h for ( col = 0; col < cols; ++col) ##-425h for ( col = 0; col < cols; ++col) addl $4, %ecx # gs ++ addl $12, %eax # xelrow ++ decl %edx # n-- jne .Lq14_col_loop # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # ##-427 break; ##-428 } ##-429 } #_ST4_# yscale #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# fracrowtofill .Lq15_exit_func: ##-592 rowsleft = rowsleft - fracrowtofill; ##-593 fracrowtofill = 0.0; fxch %st(4) # #_ST4_# fracrowtofill #_ST3_# cF:0.5 #_ST2_# rowsleft #_ST1_# cZERO = 0.0 #_ST0_# yscale fSTPL m0x070_yscale(%esp) #(pop) save yscale (double) #_ST3_# fracrowtofill #_ST2_# cF:0.5 #_ST1_# rowsleft #_ST0_# cZERO = 0.0 #_STx==> m0x070_yscale fxch %st(1) # #_ST3_# fracrowtofill #_ST2_# cF:0.5 #_ST1_# cZERO = 0.0 #_ST0_# rowsleft fsubp %st(3) #(pop) rowsleft -= fracrowtofill ##### <== FSUBRP ST(i),ST(0) ... ST(i)=ST(0)-ST(i) #_ST2_# rowsleft -= fracrowtofill #_ST1_# cF:0.5 #_ST0_# cZERO = 0.0 movl m0x09c_cols(%esp), %ebx # cols movl m0x08c_format(%esp), %eax # format fxch %st(2) # #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# rowsleft .Lq16_exit_while: fstps m0x034_rowsleft(%esp) #(pop) save rowsleft #_ST1_# cZERO = 0.0 #_ST0_# cF:0.5 #_STx==> rowsleft --> m0x034_rowsleft ##-594 } ##-595 } ##-596 makeRow(vertScaledRow, rs, gs, bs, cols, newmaxval, format); ############################################################################### ##-433 static void ##-434 makeRow(xel * const vertScaledRow, float rs[], float gs[], float bs[], ##-435 int const cols, xelval const newmaxval, int const format) ##-435 { ##-441 int col; ##-443 switch ( PNM_FORMAT_TYPE(format) ) { cmpl $0x5033, %eax # 'P3' vs format je .Lq17_skip2 # cmpl $0x5036, %eax # 'P6' vs format jne .Lq22_default # .Lq17_skip2: ##-444 case PPM_TYPE: ##-445 for ( col = 0; col < cols; ++col) { movl %eax, m0x08c_format(%esp) # format testl %ebx, %ebx # %ebx is: cols movl m0x054_rs(%esp), %eax # %eax is: &rs[0] movl m0x05c_gs(%esp), %ecx # %ecx is: &gs[0] movl m0x050_bs(%esp), %edx # %edx is: &bs[0] movl m0x028_vertScaledRow_ZERO_b(%esp), %esi # %esi is: &vertScaledRow[0].b movl %ebx, %edi # %edi is: cols --> counter n jle .Lq28_exit_for # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq18_col_loop: ##-446 PPM_ASSIGN(vertScaledRow[col], ##-447 MIN(newmaxval, (int) (rs[col] + 0.5)), ##-448 MIN(newmaxval, (int) (gs[col] + 0.5)), ##-449 MIN(newmaxval, (int) (bs[col] + 0.5)) ##-450 ); movl %edi, _m0x090_col(%esp) # counter n fld %st(0) #(push) dup 0.5 ? #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# cF:0.5 fadds (%eax) # + rs[] #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# cF:0.5 + rs[] fnstcw m0x0c2_tmp_cw(%esp) # movw m0x0c2_tmp_cw(%esp), %di # movw $TRUNC, m0x0c2_tmp_cw(%esp) # fldcw m0x0c2_tmp_cw(%esp) # movw %di, m0x0c2_tmp_cw(%esp) # fistpl m0x164_tmp_int(%esp) #(pop) #_ST1_# cZERO = 0.0 #_ST0_# cF:0.5 #_STx==> cF#0.5 + rs[] fldcw m0x0c2_tmp_cw(%esp) # movl m0x164_tmp_int(%esp), %ebx # %ebx is: result movl _m0x0a8_newmaxval(%esp), %edi # %edi is: newmaxval cmpl %edi, %ebx # newmaxval vs result ja .Lq19_skip1 # movl %ebx, %edi # %edi is: result .Lq19_skip1: movl %edi, -8(%esi) # MIN --> vertScaledRow[].r fld %st(0) #(push) 0.5 ? #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# cF:0.5 fadds (%ecx) # + gs[] #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# cF:0.5 + gs[] fnstcw m0x0c0_tmp_cw(%esp) # movw m0x0c0_tmp_cw(%esp), %di # movw $TRUNC, m0x0c0_tmp_cw(%esp) # fldcw m0x0c0_tmp_cw(%esp) # movw %di, m0x0c0_tmp_cw(%esp) # fistpl m0x168_tmp_int(%esp) #(pop) #_ST1_# cZERO = 0.0 #_ST0_# cF:0.5 #_STx==> cF#0.5 + gs[] fldcw m0x0c0_tmp_cw(%esp) # movl m0x168_tmp_int(%esp), %ebx # %ebx is: result movl _m0x0a8_newmaxval(%esp), %edi # %edi is: newmaxval cmpl %edi, %ebx # newmaxval vs result ja .Lq20_skip1 # movl %ebx, %edi # %edi is: result .Lq20_skip1: movl %edi, -4(%esi) # MIN --> vertScaledRow[].g fld %st(0) #(push) 0.5 ? #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# cF:0.5 fadds (%edx) # + bs[] #_ST2_# cZERO = 0.0 #_ST1_# cF:0.5 #_ST0_# cF:0.5 + bs[] fnstcw m0x0be_tmp_cw(%esp) # movw m0x0be_tmp_cw(%esp), %di # movw $TRUNC, m0x0be_tmp_cw(%esp) # fldcw m0x0be_tmp_cw(%esp) # movw %di, m0x0be_tmp_cw(%esp) # fistpl m0x16c_tmp_int(%esp) #(pop) #_ST1_# cZERO = 0.0 #_ST0_# cF:0.5 #_STx==> cF#0.5 + bs[] fldcw m0x0be_tmp_cw(%esp) # movl m0x16c_tmp_int(%esp), %ebx # %ebx is: result movl _m0x0a8_newmaxval(%esp), %edi # %edi is: newmaxval cmpl %edi, %ebx # newmaxval vs result ja .Lq21_skip1 # movl %ebx, %edi # %edi is: result .Lq21_skip1: movl %edi, (%esi) # MIN --> vertScaledRow[].b addl $12, %esi # vertScaledRow ++ addl $4, %edx # bs ++ addl $4, %ecx # gs ++ addl $4, %eax # rs ++ movl _m0x090_col(%esp), %edi # counter n decl %edi # n-- jne .Lq18_col_loop # ##-451 } ##-452 break; jmp .Lq25_exit_func # #_ST1_# cZERO = 0.0 #_ST0_# cF:0.5 .Lq22_default: ##-454 default: ##-455 for ( col = 0; col < cols; ++col ) { fstp %st(1) #(pop) __del_ST1__ fstp %st(0) #(pop) __del_ST0__ #_STx_# ____empty____ movl %eax, m0x08c_format(%esp) # format testl %ebx, %ebx # %ebx is: cols movl m0x05c_gs(%esp), %eax # %eax is: &gs[0] movl m0x028_vertScaledRow_ZERO_b(%esp), %ecx # %ecx is: &vertScaledRow[0].b movl %ebx, %edx # %edx is: cols --> counter n fldz #(push) 0.0 fldz #(push) 0.0 #_ST1_# _dummy_ = 0.0 #_ST0_# _dummy_ = 0.0 jle .Lq28_exit_for # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq23_col_loop: ##-456 PNM_ASSIGN1(vertScaledRow[col], ##-457 MIN(newmaxval, (int) (gs[col] + 0.5))); fstp %st(1) #(pop) __del_ST1__ fstp %st(0) #(pop) __del_ST0__ #_STx_# ____empty____ movl $0, -8(%ecx) # 0 --> vertScaledRow[].r movl $0, -4(%ecx) # 0 --> vertScaledRow[].g flds (%eax) #(push) gs[] #_ST0_# gs[] fadds .cFLOAT_0_5 # + 0.5 #_ST0_# gs[] + 0.5 fnstcw m0x0bc_tmp_cw(%esp) # movw m0x0bc_tmp_cw(%esp), %si # movw $TRUNC, m0x0bc_tmp_cw(%esp) # fldcw m0x0bc_tmp_cw(%esp) # movw %si, m0x0bc_tmp_cw(%esp) # fistpl m0x160_tmp_int(%esp) #(pop) #_STx_# ____empty____ #_STx==> gs[] + 0.5 fldcw m0x0bc_tmp_cw(%esp) # movl m0x160_tmp_int(%esp), %esi # %esi is: result movl _m0x0a8_newmaxval(%esp), %edi # %edi is: newmaxval cmpl %edi, %esi # newmaxval vs result ja .Lq24_skip1 # movl %esi, %edi # %edi is: result .Lq24_skip1: movl %edi, (%ecx) # MIN --> vertScaledRow[].b addl $12, %ecx # vertScaledRow ++ addl $4, %eax # gs ++ decl %edx # counter n-- fldz #(push) 0.0 fldz #(push) 0.0 #_ST1_# _dummy_ = 0.0 #_ST0_# _dummy_ = 0.0 jne .Lq23_col_loop # ##-458 } ##-459 break; ##-460 } ##-461 } .Lq25_exit_func: # -------------------- makeRow.exit.i fstp %st(1) #(pop) __del_ST1__ fstp %st(0) #(pop) __del_ST0__ #_STx_# ____empty____ ##-597 zeroAccum(cols, format, rs, gs, bs); ##-598 fracrowtofill = 1.0; ############################################################################### ##-393 static void ##-394 zeroAccum(int const cols, int const format, ##-395 float rs[], float gs[], float bs[]) ##-395 { ##-397 int col; ##-399 for ( col = 0; col < cols; ++col ) movl m0x09c_cols(%esp), %edi # %edi is: cols testl %edi, %edi # movl m0x050_bs(%esp), %eax # %eax is: &bs[0] movl m0x05c_gs(%esp), %ecx # %ecx is: &gs[0] movl m0x054_rs(%esp), %edx # %edx is: &rs[0] movl %edi, %esi # %esi is: cols --> counter n jle .Lq27_exit_loop # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq26_col_loop: ##-400 rs[col] = gs[col] = bs[col] = 0.0; movl $0, (%eax) # 0 --> bs[] movl $0, (%ecx) # 0 --> gs[] movl $0, (%edx) # 0 --> rs[] addl $4, %edx # rs ++ addl $4, %ecx # gs ++ addl $4, %eax # bs ++ decl %esi # n-- jne .Lq26_col_loop # ##-401 } .Lq27_exit_loop: movl _m0x0a8_newmaxval(%esp), %esi # newmaxval ? jmp .Lq29_start_write # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # #_ST1_# _dummy_ #_ST0_# _dummy_ .Lq28_exit_for: fstp %st(1) #(pop) __del_ST1__ fstp %st(0) #(pop) __del_ST0__ #_STx_# ____empty____ movl _m0x0a8_newmaxval(%esp), %esi # newmaxval ? movl m0x09c_cols(%esp), %edi # cols .Lq29_start_write: # -------------------- zeroAccum.exit8.i ##-599 } ##-605 if (newcols == cols) movl m0x080_newcols(%esp), %edx # newcols cmpl %edi, %edx # cols vs newcols jne .Lq30_else # ##-619 pnm_writepnmrow(stdout, newxelrow, newcols, ##-620 newmaxval, newformat, 0 ); movl __stdoutp, %eax # movl m0x06c_newformat(%esp), %ecx # %exc is: newformat movl %ecx, m0x010_P5(%esp) # newformat movl %esi, m0x00c_P4(%esp) # %esi is: newmaxval movl %edx, m0x008_P3(%esp) # %edx is: newcols movl m0x060_vertScaledRow(%esp), %ecx # %ecx is: &vertScaledRow[0] jmp .Lq57_write # .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # #_STx_# ____empty____ .Lq30_else: ##-608 else { ##-609 float stretch; ##-611 horizontal_scale(vertScaledRow, newxelrow, cols, newcols, xscale, ##-612 format, newmaxval, &stretch); ############################################################################### ##-279 static void ##-280 horizontal_scale(const xel vertScaledRow[], xel newxelrow[], ##-281 const int cols, const int newcols, const float xscale, ##-282 const int format, const xelval newmaxval, ##-283 float * const stretchP) #_____VARIABLE_NAME_CONVERSION______ # _caller_side____::_callie_side____ # &stretch == stretchP <== ! ##-283 { ##-292 float r, g, b; ##-293 float fraccoltofill, fraccolleft; ##-294 unsigned int col; ##-295 unsigned int newcol; ##-297 newcol = 0; ##-298 fraccoltofill = 1.0; ##-299 r = g = b = 0; ##-300t for (col = 0; col < cols; ++col) { ##-302 fraccolleft = xscale; xorl %ebx, %ebx #hs# %ebx is: newcol ? testl %edi, %edi #hs# %edi is: cols movl $0, %ecx #hs# %ecx is: col ? fld1 #hs#(push) 1.0 fldz #hs#(push) 0.0 fsts _m0x090_b(%esp) #hs# 0.0 --> fld %st(0) #hs#(push) 0.0 fld %st(1) #hs#(push) 0.0 #_ST3_# fraccoltofill = 1.0 #_ST2_# b = 0.0 --> _m0x090_b #_ST1_# g = 0.0 #_ST0_# r = 0.0 je .Lq46_exit_for #hs# .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq31_col_loop: ##-307d while (fraccolleft >= fraccoltofill) { fLDL m0x078_xscale(%esp) #hs#(push) xscale --> fraccolleft (double) #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g #_ST1_# r #_ST0_# fraccolleft = xscale fucom %st(4) #hs# fraccoltofill vs fraccolleft fnstsw %ax #hs# sahf #hs# jb .Lq40_exit_while_col #hs# imull $12, %ecx, %eax #hs# %eax is: 12*col ? movl %ecx, m0x064_col(%esp) #hs# col movl m0x060_vertScaledRow(%esp), %ecx #hs# %ecx is: &vertScaledRow[0] leal 8(%ecx,%eax), %edx #hs# %edx is: &vertScaledRow[col].b leal (%ecx,%eax), %edi #hs# %edi is: &vertScaledRow[col].r movl %edi, _m0x088_vertScaledRow_col_r(%esp) #hs# &vertScaledRow[col].r leal 4(%ecx,%eax), %eax #hs# %eax is: &vertScaledRow[col].g movl %eax, _m0x084_vertScaledRow_col_g(%esp) #hs# &vertScaledRow[col].g leal (%ebx,%ebx,2), %eax #hs# %eax is: 3*newcol movl m0x044_newxelrow_ZERO_b(%esp), %ecx #hs# %ecx is: &newxelrow[0].b leal (%ecx,%eax,4), %edi #hs# %edi is: &newxelrow[newcol].b .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq32_while_col: ##-312 switch (PNM_FORMAT_TYPE(format)) { ##-313 case PPM_TYPE: movl m0x08c_format(%esp), %eax #hs# format cmpl $0x5033, %eax #hs# 'P3' vs format je .Lq33_skip2 #hs# cmpl $0x5036, %eax #hs# 'P6' vs format jne .Lq37_default #hs# .Lq33_skip2: fstp %st(3) #hs#(pop) #_ST3_# fraccoltofill #_ST2_# fraccolleft #_ST1_# g #_ST0_# r ##-314 r += fraccoltofill * PPM_GETR(vertScaledRow[col]); movl _m0x088_vertScaledRow_col_r(%esp), %eax #hs# &vertScaledRow[col].r movl (%eax), %eax #hs# vertScaledRow[col].r movl %eax, m0x138_tmpLL(%esp) #hs# movl $0, m0x13c_tmpLL_high(%esp) #hs# fiLDLL m0x138_tmpLL(%esp) #hs#(push.LL) #_ST4_# fraccoltofill #_ST3_# fraccolleft #_ST2_# g #_ST1_# r #_ST0_# vertScaledRow[col].r fmul %st(4) #hs# * fraccoltofill #_ST4_# fraccoltofill #_ST3_# fraccolleft #_ST2_# g #_ST1_# r #_ST0_# vertScaledRow[col].r * fraccoltofill faddp %st(1) #hs#(pop) r ? #_ST3_# fraccoltofill #_ST2_# fraccolleft #_ST1_# g #_ST0_# r + vertScaledRow[col].r * fraccoltofill ##-315 g += fraccoltofill * PPM_GETG(vertScaledRow[col]); movl _m0x084_vertScaledRow_col_g(%esp), %eax #hs# &vertScaledRow[col].g movl (%eax), %eax #hs# vertScaledRow[col].g movl %eax, m0x140_tmpLL(%esp) #hs# movl $0, m0x144_tmpLL_high(%esp) #hs# fiLDLL m0x140_tmpLL(%esp) #hs#(push.LL) #_ST4_# fraccoltofill #_ST3_# fraccolleft #_ST2_# g #_ST1_# r + vertScaledRow[col].r * fraccoltofill #_ST0_# vertScaledRow[col].g fmul %st(4) #hs# * fraccoltofill #_ST4_# fraccoltofill #_ST3_# fraccolleft #_ST2_# g #_ST1_# r + vertScaledRow[col].r * fraccoltofill #_ST0_# vertScaledRow[col].g * fraccoltofill faddp %st(2) #hs#(pop) g ? #_ST3_# fraccoltofill #_ST2_# fraccolleft #_ST1_# g + vertScaledRow[col].g * fraccoltofill #_ST0_# r + vertScaledRow[col].r * fraccoltofill ##-316 b += fraccoltofill * PPM_GETB(vertScaledRow[col]); movl (%edx), %eax #hs# vertScaledRow[col].b movl %eax, m0x148_tmpLL(%esp) #hs# vertScaledRow[col].b movl $0, m0x14c_tmpLL_high(%esp) #hs# fiLDLL m0x148_tmpLL(%esp) #hs#(push.LL) #_ST4_# fraccoltofill #_ST3_# fraccolleft #_ST2_# g + vertScaledRow[col].g * fraccoltofill #_ST1_# r + vertScaledRow[col].r * fraccoltofill #_ST0_# vertScaledRow[col].b fmul %st(4) #hs# * fraccoltofill #_ST4_# fraccoltofill #_ST3_# fraccolleft #_ST2_# g + vertScaledRow[col].g * fraccoltofill #_ST1_# r + vertScaledRow[col].r * fraccoltofill #_ST0_# vertScaledRow[col].b * fraccoltofill flds _m0x090_b(%esp) #hs#(push) b ? #_ST5_# fraccoltofill #_ST4_# fraccolleft #_ST3_# g + vertScaledRow[col].g * fraccoltofill #_ST2_# r + vertScaledRow[col].r * fraccoltofill #_ST1_# vertScaledRow[col].b * fraccoltofill #_ST0_# b faddp %st(1) #hs#(pop) b ? #_ST4_# fraccoltofill #_ST3_# fraccolleft #_ST2_# g + vertScaledRow[col].g * fraccoltofill #_ST1_# r + vertScaledRow[col].r * fraccoltofill #_ST0_# b + vertScaledRow[col].b * fraccoltofill ##-317 PPM_ASSIGN( newxelrow[newcol], ##-318 MIN(newmaxval, (int) (r + 0.5)), ##-319 MIN(newmaxval, (int) (g + 0.5)), ##-320 MIN(newmaxval, (int) (b + 0.5)) ##-321 ); fLDL _m0x0a0_cF_0_5(%esp) #hs#(push) 0.5 (double) #_ST5_# fraccoltofill #_ST4_# fraccolleft #_ST3_# g + vertScaledRow[col].g * fraccoltofill #_ST2_# r + vertScaledRow[col].r * fraccoltofill #_ST1_# b + vertScaledRow[col].b * fraccoltofill #_ST0_# 0.5 faddp %st(2) #hs#(pop) #_ST4_# fraccoltofill #_ST3_# fraccolleft #_ST2_# g + vertScaledRow[col].g * fraccoltofill #_ST1_# r + vertScaledRow[col].r * fraccoltofill + 0.5 #_ST0_# b + vertScaledRow[col].b * fraccoltofill fnstcw m0x0ba_tmp_cw(%esp) #hs# movw m0x0ba_tmp_cw(%esp), %ax #hs# movw $TRUNC, m0x0ba_tmp_cw(%esp) #hs# fldcw m0x0ba_tmp_cw(%esp) #hs# movw %ax, m0x0ba_tmp_cw(%esp) #hs# fxch %st(1) #hs# #_ST4_# fraccoltofill #_ST3_# fraccolleft #_ST2_# g + vertScaledRow[col].g * fraccoltofill #_ST1_# b + vertScaledRow[col].b * fraccoltofill #_ST0_# r + vertScaledRow[col].r * fraccoltofill + 0.5 fistpl m0x154_tmp_int(%esp) #hs#(pop) #_ST3_# fraccoltofill #_ST2_# fraccolleft #_ST1_# g + vertScaledRow[col].g * fraccoltofill #_ST0_# b + vertScaledRow[col].b * fraccoltofill #_STx==> r + vertScaledRow[col].r * fraccoltofill + 0.5 fldcw m0x0ba_tmp_cw(%esp) #hs# movl m0x154_tmp_int(%esp), %eax #hs# result cmpl %esi, %eax #hs# newmaxval vs result movl %esi, %ecx #hs# %ecx is: newmaxval ja .Lq34_skip1 #hs# movl %eax, %esi #hs# %esi is: result .Lq34_skip1: movl %esi, -8(%edi) #hs# MIN --> newxelrow[newcol].r fLDL _m0x0a0_cF_0_5(%esp) #hs#(push) 0.5 (double) #_ST4_# fraccoltofill #_ST3_# fraccolleft #_ST2_# g + vertScaledRow[col].g * fraccoltofill #_ST1_# b + vertScaledRow[col].b * fraccoltofill #_ST0_# 0.5 faddp %st(2) #hs#(pop) #_ST3_# fraccoltofill #_ST2_# fraccolleft #_ST1_# g + vertScaledRow[col].g * fraccoltofill + 0.5 #_ST0_# b + vertScaledRow[col].b * fraccoltofill fnstcw m0x0b8_tmp_cw(%esp) #hs# movw m0x0b8_tmp_cw(%esp), %ax #hs# movw $TRUNC, m0x0b8_tmp_cw(%esp) #hs# fldcw m0x0b8_tmp_cw(%esp) #hs# movw %ax, m0x0b8_tmp_cw(%esp) #hs# fxch %st(1) #hs# #_ST3_# fraccoltofill #_ST2_# fraccolleft #_ST1_# b + vertScaledRow[col].b * fraccoltofill #_ST0_# g + vertScaledRow[col].g * fraccoltofill + 0.5 fistpl m0x158_tmp_int(%esp) #hs#(pop) #_ST2_# fraccoltofill #_ST1_# fraccolleft #_ST0_# b + vertScaledRow[col].b * fraccoltofill #_STx==> g + vertScaledRow[col].g * fraccoltofill + 0.5 fldcw m0x0b8_tmp_cw(%esp) #hs# movl m0x158_tmp_int(%esp), %eax #hs# result cmpl %ecx, %eax #hs# newmaxval vs result movl %ecx, %esi #hs# %esi is: newmaxval ja .Lq35_skip1 #hs# movl %eax, %esi #hs# %esi is: result .Lq35_skip1: movl %esi, -4(%edi) #hs# MIN --> newxelrow[newcol].g fLDL _m0x0a0_cF_0_5(%esp) #hs#(push) 0.5 (double) #_ST3_# fraccoltofill #_ST2_# fraccolleft #_ST1_# b + vertScaledRow[col].b * fraccoltofill #_ST0_# 0.5 faddp %st(1) #hs#(pop) #_ST2_# fraccoltofill #_ST1_# fraccolleft #_ST0_# b + vertScaledRow[col].b * fraccoltofill + 0.5 fnstcw m0x0b6_tmp_cw(%esp) #hs# movw m0x0b6_tmp_cw(%esp), %ax #hs# movw $TRUNC, m0x0b6_tmp_cw(%esp) #hs# fldcw m0x0b6_tmp_cw(%esp) #hs# movw %ax, m0x0b6_tmp_cw(%esp) #hs# fistpl m0x15c_tmp_int(%esp) #hs#(pop) #_ST1_# fraccoltofill #_ST0_# fraccolleft #_STx==> b + vertScaledRow[col].b * fraccoltofill + 0.5 fldcw m0x0b6_tmp_cw(%esp) #hs# movl m0x15c_tmp_int(%esp), %eax #hs# result cmpl %ecx, %eax #hs# newmaxval vs result movl %ecx, %esi #hs# %esi is: newmaxval fldz #hs#(push) b = 0.0 #_ST2_# fraccoltofill #_ST1_# fraccolleft #_ST0_# b = 0.0 ja .Lq36_skip1 #hs# movl %eax, %esi #hs# %esi is: result .Lq36_skip1: movl %esi, (%edi) #hs# MIN --> newxelrow[newcol].b ##-322 break; jmp .Lq39_exit_switch #hs# .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g #_ST1_# r #_ST0_# fraccolleft .Lq37_default: ##-324 default: ##-325 g += fraccoltofill * PNM_GET1(vertScaledRow[col]); fstp %st(1) #hs#(pop) __del_ST1__ #_ST3_# fraccoltofill #_ST2_# b #_ST1_# g #_ST0_# fraccolleft movl (%edx), %eax #hs# %edx is: vertScaledRow[col].b movl %eax, m0x128_tmpLL(%esp) #hs# movl $0, m0x12c_tmpLL_high(%esp) #hs# fiLDLL m0x128_tmpLL(%esp) #hs#(push.LL) #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g #_ST1_# fraccolleft #_ST0_# vertScaledRow[col].b fmul %st(4) #hs# * fraccoltofill #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g #_ST1_# fraccolleft #_ST0_# vertScaledRow[col].b * fraccoltofill faddp %st(2) #hs#(pop) g ? #_ST3_# fraccoltofill #_ST2_# b #_ST1_# g + vertScaledRow[col].b * fraccoltofill #_ST0_# fraccolleft ##-326 PNM_ASSIGN1( newxelrow[newcol], MIN(newmaxval, (int) (g + 0.5))); movl $0, -8(%edi) #hs# 0 --> newxelrow[newcol].r (%edi is: newxelrow[newcol].b) movl $0, -4(%edi) #hs# 0 --> newxelrow[newcol].g fxch %st(1) #hs# #_ST3_# fraccoltofill #_ST2_# b #_ST1_# fraccolleft #_ST0_# g + vertScaledRow[col].b * fraccoltofill fadds .cFLOAT_0_5 #hs# + 0.5 #_ST3_# fraccoltofill #_ST2_# b #_ST1_# fraccolleft #_ST0_# g + vertScaledRow[col].b * fraccoltofill + 0.5 fnstcw m0x0b4_tmp_cw(%esp) #hs# movw m0x0b4_tmp_cw(%esp), %ax #hs# movw $TRUNC, m0x0b4_tmp_cw(%esp) #hs# fldcw m0x0b4_tmp_cw(%esp) #hs# movw %ax, m0x0b4_tmp_cw(%esp) #hs# fistpl m0x134_tmp_int(%esp) #hs#(pop) #_ST2_# fraccoltofill #_ST1_# b #_ST0_# fraccolleft #_STx==> g + vertScaledRow[col].b * fraccoltofill + 0.5 fldcw m0x0b4_tmp_cw(%esp) #hs# movl m0x134_tmp_int(%esp), %eax #hs# %eax is: result cmpl %esi, %eax #hs# newmaxval vs result movl %esi, %ecx #hs# %ecx is: newmaxval ja .Lq38_skip1 #hs# movl %eax, %esi #hs# %esi is: result .Lq38_skip1: movl %esi, (%edi) #hs# MIN --> newxelrow[newcol].b fxch %st(1) #hs# #_ST2_# fraccoltofill #_ST0_# fraccolleft #_ST1_# b ##-327 break; #_ST2_# fraccoltofill #_ST1_# fraccolleft #_ST0_# b # b is cleared to 0.0 when PPM, keep 0.0 when PGM # so b is 0.0 here .Lq39_exit_switch: ##-328 } ##-329 fraccolleft -= fraccoltofill; ##-331 newcol++; ##-332 fraccoltofill = 1.0; ##-333 r = g = b = 0.0; fxch %st(1) #hs# #_ST2_# fraccoltofill #_ST1_# b #_ST0_# fraccolleft fsubp %st(2) #hs#(pop) fraccolleft - fraccoltofill ##### <=== FSUBRP ST(i), ST(0) ... ST(i)=ST(0)-ST(i) #_ST1_# fraccolleft - fraccoltofill #_ST0_# b fld1 #hs#(push) fraccoltofill = 1.0 #_ST2_# fraccolleft #_ST1_# b #_ST0_# fraccoltofill = 1.0 fxch %st(2) #hs# #_ST2_# fraccoltofill #_ST1_# b #_ST0_# fraccolleft ##-307d while (fraccolleft >= fraccoltofill) { fucom %st(2) #hs# fraccolleft vs fraccoltofill fnstsw %ax #hs# incl %ebx #hs# newcol ++ addl $12, %edi #hs# newxelrow[newcol].b ++ sahf #hs# fxch %st(1) #hs# #_ST2_# fraccoltofill #_ST1_# fraccolleft #_ST0_# b fsts _m0x090_b(%esp) #hs# save b #_ST2_# fraccoltofill 1.0 #_ST1_# fraccolleft #_ST0_# b #hs# b is 0.0 here fld %st(0) #hs#(push) #_ST3_# fraccoltofill 1.0 #_ST2_# fraccolleft #_ST1_# b #_ST0_# g fld %st(1) #hs#(push) #_ST4_# fraccoltofill 1.0 #_ST3_# fraccolleft #_ST2_# b #_ST1_# g #_ST0_# r movl %ecx, %esi #hs# fxch %st(2) #hs# #_ST4_# fraccoltofill 1.0 #_ST3_# fraccolleft #_ST2_# r #_ST1_# g #_ST0_# b fxch %st(3) #hs# #_ST4_# fraccoltofill 1.0 #_ST3_# b #_ST2_# r #_ST1_# g #_ST0_# fraccolleft fxch %st(1) #hs# #_ST4_# fraccoltofill 1.0 #_ST3_# b #_ST2_# r #_ST1_# fraccolleft #_ST0_# g fxch %st(2) #hs# #_ST4_# fraccoltofill 1.0 #_ST3_# b #_ST2_# g #_ST1_# fraccolleft #_ST0_# r fxch %st(1) #hs# #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g #_ST1_# r #_ST0_# fraccolleft ##-334 } jae .Lq32_while_col #hs# ##-339 if (fraccolleft > 0.0) { fstp %st(4) #hs#(pop) #_ST3_# fraccolleft #_ST2_# b #_ST1_# g #_ST0_# r fstp %st(1) #hs#(pop) __del_ST1__ #_ST2_# fraccolleft #_ST1_# b #_ST0_# r fstp %st(0) #hs#(pop) __del_ST0__ #_ST1_# fraccolleft #_ST0_# b fld1 #hs#(push) fraccoltofill = 1.0 #_ST2_# fraccolleft #_ST1_# b #_ST0_# fraccoltofill = 1.0 fxch %st(1) #hs# #_ST2_# fraccolleft #_ST1_# fraccoltofill #_ST0_# b fsts _m0x090_b(%esp) #hs# fld %st(0) #hs#(push) #_ST3_# fraccolleft #_ST2_# fraccoltofill #_ST1_# b #_ST0_# g fld %st(1) #hs#(push) #_ST4_# fraccolleft #_ST3_# fraccoltofill #_ST2_# b #_ST1_# g #_ST0_# r movl m0x064_col(%esp), %ecx #hs# col fxch %st(3) #hs# #_ST4_# fraccolleft #_ST3_# r #_ST2_# b #_ST1_# g #_ST0_# fraccoltofill fxch %st(4) #hs# #_ST4_# fraccoltofill #_ST3_# r #_ST2_# b #_ST1_# g #_ST0_# fraccolleft fxch %st(2) #hs# #_ST4_# fraccoltofill #_ST3_# r #_ST2_# fraccolleft #_ST1_# g #_ST0_# b fxch %st(3) #hs# #_ST4_# fraccoltofill #_ST3_# b #_ST2_# fraccolleft #_ST1_# g #_ST0_# r fxch %st(1) #hs# #_ST4_# fraccoltofill #_ST3_# b #_ST2_# fraccolleft #_ST1_# r #_ST0_# g fxch %st(2) #hs# #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g #_ST1_# r #_ST0_# fraccolleft .Lq40_exit_while_col: fucom %st(3) #hs# b (0.0) vs fraccolleft fnstsw %ax #hs# sahf #hs# jbe .Lq42_exit_if #hs# ##-340 switch (PNM_FORMAT_TYPE(format)) { movl m0x08c_format(%esp), %eax #hs# format cmpl $0x5033, %eax #hs# 'P3' vs format je .Lq41_skip2 #hs# cmpl $0x5036, %eax #hs# 'P6' vs format jne .Lq43_default #hs# .Lq41_skip2: ##-341 case PPM_TYPE: ##-342 r += fraccolleft * PPM_GETR(vertScaledRow[col]); ##-344 b += fraccolleft * PPM_GETB(vertScaledRow[col]); imull $12, %ecx, %eax #hs# %eax is: 12*col movl %ecx, m0x064_col(%esp) #hs# %ecx is: col movl m0x060_vertScaledRow(%esp), %edi #hs# %edi is: &vertScaledRow[0] movl (%edi,%eax), %ecx #hs# %ecx is: vertScaledRow[col].r movl 8(%edi,%eax), %edx #hs# %edx is: vertScaledRow[col].b movl %ecx, m0x118_tmpLL(%esp) #hs# vertScaledRow[col].r movl $0, m0x11c_tmpLL_high(%esp) #hs# fiLDLL m0x118_tmpLL(%esp) #hs#(push.LL) #_ST5_# fraccoltofill #_ST4_# b #_ST3_# g #_ST2_# r #_ST1_# fraccolleft #_ST0_# vertScaledRow[col].r fmul %st(1) #hs# * fraccolleft #_ST5_# fraccoltofill #_ST4_# b #_ST3_# g #_ST2_# r #_ST1_# fraccolleft #_ST0_# vertScaledRow[col].r * fraccolleft faddp %st(2) #hs#(pop) #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g #_ST1_# r + vertScaledRow[col].r * fraccolleft #_ST0_# fraccolleft leal 4(%edi,%eax), %eax #hs# &vertScaledRow[col].g movl %edx, m0x120_tmpLL(%esp) #hs# vertScaledRow[col].b movl $0, m0x124_tmpLL_high(%esp) #hs# fiLDLL m0x120_tmpLL(%esp) #hs#(push.LL) #_ST5_# fraccoltofill #_ST4_# b #_ST3_# g #_ST2_# r + vertScaledRow[col].r * fraccolleft #_ST1_# fraccolleft #_ST0_# vertScaledRow[col].b fmul %st(1) #hs# * fraccolleft #_ST5_# fraccoltofill #_ST4_# b #_ST3_# g #_ST2_# r + vertScaledRow[col].r * fraccolleft #_ST1_# fraccolleft #_ST0_# vertScaledRow[col].b * fraccolleft flds _m0x090_b(%esp) #hs#(push) b #_ST6_# fraccoltofill #_ST5_# b #_ST4_# g #_ST3_# r + vertScaledRow[col].r * fraccolleft #_ST2_# fraccolleft #_ST1_# vertScaledRow[col].b * fraccolleft #_ST0_# _m0x090_b faddp %st(1) #hs#(pop) #_ST5_# fraccoltofill #_ST4_# b #_ST3_# g #_ST2_# r + vertScaledRow[col].r * fraccolleft #_ST1_# fraccolleft #_ST0_# b + vertScaledRow[col].b * fraccolleft fstps _m0x090_b(%esp) #hs#(pop) #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g #_ST1_# r + vertScaledRow[col].r * fraccolleft #_ST0_# fraccolleft #_STx==> b + vertScaledRow[col].b * fraccolleft ##-343 g += fraccolleft * PPM_GETG(vertScaledRow[col]); jmp .Lq44_code_share #hs# .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g #_ST1_# r #_ST0_# fraccolleft .Lq42_exit_if: fstp %st(0) #hs#(pop) __del_ST0__ #_ST3_# fraccoltofill #_ST2_# b #_ST1_# g #_ST0_# r ##-345 break; jmp .Lq45_exit_switch #hs# #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g #_ST1_# r #_ST0_# fraccolleft .Lq43_default: ##-347 default: ##-348 g += fraccolleft * PNM_GET1(vertScaledRow[col]); imull $12, %ecx, %eax #hs# 12*col movl %ecx, m0x064_col(%esp) #hs# col movl m0x060_vertScaledRow(%esp), %ecx #hs# &vertScaledRow[0] leal 8(%ecx,%eax), %eax #hs# &vertScaledRow[col].b .Lq44_code_share: movl (%eax), %eax #hs# vertScaledRow[col].b movl %eax, m0x110_tmpLL(%esp) #hs# movl $0, m0x114_tmpLL_high(%esp) #hs# fiLDLL m0x110_tmpLL(%esp) #hs#(push.LL) #_ST5_# fraccoltofill #_ST4_# b #_ST3_# g #_ST2_# r #_ST1_# fraccolleft #_ST0_# vertScaledRow[col].b fmul %st(1) #hs# * fraccolleft #_ST5_# fraccoltofill #_ST4_# b #_ST3_# g #_ST2_# r #_ST1_# fraccolleft #_ST0_# vertScaledRow[col].b * fraccolleft faddp %st(3) #hs#(pop) #_ST4_# fraccoltofill #_ST3_# b #_ST2_# g + vertScaledRow[col].b * fraccolleft #_ST1_# r #_ST0_# fraccolleft ##-349 break; ##-350 } ##-351 fraccoltofill -= fraccolleft; fsubrp %st(4) #hs#(pop) - fraccolleft ###### <== FSUBP ST(i), ST(0) ... ST(i) = ST(i) - ST(0) #_ST3_# fraccoltofill - fraccolleft #_ST2_# b #_ST1_# g #_ST0_# r movl m0x064_col(%esp), %ecx #hs# col .Lq45_exit_switch: ##-300t for (col = 0; col < cols; ++col) { ##-300t for (col = 0; col < cols; ++col) { incl %ecx #hs# col ++ ? cmpl m0x09c_cols(%esp), %ecx #hs# cols vs col jne .Lq31_col_loop #hs# .Lq46_exit_for: ##-352 } ##-353 } ##-355 if (newcol < newcols-1 || newcol > newcols) cmpl m0x02c_newcols_MINUS_1(%esp), %ebx #hs# (newcols-1) vs newcol jb .Lq47_skip2 #hs# cmpl m0x080_newcols(%esp), %ebx #hs# newcols vs newcol jbe .Lq48_next_if #hs# .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq47_skip2: fstp %st(2) #hs#(pop) #_ST2_# fraccoltofill #_ST1_# r #_ST0_# g movl m0x02c_newcols_MINUS_1(%esp), %eax #hs# (newcols - 1) movl %eax, m0x008_P3(%esp) #hs# (newcols - 1) movl %ebx, m0x004_P2(%esp) #hs# newcol ##-356 pm_error("Internal error: last column filled is %d, but %d " ##-357 "is the rightmost output column.", ##-358 newcol, newcols-1); movl $.str_07, m0x000_P1(%esp) #hs# fxch %st(2) #hs# #_ST2_# g #_ST1_# r #_ST0_# fraccoltofill fstps _m0x088_some_float(%esp) #hs#(pop) save fraccoltofill #_ST1_# g #_ST0_# r #_STx==> fraccoltofill flds _m0x090_b(%esp) #hs#(push) b #_ST2_# g #_ST1_# r #_ST0_# b fstps _m0x090_b(%esp) #hs#(pop) save b #_ST1_# g #_ST0_# r #_STx==> b fxch %st(1) #hs# #_ST1_# r #_ST0_# g fstps _m0x084_tmp_float(%esp) #hs#(pop) save g #_ST1_# r #_STx==> g fstps m0x064_col(%esp) #hs#(pop) save r #_STx_# ____empty____ #_STx==> r calll pm_error #hs# #_____NEVER_RETURN_____cc_dont_know_it flds m0x064_col(%esp) #hs#(push) recover r flds _m0x084_tmp_float(%esp) #hs#(push) recover g flds _m0x088_some_float(%esp) #hs#(push) recover fraccoltofill fldz #hs#(push) 0.0 flds _m0x090_b(%esp) #hs#(push) b #_ST4_# r #_ST3_# g #_ST2_# fraccoltofill #_ST1_# 0.0 #_ST0_# b fstps _m0x090_b(%esp) #hs#(pop) #_ST3_# r #_ST2_# g #_ST1_# fraccoltofill #_ST0_# 0.0 #_STx==> b fxch %st(1) #hs# #_ST3_# r #_ST2_# g #_ST1_# 0.0 #_ST0_# fraccoltofill fxch %st(3) #hs# #_ST3_# fraccoltofill #_ST2_# g #_ST1_# 0.0 #_ST0_# r fxch %st(1) #hs# #_ST3_# fraccoltofill #_ST2_# g #_ST1_# r #_ST0_# 0.0 fxch %st(2) #hs# #_ST3_# fraccoltofill #_ST2_# 0.0 #_ST1_# r #_ST0_# g fxch %st(1) #hs# #_ST3_# fraccoltofill #_ST2_# 0.0 ... b ? #_ST1_# g #_ST0_# r .Lq48_next_if: ##-360 if (newcol < newcols ) { movl m0x080_newcols(%esp), %edx #hs# newcols cmpl %edx, %ebx #hs# newcols vs newcol jae .Lq55_exit_func #hs# fstp %st(2) #hs#(pop) #_ST2_# fraccoltofill #_ST1_# r #_ST0_# g ##-369 switch (PNM_FORMAT_TYPE(format)) { movl m0x08c_format(%esp), %eax #hs# format cmpl $0x5033, %eax #hs# 'P3' vs format je .Lq49_skip2 #hs# cmpl $0x5036, %eax #hs# 'P6' vs format jne .Lq52_default #hs# .Lq49_skip2: ##-370 case PPM_TYPE: movl %edx, %edi #hs# %edi is: newcols ##-371 r += fraccoltofill * PPM_GETR(vertScaledRow[cols-1]); movl m0x020_vertScaledRow_COLSminus1_r(%esp), %eax #hs# %eax is: &vertScaledRow[cols-1].r movl (%eax), %eax #hs# %eax is: vertScaledRow[cols-1].r movl %eax, m0x0e8_tmpLL(%esp) #hs# movl $0, m0x0ec_tmpLL_high(%esp) #hs# fiLDLL m0x0e8_tmpLL(%esp) #hs#(push.LL) #_ST3_# fraccoltofill #_ST2_# r #_ST1_# g #_ST0_# vertScaledRow[cols-1].r fmul %st(3) #hs# * fraccoltofill #_ST3_# fraccoltofill #_ST2_# r #_ST1_# g #_ST0_# vertScaledRow[cols-1].r * fraccoltofill faddp %st(2) #hs#(pop) r ? #_ST2_# fraccoltofill #_ST1_# r + vertScaledRow[cols-1].r * fraccoltofill #_ST0_# g ##-372 g += fraccoltofill * PPM_GETG(vertScaledRow[cols-1]); movl m0x01c_vertScaledRow_COLSminus1_g(%esp), %eax #hs# &vertScaledRow[cols-1].g movl (%eax), %eax #hs# vertScaledRow[cols-1].g movl %eax, m0x0f0_tmpLL(%esp) #hs# movl $0, m0x0f4_tmpLL_high(%esp) #hs# fiLDLL m0x0f0_tmpLL(%esp) #hs#(push.LL) #_ST3_# fraccoltofill #_ST2_# r + vertScaledRow[cols-1].r * fraccoltofill #_ST1_# g #_ST0_# vertScaledRow[cols-1].g fmul %st(3) #hs# * fraccoltofill #_ST3_# fraccoltofill #_ST2_# r + vertScaledRow[cols-1].r * fraccoltofill #_ST1_# g #_ST0_# vertScaledRow[cols-1].g * fraccoltofill faddp %st(1) #hs#(pop) g #_ST2_# fraccoltofill #_ST1_# r + vertScaledRow[cols-1].r * fraccoltofill #_ST0_# g + vertScaledRow[cols-1].g * fraccoltofill ##-373 b += fraccoltofill * PPM_GETB(vertScaledRow[cols-1]); movl m0x024_vertScaledRow_COLSminus1_b(%esp), %eax #hs# %eax is: &vertScaledRow[cols-1].b movl (%eax), %eax #hs# %eax is: vertScaledRow[cols-1].b movl %eax, m0x0f8_tmpLL(%esp) #hs# movl $0, m0x0fc_tmpLL_high(%esp) #hs# fiLDLL m0x0f8_tmpLL(%esp) #hs#(push.LL) #_ST3_# fraccoltofill #_ST2_# r + vertScaledRow[cols-1].r * fraccoltofill #_ST1_# g + vertScaledRow[cols-1].g * fraccoltofill #_ST0_# vertScaledRow[cols-1].b fmul %st(3) #hs# * fraccoltofill #_ST3_# fraccoltofill #_ST2_# r + vertScaledRow[cols-1].r * fraccoltofill #_ST1_# g + vertScaledRow[cols-1].g * fraccoltofill #_ST0_# vertScaledRow[cols-1].b * fraccoltofill flds _m0x090_b(%esp) #hs#(push) b #_ST4_# fraccoltofill #_ST3_# r + vertScaledRow[cols-1].r * fraccoltofill #_ST2_# g + vertScaledRow[cols-1].g * fraccoltofill #_ST1_# vertScaledRow[cols-1].b * fraccoltofill #_ST0_# _m0x090_b faddp %st(1) #hs#(pop) b ? #_ST3_# fraccoltofill #_ST2_# r + vertScaledRow[cols-1].r * fraccoltofill #_ST1_# g + vertScaledRow[cols-1].g * fraccoltofill #_ST0_# vertScaledRow[cols-1].b * fraccoltofill + _m0x090_b ##-375 PPM_ASSIGN(newxelrow[newcol], ##-376 MIN(newmaxval, (int) (r + 0.5)), ##-377 MIN(newmaxval, (int) (g + 0.5)), ##-378 MIN(newmaxval, (int) (b + 0.5)) ##-379 ); fLDL _m0x0a0_cF_0_5(%esp) #hs#(push) 0.5 (double) #_ST4_# fraccoltofill #_ST3_# r + vertScaledRow[cols-1].r * fraccoltofill #_ST2_# g + vertScaledRow[cols-1].g * fraccoltofill #_ST1_# vertScaledRow[cols-1].b * fraccoltofill + _m0x090_b #_ST0_# _m0x0a0_cF_0_5 fadd %st(0), %st(3) #hs# +0.5 #_ST4_# fraccoltofill #_ST3_# r + vertScaledRow[cols-1].r * fraccoltofill + cF:0.5 #_ST2_# g + vertScaledRow[cols-1].g * fraccoltofill #_ST1_# vertScaledRow[cols-1].b * fraccoltofill + _m0x090_b #_ST0_# cF:0.5 fnstcw m0x0b2_tmp_cw(%esp) #hs# movw m0x0b2_tmp_cw(%esp), %ax #hs# movw $TRUNC, m0x0b2_tmp_cw(%esp) #hs# fldcw m0x0b2_tmp_cw(%esp) #hs# movw %ax, m0x0b2_tmp_cw(%esp) #hs# fxch %st(3) #hs# #_ST4_# fraccoltofill #_ST3_# cF:0.5 #_ST2_# g + vertScaledRow[cols-1].g * fraccoltofill #_ST1_# vertScaledRow[cols-1].b * fraccoltofill + _m0x090_b #_ST0_# r + vertScaledRow[cols-1].r * fraccoltofill + cF:0.5 fistpl m0x104_tmp_int(%esp) #hs#(pop) #_ST3_# fraccoltofill #_ST2_# cF:0.5 #_ST1_# g + vertScaledRow[cols-1].g * fraccoltofill #_ST0_# vertScaledRow[cols-1].b * fraccoltofill + _m0x090_b #_STx==> r + vertScaledRow[cols-1].r * fraccoltofill + cF#0.5 fldcw m0x0b2_tmp_cw(%esp) #hs# movl m0x104_tmp_int(%esp), %eax #hs# result cmpl %esi, %eax #hs# newmaxval vs result movl %esi, %ecx #hs# %ecx is: newmaxval ja .Lq50_skip1 #hs# movl %eax, %ecx #hs# %ecx is: result .Lq50_skip1: imull $12, %ebx, %eax #hs# %eax is: 12*newcol movl m0x030_newxelrow(%esp), %edx #hs# %edx is: &newxelrow[0] movl %ecx, (%edx,%eax) #hs# MIN --> newxelrow[newcol].r fxch %st(1) #hs# #_ST3_# fraccoltofill #_ST2_# cF:0.5 #_ST1_# vertScaledRow[cols-1].b * fraccoltofill + _m0x090_b #_ST0_# g + vertScaledRow[cols-1].g * fraccoltofill fadd %st(2) #hs# +0.5 #_ST3_# fraccoltofill #_ST2_# cF:0.5 #_ST1_# vertScaledRow[cols-1].b * fraccoltofill + _m0x090_b #_ST0_# g + vertScaledRow[cols-1].g * fraccoltofill + cF:0.5 fnstcw m0x0b0_tmp_cw(%esp) #hs# movw m0x0b0_tmp_cw(%esp), %cx #hs# movw $TRUNC, m0x0b0_tmp_cw(%esp) #hs# fldcw m0x0b0_tmp_cw(%esp) #hs# movw %cx, m0x0b0_tmp_cw(%esp) #hs# fistpl m0x108_tmp_int(%esp) #hs#(pop) #_ST2_# fraccoltofill #_ST1_# cF:0.5 #_ST0_# vertScaledRow[cols-1].b * fraccoltofill + _m0x090_b #_STx==> g + vertScaledRow[cols-1].g * fraccoltofill + cF#0.5 fldcw m0x0b0_tmp_cw(%esp) #hs# movl m0x108_tmp_int(%esp), %ecx #hs# %ecx is: result cmpl %esi, %ecx #hs# newmaxval vs result movl %esi, %edx #hs# %edx is: newmaxval ja .Lq51_skip1 #hs# movl %ecx, %edx #hs# %edx is: result .Lq51_skip1: movl m0x030_newxelrow(%esp), %ecx #hs# %ecx is: &newxelrow[0] movl %edx, 4(%ecx,%eax) #hs# MIN --> newxelrow[newcol].g faddp %st(1) #hs#(pop) #_ST1_# fraccoltofill #_ST0_# cF:0.5 + vertScaledRow[cols-1].b * fraccoltofill + _m0x090_b fnstcw m0x0ae_tmp_cw(%esp) #hs# movw m0x0ae_tmp_cw(%esp), %cx #hs# movw $TRUNC, m0x0ae_tmp_cw(%esp) #hs# fldcw m0x0ae_tmp_cw(%esp) #hs# movw %cx, m0x0ae_tmp_cw(%esp) #hs# fistpl m0x10c_tmp_int(%esp) #hs#(pop) #_ST0_# fraccoltofill #_STx==> cF#0.5 + vertScaledRow[cols-1].b * fraccoltofill + _m0x090_b fldcw m0x0ae_tmp_cw(%esp) #hs# movl m0x10c_tmp_int(%esp), %ecx #hs# %ecx is: result jmp .Lq53_exit_switch #hs# .Lq52_default: #_ST2_# fraccoltofill #_ST1_# r #_ST0_# g ##-382 default: ##-383 g += fraccoltofill * PNM_GET1(vertScaledRow[cols-1]); fstp %st(1) #hs#(pop) __del_ST1__ #_ST2_# fraccoltofill #_ST0_# g movl %edx, %edi #hs# %edi is: newcols movl m0x024_vertScaledRow_COLSminus1_b(%esp), %eax #hs# %eax is: &vertScaledRow[cols-1].b movl (%eax), %eax #hs# %eax is: vertScaledRow[cols-1].b movl %eax, m0x0d8_tmpLL(%esp) #hs# movl $0, m0x0dc_tmpLL_high(%esp) #hs# fiLDLL m0x0d8_tmpLL(%esp) #hs#(push.LL) #_ST2_# fraccoltofill #_ST1_# g #_ST0_# vertScaledRow[cols-1].b fmul %st(2) #hs# * fraccoltofill #_ST2_# fraccoltofill #_ST1_# g #_ST0_# vertScaledRow[cols-1].b * fraccoltofill faddp %st(1) #hs#(pop) g ? #_ST1_# fraccoltofill #_ST0_# g + vertScaledRow[cols-1].b * fraccoltofill ##-384 PNM_ASSIGN1( newxelrow[newcol], MIN(newmaxval, (int) (g + 0.5))); imull $12, %ebx, %eax #hs# %eax is: 12*newcol movl m0x030_newxelrow(%esp), %ecx #hs# %ecx is: &newxelrow[0] movl $0, (%ecx,%eax) #hs# 0 --> newxelrow[newcol].r movl $0, 4(%ecx,%eax) #hs# 0 --> newxelrow[newcol].g fadds .cFLOAT_0_5 #hs# + 0.5 #_ST1_# fraccoltofill #_ST0_# g + vertScaledRow[cols-1].b * fraccoltofill + 0.5 fnstcw m0x0ac_tmp_cw(%esp) #hs# movw m0x0ac_tmp_cw(%esp), %cx #hs# movw $TRUNC, m0x0ac_tmp_cw(%esp) #hs# fldcw m0x0ac_tmp_cw(%esp) #hs# movw %cx, m0x0ac_tmp_cw(%esp) #hs# fistpl m0x0e4_tmp_int(%esp) #hs#(pop) #_ST0_# fraccoltofill #_STx==> g + vertScaledRow[cols-1].b * fraccoltofill + 0.5 fldcw m0x0ac_tmp_cw(%esp) #hs# movl m0x0e4_tmp_int(%esp), %ecx #hs# %ecx is: result .Lq53_exit_switch: cmpl %esi, %ecx #hs# newmaxval vs result movl %esi, %edx #hs# %edx is: newmaxval ja .Lq54_skip1 #hs# movl %ecx, %edx #hs# %edx is: result .Lq54_skip1: movl m0x030_newxelrow(%esp), %ecx #hs# %ecx is: &newxelrow[0] movl %edx, 8(%ecx,%eax) #hs# MIN --> newxelrow[newcol].b ##-380 break; ##-385 break; ##-386 } movl %edi, %edx #hs# %edx is: newcols #_ST0_# fraccoltofill fldz #hs#(push) 0.0 fldz #hs#(push) 0.0 fldz #hs#(push) 0.0 #_ST3_# fraccoltofill #_ST2_# ?d = 0.0 #_ST1_# ?e = 0.0 #_ST0_# ?f = 0.0 fxch %st(2) #hs# #_ST3_# fraccoltofill #_ST2_# ?f = 0.0 #_ST1_# ?e = 0.0 #_ST0_# ?d = 0.0 fxch %st(3) #hs# #_ST3_# ?d = 0.0 #_ST2_# ?f = 0.0 #_ST1_# ?e = 0.0 #_ST0_# fraccoltofill fxch %st(2) #hs# #_ST3_# ?d = 0.0 #_ST2_# fraccoltofill #_ST1_# ?e = 0.0 #_ST0_# ?f = 0.0 .Lq55_exit_func: # -------------------- horizontal_scale.exit.i ##-367 *stretchP = fraccoltofill; ##-387 } else ##-388 *stretchP = 0; fstp %st(3) #hs#(pop) #_ST2_# ?f = 0.0 #_ST1_# fraccoltofill #_ST0_# ?e = 0.0 fstp %st(0) #hs#(pop) __del_ST0__ #_ST1_# ?f = 0.0 #_ST0_# fraccoltofill fstp %st(1) #hs#(pop) __del_ST1__ #_ST0_# fraccoltofill ##-389 } ##-614 if (verbose && row == 0) cmpl $0, m0x040_verbose(%esp) # 0 vs verbose movl m0x09c_cols(%esp), %eax # %eax is: cols je .Lq56_exit_if # cmpl $0, m0x03c_row(%esp) # 0 vs row jne .Lq56_exit_if # fSTPL m0x004_P2(%esp) #(pop) stretch (double) #_STx_# ____empty____ #_STx==> fraccoltofill --> stretchP ##-615 pm_message("%f of right column stretched due to " ##-616 "arithmetic imprecision", ##-617 stretch); movl $.str_06, m0x000_P1(%esp) # movl %eax, %ebx # movl %edx, %edi # calll pm_message # movl %edi, %edx # movl %ebx, %eax # fldz #(push) 0.0 #_ST0_# 0.0 .align 16, 0x90 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .Lq56_exit_if: fstp %st(0) #(pop) __del_ST0__ #_STx_# ____empty____ movl %eax, %edi # movl %edx, m0x080_newcols(%esp) # ##-606 pnm_writepnmrow(stdout, vertScaledRow, newcols, ##-607 newmaxval, newformat, 0); movl __stdoutp, %eax # movl m0x06c_newformat(%esp), %ecx # movl %ecx, m0x010_P5(%esp) # movl %esi, m0x00c_P4(%esp) # movl %edx, m0x008_P3(%esp) # movl m0x030_newxelrow(%esp), %ecx # %ecx is: &newxelrow[0] .Lq57_write: movl %ecx, m0x004_P2(%esp) # movl %eax, m0x000_P1(%esp) # movl $0, m0x014_P6(%esp) # calll pnm_writepnmrow # movl m0x03c_row(%esp), %ecx # %ecx is: row incl %ecx # row ++ movl %ecx, m0x03c_row(%esp) # movl m0x068_newrows(%esp), %eax # newrows cmpl %eax, %ecx # newrows vs row fldz #(push) 0.0 fLDL _m0x0a0_cF_0_5(%esp) #(push) 0.5 (double) flds m0x034_rowsleft(%esp) #(push) rowsleft #_ST2_# 0.0 #_ST1_# _m0x0a0_cF_0_5 #_ST0_# rowsleft jne .Lp73_row_loop # .Lq58_exit_loop: # -------------------- scaleWithMixing.exit fstp %st(2) #(pop) fstp %st(0) #(pop) __del_ST0__ fstp %st(0) #(pop) __del_ST0__ #_STx_# ____empty____ ##-621 } ##-622 } ##-623 pnm_freerow(newxelrow); movl m0x030_newxelrow(%esp), %eax # %eax is: &newxelrow[0] movl %eax, m0x000_P1(%esp) # calll free # ##-624 pnm_freerow(xelrow); movl m0x038_xelrow_ZERO(%esp), %eax # %eax is: &xelrow[0] movl %eax, m0x000_P1(%esp) # calll free # ##-625 pnm_freerow(vertScaledRow); ##-626 } movl m0x060_vertScaledRow(%esp), %eax # &vertScaledRow[0] jmp .Lp69_for_free # ############################################################################### #_STx_# ____empty____ .Lq59_else: ##-174 else { ##-175 scale_parm = atof(argv[1]); movl 4(%esi), %ebx #ii# movl %ebx, m0x000_P1(%esp) #ii# calll atof #ii#(push ?) #_ST0_# atof() ? fstps m0x26c_tmp_float(%esp) #ii#(pop) flds m0x26c_tmp_float(%esp) #ii#(push) #_ST0_# scale_parm ##-177 if (scale_parm == 0.0) fldz #ii#(push) 0.0 #_ST1_# scale_parm #_ST0_# 0.0 fxch %st(1) #ii# #_ST1_# 0.0 #_ST0_# scale_parm fucom %st(1) #ii# 0.0 vs scale_parm fstp %st(1) #ii#(pop) __del_ST1__ #_ST0_# scale_parm fnstsw %ax #ii# sahf #ii# jne .Lq60_else #ii# jp .Lq60_else #ii# movl %ebx, m0x004_P2(%esp) #ii# ##-178 pm_error("The scale parameter %s is not " ##-179 "a positive number.", ##-180 argv[1]); movl $.str_38, m0x000_P1(%esp) #ii# fSTPL _m0x0a0_tmp_double(%esp) #ii#(pop) scale_parm (double) #_STx_# ____empty____ #_STx==> scale_parm --> tmp_double calll pm_error #ii# #_____NEVER_RETURN_____cc_dont_know_it jmp .Lp25 #ii# #_ST0_# scale_parm .Lq60_else: ##-181 else { ##-182 if (argc-1 < 2) cmpl $2, %edi #ii# 2 vs jg .Lq61_skip2 #ii# ##-183 cmdline_p->input_filespec = "-"; movl $.str_36, m0x288_cmdline_input_filespec(%esp) #ii# "-" jmp .Lp32_finish #ii# .Lq61_skip2: ##-184 else ##-185 cmdline_p->input_filespec = argv[2]; ##-186 } ##-187 } movl 8(%esi), %eax #ii# movl %eax, m0x288_cmdline_input_filespec(%esp) #ii# jmp .Lp32_finish #ii# .Ltmp0: .size main, .Ltmp0-main ############################################################################### .section .rodata.cst4,"aM",@progbits,4 .align 4 # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # .cFLOAT_0_5: .long 0x3F000000 # float 0.5 ############################################################################### .section .rodata.str1.1,"aMS",@progbits,1 .type .str_01,@object .str_01: .asciz "promoting from PBM to PGM" .size .str_01, 26 .type .str_02,@object .str_02: .asciz "Scaling by %f horizontally to %d columns." .size .str_02, 42 .type .str_03,@object .str_03: .asciz "Scaling by %f vertically to %d rows." .size .str_03, 37 .type .str_04,@object .str_04: .ascii "Arithmetic precision of this program is inadequate to do the specified scaling. " .asciz "Use a smaller input image or a slightly different scale factor." .size .str_04, 145 .type .str_05,@object .str_05: .asciz "%f of bottom row stretched due to arithmetic imprecision" .size .str_05, 57 .type .str_06,@object .str_06: .asciz "%f of right column stretched due to arithmetic imprecision" .size .str_06, 59 .type .str_07,@object .str_07: .ascii "Internal error: last column filled is %d," .asciz " but %d is the rightmost output column." .size .str_07, 81 .type .str_08,@object .str_08: .asciz "xsize" .size .str_08, 6 .type .str_09,@object .str_09: .asciz "width" .size .str_09, 6 .type .str_10,@object .str_10: .asciz "ysize" # this string may be is shared .size .str_10, 6 # with "xysize" by linker... .type .str_11,@object .str_11: .asciz "height" .size .str_11, 7 .type .str_12,@object .str_12: .asciz "xscale" .size .str_12, 7 .type .str_13,@object .str_13: .asciz "yscale" .size .str_13, 7 .type .str_14,@object .str_14: .asciz "pixels" .size .str_14, 7 .type .str_15,@object .str_15: .asciz "reduce" .size .str_15, 7 .type .str_16,@object .str_16: .asciz "xysize" .size .str_16, 7 .type .str_17,@object .str_17: .asciz "verbose" .size .str_17, 8 .type .str_18,@object .str_18: .asciz "nomix" .size .str_18, 6 .type .str_19,@object .str_19: .asciz "-xsize/width must be greater than zero." .size .str_19, 40 .type .str_20,@object .str_20: .asciz "-ysize/height must be greater than zero." .size .str_20, 41 .type .str_21,@object .str_21: .asciz "-xscale must be greater than zero." .size .str_21, 35 .type .str_22,@object .str_22: .asciz "-yscale must be greater than zero." .size .str_22, 35 .type .str_23,@object .str_23: .asciz "-reduce must be greater than zero." .size .str_23, 35 .type .str_24,@object .str_24: .asciz "Cannot specify both -xsize/width and -xscale." .size .str_24, 46 .type .str_25,@object .str_25: .asciz "Cannot specify both -ysize/height and -yscale." .size .str_25, 47 .type .str_26,@object .str_26: .asciz "Cannot specify -xysize with other dimension options." .size .str_26, 53 .type .str_27,@object .str_27: .asciz "Cannot specify -pixels with other dimension options." .size .str_27, 53 .type .str_28,@object .str_28: .asciz "Cannot specify -reduce with other dimension options." .size .str_28, 53 .type .str_29,@object .str_29: .asciz "-pixels must be greater than zero" .size .str_29, 34 .type .str_30,@object .str_30: .ascii "You must supply at least two parameters with -xysize:\n" .asciz " x and y dimensions of the bounding box." .size .str_30, 95 .type .str_31,@object .str_31: .asciz "Too many arguments. With -xysize, you need 2 or 3 arguments." .size .str_31, 62 .type .str_32,@object .str_32: .asciz "horizontal xysize not an integer: '%s'" .size .str_32, 39 .type .str_33,@object .str_33: .asciz "horizontal size is not positive: %d" .size .str_33, 36 .type .str_34,@object .str_34: .asciz "vertical xysize not an integer: '%s'" .size .str_34, 37 .type .str_35,@object .str_35: .asciz "vertical size is not positive: %d" .size .str_35, 34 .type .str_36,@object .str_36: .asciz "-" .size .str_36, 2 .type .str_37,@object .str_37: .ascii "With no dimension options, you must supply at least" .asciz " one parameter: \nthe scale factor." .size .str_37, 86 .type .str_38,@object .str_38: .asciz "The scale parameter %s is not a positive number." .size .str_38, 49 .type .str_39,@object .str_39: .asciz "reducing by %d gives scale factor of %f." .size .str_39, 41 ############################################################################### .ident "FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512" .section ".note.GNU-stack","",@progbits ############################################################################### #c# (other M_memorandums_M from here) #c# #c# Linuxでx86アセンブラ(浮動小数点編) #c# https://qiita.com/MoriokaReimen/items/8d3b0dddcc2a77ecdfa5 #c# #c# (FPU が主体になるので store は FPU からの) #c# (取り出し、load は FPU への書き込みを表す) #c# #c# FPU stack ... ST0(bottom) -- ST7(top) までの 8本あり #c# | ST7 | (80bit) | #c# | ST6 | (80bit) | #c# | ST5 | (80bit) | (fld,fild で ST0 から詰まれる) #c# | ST4 | (80bit) | (fst,fist は stack-top が対象) #c# | ST3 | (80bit) | (postfix-p が無いと pop しない) #c# | ST2 | (80bit) | #c# | ST1 | (80bit) | #c# | ST0 | (80bit) | #c# #c# FPU control word (16bit) ... fldcw で書き込み、fstcw で取り出し #c# +-----------+++-----------+++-----------+++-----------+ #c# |xx|xx|xx|xx| | RC | PC | |xx|xx|PM|UM| |OM|ZM|DM|IM| #c# +-----------+++-----------+++-----------+++-----------+ #c# 四捨五入 00 00 単精度 (24bits) | #c# 繰り下げ 01 01 ---- XM は例外マスク #c# 繰り上げ 10 10 倍精度 (53bits) #c# 切り捨て 11 11 拡張倍精度(64bits) #c# #c# $0xc7f = 0b_0000_1100_0111_1111 #c# ||++----単精度 #c# ++-----切捨て #c# #c# FPU status word (16bit) ... f*stsw で AX にコピー、 #c# +-----------+++-----------+++-----------+++-----------+ #c# |B |C3| TOS (TOP)|C2|C1|C0| |ES|SF|PE|UE| |OE|ZE|DE|IE| #c# +-----------+++-----------+++-----------+++-----------+ #c# V V V sahf で AH から F にコピー #c# +-----------+++-----------+ #c# |SF|ZF| |AF| | |PF| |CF| #c# +-----------+++-----------+ #c# (f > 0.0) ... 等で f が NaN 等の場合は C2=1 (比較不能) になる #c# みたいで それを PF で見るみたい #c# #c# 浮動小数点数の内部表現(IEEE) #c# https://www.k-cube.co.jp/wakaba/server/floating_point.html #c# #c# 0x3F000000 => 0b_0011_1111_0000_0000_0000_0000_0000_0000 #c# S***_****_*+++_++++_++++_++++_++++_++++ #c# 符号(1bit) 指数部(8bit) 仮数部(23bit) #c# 0 0x7e=126=-1 0 => 1.0 ====> 0.5 #c# #c# #c# x86 and amd64 instruction reference #c# https://www.felixcloutier.com/x86/ #c# #c# (たぶんこんな感じのオペレーションと思われる) #c# #c# (empty) <-ST(0) FLDZ FLD1 FLD 3.333 #c# |ST7|(80bit)| | > 0.000 |<-ST(0) | 0.000 |..ST(1) | 0.000 |..ST(2) #c# |ST6|(80bit)| | ^ | --- | > 1.000 |<-ST(0) | 1.000 |..ST(1) #c# |ST5|(80bit)| push | | --- | | --- | > 3.333 |<-ST(0) #c# |ST4|(80bit)| | | | --- | | --- | | --- | #c# |ST3|(80bit)| V | | --- | | --- | | --- | #c# |ST2|(80bit)| pop | --- | | --- | | --- | #c# |ST1|(80bit)| | --- | | --- | | --- | #c# |ST0|(80bit)| | --- | | --- | | --- | #c# #c# (initial) FSQRT #c# |ST7| 3.333 |..ST(2) | 3.333 |..ST(2) #c# |ST6| 2.222 |..ST(1) | 2.222 |..ST(1) #c# |ST5| 1.111 |<-ST(0) * 1.054 |<-ST(0) #c# #c# FIMUL 5 FMUL 6.000 FMULP #c# | 3.702 |..ST(2) | 3.333 |..ST(2) | 3.333 |..ST(1) #c# | 2.222 |..ST(1) | 2.222 |..ST(1) > 2.468 |<-ST(0) #c# > 5.555 |<-ST(0) > 6.666 |<-ST(0) | --- | #c# #c# FMUL ST(0),ST(2) FMUL ST(2),ST(0) FMULP ST(2),ST(0) #c# | 3.333 |..ST(2) > 3.702 |..ST(2) > 3.702 |..ST(1) #c# | 2.222 |..ST(1) | 2.222 |..ST(1) | 2.222 |<-ST(0) #c# > 3.702 |<-ST(0) | 1.111 |<-ST(0) | --- | #c# #c# FST mem FST ST(2) FSTP mem FSTP ST(2) #c# | 3.333 |..ST(2) > 1.111 |..ST(2) | 3.333 |..ST(1) > 1.111 |..ST(1) #c# | 2.222 |..ST(1) | 2.222 |..ST(1) | 2.222 |<-ST(0) | 2.222 |<-ST(0) #c# * 1.111 |<-ST(0) * 1.111 |<-ST(0) * --- | * --- | #c# 1.111-->mem 1.111-->mem #c# #c# Jcc - Jump if Condition Is Met #c# #c# (2) JAE rel - Jump if above or equal (CF=0) #c# JNC rel - Jump if not carry (CF=0) #c# JNB rel - Jump if not below (CF=0) #c# (5) JB rel - Jump if below (CF=1) #c# JC rel - Jump if carry (CF=1) #c# JNAE rel - Jump if not above or equal (CF=1) #c# (59) JNE rel - Jump if not equal (ZF=0) #c# JNZ rel - Jump if not zero (ZF=0) #c# JZ rel - Jump if zero (ZF=1) #c# (33) JE rel - Jump if equal (ZF=1) #c# (13) JA rel - Jump if above (CF=0 and ZF=0) #c# JNBE rel - Jump if not below or equal (CF=0 and ZF=0) #c# (6) JBE rel - Jump if below or equal (CF=1 or ZF=1) #c# JNA rel - Jump if not above (CF=1 or ZF=1) #c# JO rel - Jump if overflow (OF=1) #c# JNO rel - Jump if not overflow (OF=0) #c# JS rel - Jump if sign (SF=1) #c# JNS rel - Jump if not sign (SF=0) #c# (2) JGE rel - Jump if greater or equal (SF=OF) #c# JNL rel - Jump if not less (SF=OF) #c# (1) JL rel - Jump if less (SF=/OF) #c# JNGE rel - Jump if not greater or equal (SF=/OF) #c# (7) JG rel - Jump if greater (ZF=0 and SF=OF) #c# JNLE rel - Jump if not less or equal (ZF=0 and SF=OF) #c# (13) JLE rel - Jump if less or equal (ZF=1 or SF=/OF) #c# JNG rel - Jump if not greater (ZF=1 or SF=/OF) #c# JPO rel - Jump if parity odd (PF=0) #c# (8) JNP rel - Jump if not parity (PF=0) #c# JPE rel - Jump if parity even (PF=1) #c# (8) JP rel - Jump if parity (PF=1) #c# JCXZ rel - Jump if CX register is 0 #c# JECXZ rel - Jump if ECX register is 0 #c# JRCXZ rel - Jump if RCX register is 0 #c# #c# #c# % objdump -D pnmscale ... 本ファイルは この出力を元にしているが、 #c# ( default: -M att ) オペランドの表記が OP param -> target に #c# なるようだ (mov も src -> dst) #c# % objdump -D -M intel pnmscale ... intel format を選ぶと OP target <- param #c# になり、↓ の各種表記と一致する #c# (mov も dst <- src) #c# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #c# --- x86 and amd64 instruction reference #c# 325462-sdm-vol-1-2abcd-3abcd-4....IA-32 Manual.pdf #c# --- Intel(R) 64 and IA-32 Architectures Software Developer's Manual #c# (see p528 for "Addressing-Mode Encoding of ModR/M and SIB Bytes") #c# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #c# #c# GCCでインラインアセンブリを使用 する方法と留意点等 for x86 #c# https://www.sci10.org/on_gcc_asm.html #c# | #c# | レジスタは、%マークを付けて、%eax や %ebp と書くこと。 #c# | #c# | また、レジスタの指しているアドレスのメモリは、 #c# | intel形式では[eax]であったが、AT&T形式では、(%eax)である。 #c# | #c# | さらに、オフセットが val であるとき、 #c# | intel形式では[eax+val]であったが、AT&T形式では、val(%eax)である。 #c# | #c# | AT&T形式で、val(a,b,c)と書くと、 #c# | intel形式の[a + b * c + val]と等価である。 #c# | #c# | 例えば、int型の配列 array の%eax番目の数は、intが4bytesなので、 #c# | array(,%eax,4) である。 #c# | #c# ---------------------------------------------------------------------------------------------------------- #c# _____ notation of objdump _____ #c# binary| -M att (default) | function and real name #c# ---------------------------------------------------------------------------------------------------------- ############ vvvvv these are reverse... #c# de e3 | fsubp %st,%st(3) | Subtract ST(i) from ST(0), store result in ST(i) (pop) FSUBRP ###: de e2 fsubp %st,%st(2) ST(i)=ST(0)-ST(i) FSUBRP ST(i), ST(0) ###: de ec fsubrp %st,%st(4) ST(i)=ST(i)-ST(0) FSUBP ST(i), ST(0) #c# de ec | fsubrp %st,%st(4) | Subtract ST(0) from ST(i), store result in ST(i) (pop) FSUBP #c# ###: d8 f1 fdiv %st(1),%st ST(0)=ST(0)/ST(i) FDIV ST(0), ST(i) ############ ^^^^ this is correct but vvvvv these are reverse... #c# de f1 | fdivp %st,%st(1) | Divide ST(0) by ST(i), store result in ST(i) (pop) FDIVRP ###: de f1 fdivp %st,%st(1) ST(i)=ST(0)/ST(i) FDIVRP ST(i), ST(0) ###: de f9 fdivrp %st,%st(1) ST(1)=ST(1)/ST(0) FDIVP (ST(1), ST(0)) #c# de f9 | fdivrp %st,%st(1) | Divide ST(i) by ST(0), store result in ST(i) (pop) FDIVP #c# #### SUMMARY ###################### #c# ## in case of dst is not %st(0), ## #c# ## reverse reverse-option like ## #c# ## div <-> divr, sub <-> subr ## ... div/divr や sub/subr の表記が #c# ################################### なんか逆だったり そうじゃなかったり… ?? #c# ---------------------------------------------------------------------------------------------------------- #c# #c# このような simple な for() 文の場合、 #c# for (row = 0; row < newrows; ++row) #c# (a) まず (0 < newrows) を見てループに入るかどうかを判別し、 #c# ループ処理後に #c# (b1) (++row した後) (row < newrows) を見て繰り返しを判断したり、 #c# (b2) newrows をそのまま繰り返し回数 n と扱って (--n > 0) で繰り返しを判断したり #c# するようだ #c# #c# 最終的に C の 1行は 3つ(以上)に分解されコード化される #c# for ( ; 0 < newrows; ) <-- (a) (newrows -> n) #c# for (row = 0; ) #c# for ( ; ; ++row) <-- (b1) or for ( ; n--) <-- (b2) #c# for ( ; row < newrows; ) <-- (b1) or for ( ; n > 0; ) <-- (b2) #c# #c# ---------------------------------------------------------------------------------------------------------- #c# 不明点 #c# 1. ##-669t for (col = 0; col < newcols; ++col) { #c# で 0 >= newcols の場合に newcols = 1 で loop に入るのは何故? #c# 2. ##-388 *stretchP = 0; #c# に対応する部分がわからない (条件分岐先毎に複数あるのかも) #c#