#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 */
char *form_set_post_change_javascript_row_zero(char *);
int /*<<< orphan*/ printf(char *, ...);
void form_output_prompt_insert_reset_button(
    char *reset_post_change_javascript) {
  printf("<td><input type=button value=\"Reset\" "
         "onClick=\"form_reset(document.forms[0], '%c')",
         '|');
  if (reset_post_change_javascript && *reset_post_change_javascript) {
    printf(";%s;", form_set_post_change_javascript_row_zero(
                       reset_post_change_javascript));
  }
  printf("\">\n");
}


x86 assembly (clang, -O0):
<form_output_prompt_insert_reset_button>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x7c,%esi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
je     1174 <form_output_prompt_insert_reset_button+0x54>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1174 <form_output_prompt_insert_reset_button+0x54>
mov    -0x8(%rbp),%rdi
call   1040 <form_set_post_change_javascript_row_zero@plt>
mov    %rax,%rsi
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<form_output_prompt_insert_reset_button>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    $0x7c,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %rbx,%rbx
je     116a <form_output_prompt_insert_reset_button+0x3a>
cmpb   $0x0,(%rbx)
je     116a <form_output_prompt_insert_reset_button+0x3a>
mov    %rbx,%rdi
call   1050 <form_set_post_change_javascript_row_zero@plt>
lea    0xef2(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee6(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [82 x i8] c"<td><input type=button value=\22Reset\22 onClick=\22form_reset(document.forms[0], '%c')\00"
@.str.1 = [5 x i8] c";%s;\00"
@.str.2 = [4 x i8] c"\22>\0A\00"
define void @form_output_prompt_insert_reset_button(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i32 124)
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %6
%12 = load i8*, i8** %2
%13 = call i8* @form_set_post_change_javascript_row_zero(i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %11, %6, %1
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [82 x i8] c"<td><input type=button value=\22Reset\22 onClick=\22form_reset(document.forms[0], '%c')\00"
@.str.1 = [5 x i8] c";%s;\00"
@str = [3 x i8] c"\22>\00"
define void @form_output_prompt_insert_reset_button(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i32 124)
%3 = icmp eq i8* %0, null
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i8* @form_set_post_change_javascript_row_zero(i8* %0)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %4, %1
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}