#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ hpgs_parse_length(char const *, double *);
char *strchr(char const *, char);
scalar_t__ strcmp(char const *, char *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
int hpgs_parse_papersize(const char *str, double *pt_width, double *pt_height) {
  if (strcmp(str, "A4") == 0) {
    *pt_width = 595.91084545538825881889;
    *pt_height = 842.74519960822752756850;
  } else if (strcmp(str, "A3") == 0) {
    *pt_width = 842.74519960822752756850;
    *pt_height = 1191.82169091077651766614;
  } else if (strcmp(str, "A2") == 0) {
    *pt_width = 1191.82169091077651766614;
    *pt_height = 1685.49039921645505516535;
  } else if (strcmp(str, "A1") == 0) {
    *pt_width = 1685.49039921645505516535;
    *pt_height = 2383.64338182155303536062;
  } else if (strcmp(str, "A0") == 0) {
    *pt_width = 2383.64338182155303536062;
    *pt_height = 3370.98079843291011035905;
  } else if (strcmp(str, "A4l") == 0) {
    *pt_height = 595.91084545538825881889;
    *pt_width = 842.74519960822752756850;
  } else if (strcmp(str, "A3l") == 0) {
    *pt_height = 842.74519960822752756850;
    *pt_width = 1191.82169091077651766614;
  } else if (strcmp(str, "A2l") == 0) {
    *pt_height = 1191.82169091077651766614;
    *pt_width = 1685.49039921645505516535;
  } else if (strcmp(str, "A1l") == 0) {
    *pt_height = 1685.49039921645505516535;
    *pt_width = 2383.64338182155303536062;
  } else if (strcmp(str, "A0l") == 0) {
    *pt_height = 2383.64338182155303536062;
    *pt_width = 3370.98079843291011035905;
  } else {
    const char *x = strchr(str, 'x');
    char wstr[32];
    int l;
    if (!x)
      return -1;
    l = x - str;
    if (l > 31)
      return -1;
    strncpy(wstr, str, l);
    wstr[l] = '\0';
    if (hpgs_parse_length(wstr, pt_width))
      return -1;
    if (hpgs_parse_length(str + l + 1, pt_height))
      return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<hpgs_parse_papersize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1193 <hpgs_parse_papersize+0x53>
mov    -0x18(%rbp),%rax
movsd  0xeae(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xe96(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14b3 <hpgs_parse_papersize+0x373>
mov    -0x10(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11d2 <hpgs_parse_papersize+0x92>
mov    -0x18(%rbp),%rax
movsd  0xe67(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xe4f(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14ae <hpgs_parse_papersize+0x36e>
mov    -0x10(%rbp),%rdi
lea    0xe59(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1211 <hpgs_parse_papersize+0xd1>
mov    -0x18(%rbp),%rax
movsd  0xe20(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xe08(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14a9 <hpgs_parse_papersize+0x369>
mov    -0x10(%rbp),%rdi
lea    0xe1d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1250 <hpgs_parse_papersize+0x110>
mov    -0x18(%rbp),%rax
movsd  0xdd9(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xdc1(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14a4 <hpgs_parse_papersize+0x364>
mov    -0x10(%rbp),%rdi
lea    0xde1(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    128f <hpgs_parse_papersize+0x14f>
mov    -0x18(%rbp),%rax
movsd  0xd92(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xd7a(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    149f <hpgs_parse_papersize+0x35f>
mov    -0x10(%rbp),%rdi
lea    0xda5(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12ce <hpgs_parse_papersize+0x18e>
mov    -0x20(%rbp),%rax
movsd  0xd73(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xd5b(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    149a <hpgs_parse_papersize+0x35a>
mov    -0x10(%rbp),%rdi
lea    0xd6a(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    130d <hpgs_parse_papersize+0x1cd>
mov    -0x20(%rbp),%rax
movsd  0xd2c(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xd14(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    1495 <hpgs_parse_papersize+0x355>
mov    -0x10(%rbp),%rdi
lea    0xd2f(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    134c <hpgs_parse_papersize+0x20c>
mov    -0x20(%rbp),%rax
movsd  0xce5(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xccd(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    1490 <hpgs_parse_papersize+0x350>
mov    -0x10(%rbp),%rdi
lea    0xcf4(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    138b <hpgs_parse_papersize+0x24b>
mov    -0x20(%rbp),%rax
movsd  0xc9e(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xc86(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    148b <hpgs_parse_papersize+0x34b>
mov    -0x10(%rbp),%rdi
lea    0xcb9(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    13ca <hpgs_parse_papersize+0x28a>
mov    -0x20(%rbp),%rax
movsd  0xc57(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xc3f(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    1486 <hpgs_parse_papersize+0x346>
mov    -0x10(%rbp),%rdi
mov    $0x78,%esi
call   1040 <strchr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    13f3 <hpgs_parse_papersize+0x2b3>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ba <hpgs_parse_papersize+0x37a>
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x54(%rbp)
cmpl   $0x1f,-0x54(%rbp)
jle    1417 <hpgs_parse_papersize+0x2d7>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ba <hpgs_parse_papersize+0x37a>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x54(%rbp),%edx
call   1030 <strncpy@plt>
movslq -0x54(%rbp),%rax
movb   $0x0,-0x50(%rbp,%rax,1)
lea    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <hpgs_parse_length@plt>
cmp    $0x0,%rax
je     1453 <hpgs_parse_papersize+0x313>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ba <hpgs_parse_papersize+0x37a>
mov    -0x10(%rbp),%rdi
movslq -0x54(%rbp),%rax
add    %rax,%rdi
add    $0x1,%rdi
mov    -0x20(%rbp),%rsi
call   1060 <hpgs_parse_length@plt>
cmp    $0x0,%rax
je     1481 <hpgs_parse_papersize+0x341>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ba <hpgs_parse_papersize+0x37a>
jmp    1486 <hpgs_parse_papersize+0x346>
jmp    148b <hpgs_parse_papersize+0x34b>
jmp    1490 <hpgs_parse_papersize+0x350>
jmp    1495 <hpgs_parse_papersize+0x355>
jmp    149a <hpgs_parse_papersize+0x35a>
jmp    149f <hpgs_parse_papersize+0x35f>
jmp    14a4 <hpgs_parse_papersize+0x364>
jmp    14a9 <hpgs_parse_papersize+0x369>
jmp    14ae <hpgs_parse_papersize+0x36e>
jmp    14b3 <hpgs_parse_papersize+0x373>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpgs_parse_papersize>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xea3(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     12ad <hpgs_parse_papersize+0x16d>
lea    0xe91(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     12c6 <hpgs_parse_papersize+0x186>
lea    0xe7c(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     12df <hpgs_parse_papersize+0x19f>
lea    0xe67(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     12f8 <hpgs_parse_papersize+0x1b8>
lea    0xe52(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1311 <hpgs_parse_papersize+0x1d1>
lea    0xe3d(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     133b <hpgs_parse_papersize+0x1fb>
lea    0xe29(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1354 <hpgs_parse_papersize+0x214>
lea    0xe15(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     136d <hpgs_parse_papersize+0x22d>
lea    0xe01(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1386 <hpgs_parse_papersize+0x246>
lea    0xded(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     139f <hpgs_parse_papersize+0x25f>
mov    %rbx,%rdi
mov    $0x78,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     12a3 <hpgs_parse_papersize+0x163>
mov    %rax,%r12
sub    %rbx,%r12
cmp    $0x1f,%r12d
jg     12a3 <hpgs_parse_papersize+0x163>
mov    %rsp,%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
call   1030 <strncpy@plt>
movslq %r12d,%r12
movb   $0x0,(%rsp,%r12,1)
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <hpgs_parse_length@plt>
test   %rax,%rax
jne    12a3 <hpgs_parse_papersize+0x163>
lea    (%rbx,%r12,1),%rdi
add    $0x1,%rdi
mov    %r14,%rsi
call   1060 <hpgs_parse_length@plt>
test   %rax,%rax
je     132b <hpgs_parse_papersize+0x1eb>
mov    $0xffffffff,%eax
jmp    132d <hpgs_parse_papersize+0x1ed>
movabs $0x40829f49695794d3,%rax
9f 82 40
mov    %rax,(%r15)
movabs $0x408a55f62b3652a2,%rax
55 8a 40
jmp    1328 <hpgs_parse_papersize+0x1e8>
movabs $0x408a55f62b3652a2,%rax
55 8a 40
mov    %rax,(%r15)
movabs $0x40929f49695794d3,%rax
9f 92 40
jmp    1328 <hpgs_parse_papersize+0x1e8>
movabs $0x40929f49695794d3,%rax
9f 92 40
mov    %rax,(%r15)
movabs $0x409a55f62b3652a2,%rax
55 9a 40
jmp    1328 <hpgs_parse_papersize+0x1e8>
movabs $0x409a55f62b3652a2,%rax
55 9a 40
mov    %rax,(%r15)
movabs $0x40a29f49695794d3,%rax
9f a2 40
jmp    1328 <hpgs_parse_papersize+0x1e8>
movabs $0x40a29f49695794d3,%rax
9f a2 40
mov    %rax,(%r15)
movabs $0x40aa55f62b3652a2,%rax
55 aa 40
mov    %rax,(%r14)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
movabs $0x40829f49695794d3,%rax
9f 82 40
mov    %rax,(%r14)
movabs $0x408a55f62b3652a2,%rax
55 8a 40
jmp    13b6 <hpgs_parse_papersize+0x276>
movabs $0x408a55f62b3652a2,%rax
55 8a 40
mov    %rax,(%r14)
movabs $0x40929f49695794d3,%rax
9f 92 40
jmp    13b6 <hpgs_parse_papersize+0x276>
movabs $0x40929f49695794d3,%rax
9f 92 40
mov    %rax,(%r14)
movabs $0x409a55f62b3652a2,%rax
55 9a 40
jmp    13b6 <hpgs_parse_papersize+0x276>
movabs $0x409a55f62b3652a2,%rax
55 9a 40
mov    %rax,(%r14)
movabs $0x40a29f49695794d3,%rax
9f a2 40
jmp    13b6 <hpgs_parse_papersize+0x276>
movabs $0x40a29f49695794d3,%rax
9f a2 40
mov    %rax,(%r14)
movabs $0x40aa55f62b3652a2,%rax
55 aa 40
mov    %rax,(%r15)
jmp    132b <hpgs_parse_papersize+0x1eb>

LLVM IR (-O0):
@.str = [3 x i8] c"A4\00"
@.str.1 = [3 x i8] c"A3\00"
@.str.2 = [3 x i8] c"A2\00"
@.str.3 = [3 x i8] c"A1\00"
@.str.4 = [3 x i8] c"A0\00"
@.str.5 = [4 x i8] c"A4l\00"
@.str.6 = [4 x i8] c"A3l\00"
@.str.7 = [4 x i8] c"A2l\00"
@.str.8 = [4 x i8] c"A1l\00"
@.str.9 = [4 x i8] c"A0l\00"
define i32 @hpgs_parse_papersize(i8* %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
%8 = alloca i8*
%9 = alloca [32 x i8]
%10 = alloca i32
store i8* %0, i8** %5
store double* %1, double** %6
store double* %2, double** %7
%11 = load i8*, i8** %5
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = load double*, double** %6
store double 0x40829F49695794D3, double* %15
%16 = load double*, double** %7
store double 0x408A55F62B3652A2, double* %16
br label %129
17: ; preds = %3
%18 = load i8*, i8** %5
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load double*, double** %6
store double 0x408A55F62B3652A2, double* %22
%23 = load double*, double** %7
store double 0x40929F49695794D3, double* %23
br label %128
24: ; preds = %17
%25 = load i8*, i8** %5
%26 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %24
%29 = load double*, double** %6
store double 0x40929F49695794D3, double* %29
%30 = load double*, double** %7
store double 0x409A55F62B3652A2, double* %30
br label %127
31: ; preds = %24
%32 = load i8*, i8** %5
%33 = call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %31
%36 = load double*, double** %6
store double 0x409A55F62B3652A2, double* %36
%37 = load double*, double** %7
store double 0x40A29F49695794D3, double* %37
br label %126
38: ; preds = %31
%39 = load i8*, i8** %5
%40 = call i64 @strcmp(i8* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %45
42: ; preds = %38
%43 = load double*, double** %6
store double 0x40A29F49695794D3, double* %43
%44 = load double*, double** %7
store double 0x40AA55F62B3652A2, double* %44
br label %125
45: ; preds = %38
%46 = load i8*, i8** %5
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %52
49: ; preds = %45
%50 = load double*, double** %7
store double 0x40829F49695794D3, double* %50
%51 = load double*, double** %6
store double 0x408A55F62B3652A2, double* %51
br label %124
52: ; preds = %45
%53 = load i8*, i8** %5
%54 = call i64 @strcmp(i8* %53, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %59
56: ; preds = %52
%57 = load double*, double** %7
store double 0x408A55F62B3652A2, double* %57
%58 = load double*, double** %6
store double 0x40929F49695794D3, double* %58
br label %123
59: ; preds = %52
%60 = load i8*, i8** %5
%61 = call i64 @strcmp(i8* %60, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %59
%64 = load double*, double** %7
store double 0x40929F49695794D3, double* %64
%65 = load double*, double** %6
store double 0x409A55F62B3652A2, double* %65
br label %122
66: ; preds = %59
%67 = load i8*, i8** %5
%68 = call i64 @strcmp(i8* %67, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %73
70: ; preds = %66
%71 = load double*, double** %7
store double 0x409A55F62B3652A2, double* %71
%72 = load double*, double** %6
store double 0x40A29F49695794D3, double* %72
br label %121
73: ; preds = %66
%74 = load i8*, i8** %5
%75 = call i64 @strcmp(i8* %74, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %80
77: ; preds = %73
%78 = load double*, double** %7
store double 0x40A29F49695794D3, double* %78
%79 = load double*, double** %6
store double 0x40AA55F62B3652A2, double* %79
br label %120
80: ; preds = %73
%81 = load i8*, i8** %5
%82 = call i8* @strchr(i8* %81, i8 signext 120)
store i8* %82, i8** %8
%83 = load i8*, i8** %8
%84 = icmp ne i8* %83, null
br i1 %84, label %86, label %85
85: ; preds = %80
store i32 -1, i32* %4
br label %130
86: ; preds = %80
%87 = load i8*, i8** %8
%88 = load i8*, i8** %5
%89 = ptrtoint i8* %87 to i64
%90 = ptrtoint i8* %88 to i64
%91 = sub i64 %89, %90
%92 = trunc i64 %91 to i32
store i32 %92, i32* %10
%93 = load i32, i32* %10
%94 = icmp sgt i32 %93, 31
br i1 %94, label %95, label %96
95: ; preds = %86
store i32 -1, i32* %4
br label %130
96: ; preds = %86
%97 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%98 = load i8*, i8** %5
%99 = load i32, i32* %10
%100 = call i32 @strncpy(i8* %97, i8* %98, i32 %99)
%101 = load i32, i32* %10
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 %102
store i8 0, i8* %103
%104 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%105 = load double*, double** %6
%106 = call i64 @hpgs_parse_length(i8* %104, double* %105)
%107 = icmp ne i64 %106, 0
br i1 %107, label %108, label %109
108: ; preds = %96
store i32 -1, i32* %4
br label %130
109: ; preds = %96
%110 = load i8*, i8** %5
%111 = load i32, i32* %10
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i8, i8* %110, i64 %112
%114 = getelementptr inbounds i8, i8* %113, i64 1
%115 = load double*, double** %7
%116 = call i64 @hpgs_parse_length(i8* %114, double* %115)
%117 = icmp ne i64 %116, 0
br i1 %117, label %118, label %119
118: ; preds = %109
store i32 -1, i32* %4
br label %130
119: ; preds = %109
br label %120
120: ; preds = %119, %77
br label %121
121: ; preds = %120, %70
br label %122
122: ; preds = %121, %63
br label %123
123: ; preds = %122, %56
br label %124
124: ; preds = %123, %49
br label %125
125: ; preds = %124, %42
br label %126
126: ; preds = %125, %35
br label %127
127: ; preds = %126, %28
br label %128
128: ; preds = %127, %21
br label %129
129: ; preds = %128, %14
store i32 0, i32* %4
br label %130
130: ; preds = %129, %118, %108, %95, %85
%131 = load i32, i32* %4
ret i32 %131
}

LLVM IR (-O2):
@.str = [3 x i8] c"A4\00"
@.str.1 = [3 x i8] c"A3\00"
@.str.2 = [3 x i8] c"A2\00"
@.str.3 = [3 x i8] c"A1\00"
@.str.4 = [3 x i8] c"A0\00"
@.str.5 = [4 x i8] c"A4l\00"
@.str.6 = [4 x i8] c"A3l\00"
@.str.7 = [4 x i8] c"A2l\00"
@.str.8 = [4 x i8] c"A1l\00"
@.str.9 = [4 x i8] c"A0l\00"
define i32 @hpgs_parse_papersize(i8* %0, double* %1, double* %2) {
%4 = alloca [32 x i8]
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
store double 0x40829F49695794D3, double* %1
store double 0x408A55F62B3652A2, double* %2
br label %68
8: ; preds = %3
%9 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8
store double 0x408A55F62B3652A2, double* %1
store double 0x40929F49695794D3, double* %2
br label %68
12: ; preds = %8
%13 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
store double 0x40929F49695794D3, double* %1
store double 0x409A55F62B3652A2, double* %2
br label %68
16: ; preds = %12
%17 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %16
store double 0x409A55F62B3652A2, double* %1
store double 0x40A29F49695794D3, double* %2
br label %68
20: ; preds = %16
%21 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %20
store double 0x40A29F49695794D3, double* %1
store double 0x40AA55F62B3652A2, double* %2
br label %68
24: ; preds = %20
%25 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %24
store double 0x40829F49695794D3, double* %2
store double 0x408A55F62B3652A2, double* %1
br label %68
28: ; preds = %24
%29 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %28
store double 0x408A55F62B3652A2, double* %2
store double 0x40929F49695794D3, double* %1
br label %68
32: ; preds = %28
%33 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %32
store double 0x40929F49695794D3, double* %2
store double 0x409A55F62B3652A2, double* %1
br label %68
36: ; preds = %32
%37 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %36
store double 0x409A55F62B3652A2, double* %2
store double 0x40A29F49695794D3, double* %1
br label %68
40: ; preds = %36
%41 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %44
43: ; preds = %40
store double 0x40A29F49695794D3, double* %2
store double 0x40AA55F62B3652A2, double* %1
br label %68
44: ; preds = %40
%45 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 120)
%46 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%47 = icmp eq i8* %45, null
br i1 %47, label %66, label %48
48: ; preds = %44
%49 = ptrtoint i8* %45 to i64
%50 = ptrtoint i8* %0 to i64
%51 = sub i64 %49, %50
%52 = trunc i64 %51 to i32
%53 = icmp sgt i32 %52, 31
br i1 %53, label %66, label %54
54: ; preds = %48
%55 = call i32 @strncpy(i8* %46, i8* %0, i32 %52)
%56 = shl i64 %51, 32
%57 = ashr exact i64 %56, 32
%58 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 %57
store i8 0, i8* %58
%59 = call i64 @hpgs_parse_length(i8* %46, double* %1)
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %66
61: ; preds = %54
%62 = getelementptr inbounds i8, i8* %0, i64 %57
%63 = getelementptr inbounds i8, i8* %62, i64 1
%64 = call i64 @hpgs_parse_length(i8* %63, double* %2)
%65 = icmp eq i64 %64, 0
br i1 %65, label %67, label %66
66: ; preds = %44, %48, %54, %61
br label %68
67: ; preds = %61
br label %68
68: ; preds = %7, %15, %23, %31, %39, %43, %35, %27, %19, %11, %67, %66
%69 = phi i32 [ -1, %66 ], [ 0, %67 ], [ 0, %11 ], [ 0, %19 ], [ 0, %27 ], [ 0, %35 ], [ 0, %43 ], [ 0, %39 ], [ 0, %31 ], [ 0, %23 ], [ 0, %15 ], [ 0, %7 ]
ret i32 %69
}