#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__ piece(char *, char, char *, int);
int /*<<< orphan*/ printf(char *, char *, char *);
void output_dictionary_string_as_hidden(char *dictionary_string) {
  char pair_string[4096];
  char attribute[2048];
  char data[2048];
  int i;
  for (i = 0; piece(pair_string, '&', dictionary_string, i); i++) {
    piece(attribute, '=', pair_string, 0);
    if (piece(data, '=', pair_string, 1)) {
      printf("<input type=\"hidden\"	name=\"%s\" value=\"%s\">\n", attribute,
             data);
    }
  }
}


x86 assembly (clang, -O0):
<output_dictionary_string_as_hidden>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2020,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x2014(%rbp)
lea    -0x1010(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x2014(%rbp),%ecx
mov    $0x26,%esi
call   1040 <piece@plt>
cmp    $0x0,%rax
je     11d2 <output_dictionary_string_as_hidden+0xb2>
lea    -0x1810(%rbp),%rdi
lea    -0x1010(%rbp),%rdx
mov    $0x3d,%esi
xor    %ecx,%ecx
call   1040 <piece@plt>
lea    -0x2010(%rbp),%rdi
lea    -0x1010(%rbp),%rdx
mov    $0x3d,%esi
mov    $0x1,%ecx
call   1040 <piece@plt>
cmp    $0x0,%rax
je     11b9 <output_dictionary_string_as_hidden+0x99>
lea    -0x1810(%rbp),%rsi
lea    -0x2010(%rbp),%rdx
lea    0xe4c(%rip),%rdi
call   1030 <printf@plt>
jmp    11be <output_dictionary_string_as_hidden+0x9e>
mov    -0x2014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2014(%rbp)
jmp    1139 <output_dictionary_string_as_hidden+0x19>
add    $0x2020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_dictionary_string_as_hidden>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2008,%rsp
mov    %rdi,%r15
lea    0x1000(%rsp),%rdi
mov    $0x26,%esi
mov    %r15,%rdx
xor    %ecx,%ecx
call   1040 <piece@plt>
test   %rax,%rax
je     11d6 <output_dictionary_string_as_hidden+0xb6>
mov    $0x1,%ebp
lea    0x800(%rsp),%r14
lea    0x1000(%rsp),%rbx
mov    %rsp,%r12
lea    0xe8d(%rip),%r13
jmp    119a <output_dictionary_string_as_hidden+0x7a>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    $0x26,%esi
mov    %r15,%rdx
mov    %ebp,%ecx
call   1040 <piece@plt>
add    $0x1,%ebp
test   %rax,%rax
je     11d6 <output_dictionary_string_as_hidden+0xb6>
mov    %r14,%rdi
mov    $0x3d,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
call   1040 <piece@plt>
mov    %r12,%rdi
mov    $0x3d,%esi
mov    %rbx,%rdx
mov    $0x1,%ecx
call   1040 <piece@plt>
test   %rax,%rax
je     1180 <output_dictionary_string_as_hidden+0x60>
mov    %r13,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
call   1030 <printf@plt>
jmp    1180 <output_dictionary_string_as_hidden+0x60>
add    $0x2008,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [44 x i8] c"<input type=\22hidden\22\09name=\22%s\22 value=\22%s\22>\0A\00"
define void @output_dictionary_string_as_hidden(i8* %0) {
%2 = alloca i8*
%3 = alloca [4096 x i8]
%4 = alloca [2048 x i8]
%5 = alloca [2048 x i8]
%6 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %6
br label %7
7: ; preds = %26, %1
%8 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%9 = load i8*, i8** %2
%10 = load i32, i32* %6
%11 = call i64 @piece(i8* %8, i8 signext 38, i8* %9, i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %29
13: ; preds = %7
%14 = getelementptr inbounds [2048 x i8], [2048 x i8]* %4, i64 0, i64 0
%15 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%16 = call i64 @piece(i8* %14, i8 signext 61, i8* %15, i32 0)
%17 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%18 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%19 = call i64 @piece(i8* %17, i8 signext 61, i8* %18, i32 1)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %25
21: ; preds = %13
%22 = getelementptr inbounds [2048 x i8], [2048 x i8]* %4, i64 0, i64 0
%23 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%24 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %22, i8* %23)
br label %25
25: ; preds = %21, %13
br label %26
26: ; preds = %25
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
br label %7
29: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"<input type=\22hidden\22\09name=\22%s\22 value=\22%s\22>\0A\00"
define void @output_dictionary_string_as_hidden(i8* %0) {
%2 = alloca [4096 x i8]
%3 = alloca [2048 x i8]
%4 = alloca [2048 x i8]
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [2048 x i8], [2048 x i8]* %4, i64 0, i64 0
%8 = call i64 @piece(i8* %5, i8 signext 38, i8* %0, i32 0)
%9 = icmp eq i64 %8, 0
br i1 %9, label %21, label %10
10: ; preds = %1, %17
%11 = phi i32 [ %18, %17 ], [ 0, %1 ]
%12 = call i64 @piece(i8* %6, i8 signext 61, i8* %5, i32 0)
%13 = call i64 @piece(i8* %7, i8 signext 61, i8* %5, i32 1)
%14 = icmp eq i64 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %10
%16 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
br label %17
17: ; preds = %10, %15
%18 = add nuw nsw i32 %11, 1
%19 = call i64 @piece(i8* %5, i8 signext 38, i8* %0, i32 %18)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %10
21: ; preds = %17, %1
ret void
}