#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 */
int /*<<< orphan*/ nan_array(double *, int);
int sscanf(char *, char *, char *, double *, double *, double *, double *,
           double *, double *, double *, double *, double *, double *, double *,
           double *, double *, double *, double *, double *, double *, double *,
           double *, double *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int get_xml_tagged_list(double *x, char *tag, char *line) {
  char buf[0x100], buf2[0x100];
  nan_array(x, 20);
  int r = sscanf(line,
                 " <%[^>]>%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf"
                 "%lf %lf %lf %lf %lf %lf %lf %lf %lf</%[^>]>",
                 buf, x, x + 1, x + 2, x + 3, x + 4, x + 5, x + 6, x + 7, x + 8,
                 x + 9, x + 10, x + 11, x + 12, x + 13, x + 14, x + 15, x + 16,
                 x + 17, x + 18, x + 19, buf2);
  strcpy(tag, buf);
  return r;
}


x86 assembly (clang, -O0):
<get_xml_tagged_list>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x308,%rsp
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x14,%esi
call   1040 <nan_array@plt>
mov    -0x40(%rbp),%rdi
lea    -0x140(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x30(%rbp),%r8
add    $0x8,%r8
mov    -0x30(%rbp),%r9
add    $0x10,%r9
mov    -0x30(%rbp),%rax
add    $0x18,%rax
mov    -0x30(%rbp),%rsi
add    $0x20,%rsi
mov    %rsi,-0x298(%rbp)
mov    -0x30(%rbp),%rsi
add    $0x28,%rsi
mov    %rsi,-0x290(%rbp)
mov    -0x30(%rbp),%rsi
add    $0x30,%rsi
mov    %rsi,-0x288(%rbp)
mov    -0x30(%rbp),%rsi
add    $0x38,%rsi
mov    %rsi,-0x280(%rbp)
mov    -0x30(%rbp),%rsi
add    $0x40,%rsi
mov    %rsi,-0x278(%rbp)
mov    -0x30(%rbp),%rsi
add    $0x48,%rsi
mov    %rsi,-0x270(%rbp)
mov    -0x30(%rbp),%rsi
add    $0x50,%rsi
mov    %rsi,-0x268(%rbp)
mov    -0x30(%rbp),%rsi
add    $0x58,%rsi
mov    %rsi,-0x260(%rbp)
mov    -0x30(%rbp),%rsi
add    $0x60,%rsi
mov    %rsi,-0x258(%rbp)
mov    -0x30(%rbp),%r13
add    $0x68,%r13
mov    -0x30(%rbp),%r12
add    $0x70,%r12
mov    -0x30(%rbp),%r15
add    $0x78,%r15
mov    -0x30(%rbp),%r14
add    $0x80,%r14
mov    -0x30(%rbp),%rbx
add    $0x88,%rbx
mov    -0x30(%rbp),%r11
add    $0x90,%r11
mov    -0x30(%rbp),%r10
add    $0x98,%r10
lea    -0x240(%rbp),%rsi
mov    %rsi,-0x250(%rbp)
lea    0xd9b(%rip),%rsi
mov    %rax,(%rsp)
mov    -0x298(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x290(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x288(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0x280(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0x278(%rbp),%rax
mov    %rax,0x28(%rsp)
mov    -0x270(%rbp),%rax
mov    %rax,0x30(%rsp)
mov    -0x268(%rbp),%rax
mov    %rax,0x38(%rsp)
mov    -0x260(%rbp),%rax
mov    %rax,0x40(%rsp)
mov    -0x258(%rbp),%rax
mov    %rax,0x48(%rsp)
mov    -0x250(%rbp),%rax
mov    %r13,0x50(%rsp)
mov    %r12,0x58(%rsp)
mov    %r15,0x60(%rsp)
mov    %r14,0x68(%rsp)
mov    %rbx,0x70(%rsp)
mov    %r11,0x78(%rsp)
mov    %r10,0x80(%rsp)
mov    %rax,0x88(%rsp)
call   1050 <sscanf@plt>
mov    %eax,-0x244(%rbp)
mov    -0x38(%rbp),%rdi
lea    -0x140(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x244(%rbp),%eax
add    $0x308,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_xml_tagged_list>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x268,%rsp
mov    %rdx,%r12
mov    %rsi,0x58(%rsp)
mov    %rdi,%rbx
mov    $0x14,%esi
call   1040 <nan_array@plt>
lea    0x8(%rbx),%r8
lea    0x10(%rbx),%r9
lea    0x18(%rbx),%rax
mov    %rax,0x50(%rsp)
lea    0x20(%rbx),%rax
mov    %rax,0x48(%rsp)
lea    0x28(%rbx),%rax
mov    %rax,0x40(%rsp)
lea    0x30(%rbx),%rax
mov    %rax,0x38(%rsp)
lea    0x38(%rbx),%rax
mov    %rax,0x30(%rsp)
lea    0x40(%rbx),%rax
mov    %rax,0x28(%rsp)
lea    0x48(%rbx),%rax
mov    %rax,0x20(%rsp)
lea    0x50(%rbx),%rax
mov    %rax,0x18(%rsp)
lea    0x58(%rbx),%rax
mov    %rax,0x10(%rsp)
lea    0x60(%rbx),%rax
mov    %rax,0x8(%rsp)
lea    0x68(%rbx),%rax
lea    0x70(%rbx),%rbp
lea    0x78(%rbx),%r14
lea    0x80(%rbx),%r15
lea    0x88(%rbx),%r10
lea    0x90(%rbx),%r11
lea    0x98(%rbx),%r13
lea    0xe19(%rip),%rsi
lea    0x160(%rsp),%rdx
mov    %r12,%rdi
mov    %rdx,%r12
mov    %rbx,%rcx
lea    0x60(%rsp),%rbx
push   %rbx
push   %r13
push   %r11
push   %r10
push   %r15
push   %r14
push   %rbp
push   %rax
push   0x48(%rsp)
push   0x58(%rsp)
push   0x68(%rsp)
push   0x78(%rsp)
push   0x88(%rsp)
push   0x98(%rsp)
push   0xa8(%rsp)
push   0xb8(%rsp)
push   0xc8(%rsp)
push   0xd8(%rsp)
call   1050 <sscanf@plt>
add    $0x90,%rsp
mov    %eax,%ebx
mov    0x58(%rsp),%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    %ebx,%eax
add    $0x268,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [95 x i8] c" <%[^>]>%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf%lf %lf %lf %lf %lf %lf %lf %lf %lf</%[^>]>\00"
define i32 @get_xml_tagged_list(double* %0, i8* %1, i8* %2) {
%4 = alloca double*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [256 x i8]
%8 = alloca [256 x i8]
%9 = alloca i32
store double* %0, double** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%10 = load double*, double** %4
%11 = call i32 @nan_array(double* %10, i32 20)
%12 = load i8*, i8** %6
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%14 = load double*, double** %4
%15 = load double*, double** %4
%16 = getelementptr inbounds double, double* %15, i64 1
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i64 3
%21 = load double*, double** %4
%22 = getelementptr inbounds double, double* %21, i64 4
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 5
%25 = load double*, double** %4
%26 = getelementptr inbounds double, double* %25, i64 6
%27 = load double*, double** %4
%28 = getelementptr inbounds double, double* %27, i64 7
%29 = load double*, double** %4
%30 = getelementptr inbounds double, double* %29, i64 8
%31 = load double*, double** %4
%32 = getelementptr inbounds double, double* %31, i64 9
%33 = load double*, double** %4
%34 = getelementptr inbounds double, double* %33, i64 10
%35 = load double*, double** %4
%36 = getelementptr inbounds double, double* %35, i64 11
%37 = load double*, double** %4
%38 = getelementptr inbounds double, double* %37, i64 12
%39 = load double*, double** %4
%40 = getelementptr inbounds double, double* %39, i64 13
%41 = load double*, double** %4
%42 = getelementptr inbounds double, double* %41, i64 14
%43 = load double*, double** %4
%44 = getelementptr inbounds double, double* %43, i64 15
%45 = load double*, double** %4
%46 = getelementptr inbounds double, double* %45, i64 16
%47 = load double*, double** %4
%48 = getelementptr inbounds double, double* %47, i64 17
%49 = load double*, double** %4
%50 = getelementptr inbounds double, double* %49, i64 18
%51 = load double*, double** %4
%52 = getelementptr inbounds double, double* %51, i64 19
%53 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%54 = call i32 @sscanf(i8* %12, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i8* %13, double* %14, double* %16, double* %18, double* %20, double* %22, double* %24, double* %26, double* %28, double* %30, double* %32, double* %34, double* %36, double* %38, double* %40, double* %42, double* %44, double* %46, double* %48, double* %50, double* %52, i8* %53)
store i32 %54, i32* %9
%55 = load i8*, i8** %5
%56 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%57 = call i32 @strcpy(i8* %55, i8* %56)
%58 = load i32, i32* %9
ret i32 %58
}

LLVM IR (-O2):
@.str = [95 x i8] c" <%[^>]>%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf%lf %lf %lf %lf %lf %lf %lf %lf %lf</%[^>]>\00"
define i32 @get_xml_tagged_list(double* %0, i8* %1, i8* nocapture %2) {
%4 = alloca [256 x i8]
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%8 = tail call i32 @nan_array(double* %0, i32 20)
%9 = getelementptr inbounds double, double* %0, i64 1
%10 = getelementptr inbounds double, double* %0, i64 2
%11 = getelementptr inbounds double, double* %0, i64 3
%12 = getelementptr inbounds double, double* %0, i64 4
%13 = getelementptr inbounds double, double* %0, i64 5
%14 = getelementptr inbounds double, double* %0, i64 6
%15 = getelementptr inbounds double, double* %0, i64 7
%16 = getelementptr inbounds double, double* %0, i64 8
%17 = getelementptr inbounds double, double* %0, i64 9
%18 = getelementptr inbounds double, double* %0, i64 10
%19 = getelementptr inbounds double, double* %0, i64 11
%20 = getelementptr inbounds double, double* %0, i64 12
%21 = getelementptr inbounds double, double* %0, i64 13
%22 = getelementptr inbounds double, double* %0, i64 14
%23 = getelementptr inbounds double, double* %0, i64 15
%24 = getelementptr inbounds double, double* %0, i64 16
%25 = getelementptr inbounds double, double* %0, i64 17
%26 = getelementptr inbounds double, double* %0, i64 18
%27 = getelementptr inbounds double, double* %0, i64 19
%28 = call i32 @sscanf(i8* %2, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i8* %6, double* %0, double* %9, double* %10, double* %11, double* %12, double* %13, double* %14, double* %15, double* %16, double* %17, double* %18, double* %19, double* %20, double* %21, double* %22, double* %23, double* %24, double* %25, double* %26, double* %27, i8* %7)
%29 = call i32 @strcpy(i8* %1, i8* %6)
ret i32 %28
}