#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__ exit_alt_charset_mode;
scalar_t__ exit_attribute_mode;
int /*<<< orphan*/ min_putp(scalar_t__);
int unset() {
  int ret = 0;
  if (exit_alt_charset_mode) {
    min_putp(exit_alt_charset_mode);
  } else
    ret |= 1;
  if (exit_attribute_mode) {
    min_putp(exit_attribute_mode);
    min_putp(exit_alt_charset_mode);
    return ret;
  } else
    return 1;
}


x86 assembly (clang, -O0):
<unset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    0x2eb2(%rip),%rax
cmpq   $0x0,(%rax)
je     1144 <unset+0x34>
mov    0x2ea1(%rip),%rax
mov    (%rax),%rdi
call   1030 <min_putp@plt>
jmp    114d <unset+0x3d>
mov    -0x8(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    0x2e8c(%rip),%rax
cmpq   $0x0,(%rax)
je     1187 <unset+0x77>
mov    0x2e7b(%rip),%rax
mov    (%rax),%rdi
call   1030 <min_putp@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%rdi
call   1030 <min_putp@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    118e <unset+0x7e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unset>:
push   %rbp
push   %r14
push   %rbx
mov    0x2ebd(%rip),%r14
mov    (%r14),%rdi
mov    $0x1,%ebx
mov    $0x1,%ebp
test   %rdi,%rdi
je     1134 <unset+0x24>
call   1030 <min_putp@plt>
xor    %ebp,%ebp
mov    0x2ea5(%rip),%rax
mov    (%rax),%rdi
test   %rdi,%rdi
je     1152 <unset+0x42>
call   1030 <min_putp@plt>
mov    (%r14),%rdi
call   1030 <min_putp@plt>
mov    %ebp,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@exit_alt_charset_mode = global i64 0
@exit_attribute_mode = global i64 0
define i32 @unset() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
%3 = load i64, i64* @exit_alt_charset_mode
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i64, i64* @exit_alt_charset_mode
%7 = call i32 @min_putp(i64 %6)
br label %11
8: ; preds = %0
%9 = load i32, i32* %2
%10 = or i32 %9, 1
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %5
%12 = load i64, i64* @exit_attribute_mode
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = load i64, i64* @exit_attribute_mode
%16 = call i32 @min_putp(i64 %15)
%17 = load i64, i64* @exit_alt_charset_mode
%18 = call i32 @min_putp(i64 %17)
%19 = load i32, i32* %2
store i32 %19, i32* %1
br label %21
20: ; preds = %11
store i32 1, i32* %1
br label %21
21: ; preds = %20, %14
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@exit_alt_charset_mode = global i64 0
@exit_attribute_mode = global i64 0
define i32 @unset() {
%1 = load i64, i64* @exit_alt_charset_mode
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @min_putp(i64 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ 0, %3 ], [ 1, %0 ]
%7 = load i64, i64* @exit_attribute_mode
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = tail call i32 @min_putp(i64 %7)
%11 = load i64, i64* @exit_alt_charset_mode
%12 = tail call i32 @min_putp(i64 %11)
br label %13
13: ; preds = %5, %9
%14 = phi i32 [ %6, %9 ], [ 1, %5 ]
ret i32 %14
}