#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ set_and_check(char *, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  char *license = "http://creativecommons.org/licenses/by-nd/2.0/";
  char *response;
  int status;
  (void)argc;
  (void)argv;
  printf(
      "Warning: this test will overwrite system-wide defaults if run."
      "To stop hit control-C (Control-Break on Windows).  You have 3 seconds."
      "\n\n");
  fflush(stdout);
  sleep(3);
  set_and_check(license, license);
  set_and_check("", NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x3,%edi
call   1060 <sleep@plt>
mov    -0x18(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <set_and_check@plt>
lea    0xf1c(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <set_and_check@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee7(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x3,%edi
call   1060 <sleep@plt>
lea    0xe94(%rip),%rdi
mov    %rdi,%rsi
call   1030 <set_and_check@plt>
lea    0xf39(%rip),%rdi
xor    %esi,%esi
call   1030 <set_and_check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"http://creativecommons.org/licenses/by-nd/2.0/\00"
@.str.1 = [135 x i8] c"Warning: this test will overwrite system-wide defaults if run.To stop hit control-C (Control-Break on Windows). You have 3 seconds.\0A\0A\00"
@stdout = global i32 0
@.str.2 = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8** %6
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @printf(i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = call i32 @fflush(i32 %12)
%14 = call i32 @sleep(i32 3)
%15 = load i8*, i8** %6
%16 = load i8*, i8** %6
%17 = call i32 @set_and_check(i8* %15, i8* %16)
%18 = call i32 @set_and_check(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"http://creativecommons.org/licenses/by-nd/2.0/\00"
@stdout = global i32 0
@.str.2 = [1 x i8] zeroinitializer
@str = [134 x i8] c"Warning: this test will overwrite system-wide defaults if run.To stop hit control-C (Control-Break on Windows). You have 3 seconds.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([134 x i8], [134 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call i32 @sleep(i32 3)
%7 = tail call i32 @set_and_check(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @set_and_check(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* null)
ret i32 0
}