#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 */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  scalar_t__ type;
};
typedef TYPE_1__ ASN1_GENERALIZEDTIME;

/* Variables and functions */
int ASN1_TIME_set_string_internal(TYPE_1__ *, char const *, scalar_t__);
scalar_t__ V_ASN1_GENERALIZEDTIME;
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str) {
  if (s != NULL && s->type != V_ASN1_GENERALIZEDTIME)
    return (0);
  return (ASN1_TIME_set_string_internal(s, str, V_ASN1_GENERALIZEDTIME));
}


x86 assembly (clang, -O0):
<ASN1_GENERALIZEDTIME_set_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114e <ASN1_GENERALIZEDTIME_set_string+0x3e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%rax
je     114e <ASN1_GENERALIZEDTIME_set_string+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1168 <ASN1_GENERALIZEDTIME_set_string+0x58>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2e8b(%rip),%rax
mov    (%rax),%rdx
call   1030 <ASN1_TIME_set_string_internal@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_GENERALIZEDTIME_set_string>:
test   %rdi,%rdi
je     1127 <ASN1_GENERALIZEDTIME_set_string+0x17>
mov    (%rdi),%rdx
mov    0x2ec9(%rip),%rax
cmp    (%rax),%rdx
je     1131 <ASN1_GENERALIZEDTIME_set_string+0x21>
xor    %eax,%eax
ret
mov    0x2eba(%rip),%rax
mov    (%rax),%rdx
jmp    1030 <ASN1_TIME_set_string_internal@plt>

LLVM IR (-O0):
%struct.TYPE_4__ = type { i64 }
@V_ASN1_GENERALIZEDTIME = global i64 0
define i32 @ASN1_GENERALIZEDTIME_set_string(%struct.TYPE_4__* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.TYPE_4__*
%5 = alloca i8*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %4
store i8* %1, i8** %5
%6 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%7 = icmp ne %struct.TYPE_4__* %6, null
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%10 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %9, i32 0, i32 0
%11 = load i64, i64* %10
%12 = load i64, i64* @V_ASN1_GENERALIZEDTIME
%13 = icmp ne i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %8
store i32 0, i32* %3
br label %20
15: ; preds = %8, %2
%16 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%17 = load i8*, i8** %5
%18 = load i64, i64* @V_ASN1_GENERALIZEDTIME
%19 = call i32 @ASN1_TIME_set_string_internal(%struct.TYPE_4__* %16, i8* %17, i64 %18)
store i32 %19, i32* %3
br label %20
20: ; preds = %15, %14
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i64 }
@V_ASN1_GENERALIZEDTIME = global i64 0
define i32 @ASN1_GENERALIZEDTIME_set_string(%struct.TYPE_4__* %0, i8* %1) {
%3 = icmp eq %struct.TYPE_4__* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = load i64, i64* @V_ASN1_GENERALIZEDTIME
br label %11
6: ; preds = %2
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%8 = load i64, i64* %7
%9 = load i64, i64* @V_ASN1_GENERALIZEDTIME
%10 = icmp eq i64 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %4, %6
%12 = phi i64 [ %5, %4 ], [ %8, %6 ]
%13 = tail call i32 @ASN1_TIME_set_string_internal(%struct.TYPE_4__* %0, i8* %1, i64 %12)
br label %14
14: ; preds = %6, %11
%15 = phi i32 [ %13, %11 ], [ 0, %6 ]
ret i32 %15
}